mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
debugging: make GST_PTR_FORMAT work for queries as well
This commit is contained in:
parent
0492ca71f5
commit
b62bfc573a
1 changed files with 16 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue