GNOME Bugzilla – Bug 752618
v4l2bufferpool: Set timestamp when queue buffer
Last modified: 2015-08-16 13:38:32 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.
Created attachment 307736 [details] [review] Should set timestamp when queue buffer.
Created attachment 307746 [details] [review] Should set timestamp when queue buffer.
Created attachment 307747 [details] [review] Should set timestamp when queue buffer.
(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.
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.
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
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
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.
Created attachment 307962 [details] [review] v4l2bufferpool: set GST_BUFFER_COPY_FLAGS to copy flags also remove GST_BUFFER_COPY_META
Review of attachment 307962 [details] [review]: Looks good.
Thanks Attachment 307962 [details] pushed as afcd462 - v4l2bufferpool: set GST_BUFFER_COPY_FLAGS to copy flags also