After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745438 - v4l22bufferpool: Don't update buffer flags and timestamp when dequeing from OUTPUT device
v4l22bufferpool: Don't update buffer flags and timestamp when dequeing from O...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.4.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-02 10:15 UTC by Peter Seiderer
Modified: 2015-03-08 21:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
v4l2/gstv4l2bufferpool: overwrite PTS only in case of capture device (1.20 KB, patch)
2015-03-02 10:15 UTC, Peter Seiderer
none Details | Review
v4l2/gstv4l2bufferpool: overwrite PTS only in case of capture device (1.20 KB, patch)
2015-03-03 08:02 UTC, Peter Seiderer
none Details | Review
[PATCH v2] v4l2/gstv4l2bufferpool: overwrite PTS only in case of capture device (1.29 KB, patch)
2015-03-03 08:06 UTC, Peter Seiderer
none Details | Review
[PATCH v3] v4l2/gstv4l2bufferpool: overwrite PTS only in case of capture device (1.34 KB, patch)
2015-03-03 14:48 UTC, Peter Seiderer
none Details | Review

Description Peter Seiderer 2015-03-02 10:15:39 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.
Comment 1 Peter Seiderer 2015-03-03 08:02:37 UTC
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
Comment 2 Peter Seiderer 2015-03-03 08:06:11 UTC
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...
Comment 3 Nicolas Dufresne (ndufresne) 2015-03-03 13:43:02 UTC
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.
Comment 4 Nicolas Dufresne (ndufresne) 2015-03-03 14:04:13 UTC
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))
Comment 5 Peter Seiderer 2015-03-03 14:48:41 UTC
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 ()
Comment 6 Nicolas Dufresne (ndufresne) 2015-03-08 21:19:48 UTC
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
Comment 7 Nicolas Dufresne (ndufresne) 2015-03-08 21:27:44 UTC
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