GNOME Bugzilla – Bug 595825
[v4l2src] use timestamps from v4l2 and slave to the pipeline clock
Last modified: 2012-05-24 15:34:01 UTC
v4l2 buffers have a timestamp already: http://v4l2spec.bytesex.org/spec-single/v4l2.html#V4L2-BUFFER we could slave the timstamps taken as http://v4l2spec.bytesex.org/spec-single/v4l2.html#V4L2-BUFFER to the pipeline clock. This should provide less jitter then timestamping when dequeueing (after the poll_wait).
Have you had any luck with this? If you any patches you want tested i'd be happy to give it a shot.
Any news on this?
Reopening as I can't see any open non-developer issue
This is also especially important with encoding webcams are there is no guarantee that the buffer will come out in PTS order (could be DTS order), so we have to rely on the timestamps from v4l2 (which should ideally come directly from the webcam).
I believe this is fixed in 0.11: gstv4l2bufferpool.c:588: struct v4l2_buffer vbuffer; gstv4l2bufferpool.c:619: timestamp = GST_TIMEVAL_TO_TIME (vbuffer.timestamp); commit a473750350d60ed2f9076b85c9255ae44ae764cb Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Wed Apr 25 09:41:46 2012 +0200 v4l2: improve timestamp code Sample the pipeline clock and device clock closer to eachother to reduce jitter. Don't subtract the frame duration from the timestamp when we can use the device timestamps. Assume a delay of 1 frame in read-write mode. commit 46045316cef28e0d892bc5f319b8ca944f3d51cb Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Tue Apr 24 12:37:33 2012 +0200 v4l2: use driver timestamps Use the drive timestamps for timestamping outgoing buffers.