From patchwork Fri Jun 21 16:13:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 1499 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 14664615AB for ; Fri, 21 Jun 2019 18:14:08 +0200 (CEST) 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 B236E67; Fri, 21 Jun 2019 18:14:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1561133647; bh=sMIEUyHP6455q7DFJ3S2G5zFuwEuRoYuAPlgKSKbygg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pdw1pv7FU8LYmakRJzxf+J6oC/qdNJ92LbOQmyjv4VQjLfKvqHPaW+wxUyPqn3W2D Tf9zkIAFjG/In7xSBlqhtMc5Sp5N3IS+LcHvQPOYg5AC4jIccnhfiXatrswnkaaOQ0 Dz0GPNdG3i9K3+BI1q5JH424uefqwV+fdWoFs5kI= From: Kieran Bingham To: LibCamera Devel Date: Fri, 21 Jun 2019 17:13:58 +0100 Message-Id: <20190621161401.28337-7-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190621161401.28337-1-kieran.bingham@ideasonboard.com> References: <20190621161401.28337-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v2 6/9] libcamera: request: Add a ControlList 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: Fri, 21 Jun 2019 16:14:08 -0000 Provide a ControlList on request objects to facilitate setting controls Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- include/libcamera/request.h | 3 +++ src/libcamera/request.cpp | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/libcamera/request.h b/include/libcamera/request.h index 58de6f00a554..8075270a9a12 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -11,6 +11,7 @@ #include #include +#include namespace libcamera { @@ -32,6 +33,7 @@ public: Request(const Request &) = delete; Request &operator=(const Request &) = delete; + ControlList &controls() { return controls_; } const std::map &buffers() const { return bufferMap_; } int setBuffers(const std::map &streamMap); Buffer *findBuffer(Stream *stream) const; @@ -50,6 +52,7 @@ private: bool completeBuffer(Buffer *buffer); Camera *camera_; + ControlList controls_; std::map bufferMap_; std::unordered_set pending_; diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index fa3ee46da440..9a0409b46017 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -52,6 +52,16 @@ Request::Request(Camera *camera) { } +/** + * \fn Request::controls() + * \brief Retrieve the request's ControlList + * + * Return a reference to the ControlList that stores all the controls relevant + * to this request. + * + * \return A reference to the ControlList in this request + */ + /** * \fn Request::buffers() * \brief Retrieve the request's streams to buffers map