From 22a79f5938535729fc28b9fd1988f8ed2280bbcb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 4 Jan 2001 18:57:29 +0000 Subject: [PATCH] Added enum values with default removed debugging -g from Makefile Original commit message from CVS: Added enum values with default removed debugging -g from Makefile --- tools/Makefile.am | 2 +- tools/gstreamer-inspect.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index fd5025499d..814fb27cb5 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,6 +1,6 @@ bin_PROGRAMS = gstreamer-launch gstreamer-register gstreamer-inspect -CFLAGS = -g -Wall -O2 +CFLAGS = -Wall -O2 LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) diff --git a/tools/gstreamer-inspect.c b/tools/gstreamer-inspect.c index 8d67773534..a248cb3399 100644 --- a/tools/gstreamer-inspect.c +++ b/tools/gstreamer-inspect.c @@ -27,8 +27,8 @@ void print_prop(GstPropsEntry *prop,gboolean showname,gchar *pfx) { break; case GST_PROPS_FOURCC_ID_NUM: printf("FourCC: %c%c%c%c\n", - prop->data.fourcc_data>>24 & 0xff,prop->data.fourcc_data>>16 & 0xff, - prop->data.fourcc_data>>8 & 0xff,prop->data.fourcc_data & 0xff); + prop->data.fourcc_data & 0xff,prop->data.fourcc_data>>8 & 0xff, + prop->data.fourcc_data>>16 & 0xff,prop->data.fourcc_data>>24 & 0xff); break; case GST_PROPS_LIST_ID_NUM: printf("List:\n"); @@ -256,6 +256,19 @@ gint print_element_info(GstElementFactory *factory) { default: if (args[i].type == GST_TYPE_FILENAME) printf("Filename"); + else if (GTK_FUNDAMENTAL_TYPE (args[i].type) == GTK_TYPE_ENUM) { + GtkEnumValue *values; + guint j = 0; + + printf("Enum (default %d)", GTK_VALUE_ENUM (args[i])); + values = gtk_type_enum_get_values (args[i].type); + while (values[j].value_name) { + printf("\n (%d): \t%s", values[j].value, values[j].value_nick); + j++; + } + } + else if (args[i].type == GTK_TYPE_WIDGET) + printf("GtkWidget"); else printf("unknown"); break;