From patchwork Sat Aug 31 21:02:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 1905 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se Return-Path: Received: from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net [195.74.38.228]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D0C5C60C18 for ; Sat, 31 Aug 2019 23:03:00 +0200 (CEST) X-Halon-ID: b60ef0ae-cc32-11e9-903a-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [84.172.84.18]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id b60ef0ae-cc32-11e9-903a-005056917f90; Sat, 31 Aug 2019 23:02:59 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Sat, 31 Aug 2019 23:02:17 +0200 Message-Id: <20190831210220.29819-4-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20190831210220.29819-1-niklas.soderlund@ragnatech.se> References: <20190831210220.29819-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/6] libcamera: pipeline: Add helper to process meta data coming from IPA 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: Sat, 31 Aug 2019 21:03:01 -0000 Add a helper to process meta data coming out of an IPA and associating it with a request. The helper don't do much yet, it's expected that more code will be needed in the future to deal with versioning of the meta data structure coming from the IPA and the structure provided to applications. Signed-off-by: Niklas Söderlund --- src/libcamera/include/pipeline_handler.h | 2 ++ src/libcamera/pipeline_handler.cpp | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h index ca40e7ef2b85f372..3c08ecb0260675e0 100644 --- a/src/libcamera/include/pipeline_handler.h +++ b/src/libcamera/include/pipeline_handler.h @@ -102,6 +102,8 @@ protected: void prepareInternalBuffer(Buffer *buffer, Request *request, BufferMemory *mem); + void processMetaData(Request *request, const IPAMetaData &metaData); + CameraManager *manager_; private: diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index 613751619a398968..04293921d4d81d98 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -523,6 +523,22 @@ void PipelineHandler::prepareInternalBuffer(Buffer *buffer, Request *request, buffer->mem_ = mem; } +/** + * \brief Helper to process meta data from the IPA + * \param[in] request The request to associate the \a metaData with + * \param[in] metaData The meta data to process + * + * This function is a helper for pipline handler implementations to process + * meta data retrived from an IPA. It is mandatory to call this function with + * any meta data returned from the IPA before it's passed to the application. + */ +void PipelineHandler::processMetaData(Request *request, + const IPAMetaData &metaData) +{ + request->metaData_ = metaData; + request->metaData_.ready = true; +} + /** * \brief Slot for the MediaDevice disconnected signal */