[FFmpeg-devel] [PATCH] lavfi: add ff_all_channel_layouts internal symbol

Michael Niedermayer michaelni at gmx.at
Wed Aug 24 05:48:55 CEST 2011


On Tue, Aug 23, 2011 at 03:31:35PM +0200, Stefano Sabatini wrote:
> On date Tuesday 2011-08-23 15:07:02 +0200, Stefano Sabatini encoded:
> > On date Saturday 2011-08-20 15:48:45 +0200, Stefano Sabatini encoded:
> > [...]
> > > This is more an RFC than a patch, since I'm not sure this is a proper
> > > solution.
> > 
> > Updated.
> 
> Fixed...
> -- 
> FFmpeg = Fantastic and Foolish Multimedia Practical Evil Geek

>  avfilter.h |    5 +++++
>  formats.c  |   34 +++++++++++++++++-----------------
>  2 files changed, 22 insertions(+), 17 deletions(-)
> 42152e18caa8b7b437f9e824f1a0034d6b37dace  0005-lavfi-add-avfilter_all_channel_layouts_list-public-s.patch
> From 478bd26d0807d356b74cdf5ee7e8905783eb3763 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Thu, 18 Aug 2011 15:26:21 +0200
> Subject: [PATCH] lavfi: add avfilter_all_channel_layouts_list public symbol
> 
> The list of supported channel layouts is mainly useful to be directly
> used as a parameter for the audio sink buffer, when there is no need
> to force a specific channel layout.
> ---
>  libavfilter/avfilter.h |    5 +++++
>  libavfilter/formats.c  |   34 +++++++++++++++++-----------------
>  2 files changed, 22 insertions(+), 17 deletions(-)
> 
> diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
> index e7b70fb..adcc42c 100644
> --- a/libavfilter/avfilter.h
> +++ b/libavfilter/avfilter.h
> @@ -260,6 +260,11 @@ int avfilter_add_format(AVFilterFormats **avff, int64_t fmt);
>  AVFilterFormats *avfilter_all_formats(enum AVMediaType type);
>  
>  /**
> + * A list of all channel layouts supported by libavfilter.
> + */
> +extern const int64_t avfilter_all_channel_layouts_list[];
> +
> +/**
>   * Return a list of all channel layouts supported by FFmpeg.
>   */
>  AVFilterFormats *avfilter_all_channel_layouts(void);
> diff --git a/libavfilter/formats.c b/libavfilter/formats.c
> index 1959a0e..bd5a211 100644
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -153,25 +153,25 @@ AVFilterFormats *avfilter_all_formats(enum AVMediaType type)
>      return ret;
>  }
>  
> +const int64_t avfilter_all_channel_layouts_list[] = {
> +    AV_CH_LAYOUT_MONO,
> +    AV_CH_LAYOUT_STEREO,
> +    AV_CH_LAYOUT_4POINT0,
> +    AV_CH_LAYOUT_QUAD,
> +    AV_CH_LAYOUT_5POINT0,
> +    AV_CH_LAYOUT_5POINT0_BACK,
> +    AV_CH_LAYOUT_5POINT1,
> +    AV_CH_LAYOUT_5POINT1_BACK,
> +    AV_CH_LAYOUT_5POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX,
> +    AV_CH_LAYOUT_7POINT1,
> +    AV_CH_LAYOUT_7POINT1_WIDE,
> +    AV_CH_LAYOUT_7POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX,
> +    -1
> +};

There are more possible layouts than can easily be listed i think

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- 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/20110824/c8b7e9ab/attachment.asc>


More information about the ffmpeg-devel mailing list