summaryrefslogtreecommitdiff
path: root/test/v4l2_device
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2019-02-13 11:14:27 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2019-02-13 15:46:30 +0000
commit1db3ea08b6f96ffb597c741493aff8a803683e11 (patch)
tree92704e7122e5aa2980769f1f1e8b53ea9025d8ea /test/v4l2_device
parent9fa7934239f259af8b86ea3395baa3b30e3a0d33 (diff)
test: v4l2_device: capture_async: End test at 30 frames
The capture_async test was written to run for a fixed 5 second duration. Modify the test such that it runs until it has captured 30 frames, or a 10 second time out occurs. Running the capture_async test on an ARM64 platform using VIVID captures 30 frames in 6.15 seconds. There may be scope to optimise this speed by changing the format on the capture device. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/v4l2_device')
-rw-r--r--test/v4l2_device/capture_async.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/v4l2_device/capture_async.cpp b/test/v4l2_device/capture_async.cpp
index 7a0735f6..ba37c973 100644
--- a/test/v4l2_device/capture_async.cpp
+++ b/test/v4l2_device/capture_async.cpp
@@ -56,9 +56,12 @@ protected:
if (ret)
return TestFail;
- timeout.start(5000);
- while (timeout.isRunning())
+ timeout.start(10000);
+ while (timeout.isRunning()) {
dispatcher->processEvents();
+ if (frames > 30)
+ break;
+ }
if (frames < 1) {
std::cout << "Failed to capture any frames within timeout." << std::endl;