From 821c68822b9789b1c3ac94405d283dd24e5f3004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 30 Mar 2014 00:35:07 +0000 Subject: [PATCH] matroska-mux: add mapping for Opus audio Might want to consider adding channels/rate requirement to template caps, but requires fixing up of encoder and parser first. --- gst/matroska/matroska-mux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 2f3ae1742a..7347509002 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -160,6 +160,7 @@ static GstStaticPadTemplate audiosink_templ = COMMON_AUDIO_CAPS "; " "audio/x-flac, " COMMON_AUDIO_CAPS "; " + "audio/x-opus; " "audio/x-speex, " COMMON_AUDIO_CAPS "; " "audio/x-raw, " @@ -1841,6 +1842,8 @@ gst_matroska_mux_audio_pad_setcaps (GstPad * pad, GstCaps * caps) ("speex stream headers missing or malformed")); goto refuse_caps; } + } else if (!strcmp (mimetype, "audio/x-opus")) { + gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_AUDIO_OPUS); } else if (!strcmp (mimetype, "audio/x-ac3")) { gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_AUDIO_AC3); } else if (!strcmp (mimetype, "audio/x-eac3")) {