[{"id":35293,"web_url":"https://patchwork.libcamera.org/comment/35293/","msgid":"<175450312602.50296.17415317013516608718@ping.linuxembedded.co.uk>","date":"2025-08-06T17:58:46","subject":"Re: [PATCH v5 0/3] gstreamer: 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-29 16:39:12)\n> This series aims to report camera properties from libcamera\n> to device properties in gstreamer device provider.\n> \n> Patch 1/3 splits the Rectangle GValue helper into two:\n> Point and Size.\n> \n> Patch 2/3 moves all three 3 GValue helpers(Rectangle, Size, Point)\n> from gstlibcamera-controls.cpp.in to libcamera-utils.cpp. This\n> enables code sharing when we report properties which are\n> Rectangle, Size, Points types.\n> \n> Patch 3/3 is the integration patch. It maps all ControlType\n> from libcamera to corresponding GType. If the ControlValue::isArray()\n> is true, GST_VALUE_ARRAY is preferred to report all array values,\n> with corresponding type GType.\n> \n> Output on RPi3:\n> ==============\n> uajain1@uajain:~$ cam -c1 -p\n> ...\n> Property: SystemDevices = [ 20749, 20739, 20740, 20741 ]\n> Property: ScalerCropMaximum = (0, 0)/0x0\n> Property: PixelArrayActiveAreas = [ (8, 8)/3280x2464 ]\n> Property: PixelArraySize = 3280x2464\n> Property: Rotation = 180\n> Property: Location = 2 (CameraLocationExternal)\n> Property: ColorFilterArrangement = 0 (RGGB)\n> Property: UnitCellSize = 1120x1120\n> Property: Model = imx219\n> \n> \n> uajain1@uajain:~$ gst-device-monitor-1.0 \n> ....\n>         properties:\n>                 api.libcamera.SystemDevices = < (gint64)20749, (gint64)20739, (gint64)20740, (gint64)20741 >\n>                 api.libcamera.ScalerCropMaximum = < (int)0, (int)0, (int)0, (int)0 >\n>                 api.libcamera.PixelArrayActiveAreas = < (int)8, (int)8, (int)3280, (int)2464 >\n>                 api.libcamera.PixelArraySize = < (int)3280, (int)2464 >\n>                 api.libcamera.Rotation = 180\n>                 api.libcamera.Location = CameraLocationExternal\n>                 api.libcamera.ColorFilterArrangement = RGGB\n>                 api.libcamera.UnitCellSize = < (int)1120, (int)1120 >\n>                 api.libcamera.Model = imx219\n>         gst-launch-1.0 libcamerasrc camera-name=\"/base/soc/i2c0mux/i2c\\@1/imx219\\@10\" ! ...\n> \n\nCI is all green,\n(https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1484662)\nand this is fully reviewed by Nicolas - so on that premise - I think\nwe're good to merge this.\n\nI like that the properties will be conveyed through.\n\n\n\n> Changes in v5:\n> - Use of g_auto() for GValue cleanups\n> - Construct property string api.libcamera.xxx in\n>   gst_libcamera_set_structure_field() directly\n> - Unset GValue array before setting string type property\n> - Use G_TYPE_INT for 32-bit integers (drop long-type) as per Nicolas'\n>   comment.\n> - few cosmetic changes for better readability\n> \n> Changes in v4:\n> - Extensively reworked to map ControlType<>GType for ControlValues\n> \n> Umang Jain (3):\n>   gstreamer: Split value_set_rectangle() GValue helper\n>   gstreamer: Move existing GValue helpers to gstreamer-utils\n>   gstreamer: Report camera properties as device properties\n> \n>  src/gstreamer/gstlibcamera-controls.cpp.in |  50 +----\n>  src/gstreamer/gstlibcamera-utils.cpp       | 244 +++++++++++++++++++++\n>  src/gstreamer/gstlibcamera-utils.h         |   7 +\n>  src/gstreamer/gstlibcameraprovider.cpp     |  13 ++\n>  4 files changed, 269 insertions(+), 45 deletions(-)\n> \n> -- \n> 2.50.0\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 DDF26BE086\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Aug 2025 17:58:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 172666921A;\n\tWed,  6 Aug 2025 19:58:51 +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 64982691F5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Aug 2025 19:58:49 +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 BC108EBA;\n\tWed,  6 Aug 2025 19:58:00 +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=\"WUj5Mkyx\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1754503080;\n\tbh=7E92Xb6MnUdZjpmLh92s/830JfS/NYOgO7XYzN4FVQc=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=WUj5Mkyx6lokzWBJqOZ7wGxWfuaWKpLFe0stsuN8aDVXCWFWPBnzhTg8UUjNFXVqA\n\tZW1+TVdvcfmAQW3slc88TxeG8PpH1/OPqZlcU7nS3R4kGP61BhkrRumcL1OuAIY4IU\n\tqXXIdoovA8nGDr+kQAzRkvZ2NSE8gUAq5h95Y5t0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250729153915.159243-1-uajain@igalia.com>","References":"<20250729153915.159243-1-uajain@igalia.com>","Subject":"Re: [PATCH v5 0/3] gstreamer: Report camera properties as device\n\tproperties","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jaslo Ziska <jaslo@ziska.de>,\n\tNicolas Dufresne <nicolas.dufresne@collabora.com>,\n\tUmang Jain <uajain@igalia.com>","To":"Umang Jain <uajain@igalia.com>, libcamera-devel@lists.libcamera.org","Date":"Wed, 06 Aug 2025 18:58:46 +0100","Message-ID":"<175450312602.50296.17415317013516608718@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>"}}]