Commit 081bae28 authored by Todor Tomov's avatar Todor Tomov Committed by Nicolas Dufresne

v4l2object: Copy timestamp when importing buffers

This is needed for V4L2_OUTPUT interface, and is harmless of
V4L2_CAPTURE interfaces. This will fix timestamp in cases like:

  v4l2src io-mode=dmabuf ! v4l2videoNenc output-io-mode=dmabuf-import !  ...

Same apply for userptr.

https://bugzilla.gnome.org/show_bug.cgi?id=781119
parent d6b145df
......@@ -292,6 +292,9 @@ gst_v4l2_buffer_pool_import_userptr (GstV4l2BufferPool * pool,
gst_mini_object_set_qdata (GST_MINI_OBJECT (dest), GST_V4L2_IMPORT_QUARK,
data, (GDestroyNotify) _unmap_userptr_frame);
gst_buffer_copy_into (dest, src,
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
return ret;
not_our_buffer:
......@@ -346,6 +349,9 @@ gst_v4l2_buffer_pool_import_dmabuf (GstV4l2BufferPool * pool,
gst_mini_object_set_qdata (GST_MINI_OBJECT (dest), GST_V4L2_IMPORT_QUARK,
gst_buffer_ref (src), (GDestroyNotify) gst_buffer_unref);
gst_buffer_copy_into (dest, src,
GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
return GST_FLOW_OK;
not_our_buffer:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment