From 7413c8ee97c9dc461d6850a88349e503b74253f2 Mon Sep 17 00:00:00 2001 From: Nick Haddad Date: Fri, 31 Oct 2008 09:49:57 +0000 Subject: [PATCH] gst-libs/gst/riff/: Add support for other fourcc codes that are commonly used for 'uncompressed RGB', including 'RGB ... Original commit message from CVS: Patch by: Nick Haddad * gst-libs/gst/riff/riff-ids.h: * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps): Add support for other fourcc codes that are commonly used for 'uncompressed RGB', including 'RGB ', 'RAW ', and 0. Fixes #558553. --- ChangeLog | 10 ++++++++++ gst-libs/gst/riff/riff-ids.h | 2 ++ gst-libs/gst/riff/riff-media.c | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5bc3336d2c..fda917e511 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-10-31 Wim Taymans + + Patch by: Nick Haddad + + * gst-libs/gst/riff/riff-ids.h: + * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps): + Add support for other fourcc codes that are commonly used for + 'uncompressed RGB', including 'RGB ', 'RAW ', and 0. + Fixes #558553. + 2008-10-30 Stefan Kost * gst/audioresample/gstaudioresample.c: diff --git a/gst-libs/gst/riff/riff-ids.h b/gst-libs/gst/riff/riff-ids.h index cf45f6d70e..e043c565d1 100644 --- a/gst-libs/gst/riff/riff-ids.h +++ b/gst-libs/gst/riff/riff-ids.h @@ -135,6 +135,8 @@ G_BEGIN_DECLS #define GST_RIFF_WHAM GST_MAKE_FOURCC ('W', 'H', 'A', 'M') #define GST_RIFF_rgb GST_MAKE_FOURCC (0x00,0x00,0x00,0x00) #define GST_RIFF_RGB GST_MAKE_FOURCC ('R', 'G', 'B', ' ') +#define GST_RIFF_RAW GST_MAKE_FOURCC ('R', 'A', 'W', ' ') +#define GST_RIFF_DIB GST_MAKE_FOURCC ('D', 'I', 'B', ' ') #define GST_RIFF_rle8 GST_MAKE_FOURCC (0x01,0x00,0x00,0x00) #define GST_RIFF_RLE8 GST_MAKE_FOURCC ('R', 'L', 'E', '8') #define GST_RIFF_rle4 GST_MAKE_FOURCC (0x02,0x00,0x00,0x00) diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index 0dd29e6b60..45458ca9b1 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -59,7 +59,11 @@ gst_riff_create_video_caps (guint32 codec_fcc, GST_DEBUG ("video fourcc %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (codec_fcc)); switch (codec_fcc) { - case GST_MAKE_FOURCC ('D', 'I', 'B', ' '):{ + case GST_MAKE_FOURCC ('D', 'I', 'B', ' '): /* uncompressed RGB */ + case GST_MAKE_FOURCC (0x00, 0x00, 0x00, 0x00): + case GST_MAKE_FOURCC ('R', 'G', 'B', ' '): + case GST_MAKE_FOURCC ('R', 'A', 'W', ' '): + { gint bpp = (strf && strf->bit_cnt != 0) ? strf->bit_cnt : 8; if (strf) {