[aravis] gst: fix bayer format detection in arv_pixel_format_from_gst_caps.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] gst: fix bayer format detection in arv_pixel_format_from_gst_caps.
- Date: Mon, 22 Jul 2013 13:29:27 +0000 (UTC)
commit debd36aacc29f9be55457bb57a77262b14da4aa8
Author: Edgar Thier <edgarthier gmail com>
Date: Mon Jul 22 15:27:14 2013 +0200
gst: fix bayer format detection in arv_pixel_format_from_gst_caps.
src/arvmisc.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/arvmisc.c b/src/arvmisc.c
index 6250eee..036c0e1 100644
--- a/src/arvmisc.c
+++ b/src/arvmisc.c
@@ -624,22 +624,22 @@ ArvGstCapsInfos arv_gst_caps_infos[] = {
{
ARV_PIXEL_FORMAT_BAYER_GR_8,
"video/x-raw-bayer, format=grbg, bpp=(int)8, depth=(int)8",
- "video/x-raw-bayer", 8, 8, 0
+ "video/x-raw-bayer", 8, 8, ARV_MAKE_FOURCC ('g','r','b','g')
},
{
ARV_PIXEL_FORMAT_BAYER_RG_8,
"video/x-raw-bayer, format=rggb, bpp=(int)8, depth=(int)8",
- "video/x-raw-bayer", 8, 8, 0
+ "video/x-raw-bayer", 8, 8, ARV_MAKE_FOURCC ('r','g','g','b')
},
{
ARV_PIXEL_FORMAT_BAYER_GB_8,
"video/x-raw-bayer, format=gbrg, bpp=(int)8, depth=(int)8",
- "video/x-raw-bayer", 8, 8, 0
+ "video/x-raw-bayer", 8, 8, ARV_MAKE_FOURCC ('g','b','r','g')
},
{
ARV_PIXEL_FORMAT_BAYER_BG_8,
"video/x-raw-bayer, format=bggr, bpp=(int)8, depth=(int)8",
- "video/x-raw-bayer", 8, 8, 0
+ "video/x-raw-bayer", 8, 8, ARV_MAKE_FOURCC ('b','g','g','r')
},
/* Disable non 8bit bayer formats for now, as it's not supported by gstreamer bayer plugin.
@@ -790,8 +790,9 @@ arv_pixel_format_from_gst_caps (const char *name, int bpp, int depth, guint32 fo
fourcc == arv_gst_caps_infos[i].fourcc)
return arv_gst_caps_infos[i].pixel_format;
- if (depth == arv_gst_caps_infos[i].depth &&
- bpp == arv_gst_caps_infos[i].bpp)
+ if ((depth == arv_gst_caps_infos[i].depth) &&
+ (bpp == arv_gst_caps_infos[i].bpp)
+ && (fourcc == arv_gst_caps_infos[i].fourcc))
return arv_gst_caps_infos[i].pixel_format;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]