Message ID | 20250729153915.159243-1-uajain@igalia.com |
---|---|
Headers | show |
Series |
|
Related | show |
Quoting Umang Jain (2025-07-29 16:39:12) > This series aims to report camera properties from libcamera > to device properties in gstreamer device provider. > > Patch 1/3 splits the Rectangle GValue helper into two: > Point and Size. > > Patch 2/3 moves all three 3 GValue helpers(Rectangle, Size, Point) > from gstlibcamera-controls.cpp.in to libcamera-utils.cpp. This > enables code sharing when we report properties which are > Rectangle, Size, Points types. > > Patch 3/3 is the integration patch. It maps all ControlType > from libcamera to corresponding GType. If the ControlValue::isArray() > is true, GST_VALUE_ARRAY is preferred to report all array values, > with corresponding type GType. > > Output on RPi3: > ============== > uajain1@uajain:~$ cam -c1 -p > ... > Property: SystemDevices = [ 20749, 20739, 20740, 20741 ] > Property: ScalerCropMaximum = (0, 0)/0x0 > Property: PixelArrayActiveAreas = [ (8, 8)/3280x2464 ] > Property: PixelArraySize = 3280x2464 > Property: Rotation = 180 > Property: Location = 2 (CameraLocationExternal) > Property: ColorFilterArrangement = 0 (RGGB) > Property: UnitCellSize = 1120x1120 > Property: Model = imx219 > > > uajain1@uajain:~$ gst-device-monitor-1.0 > .... > properties: > api.libcamera.SystemDevices = < (gint64)20749, (gint64)20739, (gint64)20740, (gint64)20741 > > api.libcamera.ScalerCropMaximum = < (int)0, (int)0, (int)0, (int)0 > > api.libcamera.PixelArrayActiveAreas = < (int)8, (int)8, (int)3280, (int)2464 > > api.libcamera.PixelArraySize = < (int)3280, (int)2464 > > api.libcamera.Rotation = 180 > api.libcamera.Location = CameraLocationExternal > api.libcamera.ColorFilterArrangement = RGGB > api.libcamera.UnitCellSize = < (int)1120, (int)1120 > > api.libcamera.Model = imx219 > gst-launch-1.0 libcamerasrc camera-name="/base/soc/i2c0mux/i2c\@1/imx219\@10" ! ... > CI is all green, (https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1484662) and this is fully reviewed by Nicolas - so on that premise - I think we're good to merge this. I like that the properties will be conveyed through. > Changes in v5: > - Use of g_auto() for GValue cleanups > - Construct property string api.libcamera.xxx in > gst_libcamera_set_structure_field() directly > - Unset GValue array before setting string type property > - Use G_TYPE_INT for 32-bit integers (drop long-type) as per Nicolas' > comment. > - few cosmetic changes for better readability > > Changes in v4: > - Extensively reworked to map ControlType<>GType for ControlValues > > Umang Jain (3): > gstreamer: Split value_set_rectangle() GValue helper > gstreamer: Move existing GValue helpers to gstreamer-utils > gstreamer: Report camera properties as device properties > > src/gstreamer/gstlibcamera-controls.cpp.in | 50 +---- > src/gstreamer/gstlibcamera-utils.cpp | 244 +++++++++++++++++++++ > src/gstreamer/gstlibcamera-utils.h | 7 + > src/gstreamer/gstlibcameraprovider.cpp | 13 ++ > 4 files changed, 269 insertions(+), 45 deletions(-) > > -- > 2.50.0 >