From aaef425d99763c67fda0e5054b6bcf2d7044e968 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 7 Jan 2003 20:49:46 +0000 Subject: [PATCH] Small fixes, improved query inspect Original commit message from CVS: Small fixes, improved query inspect --- tools/gst-inspect.c | 37 +++++++++++++++++-------------------- tools/gst-launch.c | 4 ++-- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index 93eeaab..0be347f 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -151,6 +151,23 @@ print_formats (const GstFormat *formats) } static void +print_query_types (const GstQueryType *types) +{ + while (types && *types) { + const GstQueryTypeDefinition *definition; + + definition = gst_query_type_get_details (*types); + if (definition) + g_print ("\t\t(%d):\t%s (%s)\n", *types, + definition->nick, definition->description); + else + g_print ("\t\t(%d):\tUnknown query format\n", *types); + + types++; + } +} + +static void print_event_masks (const GstEventMask *masks) { GType event_type; @@ -198,26 +215,6 @@ print_event_masks (const GstEventMask *masks) } } -static void -print_query_types (const GstQueryType *types) -{ - GType query_type; - GEnumClass *klass; - - query_type = gst_query_type_get_type(); - klass = (GEnumClass *) g_type_class_ref (query_type); - - while (types && *types) { - GEnumValue *value; - - value = g_enum_get_value (klass, *types); - - g_print ("\t\t(%d):\t%s (%s)\n", value->value, value->value_nick, value->value_name); - types++; - } -} - - static void output_hierarchy (GType type, gint level, gint *maxlevel) { diff --git a/tools/gst-launch.c b/tools/gst-launch.c index 5d162d0..035d490 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -204,10 +204,10 @@ main(int argc, char *argv[]) free (malloc (8)); /* -lefence */ + gst_init_with_popt_table (&argc, &argv, options); + if (!no_fault) fault_setup(); - - gst_init_with_popt_table (&argc, &argv, options); /* make a null-terminated version of argv */ argvn = g_new0 (char*, argc); -- 2.7.4