[FFmpeg-devel] [PATCH 000/279] New channel layout API
James Almer
jamrial at gmail.com
Wed Dec 8 14:07:59 EET 2021
On 12/8/2021 7:55 AM, Nicolas George wrote:
> James Almer (12021-12-07):
>> This is an updated and rebased version of the API that was sent to this mailing
>> list about two years ago. It expands it with some new helpers, implements some
>> changes that allows further extensibility for new features down the line, and
>> finishes porting all missing modules and those introduced since 2019.
>
> I see the concerns I raised last time have not been addressed:
>
> (1) the ability to have a channel at a certain location several times;
>
> (2) the ability to attach an arbitrary label to a channel or to a group
> of channels;
>
> (3) an API and syntax for the user to specify a particular channel.
>
> (1) is necessary for the amerge filter: merge two stereo streams, you
> get two FL and two FR.
>
> (1) is also necessary for devices that can record several sources
> simultaneously. IIRC, that is the case for the BlackMagick devices. If
> your devices records a band from two stereo and three mono microphones,
> we need two FL, two FR and three FC.
>
> (2) and (3) are necessary consequences of (1).
>
> I also have concerns with the signature of av_channel_description():
> this is level 0 of string manipulation, we need to get past this. I
> should post again about this in a separate thread.
What is wrong with it? All the functions returning a string in this API
use the same signature. You pass it a pre-allocated buffer and it's
filled with the string, truncating it if there's not enough space and
letting the user know about it.
I recall you were against dynamic allocation of the string, which the
user then had to free, so this was the alternative.
I could make it use a user provided AVBprint buffer instead of using one
internally, if you think that's better, but since you planned to replace
that with AVWriter i figured using AVBprint in the signature would mean
an eventual deprecation and removal.
>
> Regards,
>
More information about the ffmpeg-devel
mailing list