|
Is it possible to get the v4l2 video timestamps from the frames returned to an appsink via v4l2src?
Looking at some of the gstreamer source code, gst_v4l2src_grab_frame() (in file v4l2src_calls.c) calls
gst_v4l2_buffer_pool_dqbuf() (in file gstv4l2srcbufferpool.c) which appears to return a "normal" V4L2_BUF_TYPE_VIDEO_CAPTURE buffer which should have the timestamp and sequence numbers from the driver accessible with:
seq=buf.sequence;
tod=buf.timestamp.tv_sec%86400+buf.timestamp.tv_usec/1000000.0;
Its the latter I really want (system time turned into time of day in seconds with uS resolution) so I can attempt to sync video data with an A/D data stream acquired on the same system, although the sequence number should tell if any frames are dropped.
I just can't follow the flow of the data in the buffer pool after this to see if this "meta data" tags along and would be somehow accessible to me or not.
|