d/v4l2: Set the timestamp

This commit is contained in:
Jakob Bornecrantz 2019-10-22 09:44:25 +01:00
parent 4d0b2f0b81
commit 0b16e1e94d

View file

@ -923,6 +923,13 @@ v4l2_fs_stream_run(void *ptr)
xf->source_id = vid->base.source_id;
xf->source_sequence = v_buf.sequence;
if ((v_buf.flags & V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC) != 0) {
int64_t ns = 0;
ns += v_buf.timestamp.tv_sec * 1000 * 1000 * 1000;
ns += v_buf.timestamp.tv_usec * 1000;
xf->timestamp = ns;
}
vid->sink->push_frame(vid->sink, xf);
// The frame is requeued as soon as the refcount reaches zero,