[gst-cvs] gst-plugins-base: riff: add theora mapping

Wim Taymans wtay at kemper.freedesktop.org
Fri Mar 6 09:55:18 PST 2009


Module: gst-plugins-base
Branch: master
Commit: d998f6097bb3820db1eac934501a52830b79ec0b
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=d998f6097bb3820db1eac934501a52830b79ec0b

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Fri Mar  6 18:53:17 2009 +0100

riff: add theora mapping

Add theora mappings. See #574169.

---

 gst-libs/gst/riff/riff-media.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index 0a2a38c..e5d5083 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -752,6 +752,13 @@ gst_riff_create_video_caps (guint32 codec_fcc,
         *codec_name = g_strdup ("Mimic webcam");
       break;
 
+    case GST_MAKE_FOURCC ('T', 'H', 'E', 'O'):
+    case GST_MAKE_FOURCC ('t', 'h', 'e', 'o'):
+      caps = gst_caps_new_simple ("video/x-theora", NULL);
+      if (codec_name)
+        *codec_name = g_strdup ("Theora video codec");
+
+      break;
 
     default:
       GST_WARNING ("Unknown video fourcc %" GST_FOURCC_FORMAT,
@@ -779,8 +786,11 @@ gst_riff_create_video_caps (guint32 codec_fcc,
 
   /* extradata */
   if (strf_data || strd_data) {
-    gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER,
-        strf_data ? strf_data : strd_data, NULL);
+    GstBuffer *codec_data;
+
+    codec_data = strf_data ? strf_data : strd_data;
+
+    gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, codec_data, NULL);
   }
 
   /* palette */
@@ -1691,6 +1701,7 @@ gst_riff_create_video_template_caps (void)
     GST_MAKE_FOURCC ('V', 'P', '6', '0'),
     GST_MAKE_FOURCC ('L', 'M', '2', '0'),
     GST_MAKE_FOURCC ('R', 'P', 'Z', 'A'),
+    GST_MAKE_FOURCC ('T', 'H', 'E', 'O'),
     /* FILL ME */
   };
   guint i;





More information about the Gstreamer-commits mailing list