gst-libs/gst/riff/: Add support for other fourcc codes that are commonly used for...
authorNick Haddad <nick@haddads.net>
Fri, 31 Oct 2008 09:49:57 +0000 (09:49 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 31 Oct 2008 09:49:57 +0000 (09:49 +0000)
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.

ChangeLog
gst-libs/gst/riff/riff-ids.h
gst-libs/gst/riff/riff-media.c

index 5bc3336..fda917e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
index cf45f6d..e043c56 100644 (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)
index 0dd29e6..45458ca 100644 (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) {