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 <nick at haddads dot net>
* 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.
This commit is contained in:
Nick Haddad 2008-10-31 09:49:57 +00:00 committed by Wim Taymans
parent 35a5ad819d
commit 7413c8ee97
3 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,13 @@
2008-10-31 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Nick Haddad <nick at haddads dot net>
* 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 <ensonic@users.sf.net>
* gst/audioresample/gstaudioresample.c:

View file

@ -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)

View file

@ -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) {