summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-12-29 11:29:31 +0000
committerTim-Philipp Müller <tim@centricular.com>2015-12-29 11:29:31 +0000
commitf2ecf85103444563aed640402f08975de6e7f1f7 (patch)
treec99f7c1edd1142a1472eae599d126f27d3400215 /tools
parente61f5b21385e5b0f5bce594477d757b841330d6e (diff)
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
Diffstat (limited to 'tools')
-rw-r--r--tools/gst-device-monitor.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/gst-device-monitor.c b/tools/gst-device-monitor.c
index 8af8f6d3e..83ff8f04e 100644
--- a/tools/gst-device-monitor.c
+++ b/tools/gst-device-monitor.c
@@ -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);