v4l2: Add a debug message beforing waiting for codec stop
authorEzequiel Garcia <ezequiel@collabora.com>
Tue, 11 Sep 2018 19:46:34 +0000 (16:46 -0300)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 14 Sep 2018 00:48:09 +0000 (20:48 -0400)
Add a debug message right before waiting for the driver.
This is useful in order to debug drivers without a properly
implemented decoder or encoder stop command.

sys/v4l2/gstv4l2videodec.c
sys/v4l2/gstv4l2videoenc.c

index e2b2237..fc89d41 100644 (file)
@@ -381,6 +381,7 @@ gst_v4l2_video_dec_finish (GstVideoDecoder * decoder)
 
     /* If the decoder stop command succeeded, just wait until processing is
      * finished */
+    GST_DEBUG_OBJECT (self, "Waiting for decoder stop");
     GST_OBJECT_LOCK (task);
     while (GST_TASK_STATE (task) == GST_TASK_STARTED)
       GST_TASK_WAIT (task);
index 7e88923..c8a5389 100644 (file)
@@ -274,6 +274,7 @@ gst_v4l2_video_enc_finish (GstVideoEncoder * encoder)
     GstTask *task = encoder->srcpad->task;
 
     /* Wait for the task to be drained */
+    GST_DEBUG_OBJECT (self, "Waiting for encoder stop");
     GST_OBJECT_LOCK (task);
     while (GST_TASK_STATE (task) == GST_TASK_STARTED)
       GST_TASK_WAIT (task);