summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2020-12-14 15:33:16 +1100
committerSebastian Dröge <sebastian@centricular.com>2020-12-14 11:09:35 +0200
commitd3c4740fb6125a121fabe8f6170ed343e749dea4 (patch)
treee3813e12bfc7506945dd353c7d7d91cf9ad2a717
parentf29e9dfe9cc46e4e3b6340c782a1a0a479f9a400 (diff)
codec map: Add a mapping for the OKI ADPCM variant.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/111>
-rw-r--r--docs/gst_plugins_cache.json2
-rw-r--r--ext/libav/gstavcodecmap.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/gst_plugins_cache.json b/docs/gst_plugins_cache.json
index 016fbca..784d7dd 100644
--- a/docs/gst_plugins_cache.json
+++ b/docs/gst_plugins_cache.json
@@ -1068,7 +1068,7 @@
"long-name": "libav ADPCM IMA Dialogic OKI decoder",
"pad-templates": {
"sink": {
- "caps": "unknown/unknown:\n",
+ "caps": "audio/x-adpcm:\n layout: oki\n",
"direction": "sink",
"presence": "always"
},
diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c
index 4688530..b5be4bb 100644
--- a/ext/libav/gstavcodecmap.c
+++ b/ext/libav/gstavcodecmap.c
@@ -1983,6 +1983,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
case AV_CODEC_ID_ADPCM_IMA_WAV:
case AV_CODEC_ID_ADPCM_IMA_DK3:
case AV_CODEC_ID_ADPCM_IMA_DK4:
+ case AV_CODEC_ID_ADPCM_IMA_OKI:
case AV_CODEC_ID_ADPCM_IMA_WS:
case AV_CODEC_ID_ADPCM_IMA_SMJPEG:
case AV_CODEC_ID_ADPCM_IMA_AMV:
@@ -2022,6 +2023,9 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
case AV_CODEC_ID_ADPCM_IMA_DK4:
layout = "dk4";
break;
+ case AV_CODEC_ID_ADPCM_IMA_OKI:
+ layout = "oki";
+ break;
case AV_CODEC_ID_ADPCM_IMA_WS:
layout = "westwood";
break;
@@ -4167,6 +4171,8 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
id = AV_CODEC_ID_ADPCM_IMA_DK3;
} else if (!strcmp (layout, "dk4")) {
id = AV_CODEC_ID_ADPCM_IMA_DK4;
+ } else if (!strcmp (layout, "oki")) {
+ id = AV_CODEC_ID_ADPCM_IMA_OKI;
} else if (!strcmp (layout, "westwood")) {
id = AV_CODEC_ID_ADPCM_IMA_WS;
} else if (!strcmp (layout, "iss")) {