From 28178e74681db0d0d924b1c2cc69e0d7a9295b16 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 10 Jan 2013 13:47:15 +0100 Subject: [PATCH] v4l2-compliance: add check whether the timestamp is monotonic. Note: today we only have 'Unknown' (legacy) and 'Monotonic' timestamps. If new timestamp types are added, then v4l2-compliance needs to be modified to add support for those. Signed-off-by: Hans Verkuil --- utils/v4l2-compliance/v4l2-test-buffers.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp index 942da05..dd2f236 100644 --- a/utils/v4l2-compliance/v4l2-test-buffers.cpp +++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp @@ -47,6 +47,8 @@ static int testQueryBuf(struct node *node, unsigned type, unsigned count) fail_on_test(buf.flags & (V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE | V4L2_BUF_FLAG_ERROR)); + fail_on_test((buf.flags & V4L2_BUF_FLAG_TIMESTAMP_MASK) != + V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC); } buf.index = count; ret = doioctl(node, VIDIOC_QUERYBUF, &buf); -- 2.7.4