[{"id":34781,"web_url":"https://patchwork.libcamera.org/comment/34781/","msgid":"<20250704094623.GA29218@pendragon.ideasonboard.com>","date":"2025-07-04T09:46:23","subject":"Re: [PATCH v3] libcamerasrc: Report camera properties as device\n\tproperties","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the patch.\n\nOn Fri, Jul 04, 2025 at 11:04:24AM +0530, Umang Jain wrote:\n> Iterate over all libcamera camera properties and report them as\n> device properties. The values are reported as strings, including the ones\n> which enum types, for better readability.\n> \n> Signed-off-by: Umang Jain <uajain@igalia.com>\n> ---\n> Changes in v3:\n> - Iterate over all camera properties and report everything.\n> ---\n>  src/gstreamer/gstlibcameraprovider.cpp | 24 ++++++++++++++++++++++++\n>  1 file changed, 24 insertions(+)\n> \n> diff --git a/src/gstreamer/gstlibcameraprovider.cpp b/src/gstreamer/gstlibcameraprovider.cpp\n> index 5da96ea3..237baeb2 100644\n> --- a/src/gstreamer/gstlibcameraprovider.cpp\n> +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> @@ -12,6 +12,7 @@\n>  \n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n> +#include <libcamera/property_ids.h>\n>  \n>  #include \"gstlibcamerasrc.h\"\n>  #include \"gstlibcamera-utils.h\"\n> @@ -130,6 +131,7 @@ gst_libcamera_device_new(const std::shared_ptr<Camera> &camera)\n>  {\n>  \tstatic const std::array roles{ StreamRole::VideoRecording };\n>  \tg_autoptr(GstCaps) caps = gst_caps_new_empty();\n> +\tg_autoptr(GstStructure) props = gst_structure_new_empty(\"camera-properties\");\n\nYou can move this just before the for loop below.\n\n>  \tconst gchar *name = camera->id().c_str();\n>  \n>  \tstd::unique_ptr<CameraConfiguration> config = camera->generateConfiguration(roles);\n> @@ -144,12 +146,34 @@ gst_libcamera_device_new(const std::shared_ptr<Camera> &camera)\n>  \t\t\tgst_caps_append(caps, sub_caps);\n>  \t}\n>  \n> +\tfor (const auto &[key, value] : camera->properties()) {\n> +\t\tconst ControlId *id = properties::properties.at(key);\n> +\n> +\t\tg_autoptr(GString) prop_str = g_string_new(\"api.libcamera.\");\n> +\t\tg_string_append(prop_str, id->name().c_str());\n> +\n> +\t\t/* Use string names for enum values for better readability */\n\ns/readability/readability./\n\n> +\t\tif (value.type() == ControlTypeInteger32) {\n> +\t\t\tint32_t val = value.get<int32_t>();\n> +\t\t\tconst auto &it = id->enumerators().find(val);\n> +\t\t\tif (it != id->enumerators().end()) {\n> +\t\t\t\tgst_structure_set(props, prop_str->str, G_TYPE_STRING,\n> +\t\t\t\t\t\t  it->second.c_str(), nullptr);\n> +\t\t\t\tcontinue;\n> +\t\t\t}\n> +\t\t}\n> +\n> +\t\tgst_structure_set(props, prop_str->str, G_TYPE_STRING,\n> +\t\t\t\t  value.toString().c_str(), nullptr);\n\nInstead of using a libcamera-specific internal string representation of\nthe value, it should be converted to native GStreamer types. Numerical\nproperties should use a numerical type, rectangles should be converted\nto the native GStreamer representation, ...\n\nNicolas, any opinion on this ?\n\n> +\t}\n> +\n>  \treturn GST_DEVICE(g_object_new(GST_TYPE_LIBCAMERA_DEVICE,\n>  \t\t\t\t       /* \\todo Use a unique identifier instead of camera name. */\n>  \t\t\t\t       \"name\", name,\n>  \t\t\t\t       \"display-name\", name,\n>  \t\t\t\t       \"caps\", caps,\n>  \t\t\t\t       \"device-class\", \"Source/Video\",\n> +\t\t\t\t       \"properties\", props,\n>  \t\t\t\t       nullptr));\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 80A52BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Jul 2025 09:46:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8FB5768E29;\n\tFri,  4 Jul 2025 11:46:54 +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 DB42868E29\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Jul 2025 11:46:52 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 8B64D669;\n\tFri,  4 Jul 2025 11:46:27 +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=\"vgBbNBy8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751622388;\n\tbh=0pgzfP5d/9Nr2G5EI005u1rNDOwhAq41kbnvOOprDNY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=vgBbNBy8O0VdMB4aB8qawAf55jH/gQbpyOaa4BY7VbkDXZ+eNs4G4fnr6lczLk211\n\tPjc6A3Z4tF6NGNCnKKe1ELyGvdDleCE5Bo4fngaRgsSkHg/+EIKSf5QqYyOOV0BRe9\n\tBcdYpwM0avgAilcdLkfx9PnsMj40u9lTnJA9n/ZA=","Date":"Fri, 4 Jul 2025 12:46:23 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tGiacomo Cappellini <giacomo.cappellini.87@gmail.com>,\n\tNicolas Dufresne <nicolas@ndufresne.ca>","Subject":"Re: [PATCH v3] libcamerasrc: Report camera properties as device\n\tproperties","Message-ID":"<20250704094623.GA29218@pendragon.ideasonboard.com>","References":"<20250704053424.23718-1-uajain@igalia.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250704053424.23718-1-uajain@igalia.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":34782,"web_url":"https://patchwork.libcamera.org/comment/34782/","msgid":"<f58f9f9ceaac81cf6fe2d6696909ede9ad64e494.camel@ndufresne.ca>","date":"2025-07-04T13:40:03","subject":"Re: [PATCH v3] libcamerasrc: Report camera properties as device\n\tproperties","submitter":{"id":30,"url":"https://patchwork.libcamera.org/api/people/30/","name":"Nicolas Dufresne","email":"nicolas@ndufresne.ca"},"content":"Le vendredi 04 juillet 2025 à 12:46 +0300, Laurent Pinchart a écrit :\n> Hi Umang,\n> \n> Thank you for the patch.\n> \n> On Fri, Jul 04, 2025 at 11:04:24AM +0530, Umang Jain wrote:\n> > Iterate over all libcamera camera properties and report them as\n> > device properties. The values are reported as strings, including the ones\n> > which enum types, for better readability.\n> > \n> > Signed-off-by: Umang Jain <uajain@igalia.com>\n> > ---\n> > Changes in v3:\n> > - Iterate over all camera properties and report everything.\n\nHere, outside of commit message, you could pate the output of gst-device-\nmonitor-1.0 Video/Source, that helps to see what kind of output we get.\n\n> > ---\n> >  src/gstreamer/gstlibcameraprovider.cpp | 24 ++++++++++++++++++++++++\n> >  1 file changed, 24 insertions(+)\n> > \n> > diff --git a/src/gstreamer/gstlibcameraprovider.cpp\n> > b/src/gstreamer/gstlibcameraprovider.cpp\n> > index 5da96ea3..237baeb2 100644\n> > --- a/src/gstreamer/gstlibcameraprovider.cpp\n> > +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> > @@ -12,6 +12,7 @@\n> >  \n> >  #include <libcamera/camera.h>\n> >  #include <libcamera/camera_manager.h>\n> > +#include <libcamera/property_ids.h>\n> >  \n> >  #include \"gstlibcamerasrc.h\"\n> >  #include \"gstlibcamera-utils.h\"\n> > @@ -130,6 +131,7 @@ gst_libcamera_device_new(const std::shared_ptr<Camera>\n> > &camera)\n> >  {\n> >  \tstatic const std::array roles{ StreamRole::VideoRecording };\n> >  \tg_autoptr(GstCaps) caps = gst_caps_new_empty();\n> > +\tg_autoptr(GstStructure) props = gst_structure_new_empty(\"camera-\n> > properties\");\n> \n> You can move this just before the for loop below.\n> \n> >  \tconst gchar *name = camera->id().c_str();\n> >  \n> >  \tstd::unique_ptr<CameraConfiguration> config = camera-\n> > >generateConfiguration(roles);\n> > @@ -144,12 +146,34 @@ gst_libcamera_device_new(const std::shared_ptr<Camera>\n> > &camera)\n> >  \t\t\tgst_caps_append(caps, sub_caps);\n> >  \t}\n> >  \n> > +\tfor (const auto &[key, value] : camera->properties()) {\n> > +\t\tconst ControlId *id = properties::properties.at(key);\n> > +\n> > +\t\tg_autoptr(GString) prop_str =\n> > g_string_new(\"api.libcamera.\");\n> > +\t\tg_string_append(prop_str, id->name().c_str());\n> > +\n> > +\t\t/* Use string names for enum values for better readability\n> > */\n> \n> s/readability/readability./\n> \n> > +\t\tif (value.type() == ControlTypeInteger32) {\n> > +\t\t\tint32_t val = value.get<int32_t>();\n> > +\t\t\tconst auto &it = id->enumerators().find(val);\n> > +\t\t\tif (it != id->enumerators().end()) {\n> > +\t\t\t\tgst_structure_set(props, prop_str->str,\n> > G_TYPE_STRING,\n> > +\t\t\t\t\t\t  it->second.c_str(),\n> > nullptr);\n> > +\t\t\t\tcontinue;\n> > +\t\t\t}\n> > +\t\t}\n> > +\n> > +\t\tgst_structure_set(props, prop_str->str, G_TYPE_STRING,\n> > +\t\t\t\t  value.toString().c_str(), nullptr);\n> \n> Instead of using a libcamera-specific internal string representation of\n> the value, it should be converted to native GStreamer types. Numerical\n> properties should use a numerical type, rectangles should be converted\n> to the native GStreamer representation, ...\n> \n> Nicolas, any opinion on this ?\n\nThis is the first time we have an API we don't have to fully map manually.\nLooking around, only G_TYPE_UINT and G_TYPE_STRING is currently used by other\nproviders. Its likely a good idea for simplicity. Though, when I look at the\nvulkan providers, what they did for flags and enum is to have both, e.g. flags +\nflags_str (no compromise). If you link to Vulkan API, you will find handy the\nvalue, and otherwise you have a string version which is human readable.\n\nNow, I don't see an \"enum\" type in the list of libcamera control types. So can\nthis really be handled generically ? Here's that list I found:\n\n\tControlTypeBool -> UINT\n\tControlTypeByte --> BASE64 STRING\n\tControlTypeUnsigned16 -> UINT\n\tControlTypeUnsigned32 --> UINT\n\tControlTypeInteger32 --> UINT\n\tControlTypeInteger64 --> UINT64\n\tControlTypeFloat --> DOUBLE ?\n\tControlTypeString --> STRING\n\tControlTypeRectangle --> No match, break in 4 _x, _y, _width, _height?\n\tControlTypeSize --> UINT64\n\tControlTypePoint --> No match, break in 2 _x, _y ?\n\nGST_TYPE_LIST/ARRAY can be used if these comes as an array, you can define your\nown types + serializers also if you want to have rec/point in a single field.\nThis is not a GStreamer but a GLib thing, GstStructure holds GValue, and offer\nhelper for the most common.\n\nStepping back, if we consider we need manual mapping, why not go back to just\nexposing the rotation for now, and make it so its easy to map more later ?\n\n> \n> > +\t}\n> > +\n> >  \treturn GST_DEVICE(g_object_new(GST_TYPE_LIBCAMERA_DEVICE,\n> >  \t\t\t\t       /* \\todo Use a unique identifier\n> > instead of camera name. */\n> >  \t\t\t\t       \"name\", name,\n> >  \t\t\t\t       \"display-name\", name,\n> >  \t\t\t\t       \"caps\", caps,\n> >  \t\t\t\t       \"device-class\", \"Source/Video\",\n> > +\t\t\t\t       \"properties\", props,\n> >  \t\t\t\t       nullptr));\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 A6125C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Jul 2025 13:40:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5635568E60;\n\tFri,  4 Jul 2025 15:40:09 +0200 (CEST)","from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com\n\t[IPv6:2607:f8b0:4864:20::f2e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DD68D68E30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Jul 2025 15:40:06 +0200 (CEST)","by mail-qv1-xf2e.google.com with SMTP id\n\t6a1803df08f44-6facba680a1so12768546d6.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 04 Jul 2025 06:40:06 -0700 (PDT)","from ?IPv6:2606:6d00:17:b699::c41? ([2606:6d00:17:b699::c41])\n\tby smtp.gmail.com with ESMTPSA id\n\taf79cd13be357-7d5dbd9422csm146658685a.15.2025.07.04.06.40.04\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 04 Jul 2025 06:40:04 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=ndufresne-ca.20230601.gappssmtp.com\n\theader.i=@ndufresne-ca.20230601.gappssmtp.com\n\theader.b=\"2vz2PITX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1751636406;\n\tx=1752241206; darn=lists.libcamera.org; \n\th=mime-version:user-agent:autocrypt:references:in-reply-to:date:cc:to\n\t:from:subject:message-id:from:to:cc:subject:date:message-id:reply-to; \n\tbh=uXfczVYCNntv6KoEFG/L6u7HYTQl/FExqeIBTlzOwWE=;\n\tb=2vz2PITXZY3WJUseVHjWb8e2NCnjXMCcp6HfKKT0KWjbo5t5659eqMXWncdiHBy7e1\n\tz0vbbwaASi+jd77f9nRxIs+q3nIEFax2Pj9Cb0DZEHyYh7QEHG64GjMRv5OXKAFeFzCu\n\tTy/OMits6o2VdLymwPvoL6WcxZIX7tlaeu/dTGaY8Sa/j2Pm4cdTEuDs7L5d7Z1OIOQ9\n\tapYulemXys/y0c0MsXl76rEyg4e6Y2iGXX/lORF7ClLWCrVXsgNt3lGPmWoxseDUNZWw\n\tPD7fYy0Uc1zIFlWPJMIuDe3mpJrq327tzV8cHnFvBWjt81Hv/tmR2rg8JC3ArSBY44w+\n\tKWfA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1751636406; x=1752241206;\n\th=mime-version:user-agent:autocrypt:references:in-reply-to:date:cc:to\n\t:from:subject:message-id:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=uXfczVYCNntv6KoEFG/L6u7HYTQl/FExqeIBTlzOwWE=;\n\tb=lpwUZBLFYEvcukQd5qU+PZIPyYU3DjPmzvdpawd9JT+0nObOroxkIaqNofUuoWxcmN\n\t7giQToZPcfdxC4XiJ1FQy7EPrYV40wXbvdWHxyskf4C2FEE3EYshl7F14KwU7jiqXIqb\n\tLMQAz7hi5v2VL+LKZsSnhgvniaURDyDqNUHyIGbKiu3+FCH2DiFsW4eZ1qw9/AyO4TBR\n\t1qkXmbjd+5osCsMwf3Fk27y/55Tcv3XW6qkeoZMYUO/xluekf/UmZBsnJyZGE1WtdRcI\n\t3qpcgKvHlqaykNFPXqofyXdW1OvxKOK/BpqX12lZBPKhLsszBkVUn3Quoauo8JoeoK0d\n\tIrtw==","X-Gm-Message-State":"AOJu0Yz8Od3sk5rZ6/5ZM6KCabcPwX+NqlzYW1Zm0Myv7WXcfisMVqFi\n\tETkOyqAYiDs0bCJi9AZ+HOQVv1L1/k4BJTJga9xE6RG/xNr6shBmIir/2rC5/1SpI4g=","X-Gm-Gg":"ASbGnctpTL+Fud/5JYdpWikESg7l9zK3zgNKByvkPAjrJJfQY7Gn0Gx+6x6cFlmZxdH\n\tiOwUnGOwjA04CFkmEDhgcQkof9iAE/6MHcRr5faKqzJeu+VoyNv4NgMsuhfbNyhtivnvx4deJCh\n\ta1vC+e4Adry1ZLD33pENWYl42MfHQyuX3i+tqY6XCAY3jg2CGp95A8RQ8687xUJGCchG3QfmtlD\n\tazBgiSvIWL6Jdx1naaT86E55vuCbt9PBbqBsMRnmeykgUMLIBmpz6ZupG4uke3KChVhZHmwwDI3\n\t/iarxMB8hVfcjVWjnxFRhZmi/eTPhTEOp+w9gO3/qWbQJnqWLM+odTnbeueJrDlwdMM=","X-Google-Smtp-Source":"AGHT+IH/PoiYZGBXwfxKdxg9Z8ncV3a74bXs6fWgHkcGlsfCwIUqdTkfQkqOrjxY3dH0MBReGjbQDg==","X-Received":"by 2002:ad4:5cc2:0:b0:6fd:74bf:6062 with SMTP id\n\t6a1803df08f44-702c8b81174mr29256886d6.17.1751636405654; \n\tFri, 04 Jul 2025 06:40:05 -0700 (PDT)","Message-ID":"<f58f9f9ceaac81cf6fe2d6696909ede9ad64e494.camel@ndufresne.ca>","Subject":"Re: [PATCH v3] libcamerasrc: Report camera properties as device\n\tproperties","From":"Nicolas Dufresne <nicolas@ndufresne.ca>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Umang Jain\n\t<uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org, Giacomo Cappellini\n\t<giacomo.cappellini.87@gmail.com>","Date":"Fri, 04 Jul 2025 09:40:03 -0400","In-Reply-To":"<20250704094623.GA29218@pendragon.ideasonboard.com>","References":"<20250704053424.23718-1-uajain@igalia.com>\n\t<20250704094623.GA29218@pendragon.ideasonboard.com>","Autocrypt":"addr=nicolas@ndufresne.ca; prefer-encrypt=mutual;\n\tkeydata=mDMEaCN2ixYJKwYBBAHaRw8BAQdAM0EHepTful3JOIzcPv6ekHOenE1u0vDG1gdHFrChD\n\t/e0MU5pY29sYXMgRHVmcmVzbmUgPG5pY29sYXMuZHVmcmVzbmVAY29sbGFib3JhLmNvbT6ImQQTFg\n\toAQQIbAwULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgBYhBO8NUoEVxMPCGgRvEtlBlFEpYHL0BQJ\n\toLLLGBQkJZfd1AAoJENlBlFEpYHL0BEkA/3qkWYt99myYFSmTJUF8UB/7OroEm3vr1HRqXeQe9Qp2\n\tAP0bsoAe6KjEPa/pJfuJ2khrOPPHxvyt/PBNbI5BYcIABLQnTmljb2xhcyBEdWZyZXNuZSA8bmljb\n\t2xhc0BuZHVmcmVzbmUuY2E+iJkEExYKAEECGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AWIQ\n\tTvDVKBFcTDwhoEbxLZQZRRKWBy9AUCaCyy+AUJCWX3dQAKCRDZQZRRKWBy9FJ5AQCNy8SX8DpHbLa\n\tcy58vgDwyIpB89mok9eWGGejY9mqpRwEAhHzs+/n5xlVlM3bqy1yHnAzJqVwqBE1D0jG0a9V6VQI=","Content-Type":"multipart/signed; micalg=\"pgp-sha512\";\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"=-jQIxzEBdwAR10KU1AItG\"","User-Agent":"Evolution 3.56.2 (3.56.2-1.fc42) ","MIME-Version":"1.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":34784,"web_url":"https://patchwork.libcamera.org/comment/34784/","msgid":"<ufzmxoziw66yrq4t4dt6zqbxwlomc6ocpplmgdhfezbvjlrstq@3i62owiekkem>","date":"2025-07-05T05:30:09","subject":"Re: [PATCH v3] libcamerasrc: Report camera properties as device\n\tproperties","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On Fri, Jul 04, 2025 at 09:40:03AM -0400, Nicolas Dufresne wrote:\n> Le vendredi 04 juillet 2025 à 12:46 +0300, Laurent Pinchart a écrit :\n> > Hi Umang,\n> > \n> > Thank you for the patch.\n> > \n> > On Fri, Jul 04, 2025 at 11:04:24AM +0530, Umang Jain wrote:\n> > > Iterate over all libcamera camera properties and report them as\n> > > device properties. The values are reported as strings, including the ones\n> > > which enum types, for better readability.\n> > > \n> > > Signed-off-by: Umang Jain <uajain@igalia.com>\n> > > ---\n> > > Changes in v3:\n> > > - Iterate over all camera properties and report everything.\n> \n> Here, outside of commit message, you could pate the output of gst-device-\n> monitor-1.0 Video/Source, that helps to see what kind of output we get.\n\n[~]$ gst-device-monitor-1.0 \nProbing devices...\n\n[3:00:30.247078308] [64824]  INFO Camera camera_manager.cpp:326 libcamera v0.5.1+47-12a310d9\n\nDevice found:\n\n\tname  : \\_SB_.PC00.XHCI.RHUB.HS04-4:1.0-04f2:b7e0\n\tclass : Source/Video\n\tcaps  : image/jpeg, width=640, height=360\n\t        image/jpeg, width=640, height=480\n\t        image/jpeg, width=848, height=480\n\t        image/jpeg, width=960, height=540\n\t        image/jpeg, width=1280, height=720\n\t        image/jpeg, width=1920, height=1080\n\t        video/x-raw, format=YUY2, width=640, height=360\n\t        video/x-raw, format=YUY2, width=640, height=480\n\tproperties:\n\t\tapi.libcamera.SystemDevices = [ 20736 ]\n\t\tapi.libcamera.PixelArrayActiveAreas = [ (0, 0)/1920x1080 ]\n\t\tapi.libcamera.PixelArraySize = 1920x1080\n\t\tapi.libcamera.Location = CameraLocationFront\n\t\tapi.libcamera.Model = Integrated Camera: Integrated C\n\tgst-launch-1.0 libcamerasrc camera-name=\"\\\\_SB_.PC00.XHCI.RHUB.HS04-4:1.0-04f2:b7e0\" ! ...\n\nNow I realise, rotation is not reported. Because UVC pipeline handler\ndoesn't set it. So camera->properties() will only report properties set\nby the pipeline handler.\n\nQ: Do we want to report *all* properties as per property_ids_core.yaml ?\nAnd report \"Unset\" or equivant, in the device provider? \n\n> \n> > > ---\n> > >  src/gstreamer/gstlibcameraprovider.cpp | 24 ++++++++++++++++++++++++\n> > >  1 file changed, 24 insertions(+)\n> > > \n> > > diff --git a/src/gstreamer/gstlibcameraprovider.cpp\n> > > b/src/gstreamer/gstlibcameraprovider.cpp\n> > > index 5da96ea3..237baeb2 100644\n> > > --- a/src/gstreamer/gstlibcameraprovider.cpp\n> > > +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> > > @@ -12,6 +12,7 @@\n> > >  \n> > >  #include <libcamera/camera.h>\n> > >  #include <libcamera/camera_manager.h>\n> > > +#include <libcamera/property_ids.h>\n> > >  \n> > >  #include \"gstlibcamerasrc.h\"\n> > >  #include \"gstlibcamera-utils.h\"\n> > > @@ -130,6 +131,7 @@ gst_libcamera_device_new(const std::shared_ptr<Camera>\n> > > &camera)\n> > >  {\n> > >  \tstatic const std::array roles{ StreamRole::VideoRecording };\n> > >  \tg_autoptr(GstCaps) caps = gst_caps_new_empty();\n> > > +\tg_autoptr(GstStructure) props = gst_structure_new_empty(\"camera-\n> > > properties\");\n> > \n> > You can move this just before the for loop below.\n> > \n> > >  \tconst gchar *name = camera->id().c_str();\n> > >  \n> > >  \tstd::unique_ptr<CameraConfiguration> config = camera-\n> > > >generateConfiguration(roles);\n> > > @@ -144,12 +146,34 @@ gst_libcamera_device_new(const std::shared_ptr<Camera>\n> > > &camera)\n> > >  \t\t\tgst_caps_append(caps, sub_caps);\n> > >  \t}\n> > >  \n> > > +\tfor (const auto &[key, value] : camera->properties()) {\n> > > +\t\tconst ControlId *id = properties::properties.at(key);\n> > > +\n> > > +\t\tg_autoptr(GString) prop_str =\n> > > g_string_new(\"api.libcamera.\");\n> > > +\t\tg_string_append(prop_str, id->name().c_str());\n> > > +\n> > > +\t\t/* Use string names for enum values for better readability\n> > > */\n> > \n> > s/readability/readability./\n> > \n> > > +\t\tif (value.type() == ControlTypeInteger32) {\n> > > +\t\t\tint32_t val = value.get<int32_t>();\n> > > +\t\t\tconst auto &it = id->enumerators().find(val);\n> > > +\t\t\tif (it != id->enumerators().end()) {\n> > > +\t\t\t\tgst_structure_set(props, prop_str->str,\n> > > G_TYPE_STRING,\n> > > +\t\t\t\t\t\t  it->second.c_str(),\n> > > nullptr);\n> > > +\t\t\t\tcontinue;\n> > > +\t\t\t}\n> > > +\t\t}\n> > > +\n> > > +\t\tgst_structure_set(props, prop_str->str, G_TYPE_STRING,\n> > > +\t\t\t\t  value.toString().c_str(), nullptr);\n> > \n> > Instead of using a libcamera-specific internal string representation of\n> > the value, it should be converted to native GStreamer types. Numerical\n> > properties should use a numerical type, rectangles should be converted\n> > to the native GStreamer representation, ...\n> > \n> > Nicolas, any opinion on this ?\n> \n> This is the first time we have an API we don't have to fully map manually.\n> Looking around, only G_TYPE_UINT and G_TYPE_STRING is currently used by other\n> providers. Its likely a good idea for simplicity. Though, when I look at the\n> vulkan providers, what they did for flags and enum is to have both, e.g. flags +\n> flags_str (no compromise). If you link to Vulkan API, you will find handy the\n> value, and otherwise you have a string version which is human readable.\n\nyes, I thought of it initially where I suggested:\n\tmounting-rotation : <angle_value>\n\tmounting-rotation-str: \"Rotate180\" \n\n> \n> Now, I don't see an \"enum\" type in the list of libcamera control types. So can\n> this really be handled generically ? Here's that list I found:\n\nenums currently get mapped to ControlTypeInteger32 and  currently you cannot\nknow if a ControlValue is a enum, without going through\nControlId::enumerators() call, which returns a map <int, EnumString>.\n\n> \n> \tControlTypeBool -> UINT\n> \tControlTypeByte --> BASE64 STRING\n> \tControlTypeUnsigned16 -> UINT\n> \tControlTypeUnsigned32 --> UINT\n> \tControlTypeInteger32 --> UINT\n\nThis would be G_TYPE_INT no ?\n\n> \tControlTypeInteger64 --> UINT64\n> \tControlTypeFloat --> DOUBLE ?\n> \tControlTypeString --> STRING\n> \tControlTypeRectangle --> No match, break in 4 _x, _y, _width, _height?\n\nAre you suggesting an array of 4 values or property breakup for e.g.\n\t\n\tapi.libcamera.PixelArrayActiveAreaX\n\tapi.libcamera.PixelArrayActiveAreaY\n\tapi.libcamera.PixelArrayActiveAreaW\n\tapi.libcamera.PixelArrayActiveAreaH\n\n> \tControlTypeSize --> UINT64\n\nDitto\n\n> \tControlTypePoint --> No match, break in 2 _x, _y ?\n> \n> GST_TYPE_LIST/ARRAY can be used if these comes as an array, you can define your\n> own types + serializers also if you want to have rec/point in a single field.\n> This is not a GStreamer but a GLib thing, GstStructure holds GValue, and offer\n> helper for the most common.\n\nI wonder if we do endup with really complex ContolType* which \n1) won't exactly map to GStreamer/GLib values\n2) Their string representation will be complex as well...\n\nOn the other hand, camera properties will be relatively simpler than\ncamera controls ?\n\n> \n> Stepping back, if we consider we need manual mapping, why not go back to just\n> exposing the rotation for now, and make it so its easy to map more later ?\n> \n> > \n> > > +\t}\n> > > +\n> > >  \treturn GST_DEVICE(g_object_new(GST_TYPE_LIBCAMERA_DEVICE,\n> > >  \t\t\t\t       /* \\todo Use a unique identifier\n> > > instead of camera name. */\n> > >  \t\t\t\t       \"name\", name,\n> > >  \t\t\t\t       \"display-name\", name,\n> > >  \t\t\t\t       \"caps\", caps,\n> > >  \t\t\t\t       \"device-class\", \"Source/Video\",\n> > > +\t\t\t\t       \"properties\", props,\n> > >  \t\t\t\t       nullptr));\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 74DF7BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  5 Jul 2025 05:30:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2595068E75;\n\tSat,  5 Jul 2025 07:30:11 +0200 (CEST)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 10BCA68E72\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  5 Jul 2025 07:30:10 +0200 (CEST)","from [49.36.71.127] (helo=uajain)\n\tby fanzine2.igalia.com with esmtpsa \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1uXvTS-00CgsW-22; Sat, 05 Jul 2025 07:30:06 +0200"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"rg/UAyUX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version\n\t:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=IXV915JW1UonHahYXpE25JoNq42evXlHQyTfedUYHj0=;\n\tb=rg/UAyUXa76YyMLBH4uQKljVoX\n\thK3lNBjHIkT3sFXg8Xa0AKscwTnzJHeLzy5dCG1s7nMygYtyjjwA09gDI0X3/ctuJjvS2Piip2aK8\n\taa+49lP5CPJL4Aw/mMwUwAd+VSvYR+9FbMG3a9Kd1ANg18lTwMM2RoQnkxtsPzaJwja5vRl2dLuUO\n\tQKTdgr63vbwm5p/Fl1AcYNza8ExL1HRJLlt17TYdplP96bXbTn3vqc7Cw/UhVqmOUwfLTQ/uP+IZc\n\t2NRmELAanWnaf4xLXDABPkyra6gHdKTVA5eRU5VSHBqEBLywxmTbS6TW6+cSKgPBFDf7NXKj1S/qN\n\tr4AC8qfA==;","Date":"Sat, 5 Jul 2025 11:00:09 +0530","From":"Umang Jain <uajain@igalia.com>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org,\n\tGiacomo Cappellini <giacomo.cappellini.87@gmail.com>","Subject":"Re: [PATCH v3] libcamerasrc: Report camera properties as device\n\tproperties","Message-ID":"<ufzmxoziw66yrq4t4dt6zqbxwlomc6ocpplmgdhfezbvjlrstq@3i62owiekkem>","References":"<20250704053424.23718-1-uajain@igalia.com>\n\t<20250704094623.GA29218@pendragon.ideasonboard.com>\n\t<f58f9f9ceaac81cf6fe2d6696909ede9ad64e494.camel@ndufresne.ca>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<f58f9f9ceaac81cf6fe2d6696909ede9ad64e494.camel@ndufresne.ca>","User-Agent":"NeoMutt/20250510-dirty","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":35021,"web_url":"https://patchwork.libcamera.org/comment/35021/","msgid":"<175318571301.50296.14428245107787711367@ping.linuxembedded.co.uk>","date":"2025-07-22T12:01:53","subject":"Re: [PATCH v3] libcamerasrc: Report camera properties as device\n\tproperties","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Umang Jain (2025-07-05 06:30:09)\n> On Fri, Jul 04, 2025 at 09:40:03AM -0400, Nicolas Dufresne wrote:\n> > Le vendredi 04 juillet 2025 à 12:46 +0300, Laurent Pinchart a écrit :\n> > > Hi Umang,\n> > > \n> > > Thank you for the patch.\n> > > \n> > > On Fri, Jul 04, 2025 at 11:04:24AM +0530, Umang Jain wrote:\n> > > > Iterate over all libcamera camera properties and report them as\n> > > > device properties. The values are reported as strings, including the ones\n> > > > which enum types, for better readability.\n> > > > \n> > > > Signed-off-by: Umang Jain <uajain@igalia.com>\n> > > > ---\n> > > > Changes in v3:\n> > > > - Iterate over all camera properties and report everything.\n> > \n> > Here, outside of commit message, you could pate the output of gst-device-\n> > monitor-1.0 Video/Source, that helps to see what kind of output we get.\n> \n> [~]$ gst-device-monitor-1.0 \n> Probing devices...\n> \n> [3:00:30.247078308] [64824]  INFO Camera camera_manager.cpp:326 libcamera v0.5.1+47-12a310d9\n> \n> Device found:\n> \n>         name  : \\_SB_.PC00.XHCI.RHUB.HS04-4:1.0-04f2:b7e0\n>         class : Source/Video\n>         caps  : image/jpeg, width=640, height=360\n>                 image/jpeg, width=640, height=480\n>                 image/jpeg, width=848, height=480\n>                 image/jpeg, width=960, height=540\n>                 image/jpeg, width=1280, height=720\n>                 image/jpeg, width=1920, height=1080\n>                 video/x-raw, format=YUY2, width=640, height=360\n>                 video/x-raw, format=YUY2, width=640, height=480\n>         properties:\n>                 api.libcamera.SystemDevices = [ 20736 ]\n>                 api.libcamera.PixelArrayActiveAreas = [ (0, 0)/1920x1080 ]\n>                 api.libcamera.PixelArraySize = 1920x1080\n>                 api.libcamera.Location = CameraLocationFront\n>                 api.libcamera.Model = Integrated Camera: Integrated C\n>         gst-launch-1.0 libcamerasrc camera-name=\"\\\\_SB_.PC00.XHCI.RHUB.HS04-4:1.0-04f2:b7e0\" ! ...\n> \n> Now I realise, rotation is not reported. Because UVC pipeline handler\n> doesn't set it. So camera->properties() will only report properties set\n> by the pipeline handler.\n> \n> Q: Do we want to report *all* properties as per property_ids_core.yaml ?\n> And report \"Unset\" or equivant, in the device provider? \n\nI would only expect to see properties that are set to be represented.\n\nI suspect 'rotation' is a difficult case for UVC cameras - they can be\nfreely rotated if they're external?\n\n> > > >  src/gstreamer/gstlibcameraprovider.cpp | 24 ++++++++++++++++++++++++\n> > > >  1 file changed, 24 insertions(+)\n> > > > \n> > > > diff --git a/src/gstreamer/gstlibcameraprovider.cpp\n> > > > b/src/gstreamer/gstlibcameraprovider.cpp\n> > > > index 5da96ea3..237baeb2 100644\n> > > > --- a/src/gstreamer/gstlibcameraprovider.cpp\n> > > > +++ b/src/gstreamer/gstlibcameraprovider.cpp\n> > > > @@ -12,6 +12,7 @@\n> > > >  \n> > > >  #include <libcamera/camera.h>\n> > > >  #include <libcamera/camera_manager.h>\n> > > > +#include <libcamera/property_ids.h>\n> > > >  \n> > > >  #include \"gstlibcamerasrc.h\"\n> > > >  #include \"gstlibcamera-utils.h\"\n> > > > @@ -130,6 +131,7 @@ gst_libcamera_device_new(const std::shared_ptr<Camera>\n> > > > &camera)\n> > > >  {\n> > > >   static const std::array roles{ StreamRole::VideoRecording };\n> > > >   g_autoptr(GstCaps) caps = gst_caps_new_empty();\n> > > > + g_autoptr(GstStructure) props = gst_structure_new_empty(\"camera-\n> > > > properties\");\n> > > \n> > > You can move this just before the for loop below.\n> > > \n> > > >   const gchar *name = camera->id().c_str();\n> > > >  \n> > > >   std::unique_ptr<CameraConfiguration> config = camera-\n> > > > >generateConfiguration(roles);\n> > > > @@ -144,12 +146,34 @@ gst_libcamera_device_new(const std::shared_ptr<Camera>\n> > > > &camera)\n> > > >                   gst_caps_append(caps, sub_caps);\n> > > >   }\n> > > >  \n> > > > + for (const auto &[key, value] : camera->properties()) {\n> > > > +         const ControlId *id = properties::properties.at(key);\n> > > > +\n> > > > +         g_autoptr(GString) prop_str =\n> > > > g_string_new(\"api.libcamera.\");\n> > > > +         g_string_append(prop_str, id->name().c_str());\n> > > > +\n> > > > +         /* Use string names for enum values for better readability\n> > > > */\n> > > \n> > > s/readability/readability./\n> > > \n> > > > +         if (value.type() == ControlTypeInteger32) {\n> > > > +                 int32_t val = value.get<int32_t>();\n> > > > +                 const auto &it = id->enumerators().find(val);\n\nAs with the cam patch - it's not if the type is integer that we should\nlook for enumerators.\n\nIt's if the enumerators is not empty - then we should parse them.\n\n\n> > > > +                 if (it != id->enumerators().end()) {\n> > > > +                         gst_structure_set(props, prop_str->str,\n> > > > G_TYPE_STRING,\n> > > > +                                           it->second.c_str(),\n> > > > nullptr);\n> > > > +                         continue;\n> > > > +                 }\n> > > > +         }\n> > > > +\n> > > > +         gst_structure_set(props, prop_str->str, G_TYPE_STRING,\n> > > > +                           value.toString().c_str(), nullptr);\n> > > \n> > > Instead of using a libcamera-specific internal string representation of\n> > > the value, it should be converted to native GStreamer types. Numerical\n> > > properties should use a numerical type, rectangles should be converted\n> > > to the native GStreamer representation, ...\n> > > \n> > > Nicolas, any opinion on this ?\n> > \n> > This is the first time we have an API we don't have to fully map manually.\n> > Looking around, only G_TYPE_UINT and G_TYPE_STRING is currently used by other\n> > providers. Its likely a good idea for simplicity. Though, when I look at the\n> > vulkan providers, what they did for flags and enum is to have both, e.g. flags +\n> > flags_str (no compromise). If you link to Vulkan API, you will find handy the\n> > value, and otherwise you have a string version which is human readable.\n> \n> yes, I thought of it initially where I suggested:\n>         mounting-rotation : <angle_value>\n>         mounting-rotation-str: \"Rotate180\" \n> \n> > \n> > Now, I don't see an \"enum\" type in the list of libcamera control types. So can\n> > this really be handled generically ? Here's that list I found:\n> \n> enums currently get mapped to ControlTypeInteger32 and  currently you cannot\n> know if a ControlValue is a enum, without going through\n> ControlId::enumerators() call, which returns a map <int, EnumString>.\n\nBut isn't that simply what you should do?\n\n\n> >       ControlTypeBool -> UINT\n> >       ControlTypeByte --> BASE64 STRING\n> >       ControlTypeUnsigned16 -> UINT\n> >       ControlTypeUnsigned32 --> UINT\n> >       ControlTypeInteger32 --> UINT\n> \n> This would be G_TYPE_INT no ?\n> \n> >       ControlTypeInteger64 --> UINT64\n> >       ControlTypeFloat --> DOUBLE ?\n> >       ControlTypeString --> STRING\n> >       ControlTypeRectangle --> No match, break in 4 _x, _y, _width, _height?\n> \n> Are you suggesting an array of 4 values or property breakup for e.g.\n>         \n>         api.libcamera.PixelArrayActiveAreaX\n>         api.libcamera.PixelArrayActiveAreaY\n>         api.libcamera.PixelArrayActiveAreaW\n>         api.libcamera.PixelArrayActiveAreaH\n> \n> >       ControlTypeSize --> UINT64\n> \n> Ditto\n> \n> >       ControlTypePoint --> No match, break in 2 _x, _y ?\n> > \n> > GST_TYPE_LIST/ARRAY can be used if these comes as an array, you can define your\n> > own types + serializers also if you want to have rec/point in a single field.\n> > This is not a GStreamer but a GLib thing, GstStructure holds GValue, and offer\n> > helper for the most common.\n> \n> I wonder if we do endup with really complex ContolType* which \n> 1) won't exactly map to GStreamer/GLib values\n> 2) Their string representation will be complex as well...\n> \n> On the other hand, camera properties will be relatively simpler than\n> camera controls ?\n> \n> > \n> > Stepping back, if we consider we need manual mapping, why not go back to just\n> > exposing the rotation for now, and make it so its easy to map more later ?\n> > \n> > > \n> > > > + }\n> > > > +\n> > > >   return GST_DEVICE(g_object_new(GST_TYPE_LIBCAMERA_DEVICE,\n> > > >                                  /* \\todo Use a unique identifier\n> > > > instead of camera name. */\n> > > >                                  \"name\", name,\n> > > >                                  \"display-name\", name,\n> > > >                                  \"caps\", caps,\n> > > >                                  \"device-class\", \"Source/Video\",\n> > > > +                                \"properties\", props,\n> > > >                                  nullptr));\n> > > >  }\n> > > >  \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 0FD12BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Jul 2025 12:01:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A44A69031;\n\tTue, 22 Jul 2025 14:01:58 +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 9D39D68F93\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Jul 2025 14:01:56 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7C76E79CC;\n\tTue, 22 Jul 2025 14:01:18 +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=\"Y2Vh8Btw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753185678;\n\tbh=+h6cb5LtXJlO8RFgnlFeO36GZ83+ivC3Cg5nVQ9pyVg=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Y2Vh8Btw0eAZq2bwz284tsiDLjhaMksPnqGeLMS3FQkTkMCRz0fPuJwEaKUCLBP+Y\n\ty1tsiKLAwvrJs57q876ud8afUkQZtsZ4TfN5hfitJkqRqduq6QfKC+fc7dD9MotiXJ\n\tEzr4k21KRLifsSiCOzAqhGSRmDwOe/sdrx/eaCC4=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<ufzmxoziw66yrq4t4dt6zqbxwlomc6ocpplmgdhfezbvjlrstq@3i62owiekkem>","References":"<20250704053424.23718-1-uajain@igalia.com>\n\t<20250704094623.GA29218@pendragon.ideasonboard.com>\n\t<f58f9f9ceaac81cf6fe2d6696909ede9ad64e494.camel@ndufresne.ca>\n\t<ufzmxoziw66yrq4t4dt6zqbxwlomc6ocpplmgdhfezbvjlrstq@3i62owiekkem>","Subject":"Re: [PATCH v3] libcamerasrc: Report camera properties as device\n\tproperties","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org,\n\tGiacomo Cappellini <giacomo.cappellini.87@gmail.com>","To":"Nicolas Dufresne <nicolas@ndufresne.ca>, Umang Jain <uajain@igalia.com>","Date":"Tue, 22 Jul 2025 13:01:53 +0100","Message-ID":"<175318571301.50296.14428245107787711367@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]