From d874016bce97826905a119b2c0838d7c72a4e255 Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Wed, 31 Oct 2012 22:30:05 -0400 Subject: [PATCH] niimaq: support RGB output, as BGRA --- sys/niimaq/gstniimaq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/niimaq/gstniimaq.c b/sys/niimaq/gstniimaq.c index 1bf21ee..2ce810a 100644 --- a/sys/niimaq/gstniimaq.c +++ b/sys/niimaq/gstniimaq.c @@ -74,7 +74,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS (GST_VIDEO_CAPS_GRAY8 ";" - GST_VIDEO_CAPS_GRAY16 ("LITTLE_ENDIAN")) + GST_VIDEO_CAPS_GRAY16 ("LITTLE_ENDIAN") ";" GST_VIDEO_CAPS_BGRA) ); static void gst_niimaqsrc_init_interfaces (GType type); @@ -633,6 +633,8 @@ gst_niimaqsrc_set_caps (GstBaseSrc * bsrc, GstCaps * caps) depth = 8; else if (niimaqsrc->format == GST_VIDEO_FORMAT_GRAY16_LE) depth = 16; + else if (niimaqsrc->format == GST_VIDEO_FORMAT_BGRA) + depth = 32; else g_assert_not_reached (); /* negotiation failed? */ @@ -914,6 +916,8 @@ gst_niimaqsrc_get_cam_caps (GstNiImaqSrc * niimaqsrc) format = GST_VIDEO_FORMAT_GRAY8; else if (depth == 16) format = GST_VIDEO_FORMAT_GRAY16_LE; + else if (depth == 32) + format = GST_VIDEO_FORMAT_BGRA; else { GST_ERROR_OBJECT (niimaqsrc, "Depth %d (%d-bit) not supported yet", depth, bpp);