[FFmpeg-devel] [PATCH 2/5] audioconvert: makes av_get_channel_layout accept composite names.

Nicolas George nicolas.george at normalesup.org
Sun Nov 6 17:04:13 CET 2011

Le sextidi 16 brumaire, an CCXX, Stefano Sabatini a écrit :
> I still wonder if 2channels (or "2c", or "2ch" or even "2 channels"
> e.g. like in "2 channels+downmix) would make for more self-explicative
> descriptions.

I get your meaning. I changed so that "2c" is accepted the same way as "2".
More would be, IMHO, of rather dubious usefulness.

>		This would also make the string returned by
> av_get_channel_layout_string() usable as input to
> av_get_channel_layout().

I am not sure about that: the string returned by
av_get_channel_layout_string is "X channels" only if the channel layout is
undefined; if the channel layout is known, then av_get_channel_layout_string
returns either its name or something like "X channels (AA+BB+CC)", with the
individual channel names in the parentheses.

The new av_get_channel_layout can parse the part in the parentheses, but
parsing the string with the parentheses is something I would like to avoid.

> I tend to agree.

Warning dropped.

> What I mean is that the function doxy should mention the supported
> syntax, even if not in a complete way (one sentence referring the
> list of accepted channel names in audioconvert.c may do).


> For what regards user documentation, maybe we could have a
> libavutil.texi file documenting stuff specific to libavutil and which
> doesn't have a specific section (e.g. eval stuff, parsing utilities,
> etc.). Alternatively a dedicated channel_layout.texi section may do as
> well. Having some way to expose the accepted names (e.g. through a
> command line list command) would be nice, but missing that a reference
> to the source code or even the function used is better than nothing.

I am not proficient enough in texinfo to try to do that just now. That will
be an idea for later.

Updated patch incoming.

Also, I would like to push "prefer 5.X over 5.X(side)" with the expanded
commit message: anybody else objects?


  Nicolas George
-------------- 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/20111106/030e90cc/attachment.asc>

More information about the ffmpeg-devel mailing list