summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice
diff options
context:
space:
mode:
Diffstat (limited to 'test/v4l2_videodevice')
-rw-r--r--test/v4l2_videodevice/capture_async.cpp11
-rw-r--r--test/v4l2_videodevice/controls.cpp2
-rw-r--r--test/v4l2_videodevice/v4l2_videodevice_test.h2
3 files changed, 9 insertions, 6 deletions
diff --git a/test/v4l2_videodevice/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp
index 42e1e671..67366461 100644
--- a/test/v4l2_videodevice/capture_async.cpp
+++ b/test/v4l2_videodevice/capture_async.cpp
@@ -61,10 +61,12 @@ protected:
if (ret)
return TestFail;
- timeout.start(10000ms);
+ const unsigned int nFrames = 30;
+
+ timeout.start(500ms * nFrames);
while (timeout.isRunning()) {
dispatcher->processEvents();
- if (frames > 30)
+ if (frames > nFrames)
break;
}
@@ -73,8 +75,9 @@ protected:
return TestFail;
}
- if (frames < 30) {
- std::cout << "Failed to capture 30 frames within timeout." << std::endl;
+ if (frames < nFrames) {
+ std::cout << "Failed to capture " << nFrames
+ << " frames within timeout." << std::endl;
return TestFail;
}
diff --git a/test/v4l2_videodevice/controls.cpp b/test/v4l2_videodevice/controls.cpp
index 0f603b85..b0130295 100644
--- a/test/v4l2_videodevice/controls.cpp
+++ b/test/v4l2_videodevice/controls.cpp
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * controls.cpp - V4L2 device controls handling test
+ * V4L2 device controls handling test
*/
#include <algorithm>
diff --git a/test/v4l2_videodevice/v4l2_videodevice_test.h b/test/v4l2_videodevice/v4l2_videodevice_test.h
index d2de1a6d..b5871ce6 100644
--- a/test/v4l2_videodevice/v4l2_videodevice_test.h
+++ b/test/v4l2_videodevice/v4l2_videodevice_test.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * vl42device_test.h - libcamera v4l2device test base class
+ * libcamera v4l2device test base class
*/
#pragma once