time of day timestamps handling in gstreamer (v4l2 source)

Sebastian Dröge sebastian at centricular.com
Mon Aug 25 23:33:25 PDT 2014


On Mo, 2014-08-25 at 18:06 +0200, Philippe De Muyter wrote:
> Hi,
> 
> I have an existing application using v4l2 cameras on different computers
> synchronized by ntp.  The output (frames) of the different computers
> are timestamped with the ntp time of the snapshot, provided by the v4l2
> driver.
> 
> I can guarantee that the ntp time has no hickups (at least not when it matters).
> 
> I would like to rewrite this application using gstreamer.  How can I
> get the same quality timestamps at the output of my gstreamer pipeline ?
> In other words : in which buffer attribute(s) can I retrieve that timestamp ?

The buffer pts will contain the timestamps as provided via the timestamp
field of struct v4l2_buffer. However this only works if the timestamps
are generated from the POSIX monotonic clock or the system clock
(gettimeofday()) currently, see the code in
gstv4l2src.c:gst_v4l2src_create().

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140826/b1064168/attachment.sig>


More information about the gstreamer-devel mailing list