gstreamer: Enable bayer formats with 10/12/14/16 bits
GStreamer supports 10/12/14/16-bit bayer formats since version 1.24. Signed-off-by: Jaslo Ziska <jaslo@ziska.de> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <uajain@igalia.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
84c0b9dd0a
commit
096b9416b2
@@ -20,7 +20,7 @@ static const struct {
|
||||
/* Compressed */
|
||||
{ GST_VIDEO_FORMAT_ENCODED, formats::MJPEG },
|
||||
|
||||
/* Bayer formats, gstreamer only supports 8-bit */
|
||||
/* Bayer formats */
|
||||
{ GST_VIDEO_FORMAT_ENCODED, formats::SBGGR8 },
|
||||
{ GST_VIDEO_FORMAT_ENCODED, formats::SGBRG8 },
|
||||
{ GST_VIDEO_FORMAT_ENCODED, formats::SGRBG8 },
|
||||
@@ -317,20 +317,15 @@ bare_structure_from_format(const PixelFormat &format)
|
||||
return gst_structure_new("video/x-raw", "format", G_TYPE_STRING,
|
||||
gst_video_format_to_string(gst_format), nullptr);
|
||||
|
||||
switch (format) {
|
||||
case formats::MJPEG:
|
||||
if (format == formats::MJPEG)
|
||||
return gst_structure_new_empty("image/jpeg");
|
||||
|
||||
case formats::SBGGR8:
|
||||
case formats::SGBRG8:
|
||||
case formats::SGRBG8:
|
||||
case formats::SRGGB8:
|
||||
return gst_structure_new("video/x-bayer", "format", G_TYPE_STRING,
|
||||
bayer_format_to_string(format), nullptr);
|
||||
const gchar *s = bayer_format_to_string(format);
|
||||
if (s)
|
||||
return gst_structure_new("video/x-bayer", "format",
|
||||
G_TYPE_STRING, s, nullptr);
|
||||
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GstCaps *
|
||||
|
||||
Reference in New Issue
Block a user