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

Stefano Sabatini stefasab at gmail.com
Fri Oct 4 17:05:38 CEST 2013

On date Friday 2013-10-04 12:29:48 +0200, Stefano Sabatini encoded:
> Hi,
> right now we set channel layouts in swr/resample specifying the
> channel layout (as an integer code).
> In order to switch to symbolic names, we need to switch to a new
> option type for channel layout, while retaining compatibility.
> To retain compatibility we need to make av_get_channel_layout() [1]
> accept an integer as a channel layout mask, rather than as a number of
> channels.
> I propose to force the "number of channels" interpretation only when a
> "c" is appended to the number (and maybe also accept "N
> channels").
> This will break syntax (alternatively: we break syntax for aresample,
> or we break syntax at the next lavu major bump, but seems quite
> overkill).
> [1] http://ffmpeg.org/pipermail/ffmpeg-devel/2011-November/116452.html

Untested attempt in attachment - also delievering a notable example of
backward-compatibility stunt.

ff_get_channel_layout() with compat=0 will be used in the opt
FFmpeg = Fundamentalist & Fanciful MultiPurpose Embarassing Geisha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-lavu-channel_layout-change-av_get_channel_layout-beh.patch
Type: text/x-diff
Size: 5258 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131004/43f25f9e/attachment.bin>

More information about the ffmpeg-devel mailing list