[PATCH 1/2] gstreamer: Map R8/R16 pixel format

Nicolas Dufresne nicolas at ndufresne.ca
Fri Feb 2 09:58:18 CET 2024


From: Nicolas Dufresne <nicolas.dufresne at collabora.com>

This enables monochrome support in libcamerasrc.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>
---
 src/gstreamer/gstlibcamera-utils.cpp | 4 ++++
 1 file changed, 4 insertions(+)

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 },
 
-- 
2.43.0



More information about the libcamera-devel mailing list