[{"id":35875,"web_url":"https://patchwork.libcamera.org/comment/35875/","msgid":"<175818542724.2127323.12423529311722387873@neptunite.rasen.tech>","date":"2025-09-18T08:50:27","subject":"Re: [RFC PATCH v2 12/22] [DNI] apps: cam: Print `MetadataListPlan`\n\tof camera","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:12)\n> When `--list-controls` is specified, print the set of supported metadata.\n> ---\n>  src/apps/cam/camera_session.cpp | 14 ++++++++++++++\n>  1 file changed, 14 insertions(+)\n> \n> diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n> index f63fcb228..91ac3f1bf 100644\n> --- a/src/apps/cam/camera_session.cpp\n> +++ b/src/apps/cam/camera_session.cpp\n> @@ -228,6 +228,20 @@ void CameraSession::listControls() const\n>                         std::cout << std::endl;\n>                 }\n>         }\n> +\n> +       for (const auto &[id, info] : camera_->metadata()) {\n> +               const auto *cid = controls::controls.at(id);\n> +\n> +               std::cout << \"Metadata: [  out] \" << cid->vendor() << \"::\" << cid->name()\n> +                         << \" type:\" << info.type\n> +                         << \" size:\";\n\nI'd prefer s/:\"/: \"/\n\n> +\n> +               if (info.isArray)\n> +                       std::cout << info.numElements << \"x\";\n\nI like the conciseness, but I worry for the ambiguity of if the number before\nthe x is the group number or if it's the number after (from the user's\nperspective). I see it as a modifier and would want the multiplier after, for\nexample. Maybe a label as opposed to a multiplier (multiplicand?) would be\nunambiguous.\n\n\nThanks,\n\nPaul\n\n> +\n> +               std::cout << info.size << \" alignment:\" << info.alignment;\n> +               std::cout << std::endl;\n> +       }\n>  }\n>  \n>  void CameraSession::listProperties() const\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 51BBEBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Sep 2025 08:50:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 60D1B6936D;\n\tThu, 18 Sep 2025 10:50:36 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9159562C39\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Sep 2025 10:50:33 +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 98CE4596;\n\tThu, 18 Sep 2025 10:49:13 +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=\"RJy8hFTU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758185354;\n\tbh=jzv31x0i/UHFt2gGG2iqGU1CWo97XGPGSWDsnc0ori4=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=RJy8hFTU0EpW4ZnkhivTEsrHLeuwOBSb+D5puj9lskS/2iKAQ4G9A6LO6uXTOMFfr\n\tVPHdH+n3n8m+p9DNTZhQjP/HGkEsO2Z/BwzS9GZsh6l6ai1hG4IIf/0FpMGYflU5f6\n\tDmX235YeUNFJphzWynSLM4W+fzwogeSE95F73GOo=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250721104622.1550908-13-barnabas.pocze@ideasonboard.com>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-13-barnabas.pocze@ideasonboard.com>","Subject":"Re: [RFC PATCH v2 12/22] [DNI] apps: cam: Print `MetadataListPlan`\n\tof camera","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:50:27 +0900","Message-ID":"<175818542724.2127323.12423529311722387873@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>"}},{"id":35877,"web_url":"https://patchwork.libcamera.org/comment/35877/","msgid":"<175818569202.2127323.7368437873976574987@neptunite.rasen.tech>","date":"2025-09-18T08:54:52","subject":"Re: [RFC PATCH v2 12/22] [DNI] apps: cam: Print `MetadataListPlan`\n\tof camera","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Quoting Paul Elder (2025-09-18 17:50:27)\n> Hi Barnabás,\n> \n> Thanks for the patch.\n> \n> Quoting Barnabás Pőcze (2025-07-21 19:46:12)\n> > When `--list-controls` is specified, print the set of supported metadata.\n> > ---\n> >  src/apps/cam/camera_session.cpp | 14 ++++++++++++++\n> >  1 file changed, 14 insertions(+)\n> > \n> > diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n> > index f63fcb228..91ac3f1bf 100644\n> > --- a/src/apps/cam/camera_session.cpp\n> > +++ b/src/apps/cam/camera_session.cpp\n> > @@ -228,6 +228,20 @@ void CameraSession::listControls() const\n> >                         std::cout << std::endl;\n> >                 }\n> >         }\n> > +\n> > +       for (const auto &[id, info] : camera_->metadata()) {\n> > +               const auto *cid = controls::controls.at(id);\n> > +\n> > +               std::cout << \"Metadata: [  out] \" << cid->vendor() << \"::\" << cid->name()\n> > +                         << \" type:\" << info.type\n> > +                         << \" size:\";\n> \n> I'd prefer s/:\"/: \"/\n> \n> > +\n> > +               if (info.isArray)\n> > +                       std::cout << info.numElements << \"x\";\n> \n> I like the conciseness, but I worry for the ambiguity of if the number before\n> the x is the group number or if it's the number after (from the user's\n> perspective). I see it as a modifier and would want the multiplier after, for\n> example. Maybe a label as opposed to a multiplier (multiplicand?) would be\n> unambiguous.\n\nI just noticed the DNI, but I think this is a genuinely useful output.\n\n\nPaul\n\n> \n> > +\n> > +               std::cout << info.size << \" alignment:\" << info.alignment;\n> > +               std::cout << std::endl;\n> > +       }\n> >  }\n> >  \n> >  void CameraSession::listProperties() const\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 22A7BBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Sep 2025 08:55:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ECCB069370;\n\tThu, 18 Sep 2025 10:55:01 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EAB4F62C39\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Sep 2025 10:54:58 +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 41EC36DF;\n\tThu, 18 Sep 2025 10:53:37 +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=\"R4LnhEPM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1758185618;\n\tbh=ac6fAca5pHPt50BarDw/w1dfJdqajovIGRoxr2OcdKc=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=R4LnhEPMH/nnQpjxQGvd6gFQnUe/DaEov44PM5uGVHjcqC4Xd0xIYMn0JhfHlB7fy\n\t0UvGJZqB7gH/PKJhS/r/iGumhhvhz5L3Lw5oaGgbv/gj+jqVI6G1abvdg1F0QSSGnN\n\tFd5NFgdQF8/s6cw3rCQQCT2lj7AKybQuFn/1+ADY=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<175818542724.2127323.12423529311722387873@neptunite.rasen.tech>","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-13-barnabas.pocze@ideasonboard.com>\n\t<175818542724.2127323.12423529311722387873@neptunite.rasen.tech>","Subject":"Re: [RFC PATCH v2 12/22] [DNI] apps: cam: Print `MetadataListPlan`\n\tof camera","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:54:52 +0900","Message-ID":"<175818569202.2127323.7368437873976574987@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>"}},{"id":36548,"web_url":"https://patchwork.libcamera.org/comment/36548/","msgid":"<f80314e6-d5bd-4b4e-a07b-c5f5078f1c45@ideasonboard.com>","date":"2025-10-30T11:12:56","subject":"Re: [RFC PATCH v2 12/22] [DNI] apps: cam: Print `MetadataListPlan`\n\tof camera","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. 09. 18. 10:54 keltezéssel, Paul Elder írta:\n> Quoting Paul Elder (2025-09-18 17:50:27)\n>> Hi Barnabás,\n>>\n>> Thanks for the patch.\n>>\n>> Quoting Barnabás Pőcze (2025-07-21 19:46:12)\n>>> When `--list-controls` is specified, print the set of supported metadata.\n>>> ---\n>>>   src/apps/cam/camera_session.cpp | 14 ++++++++++++++\n>>>   1 file changed, 14 insertions(+)\n>>>\n>>> diff --git a/src/apps/cam/camera_session.cpp b/src/apps/cam/camera_session.cpp\n>>> index f63fcb228..91ac3f1bf 100644\n>>> --- a/src/apps/cam/camera_session.cpp\n>>> +++ b/src/apps/cam/camera_session.cpp\n>>> @@ -228,6 +228,20 @@ void CameraSession::listControls() const\n>>>                          std::cout << std::endl;\n>>>                  }\n>>>          }\n>>> +\n>>> +       for (const auto &[id, info] : camera_->metadata()) {\n>>> +               const auto *cid = controls::controls.at(id);\n>>> +\n>>> +               std::cout << \"Metadata: [  out] \" << cid->vendor() << \"::\" << cid->name()\n>>> +                         << \" type:\" << info.type\n>>> +                         << \" size:\";\n>>\n>> I'd prefer s/:\"/: \"/\n\nI really prefer it without the space. E.g.\n\n   Metadata: [  out] debug::TestInteger64s type:6 size:8 alignment:8 count:2\n\nvs.\n\n   Metadata: [  out] debug::TestInteger64s type: 6 size: 8 alignment: 8 count: 2\n\nto me having the space makes it harder to parse which parts constitute \"one unit\".\n\n>>\n>>> +\n>>> +               if (info.isArray)\n>>> +                       std::cout << info.numElements << \"x\";\n>>\n>> I like the conciseness, but I worry for the ambiguity of if the number before\n>> the x is the group number or if it's the number after (from the user's\n>> perspective). I see it as a modifier and would want the multiplier after, for\n>> example. Maybe a label as opposed to a multiplier (multiplicand?) would be\n>> unambiguous.\n\nNow it's printed as \"count:X\" if it is an array.\n\n\n> \n> I just noticed the DNI, but I think this is a genuinely useful output.\n\nI see, this could indeed be useful. I think the main question is if it\nneeds a separate option (e.g. --list-metadata) or not. And the type is\ncurrently printed as a number, that would also probably need to be\nreplaced with something human readable.\n\n\nRegards,\nBarnabás Pőcze\n\n\n> \n> \n> Paul\n> \n>>\n>>> +\n>>> +               std::cout << info.size << \" alignment:\" << info.alignment;\n>>> +               std::cout << std::endl;\n>>> +       }\n>>>   }\n>>>\n>>>   void CameraSession::listProperties() const\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 1CC3EC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Oct 2025 11:13:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1F98860891;\n\tThu, 30 Oct 2025 12:13:02 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 412BA603ED\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Oct 2025 12:13:00 +0100 (CET)","from [192.168.33.29] (185.221.140.239.nat.pool.zt.hu\n\t[185.221.140.239])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 243D7E1F;\n\tThu, 30 Oct 2025 12:11:10 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"VYyIqN1n\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761822670;\n\tbh=pmV4ttpQzTEc1YLobHcOF+O452GT5RxUP82twsVyZQw=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=VYyIqN1nygWoq70J61tX4w3dfy4EZusw09ZYq3Iz/gwzNJVgFnalaFFigXFl7muF8\n\tP8tnm4Efs+oPFZL7TP+JCKPYCOpWIaMDFKz2iJWSAy27x9yHH42sdOgJVumChtW9bL\n\tn45r3AFynxE20DkESsEVxpkMYftmBVFpwZGkoLwU=","Message-ID":"<f80314e6-d5bd-4b4e-a07b-c5f5078f1c45@ideasonboard.com>","Date":"Thu, 30 Oct 2025 12:12:56 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 12/22] [DNI] apps: cam: Print `MetadataListPlan`\n\tof camera","To":"Paul Elder <paul.elder@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250721104622.1550908-1-barnabas.pocze@ideasonboard.com>\n\t<20250721104622.1550908-13-barnabas.pocze@ideasonboard.com>\n\t<175818542724.2127323.12423529311722387873@neptunite.rasen.tech>\n\t<fyx7IW2QPOVgweUvHhXVcizA70jLk3EL4qzHZdXYFBwyfFCCIwyzjKuV32tD7ZQTFDPyvIiwUQJzC2oDOiGNwQ==@protonmail.internalid>\n\t<175818569202.2127323.7368437873976574987@neptunite.rasen.tech>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<175818569202.2127323.7368437873976574987@neptunite.rasen.tech>","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>"}}]