From patchwork Tue Mar 19 12:05:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 19741 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7FB24BD160 for ; Tue, 19 Mar 2024 12:05:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AD90F62CAE; Tue, 19 Mar 2024 13:05:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="N+FfNjSJ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C9E4A62CA4 for ; Tue, 19 Mar 2024 13:05:27 +0100 (CET) Received: from jasper.fritz.box (unknown [IPv6:2a00:6020:448c:6c00:1478:344b:8fcb:baf5]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E62FDF02; Tue, 19 Mar 2024 13:05:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1710849901; bh=XqL+6G8l6sAh3t0/iCiSp/QB+GBR3E9zSf2oNX9yT4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N+FfNjSJ6O0NZf01NpATeZ0+p70S28HBk9eygqxx+j8x8MxzzmgdJ3s6km8fGTSNt PjBepDrT5nOtL/pVtOhz6ZSCFbMoyi/tY1mZEgyatLbUt04EVWErM6RK3KvEBtcYGO CYFeIVrPJXmAsIuYTwL03aVYzoYc6lrg/TTn/JP8= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v3 01/16] libcamera: lc-compliance: Add controls param to start() function Date: Tue, 19 Mar 2024 13:05:02 +0100 Message-Id: <20240319120517.362082-2-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240319120517.362082-1-stefan.klug@ideasonboard.com> References: <20240319120517.362082-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This is needed for tests that need to pass controls to Camera::start(). Signed-off-by: Stefan Klug Reviewed-by: Jacopo Mondi --- src/apps/lc-compliance/simple_capture.cpp | 4 ++-- src/apps/lc-compliance/simple_capture.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/lc-compliance/simple_capture.cpp b/src/apps/lc-compliance/simple_capture.cpp index cf4d7cf3..56680a83 100644 --- a/src/apps/lc-compliance/simple_capture.cpp +++ b/src/apps/lc-compliance/simple_capture.cpp @@ -42,7 +42,7 @@ void SimpleCapture::configure(StreamRole role) } } -void SimpleCapture::start() +void SimpleCapture::start(const ControlList *controls) { Stream *stream = config_->at(0).stream(); int count = allocator_->allocate(stream); @@ -52,7 +52,7 @@ void SimpleCapture::start() camera_->requestCompleted.connect(this, &SimpleCapture::requestComplete); - ASSERT_EQ(camera_->start(), 0) << "Failed to start camera"; + ASSERT_EQ(camera_->start(controls), 0) << "Failed to start camera"; } void SimpleCapture::stop() diff --git a/src/apps/lc-compliance/simple_capture.h b/src/apps/lc-compliance/simple_capture.h index 2911d601..54b1d54b 100644 --- a/src/apps/lc-compliance/simple_capture.h +++ b/src/apps/lc-compliance/simple_capture.h @@ -22,7 +22,7 @@ protected: SimpleCapture(std::shared_ptr camera); virtual ~SimpleCapture(); - void start(); + void start(const libcamera::ControlList *controls = nullptr); void stop(); virtual void requestComplete(libcamera::Request *request) = 0;