mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
androidmedia: Add support for Opus in the decoder
This commit is contained in:
parent
8b46e1b95a
commit
9988ad9c42
2 changed files with 7 additions and 0 deletions
|
@ -3536,6 +3536,11 @@ gst_amc_codec_info_to_caps (const GstAmcCodecInfo * codec_info,
|
||||||
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
|
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
|
||||||
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
|
"channels", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
|
||||||
encoded_ret = gst_caps_merge_structure (encoded_ret, tmp);
|
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) {
|
} else if (strcmp (type->mime, "audio/flac") == 0) {
|
||||||
tmp = gst_structure_new ("audio/x-flac",
|
tmp = gst_structure_new ("audio/x-flac",
|
||||||
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
|
"rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
|
||||||
|
|
|
@ -156,6 +156,8 @@ caps_to_mime (GstCaps * caps)
|
||||||
return "audio/g711-mlaw";
|
return "audio/g711-mlaw";
|
||||||
} else if (strcmp (name, "audio/x-vorbis") == 0) {
|
} else if (strcmp (name, "audio/x-vorbis") == 0) {
|
||||||
return "audio/vorbis";
|
return "audio/vorbis";
|
||||||
|
} else if (strcmp (name, "audio/x-opus") == 0) {
|
||||||
|
return "audio/opus";
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue