projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e61f5b2
)
tools: gst-device-monitor: print uint properties in both decimal and hex
author
Tim-Philipp Müller
<tim@centricular.com>
Tue, 29 Dec 2015 11:29:31 +0000
(11:29 +0000)
committer
Tim-Philipp Müller
<tim@centricular.com>
Tue, 29 Dec 2015 11:29:31 +0000
(11:29 +0000)
Some values are easier to read and make sense of in hex.
https://bugzilla.gnome.org//show_bug.cgi?id=759780
tools/gst-device-monitor.c
patch
|
blob
|
history
diff --git
a/tools/gst-device-monitor.c
b/tools/gst-device-monitor.c
index
8af8f6d
..
83ff8f0
100644
(file)
--- 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);