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>
This commit is contained in:
parent
9fa7934239
commit
1db3ea08b6
1 changed files with 5 additions and 2 deletions
|
@ -56,9 +56,12 @@ protected:
|
||||||
if (ret)
|
if (ret)
|
||||||
return TestFail;
|
return TestFail;
|
||||||
|
|
||||||
timeout.start(5000);
|
timeout.start(10000);
|
||||||
while (timeout.isRunning())
|
while (timeout.isRunning()) {
|
||||||
dispatcher->processEvents();
|
dispatcher->processEvents();
|
||||||
|
if (frames > 30)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (frames < 1) {
|
if (frames < 1) {
|
||||||
std::cout << "Failed to capture any frames within timeout." << std::endl;
|
std::cout << "Failed to capture any frames within timeout." << std::endl;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue