Commit f2ecf851 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

tools: gst-device-monitor: print uint properties in both decimal and hex

Some values are easier to read and make sense of in hex.

https://bugzilla.gnome.org//show_bug.cgi?id=759780
parent e61f5b21
......@@ -48,7 +48,12 @@ print_structure_field (GQuark field_id, const GValue * value,
{
gchar *val;
val = gst_value_serialize (value);
if (G_VALUE_HOLDS_UINT (value)) {
val = g_strdup_printf ("%u (0x%08x)", g_value_get_uint (value),
g_value_get_uint (value));
} else {
val = gst_value_serialize (value);
}
if (val != NULL)
g_print ("\n\t\t%s = %s", g_quark_to_string (field_id), val);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment