From patchwork Tue Apr 16 13:42:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1007 Return-Path: Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 943D060DC1 for ; Tue, 16 Apr 2019 15:41:29 +0200 (CEST) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id CE370FF81B; Tue, 16 Apr 2019 13:41:28 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 16 Apr 2019 15:42:09 +0200 Message-Id: <20190416134210.21097-7-jacopo@jmondi.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190416134210.21097-1-jacopo@jmondi.org> References: <20190416134210.21097-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 6/7] libcamera: request: Expose the Stream to Buffers map 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: Tue, 16 Apr 2019 13:41:29 -0000 Add to the Request class a method to access the map of Stream to Buffer. With the introduction of multiple stream support, pipeline handler should be able to access the map of streams at request queueing time. Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi --- include/libcamera/request.h | 1 + src/libcamera/request.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/include/libcamera/request.h b/include/libcamera/request.h index 0188bcab8383..58de6f00a554 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -32,6 +32,7 @@ public: Request(const Request &) = delete; Request &operator=(const Request &) = delete; + const std::map &buffers() const { return bufferMap_; } int setBuffers(const std::map &streamMap); Buffer *findBuffer(Stream *stream) const; diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 12a3c5204f24..1946845b91f4 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -51,6 +51,16 @@ Request::Request(Camera *camera) { } +/** + * \fn Request::buffers() + * \brief Retrieve the request's streams to buffers map + * + * Return a reference to the map that associates each Stream part of the + * request to the Buffer the Stream output should be directed to. + * + * \return The map of Stream to Buffer + */ + /** * \brief Set the streams to capture with associated buffers * \param[in] streamMap The map of streams to buffers