[libcamera-devel] [PATCH v2 2/8] test: v4l2_device: capture_async: End test at 30 frames

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Feb 13 16:40:40 CET 2019


Hi Kieran,

Thank you for the patch.

On Wed, Feb 13, 2019 at 03:10:21PM +0000, Kieran Bingham wrote:
> 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.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  test/v4l2_device/capture_async.cpp | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/test/v4l2_device/capture_async.cpp b/test/v4l2_device/capture_async.cpp
> index 7a0735f65535..ba37c9731831 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;

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list