From: Tim-Philipp Müller Date: Sat, 26 Dec 2015 11:34:47 +0000 (+0000) Subject: tools: gst-device-monitor: print non-string device properties too X-Git-Tag: 1.19.3~511^2~3135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69d3b098a2c2eed02af6916d8798995a139f5de9;p=platform%2Fupstream%2Fgstreamer.git tools: gst-device-monitor: print non-string device properties too --- diff --git a/tools/gst-device-monitor.c b/tools/gst-device-monitor.c index b09f9f8..8af8f6d 100644 --- a/tools/gst-device-monitor.c +++ b/tools/gst-device-monitor.c @@ -46,9 +46,17 @@ static gboolean print_structure_field (GQuark field_id, const GValue * value, gpointer user_data) { - if (G_VALUE_HOLDS_STRING (value)) - g_print ("\n\t\t%s = %s", g_quark_to_string (field_id), - g_value_get_string (value)); + gchar *val; + + val = gst_value_serialize (value); + + if (val != NULL) + g_print ("\n\t\t%s = %s", g_quark_to_string (field_id), val); + else + g_print ("\n\t\t%s - could not serialise field of type %s", + g_quark_to_string (field_id), G_VALUE_TYPE_NAME (value)); + + g_free (val); return TRUE; }