GNOME Bugzilla – Bug 781119
v4l2: No timestamp set when importing dma buffer on V4L2_OUTPUT interface
Last modified: 2017-04-11 07:17:58 UTC
Created attachment 349588 [details] [review] Copy the timestamp from the exported buffer to the imported one When dma buffer import is done the timestamp of the imported buffer is not set. I have hit this problem when using v4l2src and video encoder plugin on DB410c. When dma buffers are exported from v4l2src and imported in encoder, the missing timestamp leads to no processing in encoder. I have made a simple fix to copy the timestamp from the exported buffer to the imported one - attached in copy_timestamp.patch. I also attach gst output log and kernel log with v4l2 debug enabled. I use gstreamer version 1.10.4.
Created attachment 349589 [details] Output log
Created attachment 349590 [details] Kernel log with v4l2 debug enabled
Review of attachment 349588 [details] [review]: This is correct indeed. It does not matter for sinkpad (capture interfaces), but it does matter for srcpad (V4L2_OUTPUT). Can you also add those two lines in gst_v4l2_buffer_pool_import_userptr() ? If you don't have time let me know, I'll do that later today.
Created attachment 349613 [details] [review] Copy the timestamp in usrptr case This is the diff for the usrptr case however I don't have a system to test this - it is build-tested only.
(In reply to Todor Tomov from comment #4) > Created attachment 349613 [details] [review] [review] > Copy the timestamp in usrptr case > > This is the diff for the usrptr case however I don't have a system to test > this - it is build-tested only. I'm no worried, thanks. For your interest, the UVC driver supports it.
Hmm, UVC driver is a capture driver, so other then going through the new code it wouldn't be testing anything, since the TS will be replaced when the buffer is dequeued (captured). Still not worried.
I've squashed and wrote a commit message for both. See 081bae28499612734b8e5c66ed2088b286315811
Thanks for you contribution.
Thank you Nicolas for your fast response.