On 09/29/2014 10:24 AM, Omer Osman wrote:
Am 25.09.2014 17:54, schrieb Justin Ruggles:
Right. My point is that it should not check for the number of
channels. The switch should be done on the requested layout itself and
should only support AV_CH_LAYOUT_MONO and AV_CH_LAYOUT_STEREO.
OK, will check for AV_CH_LAYOUT_STEREO, _STEREO_DOWNMIX, and _MONO.
Also, does aacDecoder_GetStreamInfo() report the channel layout info
for the downmixed output or the full coded channel layout? I don't
know the API well enough...
Yes, for example:
CStreamInfo::numChannels = 6
CStreamInfo::pChannelType = { ::ACT_FRONT, ::ACT_FRONT, ::ACT_FRONT,
::ACT_LFE, ::ACT_BACK, ::ACT_BACK }
CStreamInfo::pChannelIndices = { 1, 2, 0, 0, 0, 1 }
Why is this needed if the downmixed output is maximum stereo? On the
other hand, this can simplify the code in
libfdk-accdec.c::get_stream_info (). Should this be implemented instead?
It is needed because get_stream_info() must set AVCodecContext.channels
and AVCodecContext.channel_layout to the downmixed values when
appropriate. Alternatively, the downmixed channel_layout can be set for
the AVFrame prior to ff_get_buffer(), but the former method is preferred
due to the interaction between libavcodec and libavfilter.
-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel