diff --git a/ChangeLog b/ChangeLog index d039e52adf..1b5ba355bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-01 Luca Ognibene + + * gst/gst.c: + fix docs. popt is death, long live GOption. + 2005-10-31 Wim Taymans * gst/gstbuffer.h: diff --git a/gst/gst.c b/gst/gst.c index 740b788491..3e52476a01 100644 --- a/gst/gst.c +++ b/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: * * Initializing own parameters when initializing gstreamer @@ -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); + * ... * } * *