From patchwork Wed Mar 20 16:30:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 763 Return-Path: Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8EB7D600FC for ; Wed, 20 Mar 2019 17:30:38 +0100 (CET) Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 2B14F20000F; Wed, 20 Mar 2019 16:30:38 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Mar 2019 17:30:41 +0100 Message-Id: <20190320163055.22056-18-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190320163055.22056-1-jacopo@jmondi.org> References: <20190320163055.22056-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 17/31] libcamera: request: Add camera() getter method 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, 20 Mar 2019 16:30:38 -0000 Add a "camera()" getter method to the Request class to retrieve the Camera instance the request has been sent to. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- include/libcamera/request.h | 1 + src/libcamera/request.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/libcamera/request.h b/include/libcamera/request.h index 1bf90de2c6f9..56d179e5f2f5 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -35,6 +35,7 @@ public: int setBuffers(const std::map &streamMap); Buffer *findBuffer(Stream *stream) const; const std::set &streams() const { return streams_; } + Camera *camera() const { return camera_; } Status status() const { return status_; } diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 22c516208ede..51ab6c4e71b2 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -58,6 +58,13 @@ Request::Request(Camera *camera) * \return The set of streams contained in the request */ +/** + * \fn Request::camera() + * \brief Retrieve the camera the request has been sent to + * + * \return Pointer to the camera instance the request has been sent to + */ + /** * \brief Set the streams to capture with associated buffers * \param[in] streamMap The map of streams to buffers