mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
tools: gst-device-monitor: print non-string device properties too
This commit is contained in:
parent
3459bd6854
commit
69d3b098a2
1 changed files with 11 additions and 3 deletions
|
@ -46,9 +46,17 @@ static gboolean
|
||||||
print_structure_field (GQuark field_id, const GValue * value,
|
print_structure_field (GQuark field_id, const GValue * value,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
if (G_VALUE_HOLDS_STRING (value))
|
gchar *val;
|
||||||
g_print ("\n\t\t%s = %s", g_quark_to_string (field_id),
|
|
||||||
g_value_get_string (value));
|
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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue