[FFmpeg-devel] [PACTH] Change av_get_channel_layout() syntax

Stefano Sabatini stefasab at gmail.com
Tue Oct 15 15:10:54 CEST 2013


On date Tuesday 2013-10-15 11:35:16 +0200, Michael Niedermayer encoded:
> On Tue, Oct 15, 2013 at 10:48:35AM +0200, Stefano Sabatini wrote:
[...]
> > > i just meant that we could deprecate the use of decimal numbers for
> > > channel masks as its somewhat odd and allows typos (lost c letter)
> > > that is
> > > 0x123 -> channel mask
> > > 12c   -> channel count
> > > 55    -> interpreted as mask for compatibility but deprecated
> > 
> > decimal syntax as channel mask is currently not supported, but it will
> > be at the next major bump (in order to emulate the way we set channel
> > layouts in lswr). So I can't see how we can deprecate something which
> > is not yet supported.
> 

> i meant that it should be deprecated for lswr to do that and also
> probably the newly added stuff shouldnt really recommand its use

At the moment you set ocl/icl with: aresample=[io]cl=DECIMAL

since it's using AV_OPT_TYPE_INT to set the channel mask. Switching to
AV_OPT_TYPE_CHANNEL_LAYOUT will be painless due to the hacked version
of av_get_channel_layout.
 
> but thats just a suggestion, as the decimal variant seems ambigous
> if one doesnt "know" how its exactly interpreted

You was the one to note that setting "aresample=ocl="PRId64"..." is
quite handy, so now I can't see why it should be deprecated.

And yes it is ambiguous, but I think that "a number expresses the
corresponding channel layout mask code" is still better (more
intuitive) than "a number expresses the default channel layout with
that number of channels".
-- 
FFmpeg = Funny & Furious Mastodontic Proud Extensive Geisha


More information about the ffmpeg-devel mailing list