GNOME Bugzilla – Bug 745438
v4l22bufferpool: Don't update buffer flags and timestamp when dequeing from OUTPUT device
Last modified: 2015-03-08 21:27:44 UTC
Created attachment 298264 [details] [review] v4l2/gstv4l2bufferpool: overwrite PTS only in case of capture device Overwrite PTS/TIMESTAMP of buffer only in case of capture device. This fixes wrong PTS/TIMESTAMP in case a GstBuffer is feed to multiple video sinks and/or encoders.
Created attachment 298373 [details] [review] v4l2/gstv4l2bufferpool: overwrite PTS only in case of capture device Changes: - removed Signed-off-by - add bugzilla cross-reference URI
Created attachment 298374 [details] [review] [PATCH v2] v4l2/gstv4l2bufferpool: overwrite PTS only in case of capture device Changes: - removed Signed-off-by - add bugzilla cross-reference URI - upload the right file...
Review of attachment 298374 [details] [review]: I think this is correct. I don't see any code that set the timestamp on the v4l2_buffer for output, so there is no way the driver can return this information back. Also, meta data on Output buffe being dequeued does not make much sense.
Review of attachment 298374 [details] [review]: ::: sys/v4l2/gstv4l2bufferpool.c @@ +1240,3 @@ + * buffer to multiple video sinks) + */ + if (obj->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { Sorry, I missed that initially. You forgot about the other cases (CAPTURE_MPLANE, OUTPUT_MPLANE). You could do to cover them all: if (!V4L2_TYPE_IS_OUTPUT (v4l2object->type))
Created attachment 298436 [details] [review] [PATCH v3] v4l2/gstv4l2bufferpool: overwrite PTS only in case of capture device Changes v2 -> v3: - check against !V4L2_TYPE_IS_OUTPUT ()
commit eeb4d2e8b1ca54263086857dd7776960bf7d4941 Author: Nicolas Dufresne <nicolas.dufresne@collabora.com> Date: Sun Mar 8 21:15:53 2015 +0000 v4l2bufferpool: Don't update buffer for OUTPUT For output device, we should not update the buffer with flags and timestamp when we dequeue. The information in the v4l2_buffer is not meaningful and it breaks the case where the buffer is rendered at multiple places. https://bugzilla.gnome.org/show_bug.cgi?id=745438
commit a99b790e3553874ce2506f7e0de8ed298a742861 Author: Nicolas Dufresne <nicolas.dufresne@collabora.com> Date: Sun Mar 8 21:15:53 2015 +0000 v4l2bufferpool: Don't update buffer for OUTPUT For output device, we should not update the buffer with flags and timestamp when we dequeue. The information in the v4l2_buffer is not meaningful and it breaks the case where the buffer is rendered at multiple places. https://bugzilla.gnome.org/show_bug.cgi?id=745438 Conflicts: sys/v4l2/gstv4l2bufferpool.c