From efe579704130d9c82e2ca57e788d44b01f467a59 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 29 Oct 2016 15:38:01 +0100 Subject: [PATCH] avcodecmap: Add mapping for Opus audio decoder Make avdec_opus work. https://bugzilla.gnome.org/show_bug.cgi?id=773672 --- ext/libav/gstavcodecmap.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c index 2274989..98e68cf 100644 --- a/ext/libav/gstavcodecmap.c +++ b/ext/libav/gstavcodecmap.c @@ -2108,6 +2108,16 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id, } break; + case AV_CODEC_ID_OPUS: + /* Note that ffmpeg has no encoder yet, but just for safety. In the + * encoder case, we want to add things like samplerate, channels... */ + if (!encode) { + /* FIXME: can ffmpeg handle multichannel Opus? */ + caps = gst_caps_new_simple ("audio/x-opus", + "channel-mapping-family", G_TYPE_INT, 0, NULL); + } + break; + case AV_CODEC_ID_S302M: caps = gst_caps_new_empty_simple ("audio/x-smpte-302m"); break; -- 2.7.4