androidmedia: Add support for Opus in the decoder

This commit is contained in:
Sebastian Dröge 2017-01-05 15:05:07 +02:00
parent 8b46e1b95a
commit 9988ad9c42
2 changed files with 7 additions and 0 deletions

View file

@ -3536,6 +3536,11 @@ gst_amc_codec_info_to_caps (const GstAmcCodecInfo * codec_info,
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
} else if (strcmp (type->mime, "audio/opus") == 0) {
tmp = gst_structure_new ("audio/x-opus",
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
} else if (strcmp (type->mime, "audio/flac") == 0) {
tmp = gst_structure_new ("audio/x-flac",
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,

View file

@ -156,6 +156,8 @@ caps_to_mime (GstCaps * caps)
return "audio/g711-mlaw";
} else if (strcmp (name, "audio/x-vorbis") == 0) {
return "audio/vorbis";
} else if (strcmp (name, "audio/x-opus") == 0) {
return "audio/opus";
}
return NULL;