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 752618 - v4l2bufferpool: Set timestamp when queue buffer
v4l2bufferpool: Set timestamp when queue buffer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-20 09:18 UTC by kevin
Modified: 2015-08-16 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Should set timestamp when queue buffer. (1.54 KB, patch)
2015-07-20 09:19 UTC, kevin
none Details | Review
Should set timestamp when queue buffer. (1.52 KB, patch)
2015-07-20 10:21 UTC, kevin
none Details | Review
Should set timestamp when queue buffer. (1.52 KB, patch)
2015-07-20 10:21 UTC, kevin
committed Details | Review
v4l2bufferpool: set GST_BUFFER_COPY_METADATA to copy flags and metadata also (970 bytes, patch)
2015-07-21 06:53 UTC, Hyunjun Ko
none Details | Review
v4l2bufferpool: set GST_BUFFER_COPY_FLAGS to copy flags also (989 bytes, patch)
2015-07-23 06:02 UTC, Hyunjun Ko
committed Details | Review

Description kevin 2015-07-20 09:18:19 UTC
I am develop video decoder based on V4L2 API. Found video decoder input time stamp hasn't been send to V4L2. Our V4L2 driver will handle timestamp, so need set to V4L2 driver. Attached patch to fix it.

For video sink based on v4l2bufferpool, video sink should set timestamp to -1 to indicate V4L2 driver output it ASAP.
Comment 1 kevin 2015-07-20 09:19:46 UTC
Created attachment 307736 [details] [review]
Should set timestamp when queue buffer.
Comment 2 kevin 2015-07-20 10:21:09 UTC
Created attachment 307746 [details] [review]
Should set timestamp when queue buffer.
Comment 3 kevin 2015-07-20 10:21:42 UTC
Created attachment 307747 [details] [review]
Should set timestamp when queue buffer.
Comment 4 Nicolas Dufresne (ndufresne) 2015-07-20 13:42:13 UTC
(In reply to kevin from comment #0)
> I am develop video decoder based on V4L2 API. Found video decoder input time
> stamp hasn't been send to V4L2. Our V4L2 driver will handle timestamp, so
> need set to V4L2 driver. Attached patch to fix it.

Is this an OUTPUT, a CAPTURE or a M2M device ?

> For video sink based on v4l2bufferpool, video sink should set timestamp to
> -1 to indicate V4L2 driver output it ASAP.

I agree, this need to be implemented.
Comment 5 Nicolas Dufresne (ndufresne) 2015-07-20 13:49:22 UTC
Review of attachment 307747 [details] [review]:

::: sys/v4l2/gstv4l2bufferpool.c
@@ +150,3 @@
   }
 
+  gst_buffer_copy_into (dest, src, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);

We should also copy the flags. At least GST_BUFFER_FLAG_DELTA_UNIT could be useful eventually, but other could be too. It is also armless to keep them.
Comment 6 Nicolas Dufresne (ndufresne) 2015-07-20 20:51:33 UTC
Actually, we can add this later. Thanks !

commit c5950cd04af1f913700d3504a54ab475d7cbaa9e
Author: Song Bing <b06498@freescale.com>
Date:   Mon Jul 20 16:59:40 2015 +0800

    v4l2bufferpool: Set timestamp when queue buffer.
    
    Should set timestamp when queue buffer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752618
Comment 7 Hyunjun Ko 2015-07-21 06:53:31 UTC
Created attachment 307796 [details] [review]
v4l2bufferpool: set GST_BUFFER_COPY_METADATA to copy flags and metadata also

Probably, you want this flag when buffer-copy, which includes GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS |                                     GST_BUFFER_COPY_META
Comment 8 Nicolas Dufresne (ndufresne) 2015-07-21 13:24:36 UTC
Well, not GST_BUFFER_COPY_META. Most of them are not useful, and then GstVideoMeta might not be compatible. This is a video specific copy function that handle copying from different strides.
Comment 9 Hyunjun Ko 2015-07-23 06:02:33 UTC
Created attachment 307962 [details] [review]
v4l2bufferpool: set GST_BUFFER_COPY_FLAGS to copy flags also

remove GST_BUFFER_COPY_META
Comment 10 Nicolas Dufresne (ndufresne) 2015-07-23 14:17:29 UTC
Review of attachment 307962 [details] [review]:

Looks good.
Comment 11 Nicolas Dufresne (ndufresne) 2015-07-23 14:20:06 UTC
Thanks

Attachment 307962 [details] pushed as afcd462 - v4l2bufferpool: set GST_BUFFER_COPY_FLAGS to copy flags also