From 0fb014fdbee3723db0ae5134aba97498c972c385 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 8 May 2010 13:24:47 +0200 Subject: [PATCH] ffmpegcodecmap: Add mapping for SIPR --- ext/ffmpeg/gstffmpegcodecmap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c index f398e91..664153d 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.c +++ b/ext/ffmpeg/gstffmpegcodecmap.c @@ -1381,6 +1381,17 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, gst_ff_aud_caps_new (context, codec_id, "audio/x-nellymoser", NULL); break; + case CODEC_ID_SIPR: + { + caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-sipro", NULL); + if (context) { + gst_caps_set_simple (caps, + "leaf_size", G_TYPE_INT, context->block_align, + "bitrate", G_TYPE_INT, context->bit_rate, NULL); + } + } + break; + case CODEC_ID_RA_144: case CODEC_ID_RA_288: case CODEC_ID_COOK: @@ -2322,6 +2333,7 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id, case CODEC_ID_COOK: case CODEC_ID_RA_288: case CODEC_ID_RA_144: + case CODEC_ID_SIPR: { gint leaf_size; gint bitrate; @@ -3121,6 +3133,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context) } if (id != CODEC_ID_NONE) video = TRUE; + } else if (!strcmp (mimetype, "audio/x-sipro")) { + id = CODEC_ID_SIPR; + audio = TRUE; } else if (!strcmp (mimetype, "audio/x-pn-realaudio")) { gint raversion; -- 2.7.4