gst-inspect: add G_PARAM_DEPRECATED to known flags
authorAurélien Zanelli <aurelien.zanelli@darkosphere.fr>
Sat, 1 Nov 2014 21:30:30 +0000 (22:30 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 2 Nov 2014 12:50:04 +0000 (12:50 +0000)
Display 'deprecated' instead of flag value when using G_PARAM_DEPRECATED
in element properties.

https://bugzilla.gnome.org/show_bug.cgi?id=739518

tools/gst-inspect.c

index f7c2538..e2afb04 100644 (file)
@@ -245,9 +245,9 @@ flags_to_string (GFlagsValue * vals, guint flags)
 #define KNOWN_PARAM_FLAGS \
   (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY | \
   G_PARAM_LAX_VALIDATION |  G_PARAM_STATIC_STRINGS | \
-  G_PARAM_READABLE | G_PARAM_WRITABLE | GST_PARAM_CONTROLLABLE | \
-  GST_PARAM_MUTABLE_PLAYING | GST_PARAM_MUTABLE_PAUSED | \
-  GST_PARAM_MUTABLE_READY)
+  G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_DEPRECATED | \
+  GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | \
+  GST_PARAM_MUTABLE_PAUSED | GST_PARAM_MUTABLE_READY)
 
 static void
 print_element_properties_info (GstElement * element)
@@ -290,6 +290,10 @@ print_element_properties_info (GstElement * element)
       g_print ("%s%s", (first_flag) ? "" : ", ", _("writable"));
       first_flag = FALSE;
     }
+    if (param->flags & G_PARAM_DEPRECATED) {
+      g_print ("%s%s", (first_flag) ? "" : ", ", _("deprecated"));
+      first_flag = FALSE;
+    }
     if (param->flags & GST_PARAM_CONTROLLABLE) {
       g_print (", %s", _("controllable"));
       first_flag = FALSE;