plugins: improve ::query() debugging messages.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 12 Jul 2013 16:58:57 +0000 (12:58 -0400)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 27 Sep 2013 12:17:12 +0000 (14:17 +0200)
Fix gst_vaapidecode_query() to correctly display the query type name,
instead of randomly displaying that we shared the underlying display.
Also add debug info for the GstVaapiSink::query() handler, i.e. the
supplied query type name actually.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
gst/vaapi/gstvaapidecode.c
gst/vaapi/gstvaapisink.c

index 965bd42..5aedcae 100644 (file)
@@ -882,10 +882,12 @@ gst_vaapidecode_query(GST_PAD_QUERY_FUNCTION_ARGS)
         GST_VAAPIDECODE(gst_pad_get_parent_element(pad));
     gboolean res;
 
-    GST_DEBUG("sharing display %p", decode->display);
+    GST_INFO_OBJECT(decode, "query type %s", GST_QUERY_TYPE_NAME(query));
 
-    if (gst_vaapi_reply_to_query(query, decode->display))
+    if (gst_vaapi_reply_to_query(query, decode->display)) {
+        GST_DEBUG("sharing display %p", decode->display);
         res = TRUE;
+    }
     else if (GST_PAD_IS_SINK(pad)) {
         switch (GST_QUERY_TYPE(query)) {
 #if GST_CHECK_VERSION(1,0,0)
index 9cbb008..fdada0a 100644 (file)
@@ -1347,6 +1347,8 @@ gst_vaapisink_query(GstBaseSink *base_sink, GstQuery *query)
 {
     GstVaapiSink * const sink = GST_VAAPISINK(base_sink);
 
+    GST_INFO_OBJECT(sink, "query type %s", GST_QUERY_TYPE_NAME(query));
+
     if (gst_vaapi_reply_to_query(query, sink->display)) {
         GST_DEBUG("sharing display %p", sink->display);
         return TRUE;