diff options
author | Philip Jägenstedt <philipj@opera.com> | 2009-07-08 15:15:04 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-08 15:15:04 +0200 |
commit | 9501767704f5baa180db20270af04b1b657a3a32 (patch) | |
tree | d7d916568700c7b29cbb1f0d74cb61e756a51e29 | |
parent | 5f6bfb816ba0cf6da53c92b152d70fbd329edbc3 (diff) |
tools: Fix compilation if option parsing is disabled
Fixes bug #587976.
-rw-r--r-- | tools/gst-inspect.c | 6 | ||||
-rw-r--r-- | tools/gst-launch.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 4cfebc76f3..c879c7622b 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -1403,6 +1403,7 @@ main (int argc, char *argv[]) gboolean plugin_name = FALSE; gboolean print_aii = FALSE; gboolean uri_handlers = FALSE; +#ifndef GST_DISABLE_OPTION_PARSING GOptionEntry options[] = { {"print-all", 'a', 0, G_OPTION_ARG_NONE, &print_all, N_("Print all elements"), NULL}, @@ -1422,6 +1423,7 @@ main (int argc, char *argv[]) }; GOptionContext *ctx; GError *err = NULL; +#endif #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); @@ -1432,6 +1434,7 @@ main (int argc, char *argv[]) if (!g_thread_supported ()) g_thread_init (NULL); +#ifndef GST_DISABLE_OPTION_PARSING ctx = g_option_context_new ("[ELEMENT-NAME | PLUGIN-NAME]"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_group (ctx, gst_init_get_option_group ()); @@ -1440,6 +1443,9 @@ main (int argc, char *argv[]) exit (1); } g_option_context_free (ctx); +#else + gst_init (&argc, &argv); +#endif gst_tools_print_version ("gst-inspect"); diff --git a/tools/gst-launch.c b/tools/gst-launch.c index 5e578e6a7c..105dfaa000 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -666,6 +666,7 @@ main (int argc, char *argv[]) gboolean eos_on_shutdown = FALSE; gchar *savefile = NULL; gchar *exclude_args = NULL; +#ifndef GST_DISABLE_OPTION_PARSING GOptionEntry options[] = { {"tags", 't', 0, G_OPTION_ARG_NONE, &tags, N_("Output tags (also known as metadata)"), NULL}, @@ -692,6 +693,7 @@ main (int argc, char *argv[]) }; GOptionContext *ctx; GError *err = NULL; +#endif gchar **argvn; GError *error = NULL; gint res = 0; @@ -709,6 +711,7 @@ main (int argc, char *argv[]) gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE); +#ifndef GST_DISABLE_OPTION_PARSING ctx = g_option_context_new ("PIPELINE-DESCRIPTION"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_group (ctx, gst_init_get_option_group ()); @@ -720,6 +723,9 @@ main (int argc, char *argv[]) exit (1); } g_option_context_free (ctx); +#else + gst_init (&argc, &argv); +#endif gst_tools_print_version ("gst-launch"); |