[FFmpeg-devel] [PACTH] Change av_get_channel_layout() syntax
Michael Niedermayer
michaelni at gmx.at
Tue Oct 15 15:27:36 CEST 2013
On Tue, Oct 15, 2013 at 03:10:54PM +0200, Stefano Sabatini wrote:
> 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.
people should use 0x%"PRIx64" it avoids the ambiguity
>
> 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".
agree of course
ia just trying to say we should not recommand the use of decimals
for channel masks
it even might make debuging harder if these show up in a bug report
that way
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131015/318473a0/attachment.asc>
More information about the ffmpeg-devel
mailing list