[{"id":35183,"web_url":"https://patchwork.libcamera.org/comment/35183/","msgid":"<sog3ndolmdz4f4euzvkrek7ommgonib7vfg2g3gc6erfdco5y7@32ult3huzo5p>","date":"2025-07-28T09:28:57","subject":"Re: [RFC PATCH v2 10/22] libcamera: camera: Store `MetadataListPlan`\n\tin `Camera::Private`","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Barnabás\n\nOn Mon, Jul 21, 2025 at 12:46:10PM +0200, Barnabás Pőcze wrote:\n> Just like `ControlInfoMap controlInfo_` is a public member of the private\n> camera data for pipeline handlers to populate, add a `MetadataListPlan` as\n> well for the pipeline handlers to fill. This will be used to initialize\n> the `MetadataList` of each request created by the camera.\n>\n> Also add `Camera::metadata()`, which makes it accessible for applications.\n>\n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n> changes in v2:\n>   * make it available in `Camera::metadata()`\n> ---\n>  include/libcamera/camera.h          |  1 +\n>  include/libcamera/internal/camera.h |  2 ++\n>  src/libcamera/camera.cpp            | 21 +++++++++++++++++++++\n>  3 files changed, 24 insertions(+)\n>\n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index 94cee7bd8..e3e40aa89 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n\nThis commit fails to build\n../include/libcamera/camera.h:134:15: error: ‘MetadataListPlan’ does not name a type\n\nDo you need to forward declare MetadataListPlan ?\n\n> @@ -131,6 +131,7 @@ public:\n>\n>  \tconst ControlInfoMap &controls() const;\n>  \tconst ControlList &properties() const;\n> +\tconst MetadataListPlan &metadata() const;\n\njust nitpicking on the name as it might create confusion between\nRequest::metadata() and Camera::metadata(), but as we have\nCamera::controls() I think this is actually fine\n\n>\n>  \tconst std::set<Stream *> &streams() const;\n>\n> diff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h\n> index 8a2e9ed58..016c1ae51 100644\n> --- a/include/libcamera/internal/camera.h\n> +++ b/include/libcamera/internal/camera.h\n> @@ -18,6 +18,7 @@\n>  #include <libcamera/base/class.h>\n>\n>  #include <libcamera/camera.h>\n> +#include <libcamera/metadata_list_plan.h>\n>\n>  namespace libcamera {\n>\n> @@ -40,6 +41,7 @@ public:\n>  \tstd::queue<Request *> waitingRequests_;\n>  \tControlInfoMap controlInfo_;\n>  \tControlList properties_;\n> +\tMetadataListPlan metadataPlan_;\n>\n>  \tuint32_t requestSequence_;\n>\n> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> index 5c78f36c1..fa57d46c9 100644\n> --- a/src/libcamera/camera.cpp\n> +++ b/src/libcamera/camera.cpp\n> @@ -669,6 +669,14 @@ Camera::Private::~Private()\n>   * over a single capture session.\n>   */\n>\n> +/**\n> + * \\var Camera::Private::metadataPlan_\n> + * \\brief The set of metadata supported by the camera\n> + *\n> + * The metadata information shall be initialised by the pipeline handler when\n> + * creating the camera.\n> + */\n\nnit: the member is declared in the class before requestSequence_. You\ncan move its documentation up, before the requestSequence_ one.\n\n> +\n>  static const char *const camera_state_names[] = {\n>  \t\"Available\",\n>  \t\"Acquired\",\n> @@ -1074,6 +1082,19 @@ const ControlInfoMap &Camera::controls() const\n>  \treturn _d()->controlInfo_;\n>  }\n>\n> +/**\n> + * \\brief Retrieve the set of metadata supported by the camera\n> + *\n> + * The list of metadata controls that may be reported by the camera\n> + * for a \\ref Request::metadata() \"request\".\n> + *\n> + * \\return A MetadataListPlan listing the metadata controls supported by the camera\n\nnit: s/A/The\n\nnits apart\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\n> + */\n> +const MetadataListPlan &Camera::metadata() const\n> +{\n> +\treturn _d()->metadataPlan_;\n> +}\n> +\n>  /**\n>   * \\brief Retrieve the list of properties of the camera\n>   *\n> --\n> 2.50.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C8A34C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jul 2025 09:29:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 91A0F6914B;\n\tMon, 28 Jul 2025 11:29:14 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2F7EB6146B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jul 2025 11:29:13 +0200 (CEST)","from ideasonboard.com (mob-5-90-139-29.net.vodafone.it\n\t[5.90.139.29])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BBD414A4;\n\tMon, 28 Jul 2025 11:28:28 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"IPF6Wa6D\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753694911;\n\tbh=Rpkju6K2zUglW0LfebEGubjn4J1QswyShDXcfqqh6pQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=IPF6Wa6DePMhD8mEbWTNHiMeCIQSmdmviwpTAdiH8zNKpPdMNgGbzwE+pjjDquEI2\n\tIrOmHwaHWagD21Eamf26KHCuTQqfOJc7LOj7uAg+BK9/Zc+lgNueXMx1n4nTRRtx4o\n\t/DYSugWWPvwaGS5rIS6aHWM0fU5KLBabZGHO4PL8=","Date":"Mon, 28 Jul 2025 11:28:57 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 10/22] libcamera: camera: Store `MetadataListPlan`\n\tin `Camera::Private`","Message-ID":"<sog3ndolmdz4f4euzvkrek7ommgonib7vfg2g3gc6erfdco5y7@32ult3huzo5p>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-11-barnabas.pocze@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20250721104622.1550908-11-barnabas.pocze@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35209,"web_url":"https://patchwork.libcamera.org/comment/35209/","msgid":"<84f1b8b0-daf7-434d-a48f-2560a8fe8b4a@ideasonboard.com>","date":"2025-07-28T15:12:36","subject":"Re: [RFC PATCH v2 10/22] libcamera: camera: Store `MetadataListPlan`\n\tin `Camera::Private`","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 07. 28. 11:28 keltezéssel, Jacopo Mondi írta:\n> Hi Barnabás\n> \n> On Mon, Jul 21, 2025 at 12:46:10PM +0200, Barnabás Pőcze wrote:\n>> Just like `ControlInfoMap controlInfo_` is a public member of the private\n>> camera data for pipeline handlers to populate, add a `MetadataListPlan` as\n>> well for the pipeline handlers to fill. This will be used to initialize\n>> the `MetadataList` of each request created by the camera.\n>>\n>> Also add `Camera::metadata()`, which makes it accessible for applications.\n>>\n>> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n>> ---\n>> changes in v2:\n>>    * make it available in `Camera::metadata()`\n>> ---\n>>   include/libcamera/camera.h          |  1 +\n>>   include/libcamera/internal/camera.h |  2 ++\n>>   src/libcamera/camera.cpp            | 21 +++++++++++++++++++++\n>>   3 files changed, 24 insertions(+)\n>>\n>> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n>> index 94cee7bd8..e3e40aa89 100644\n>> --- a/include/libcamera/camera.h\n>> +++ b/include/libcamera/camera.h\n> \n> This commit fails to build\n> ../include/libcamera/camera.h:134:15: error: ‘MetadataListPlan’ does not name a type\n> \n> Do you need to forward declare MetadataListPlan ?\n\nYes, I think that is sufficient.\n\n\n> \n>> @@ -131,6 +131,7 @@ public:\n>>\n>>   \tconst ControlInfoMap &controls() const;\n>>   \tconst ControlList &properties() const;\n>> +\tconst MetadataListPlan &metadata() const;\n> \n> just nitpicking on the name as it might create confusion between\n> Request::metadata() and Camera::metadata(), but as we have\n> Camera::controls() I think this is actually fine\n\nThat was my thinking as well.\n\n\n> \n>>\n>>   \tconst std::set<Stream *> &streams() const;\n>>\n>> diff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h\n>> index 8a2e9ed58..016c1ae51 100644\n>> --- a/include/libcamera/internal/camera.h\n>> +++ b/include/libcamera/internal/camera.h\n>> @@ -18,6 +18,7 @@\n>>   #include <libcamera/base/class.h>\n>>\n>>   #include <libcamera/camera.h>\n>> +#include <libcamera/metadata_list_plan.h>\n>>\n>>   namespace libcamera {\n>>\n>> @@ -40,6 +41,7 @@ public:\n>>   \tstd::queue<Request *> waitingRequests_;\n>>   \tControlInfoMap controlInfo_;\n>>   \tControlList properties_;\n>> +\tMetadataListPlan metadataPlan_;\n>>\n>>   \tuint32_t requestSequence_;\n>>\n>> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n>> index 5c78f36c1..fa57d46c9 100644\n>> --- a/src/libcamera/camera.cpp\n>> +++ b/src/libcamera/camera.cpp\n>> @@ -669,6 +669,14 @@ Camera::Private::~Private()\n>>    * over a single capture session.\n>>    */\n>>\n>> +/**\n>> + * \\var Camera::Private::metadataPlan_\n>> + * \\brief The set of metadata supported by the camera\n>> + *\n>> + * The metadata information shall be initialised by the pipeline handler when\n>> + * creating the camera.\n>> + */\n> \n> nit: the member is declared in the class before requestSequence_. You\n> can move its documentation up, before the requestSequence_ one.\n\ndone\n\n\n> \n>> +\n>>   static const char *const camera_state_names[] = {\n>>   \t\"Available\",\n>>   \t\"Acquired\",\n>> @@ -1074,6 +1082,19 @@ const ControlInfoMap &Camera::controls() const\n>>   \treturn _d()->controlInfo_;\n>>   }\n>>\n>> +/**\n>> + * \\brief Retrieve the set of metadata supported by the camera\n>> + *\n>> + * The list of metadata controls that may be reported by the camera\n>> + * for a \\ref Request::metadata() \"request\".\n>> + *\n>> + * \\return A MetadataListPlan listing the metadata controls supported by the camera\n> \n> nit: s/A/The\n\nThe documentation for `controls()` also says \"A\", I copied it from there,\nplease confirm that I should change it.\n\n\nRegards,\nBarnabás Pőcze\n\n\n> \n> nits apart\n> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> \n> Thanks\n>    j\n> \n>> + */\n>> +const MetadataListPlan &Camera::metadata() const\n>> +{\n>> +\treturn _d()->metadataPlan_;\n>> +}\n>> +\n>>   /**\n>>    * \\brief Retrieve the list of properties of the camera\n>>    *\n>> --\n>> 2.50.1\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C779EC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jul 2025 15:12:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8054A691AD;\n\tMon, 28 Jul 2025 17:12:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 637DF69158\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jul 2025 17:12:41 +0200 (CEST)","from [192.168.33.18] (185.221.140.39.nat.pool.zt.hu\n\t[185.221.140.39])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ED0863A4;\n\tMon, 28 Jul 2025 17:11:58 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mMV4dFqs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753715519;\n\tbh=Dp0bgfs13uH5c+tcaNxMP9/G1ppSxbbvH37US9vfDUE=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=mMV4dFqs6AzYVJTL9MSqgtBKtGpmu+gpyI0+1db67jfSiX62ra606YTCUkWN0j0sF\n\t1mVoNHSAsD/I2sfA3QRmFFa/SbnunCVUXSbAwfT5NVU4QCfo+p8kpfXjSFXajy3YwB\n\twvFQCs4AtGHmE6RHkymm4BtV2Y5bZIH4Z++1Qzis=","Message-ID":"<84f1b8b0-daf7-434d-a48f-2560a8fe8b4a@ideasonboard.com>","Date":"Mon, 28 Jul 2025 17:12:36 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 10/22] libcamera: camera: Store `MetadataListPlan`\n\tin `Camera::Private`","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-11-barnabas.pocze@ideasonboard.com>\n\t<sog3ndolmdz4f4euzvkrek7ommgonib7vfg2g3gc6erfdco5y7@32ult3huzo5p>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<sog3ndolmdz4f4euzvkrek7ommgonib7vfg2g3gc6erfdco5y7@32ult3huzo5p>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35220,"web_url":"https://patchwork.libcamera.org/comment/35220/","msgid":"<jy4vhpwbbvbaqicyd5dvdhrn5googtvmb7p5xy3wsgpho6m7m7@ejsf25a74htk>","date":"2025-07-28T16:04:22","subject":"Re: [RFC PATCH v2 10/22] libcamera: camera: Store `MetadataListPlan`\n\tin `Camera::Private`","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Barnabás\n\nOn Mon, Jul 28, 2025 at 05:12:36PM +0200, Barnabás Pőcze wrote:\n> Hi\n>\n> 2025. 07. 28. 11:28 keltezéssel, Jacopo Mondi írta:\n> > Hi Barnabás\n> >\n> > On Mon, Jul 21, 2025 at 12:46:10PM +0200, Barnabás Pőcze wrote:\n> > > Just like `ControlInfoMap controlInfo_` is a public member of the private\n> > > camera data for pipeline handlers to populate, add a `MetadataListPlan` as\n> > > well for the pipeline handlers to fill. This will be used to initialize\n> > > the `MetadataList` of each request created by the camera.\n> > >\n> > > Also add `Camera::metadata()`, which makes it accessible for applications.\n> > >\n> > > Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> > > ---\n> > > changes in v2:\n> > >    * make it available in `Camera::metadata()`\n> > > ---\n> > >   include/libcamera/camera.h          |  1 +\n> > >   include/libcamera/internal/camera.h |  2 ++\n> > >   src/libcamera/camera.cpp            | 21 +++++++++++++++++++++\n> > >   3 files changed, 24 insertions(+)\n> > >\n> > > diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> > > index 94cee7bd8..e3e40aa89 100644\n> > > --- a/include/libcamera/camera.h\n> > > +++ b/include/libcamera/camera.h\n> >\n> > This commit fails to build\n> > ../include/libcamera/camera.h:134:15: error: ‘MetadataListPlan’ does not name a type\n> >\n> > Do you need to forward declare MetadataListPlan ?\n>\n> Yes, I think that is sufficient.\n>\n>\n> >\n> > > @@ -131,6 +131,7 @@ public:\n> > >\n> > >   \tconst ControlInfoMap &controls() const;\n> > >   \tconst ControlList &properties() const;\n> > > +\tconst MetadataListPlan &metadata() const;\n> >\n> > just nitpicking on the name as it might create confusion between\n> > Request::metadata() and Camera::metadata(), but as we have\n> > Camera::controls() I think this is actually fine\n>\n> That was my thinking as well.\n>\n>\n> >\n> > >\n> > >   \tconst std::set<Stream *> &streams() const;\n> > >\n> > > diff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h\n> > > index 8a2e9ed58..016c1ae51 100644\n> > > --- a/include/libcamera/internal/camera.h\n> > > +++ b/include/libcamera/internal/camera.h\n> > > @@ -18,6 +18,7 @@\n> > >   #include <libcamera/base/class.h>\n> > >\n> > >   #include <libcamera/camera.h>\n> > > +#include <libcamera/metadata_list_plan.h>\n> > >\n> > >   namespace libcamera {\n> > >\n> > > @@ -40,6 +41,7 @@ public:\n> > >   \tstd::queue<Request *> waitingRequests_;\n> > >   \tControlInfoMap controlInfo_;\n> > >   \tControlList properties_;\n> > > +\tMetadataListPlan metadataPlan_;\n> > >\n> > >   \tuint32_t requestSequence_;\n> > >\n> > > diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> > > index 5c78f36c1..fa57d46c9 100644\n> > > --- a/src/libcamera/camera.cpp\n> > > +++ b/src/libcamera/camera.cpp\n> > > @@ -669,6 +669,14 @@ Camera::Private::~Private()\n> > >    * over a single capture session.\n> > >    */\n> > >\n> > > +/**\n> > > + * \\var Camera::Private::metadataPlan_\n> > > + * \\brief The set of metadata supported by the camera\n> > > + *\n> > > + * The metadata information shall be initialised by the pipeline handler when\n> > > + * creating the camera.\n> > > + */\n> >\n> > nit: the member is declared in the class before requestSequence_. You\n> > can move its documentation up, before the requestSequence_ one.\n>\n> done\n>\n>\n> >\n> > > +\n> > >   static const char *const camera_state_names[] = {\n> > >   \t\"Available\",\n> > >   \t\"Acquired\",\n> > > @@ -1074,6 +1082,19 @@ const ControlInfoMap &Camera::controls() const\n> > >   \treturn _d()->controlInfo_;\n> > >   }\n> > >\n> > > +/**\n> > > + * \\brief Retrieve the set of metadata supported by the camera\n> > > + *\n> > > + * The list of metadata controls that may be reported by the camera\n> > > + * for a \\ref Request::metadata() \"request\".\n> > > + *\n> > > + * \\return A MetadataListPlan listing the metadata controls supported by the camera\n> >\n> > nit: s/A/The\n>\n> The documentation for `controls()` also says \"A\", I copied it from there,\n> please confirm that I should change it.\n>\n\nOk. My thinking was that the metadatalist plan is a single one and we\nreturn a reference to it, and that's better conveyed by \"The\" instead\nof \"A\".\n\nBut for sake of consistency, feel free to keep it as it is!\n\n>\n> Regards,\n> Barnabás Pőcze\n>\n>\n> >\n> > nits apart\n> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> >\n> > Thanks\n> >    j\n> >\n> > > + */\n> > > +const MetadataListPlan &Camera::metadata() const\n> > > +{\n> > > +\treturn _d()->metadataPlan_;\n> > > +}\n> > > +\n> > >   /**\n> > >    * \\brief Retrieve the list of properties of the camera\n> > >    *\n> > > --\n> > > 2.50.1\n> > >\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 52B32BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Jul 2025 16:04:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 72D12691C3;\n\tMon, 28 Jul 2025 18:04:31 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 21BCC69158\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Jul 2025 18:04:30 +0200 (CEST)","from ideasonboard.com (mob-5-90-139-29.net.vodafone.it\n\t[5.90.139.29])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EFB4C446;\n\tMon, 28 Jul 2025 18:03:46 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"QwRxTneI\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753718628;\n\tbh=Jd2BK1E1zMxWLnfzj029hZbtxwauKXGdO0N6GQGHe2k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QwRxTneIw30WYvt+sqbG9/81lMIg4vV+btgWOhvLyTi33HHPu6eE38cVKss/8peqz\n\tbl+2ASzY2qXs55O64nA32vwecsCi3zfChIqkFHltP6+PTVSaMsNQ2FPc1+x5rUH5HO\n\t5A3vleAAgTuS/iESnVqDbukKxLsDsO90Pp9RACCI=","Date":"Mon, 28 Jul 2025 18:04:22 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 10/22] libcamera: camera: Store `MetadataListPlan`\n\tin `Camera::Private`","Message-ID":"<jy4vhpwbbvbaqicyd5dvdhrn5googtvmb7p5xy3wsgpho6m7m7@ejsf25a74htk>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-11-barnabas.pocze@ideasonboard.com>\n\t<sog3ndolmdz4f4euzvkrek7ommgonib7vfg2g3gc6erfdco5y7@32ult3huzo5p>\n\t<84f1b8b0-daf7-434d-a48f-2560a8fe8b4a@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<84f1b8b0-daf7-434d-a48f-2560a8fe8b4a@ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35873,"web_url":"https://patchwork.libcamera.org/comment/35873/","msgid":"<175818483300.2127323.6398946789337328884@neptunite.rasen.tech>","date":"2025-09-18T08:40:33","subject":"Re: [RFC PATCH v2 10/22] libcamera: camera: Store `MetadataListPlan`\n\tin `Camera::Private`","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Barnabás,\n\nThanks for the patch.\n\nQuoting Barnabás Pőcze (2025-07-21 19:46:10)\n> Just like `ControlInfoMap controlInfo_` is a public member of the private\n> camera data for pipeline handlers to populate, add a `MetadataListPlan` as\n> well for the pipeline handlers to fill. This will be used to initialize\n> the `MetadataList` of each request created by the camera.\n> \n> Also add `Camera::metadata()`, which makes it accessible for applications.\n> \n> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\nLooks good to me.\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n> changes in v2:\n>   * make it available in `Camera::metadata()`\n> ---\n>  include/libcamera/camera.h          |  1 +\n>  include/libcamera/internal/camera.h |  2 ++\n>  src/libcamera/camera.cpp            | 21 +++++++++++++++++++++\n>  3 files changed, 24 insertions(+)\n> \n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index 94cee7bd8..e3e40aa89 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -131,6 +131,7 @@ public:\n>  \n>         const ControlInfoMap &controls() const;\n>         const ControlList &properties() const;\n> +       const MetadataListPlan &metadata() const;\n>  \n>         const std::set<Stream *> &streams() const;\n>  \n> diff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h\n> index 8a2e9ed58..016c1ae51 100644\n> --- a/include/libcamera/internal/camera.h\n> +++ b/include/libcamera/internal/camera.h\n> @@ -18,6 +18,7 @@\n>  #include <libcamera/base/class.h>\n>  \n>  #include <libcamera/camera.h>\n> +#include <libcamera/metadata_list_plan.h>\n>  \n>  namespace libcamera {\n>  \n> @@ -40,6 +41,7 @@ public:\n>         std::queue<Request *> waitingRequests_;\n>         ControlInfoMap controlInfo_;\n>         ControlList properties_;\n> +       MetadataListPlan metadataPlan_;\n>  \n>         uint32_t requestSequence_;\n>  \n> diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp\n> index 5c78f36c1..fa57d46c9 100644\n> --- a/src/libcamera/camera.cpp\n> +++ b/src/libcamera/camera.cpp\n> @@ -669,6 +669,14 @@ Camera::Private::~Private()\n>   * over a single capture session.\n>   */\n>  \n> +/**\n> + * \\var Camera::Private::metadataPlan_\n> + * \\brief The set of metadata supported by the camera\n> + *\n> + * The metadata information shall be initialised by the pipeline handler when\n> + * creating the camera.\n> + */\n> +\n>  static const char *const camera_state_names[] = {\n>         \"Available\",\n>         \"Acquired\",\n> @@ -1074,6 +1082,19 @@ const ControlInfoMap &Camera::controls() const\n>         return _d()->controlInfo_;\n>  }\n>  \n> +/**\n> + * \\brief Retrieve the set of metadata supported by the camera\n> + *\n> + * The list of metadata controls that may be reported by the camera\n> + * for a \\ref Request::metadata() \"request\".\n> + *\n> + * \\return A MetadataListPlan listing the metadata controls supported by the camera\n> + */\n> +const MetadataListPlan &Camera::metadata() const\n> +{\n> +       return _d()->metadataPlan_;\n> +}\n> +\n>  /**\n>   * \\brief Retrieve the list of properties of the camera\n>   *\n> -- \n> 2.50.1\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D76F2BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Sep 2025 08:40:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 062D46936D;\n\tThu, 18 Sep 2025 10:40:42 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 947C262C39\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Sep 2025 10:40:39 +0200 (CEST)","from neptunite.rasen.tech (unknown\n\t[IPv6:2404:7a81:160:2100:7cf2:5f58:dd2a:9ec1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 5C7B2596;\n\tThu, 18 Sep 2025 10:39:19 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"uDyQL6DE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758184760;\n\tbh=9++qWxwEKGY6y4r74EiGzmBzKwfkwY5hm9mscuscPm4=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=uDyQL6DEr8ufdjbtl50kI2DqpDc5hO2gummkLTqNJK3Lz8WYn2QR+Hnuu5us8KvZB\n\tcHwz/uKnoCZtDfHUvzdzYEvyV6+ZVoZ5P5rL+8IL5kWBbmF2tdRYB8RIrMuUe+hQPI\n\tSkVWvbRZZQvwUm7l8lgqEenK5C3Ilr0L6v/GsDCE=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250721104622.1550908-11-barnabas.pocze@ideasonboard.com>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-11-barnabas.pocze@ideasonboard.com>","Subject":"Re: [RFC PATCH v2 10/22] libcamera: camera: Store `MetadataListPlan`\n\tin `Camera::Private`","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 18 Sep 2025 17:40:33 +0900","Message-ID":"<175818483300.2127323.6398946789337328884@neptunite.rasen.tech>","User-Agent":"alot/0.0.0","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]