matroskamux: Add support for On2 VP8
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 27 Apr 2010 13:26:13 +0000 (15:26 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 17 May 2010 15:18:24 +0000 (17:18 +0200)
...matroskademux automatically supports it through libgstriff.

gst/matroska/matroska-demux.c
gst/matroska/matroska-ids.h
gst/matroska/matroska-mux.c

index ecbcd2d2d082ff5ebe91234def369a92540e71b0..0dc975ddc02e3dbce04266d977fc77832b33fd37 100644 (file)
@@ -6408,6 +6408,10 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *
   } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_DIRAC)) {
     caps = gst_caps_new_simple ("video/x-dirac", NULL);
     context->send_xiph_headers = FALSE;
+    *codec_name = g_strdup_printf ("Dirac");
+  } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP8)) {
+    caps = gst_caps_new_simple ("video/x-vp8", NULL);
+    *codec_name = g_strdup_printf ("On2 VP8");
   } else {
     GST_WARNING ("Unknown codec '%s', cannot build Caps", codec_id);
     return NULL;
index 4c64875a9d3acacea4234dcc02773437e9b2d73e..a2bf198bc4ba01a4eaeca14aa3a7dd21ce43691b 100644 (file)
 #define GST_MATROSKA_CODEC_ID_VIDEO_QUICKTIME    "V_QUICKTIME"
 #define GST_MATROSKA_CODEC_ID_VIDEO_SNOW         "V_SNOW"
 #define GST_MATROSKA_CODEC_ID_VIDEO_DIRAC        "V_DIRAC"
+#define GST_MATROSKA_CODEC_ID_VIDEO_VP8          "V_VP8"
 
 #define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1       "A_MPEG/L1"
 #define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2       "A_MPEG/L2"
index b40d165cb970b9c0ae517ddc748179643512db3a..5829b61fdb52cce39d9af0be19478728b51a498d 100644 (file)
@@ -121,6 +121,8 @@ static GstStaticPadTemplate videosink_templ =
         "video/x-pn-realvideo, "
         "rmversion = (int) [1, 4], "
         COMMON_VIDEO_CAPS "; "
+        "video/x-vp8, "
+        COMMON_VIDEO_CAPS "; "
         "video/x-raw-yuv, "
         "format = (fourcc) { YUY2, I420, YV12, UYVY, AYUV }, "
         COMMON_VIDEO_CAPS "; "
@@ -868,6 +870,8 @@ skip_details:
     }
   } else if (!strcmp (mimetype, "video/x-dirac")) {
     context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_DIRAC);
+  } else if (!strcmp (mimetype, "video/x-vp8")) {
+    context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_VP8);
   } else if (!strcmp (mimetype, "video/mpeg")) {
     gint mpegversion;