tracerrecord: allow G_TYPE_POINTER for field types
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 14 Apr 2016 09:25:43 +0000 (12:25 +0300)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 2 Jun 2016 21:53:28 +0000 (22:53 +0100)
Tracers may want to display the address of an object.

https://bugzilla.gnome.org/show_bug.cgi?id=765052

gst/gststructure.c

index 3c705f3..581b00e 100644 (file)
@@ -1978,6 +1978,8 @@ priv__gst_structure_append_template_to_gstring (GQuark field_id,
   } else if (g_type_is_a (type, G_TYPE_ENUM)
       || g_type_is_a (type, G_TYPE_FLAGS)) {
     g_string_append (s, "%i");
+  } else if (type == G_TYPE_POINTER) {
+    g_string_append_len (s, "%p", 2);
   } else {
     GST_WARNING ("unhandled type: %s", g_type_name (type));
     g_string_append (s, "%" GST_WRAPPED_PTR_FORMAT);