From: Tim-Philipp Müller Date: Fri, 20 Mar 2009 00:42:51 +0000 (+0000) Subject: debugging: make GST_PTR_FORMAT work for queries as well X-Git-Tag: RELEASE-0.10.23~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b62bfc573a31c41c2f22f9d6f119e4ddab7f78da;p=platform%2Fupstream%2Fgstreamer.git debugging: make GST_PTR_FORMAT work for queries as well --- diff --git a/gst/gstinfo.c b/gst/gstinfo.c index a9cbb2c..45f0e18 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -530,6 +530,22 @@ gst_debug_print_object (gpointer ptr) g_free (s); return ret; } + if (GST_IS_QUERY (object)) { + GstQuery *query = GST_QUERY_CAST (object); + + if (query->structure) { + return gst_structure_to_string (query->structure); + } else { + const gchar *query_type_name; + + query_type_name = gst_query_type_get_name (query->type); + if (G_LIKELY (query_type_name != NULL)) { + return g_strdup_printf ("%s query", query_type_name); + } else { + return g_strdup_printf ("query of unknown type %d", query->type); + } + } + } return g_strdup_printf ("%p", ptr); }