From 34c5cf2480bb096689424c404ec0c1949f38b279 Mon Sep 17 00:00:00 2001 From: Julien Vuillaumier Date: Mon, 15 Dec 2025 15:53:05 +0100 Subject: [PATCH] gstreamer: Add raw support to libcamerasrc stream-role property The current definition of the stream-role property of libcamerasrc element does not allow for the Raw (0) value to be assigned. That property is used to query the pipeline handlers through generateConfiguration(roles) to retrieve the formats exposed to the user. Not being able to specify the raw stream-role, bayer formats are not reported so can not be used for caps negotiation. Adding value stream-role=raw enables usage of bayer GStreamer pipelines like: `gst-launch-1.0 libcamerasrc camera-name= src::stream-role=raw ! video/x-bayer, format=bggr16le ! ...` Signed-off-by: Julien Vuillaumier Reviewed-by: Nicolas Dufresne Reviewed-by: Jacopo Mondi Signed-off-by: Kieran Bingham --- src/gstreamer/gstlibcamerapad.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gstreamer/gstlibcamerapad.cpp b/src/gstreamer/gstlibcamerapad.cpp index b37c4b34..c1f7f16e 100644 --- a/src/gstreamer/gstlibcamerapad.cpp +++ b/src/gstreamer/gstlibcamerapad.cpp @@ -95,6 +95,10 @@ gst_libcamera_stream_role_get_type() static GType type = 0; static const GEnumValue values[] = { { + static_cast(StreamRole::Raw), + "libcamera::Raw", + "raw", + }, { static_cast(StreamRole::StillCapture), "libcamera::StillCapture", "still-capture",