mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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
This commit is contained in:
parent
e61f5b2138
commit
f2ecf85103
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue