From patchwork Thu Oct 30 16:58:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 24913 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 180E7C3331 for ; Thu, 30 Oct 2025 16:58:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AE13D60967; Thu, 30 Oct 2025 17:58:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="SeuW4F1c"; dkim-atps=neutral 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 B73E060934 for ; Thu, 30 Oct 2025 17:58:23 +0100 (CET) Received: from pb-laptop.local (185.221.140.239.nat.pool.zt.hu [185.221.140.239]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9915B15D2; Thu, 30 Oct 2025 17:56:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761843393; bh=IkO03SFMU6hCRMG1ItK9eiBRksIT39onlC8odA8a5dw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SeuW4F1cBT5jVv5LcYAlhJg0Soc7/bv93wk+df02deCyKn/+zNh5ZjRfkhlds70Fu i4IupyJTvZOYxJl3wlGf0nNCZ7grlwSpBMO7um3nxsLked5XNhrdHLkXrygWYX2V7S UKdX824ElC5yC3vcEjLl+DdYxUFy6OSfcSnRNDX4= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Paul Elder Subject: [RFC PATCH v3 10/22] libcamera: camera: Store `MetadataListPlan` in `Camera::Private` Date: Thu, 30 Oct 2025 17:58:04 +0100 Message-ID: <20251030165816.1095180-11-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251030165816.1095180-1-barnabas.pocze@ideasonboard.com> References: <20251030165816.1095180-1-barnabas.pocze@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" Just like `ControlInfoMap controlInfo_` is a public member of the private camera data for pipeline handlers to populate, add a `MetadataListPlan` as well for the pipeline handlers to fill. This will be used to initialize the `MetadataList` of each request created by the camera. Also add `Camera::metadata()`, which makes it accessible for applications. Signed-off-by: Barnabás Pőcze Reviewed-by: Jacopo Mondi Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- changes in v2: * make it available in `Camera::metadata()` --- include/libcamera/camera.h | 2 ++ include/libcamera/internal/camera.h | 2 ++ src/libcamera/camera.cpp | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index b24a297400..53089282a4 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -31,6 +31,7 @@ class FrameBuffer; class FrameBufferAllocator; class PipelineHandler; class Request; +class MetadataListPlan; class SensorConfiguration { @@ -131,6 +132,7 @@ public: const ControlInfoMap &controls() const; const ControlList &properties() const; + const MetadataListPlan &metadata() const; const std::set &streams() const; diff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h index 8a2e9ed589..016c1ae512 100644 --- a/include/libcamera/internal/camera.h +++ b/include/libcamera/internal/camera.h @@ -18,6 +18,7 @@ #include #include +#include namespace libcamera { @@ -40,6 +41,7 @@ public: std::queue waitingRequests_; ControlInfoMap controlInfo_; ControlList properties_; + MetadataListPlan metadataPlan_; uint32_t requestSequence_; diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 2e1e146a25..7bfa50b52c 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -658,6 +658,14 @@ Camera::Private::~Private() * when creating the camera, and shall not be modified afterwards. */ +/** + * \var Camera::Private::metadataPlan_ + * \brief The set of metadata supported by the camera + * + * The metadata information shall be initialised by the pipeline handler when + * creating the camera. + */ + /** * \var Camera::Private::requestSequence_ * \brief The queuing sequence number of the request @@ -1074,6 +1082,19 @@ const ControlInfoMap &Camera::controls() const return _d()->controlInfo_; } +/** + * \brief Retrieve the set of metadata supported by the camera + * + * The list of metadata controls that may be reported by the camera + * for a \ref Request::metadata() "request". + * + * \return A MetadataListPlan listing the metadata controls supported by the camera + */ +const MetadataListPlan &Camera::metadata() const +{ + return _d()->metadataPlan_; +} + /** * \brief Retrieve the list of properties of the camera *