summaryrefslogtreecommitdiff
path: root/src/gstreamer/gstlibcamera-utils.cpp
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2024-02-02 09:58:18 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-02 11:33:09 +0200
commit05894d2652b340c400cdac8c7e96d0399387e9ca (patch)
treef8f1da83a6b4f5f82bee382b34d9448ca8570f97 /src/gstreamer/gstlibcamera-utils.cpp
parent1dd3bd9d7d31d85a8bc026d512ba064f6a13857d (diff)
gstreamer: Map R8/R16 pixel format
This enables monochrome support in libcamerasrc. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/gstreamer/gstlibcamera-utils.cpp')
-rw-r--r--src/gstreamer/gstlibcamera-utils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp
index 750ec351..2a0b77f4 100644
--- a/src/gstreamer/gstlibcamera-utils.cpp
+++ b/src/gstreamer/gstlibcamera-utils.cpp
@@ -26,6 +26,10 @@ static struct {
{ GST_VIDEO_FORMAT_ENCODED, formats::SGRBG8 },
{ GST_VIDEO_FORMAT_ENCODED, formats::SRGGB8 },
+ /* Monochrome */
+ { GST_VIDEO_FORMAT_GRAY8, formats::R8 },
+ { GST_VIDEO_FORMAT_GRAY16_LE, formats::R16 },
+
/* RGB16 */
{ GST_VIDEO_FORMAT_RGB16, formats::RGB565 },