From 7fb020ffe65178bcef4cea6b2d81f9a623dc995e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 20 May 2001 20:12:45 +0000 Subject: [PATCH] Better output of element flags. Original commit message from CVS: Better output of element flags. --- tools/gstreamer-inspect.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tools/gstreamer-inspect.c b/tools/gstreamer-inspect.c index cd94162a73..a12629e971 100644 --- a/tools/gstreamer-inspect.c +++ b/tools/gstreamer-inspect.c @@ -83,6 +83,7 @@ print_element_info (GstElementFactory *factory) GtkArg *args; guint32 *flags; gint num_args,i; + gboolean have_flags; element = gst_elementfactory_create(factory,"element"); if (!element) { @@ -151,17 +152,26 @@ print_element_info (GstElementFactory *factory) } else printf(" none\n\n"); + have_flags = FALSE; + printf("Element Flags:\n"); - if (GST_FLAG_IS_SET(element,GST_ELEMENT_COMPLEX)) + if (GST_FLAG_IS_SET(element,GST_ELEMENT_COMPLEX)) { printf(" GST_ELEMENT_COMPLEX\n"); - if (GST_FLAG_IS_SET(element,GST_ELEMENT_DECOUPLED)) + have_flags = TRUE; + } + if (GST_FLAG_IS_SET(element,GST_ELEMENT_DECOUPLED)) { printf(" GST_ELEMENT_DECOUPLED\n"); - if (GST_FLAG_IS_SET(element,GST_ELEMENT_THREAD_SUGGESTED)) + have_flags = TRUE; + } + if (GST_FLAG_IS_SET(element,GST_ELEMENT_THREAD_SUGGESTED)) { printf(" GST_ELEMENT_THREADSUGGESTED\n"); - if (GST_FLAG_IS_SET(element,GST_ELEMENT_NO_SEEK)) + have_flags = TRUE; + } + if (GST_FLAG_IS_SET(element,GST_ELEMENT_NO_SEEK)) { printf(" GST_ELEMENT_NO_SEEK\n"); - if (! GST_FLAG_IS_SET(element, GST_ELEMENT_COMPLEX | GST_ELEMENT_DECOUPLED | - GST_ELEMENT_THREAD_SUGGESTED | GST_ELEMENT_NO_SEEK)) + have_flags = TRUE; + } + if (!have_flags) printf(" no flags set\n"); printf("\n");