mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-04 06:06:17 +00:00
d/v4l2: Set the timestamp
This commit is contained in:
parent
4d0b2f0b81
commit
0b16e1e94d
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue