v4l2videodec: add some useful debug messages
authorNicolas Dechesne <nicolas.dechesne@linaro.org>
Wed, 19 Jul 2017 08:42:46 +0000 (10:42 +0200)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 19 Jul 2017 14:25:11 +0000 (10:25 -0400)
Add a couple of useful debug traces , they happened to be useful to
debug/investigate a 4K video playback issue with v4l2, so let's make these
changes more permanent.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
https://bugzilla.gnome.org/show_bug.cgi?id=785109

sys/v4l2/gstv4l2videodec.c

index 1377e10..1550c46 100644 (file)
@@ -580,12 +580,14 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
 
     /* Create caps from the acquired format, remove the format field */
     acquired_caps = gst_video_info_to_caps (&info);
+    GST_DEBUG_OBJECT (self, "Acquired caps: %" GST_PTR_FORMAT, acquired_caps);
     st = gst_caps_get_structure (acquired_caps, 0);
     gst_structure_remove_field (st, "format");
 
     /* Probe currently available pixel formats */
     available_caps = gst_v4l2_object_probe_caps (self->v4l2capture, NULL);
     available_caps = gst_caps_make_writable (available_caps);
+    GST_DEBUG_OBJECT (self, "Available caps: %" GST_PTR_FORMAT, available_caps);
 
     /* Replace coded size with visible size, we want to negotiate visible size
      * with downstream, not coded size. */
@@ -593,6 +595,7 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
 
     filter = gst_caps_intersect_full (available_caps, acquired_caps,
         GST_CAPS_INTERSECT_FIRST);
+    GST_DEBUG_OBJECT (self, "Filtered caps: %" GST_PTR_FORMAT, filter);
     gst_caps_unref (acquired_caps);
     gst_caps_unref (available_caps);
     caps = gst_pad_peer_query_caps (decoder->srcpad, filter);