mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-09 19:09:41 +00:00
gst/gst.c: fix docs. popt is death, long live GOption.
Original commit message from CVS: * gst/gst.c: fix docs. popt is death, long live GOption.
This commit is contained in:
parent
45a69909bc
commit
f06f22ef8d
2 changed files with 20 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-11-01 Luca Ognibene <luogni@tin.it>
|
||||
|
||||
* gst/gst.c:
|
||||
fix docs. popt is death, long live GOption.
|
||||
|
||||
2005-10-31 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstbuffer.h:
|
||||
|
|
24
gst/gst.c
24
gst/gst.c
|
@ -62,7 +62,7 @@
|
|||
* It's allowed to pass two NULL pointers to gst_init() in case you don't want
|
||||
* to pass the command line args to GStreamer.
|
||||
*
|
||||
* You can also use a popt table to initialize your own parameters as shown in
|
||||
* You can also use GOption to initialize your own parameters as shown in
|
||||
* the next code fragment:
|
||||
* <example>
|
||||
* <title>Initializing own parameters when initializing gstreamer</title>
|
||||
|
@ -72,14 +72,20 @@
|
|||
* int
|
||||
* main (int argc, char *argv[])
|
||||
* {
|
||||
* struct poptOption options[] = {
|
||||
* { "stats", 's', POPT_ARG_NONE|POPT_ARGFLAG_STRIP, &stats, 0,
|
||||
* "Show pad stats", NULL},
|
||||
* POPT_TABLEEND
|
||||
* };
|
||||
* // initialize the GStreamer library
|
||||
* gst_init_with_popt_table (&argc, &argv, options);
|
||||
* ...
|
||||
* GOptionEntry options[] = {
|
||||
* {"tags", 't', 0, G_OPTION_ARG_NONE, &tags,
|
||||
* N_("Output tags (also known as metadata)"), NULL},
|
||||
* {NULL}
|
||||
* };
|
||||
* ctx = g_option_context_new ("gst-launch");
|
||||
* g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE);
|
||||
* g_option_context_add_group (ctx, gst_init_get_option_group ());
|
||||
* if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
|
||||
* g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
|
||||
* exit (1);
|
||||
* }
|
||||
* g_option_context_free (ctx);
|
||||
* ...
|
||||
* }
|
||||
* </programlisting>
|
||||
* </example>
|
||||
|
|
Loading…
Reference in a new issue