mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
avcodecmap: Increase max AAC channels to 16
This is the maximum amount supported by aacenc. 8-channel output fully works. 16-channel also encodes fine, but codec-utils isn't able to parse its channel config, so output level will not be shown in caps. For that to work, GASpecificConfig parsing needs to be implemented. It's not a critical issue and can be worked on at a later date. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6375>
This commit is contained in:
parent
615b7ca7ca
commit
9048bea3d3
2 changed files with 26 additions and 22 deletions
|
@ -30510,12 +30510,12 @@
|
|||
"long-name": "libav AAC (Advanced Audio Coding) encoder",
|
||||
"pad-templates": {
|
||||
"sink": {
|
||||
"caps": "audio/x-raw:\n channels: [ 1, 6 ]\n rate: { (int)96000, (int)88200, (int)64000, (int)48000, (int)44100, (int)32000, (int)24000, (int)22050, (int)16000, (int)12000, (int)11025, (int)8000, (int)7350 }\n format: F32LE\n layout: interleaved\n",
|
||||
"caps": "audio/x-raw:\n channels: [ 1, 16 ]\n rate: { (int)96000, (int)88200, (int)64000, (int)48000, (int)44100, (int)32000, (int)24000, (int)22050, (int)16000, (int)12000, (int)11025, (int)8000, (int)7350 }\n format: F32LE\n layout: interleaved\n",
|
||||
"direction": "sink",
|
||||
"presence": "always"
|
||||
},
|
||||
"src": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "src",
|
||||
"presence": "always"
|
||||
}
|
||||
|
@ -135463,7 +135463,7 @@
|
|||
"long-name": "libav 3GP2 (3GPP2 file format) muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/AMR:\n channels: 1\n rate: { (int)8000 }\naudio/AMR-WB:\n channels: 1\n rate: { (int)16000 }\naudio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/AMR:\n channels: 1\n rate: { (int)8000 }\naudio/AMR-WB:\n channels: 1\n rate: { (int)16000 }\naudio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -135527,7 +135527,7 @@
|
|||
"long-name": "libav 3GP (3GPP file format) muxer (not recommended, use gppmux instead)",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/AMR:\n channels: 1\n rate: { (int)8000 }\naudio/AMR-WB:\n channels: 1\n rate: { (int)16000 }\naudio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/AMR:\n channels: 1\n rate: { (int)8000 }\naudio/AMR-WB:\n channels: 1\n rate: { (int)16000 }\naudio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -135645,7 +135645,7 @@
|
|||
"long-name": "libav ADTS AAC (Advanced Audio Coding) muxer (not recommended, use aacparse instead)",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -136766,7 +136766,7 @@
|
|||
"long-name": "libav DASH Muxer muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -137012,7 +137012,7 @@
|
|||
"long-name": "libav F4V Adobe Flash Video muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -137440,7 +137440,7 @@
|
|||
"long-name": "libav HDS Muxer muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -137504,7 +137504,7 @@
|
|||
"long-name": "libav Apple HTTP Live Streaming muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -137681,7 +137681,7 @@
|
|||
"long-name": "libav iPod H.264 MP4 (MPEG-4 Part 14) muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -137804,7 +137804,7 @@
|
|||
"long-name": "libav ISMV/ISMA (Smooth Streaming) muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -137981,7 +137981,7 @@
|
|||
"long-name": "libav LOAS/LATM muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -138281,7 +138281,7 @@
|
|||
"long-name": "libav QuickTime / MOV muxer (not recommended, use qtmux instead)",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/x-mulaw:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\naudio/x-alaw:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\naudio/x-adpcm:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n layout: quicktime\naudio/x-mace:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n maceversion: 3\naudio/x-mace:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n maceversion: 6\naudio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\naudio/AMR:\n channels: 1\n rate: { (int)8000 }\naudio/AMR-WB:\n channels: 1\n rate: { (int)16000 }\naudio/x-raw:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n format: S16BE\n layout: interleaved\naudio/x-raw:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n format: S16LE\n layout: interleaved\naudio/mpeg:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n mpegversion: 1\n layer: 3\n",
|
||||
"caps": "audio/x-mulaw:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\naudio/x-alaw:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\naudio/x-adpcm:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n layout: quicktime\naudio/x-mace:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n maceversion: 3\naudio/x-mace:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n maceversion: 6\naudio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\naudio/AMR:\n channels: 1\n rate: { (int)8000 }\naudio/AMR-WB:\n channels: 1\n rate: { (int)16000 }\naudio/x-raw:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n format: S16BE\n layout: interleaved\naudio/x-raw:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n format: S16LE\n layout: interleaved\naudio/mpeg:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n mpegversion: 1\n layer: 3\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -138468,7 +138468,7 @@
|
|||
"long-name": "libav MP4 (MPEG-4 Part 14) muxer (not recommended, use mp4mux instead)",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\naudio/mpeg:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n mpegversion: 1\n layer: 3\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\naudio/mpeg:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n mpegversion: 1\n layer: 3\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -138596,7 +138596,7 @@
|
|||
"long-name": "libav MPEG-TS (MPEG-2 Transport Stream) muxer (not recommended, use mpegtsmux instead)",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 2 ]\n rate: { (int)48000, (int)44100, (int)32000, (int)24000, (int)22050, (int)16000 }\n mpegversion: 1\n layer: 2\naudio/mpeg:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n mpegversion: 1\n layer: 3\naudio/x-ac3:\n channels: [ 1, 6 ]\n rate: { (int)48000, (int)44100, (int)32000 }\naudio/x-dts:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\naudio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 2 ]\n rate: { (int)48000, (int)44100, (int)32000, (int)24000, (int)22050, (int)16000 }\n mpegversion: 1\n layer: 2\naudio/mpeg:\n channels: [ 1, 2 ]\n rate: [ 4000, 96000 ]\n mpegversion: 1\n layer: 3\naudio/x-ac3:\n channels: [ 1, 6 ]\n rate: { (int)48000, (int)44100, (int)32000 }\naudio/x-dts:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\naudio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -139255,7 +139255,7 @@
|
|||
"long-name": "libav PSP MP4 (MPEG-4 Part 14) muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -139442,7 +139442,7 @@
|
|||
"long-name": "libav RTSP output muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -139506,7 +139506,7 @@
|
|||
"long-name": "libav SAP output muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
@ -139693,7 +139693,7 @@
|
|||
"long-name": "libav Smooth Streaming Muxer muxer",
|
||||
"pad-templates": {
|
||||
"audio_%%u": {
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 6 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"caps": "audio/mpeg:\n channels: [ 1, 16 ]\n rate: [ 4000, 96000 ]\n mpegversion: 4\n base-profile: lc\n",
|
||||
"direction": "sink",
|
||||
"presence": "request"
|
||||
},
|
||||
|
|
|
@ -65,7 +65,9 @@ static const struct
|
|||
AV_CH_TOP_BACK_CENTER, GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER}, {
|
||||
AV_CH_TOP_BACK_RIGHT, GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT}, {
|
||||
AV_CH_STEREO_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
|
||||
AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}
|
||||
AV_CH_STEREO_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
|
||||
AV_CH_WIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT}, {
|
||||
AV_CH_WIDE_RIGHT, GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT},
|
||||
};
|
||||
|
||||
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100)
|
||||
|
@ -673,11 +675,13 @@ gst_ff_aud_caps_new (AVCodecContext * context, AVCodec * codec,
|
|||
|
||||
/* so we must be after restricted caps in this case */
|
||||
switch (codec_id) {
|
||||
case AV_CODEC_ID_AAC:
|
||||
case AV_CODEC_ID_AAC_LATM:
|
||||
case AV_CODEC_ID_DTS:
|
||||
maxchannels = 6;
|
||||
break;
|
||||
case AV_CODEC_ID_AAC:
|
||||
case AV_CODEC_ID_AAC_LATM:
|
||||
maxchannels = 16;
|
||||
break;
|
||||
case AV_CODEC_ID_MP2:
|
||||
{
|
||||
const static gint l_rates[] =
|
||||
|
|
Loading…
Reference in a new issue