From patchwork Wed Feb 13 15:10:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 571 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EEBE4610B3 for ; Wed, 13 Feb 2019 16:10:32 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D1F05B6; Wed, 13 Feb 2019 16:10:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1550070632; bh=aoOnnBwJExV51TCGu4TDrq/+OLyuJQhG47PaE6OlYDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K1CV7nQmm4sHKQXYKkaxkxnLE2Pg/XQ+sT+qfDanQuruXb10BfNKyLvqhKA+qnS2x INmpJJ9i/gsyxSV+5/hseQ1r5yQRPY8gWJpKXyGfRldLw3lPYXACzPFD0ZvSAd8jF7 ew87DzbqRyXsfh6JOJuNnColEFTm0QUru7X5x4JE= From: Kieran Bingham To: LibCamera Devel Date: Wed, 13 Feb 2019 15:10:21 +0000 Message-Id: <20190213151027.6376-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190213151027.6376-1-kieran.bingham@ideasonboard.com> References: <20190213151027.6376-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/8] test: v4l2_device: capture_async: End test at 30 frames X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2019 15:10:33 -0000 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 Reviewed-by: Laurent Pinchart --- 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;