From cc4a11831d93d3d1b33ce6ddd86daba8d0d9051c Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey@collabora.co.uk>
Date: Mon, 24 Jan 2011 17:20:56 +0100
Subject: [PATCH] gstffmpegcodecmap: Add some new codec mappings

VP8
LAGARITH
GSM
GSM_MS
---
 ext/ffmpeg/gstffmpegcodecmap.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c
index e170832036..cdb1a7cc53 100644
--- a/ext/ffmpeg/gstffmpegcodecmap.c
+++ b/ext/ffmpeg/gstffmpegcodecmap.c
@@ -943,6 +943,10 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
       caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-alpha", NULL);
       break;
 
+    case CODEC_ID_VP8:
+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp8", NULL);
+      break;
+
     case CODEC_ID_THEORA:
       caps = gst_ff_vid_caps_new (context, codec_id, "video/x-theora", NULL);
       break;
@@ -1182,6 +1186,10 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
       caps = gst_ff_vid_caps_new (context, codec_id, "video/x-zmbv", NULL);
       break;
 
+    case CODEC_ID_LAGARITH:
+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-lagarith", NULL);
+      break;
+
 
     case CODEC_ID_WS_VQA:
     case CODEC_ID_IDCIN:
@@ -1430,6 +1438,14 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
       caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR-WB", NULL);
       break;
 
+    case CODEC_ID_GSM:
+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-gsm", NULL);
+      break;
+
+    case CODEC_ID_GSM_MS:
+      caps = gst_ff_aud_caps_new (context, codec_id, "audio/ms-gsm", NULL);
+      break;
+
     case CODEC_ID_NELLYMOSER:
       caps =
           gst_ff_aud_caps_new (context, codec_id, "audio/x-nellymoser", NULL);
@@ -3073,6 +3089,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
   } else if (!strcmp (mimetype, "video/x-vp6-alpha")) {
     id = CODEC_ID_VP6A;
     video = TRUE;
+  } else if (!strcmp (mimetype, "video/x-vp8")) {
+    id = CODEC_ID_VP8;
+    video = TRUE;
   } else if (!strcmp (mimetype, "video/x-flash-screen")) {
     id = CODEC_ID_FLASHSV;
     video = TRUE;