[FFmpeg-devel] [PATCH 2/9] lavfi: implement ff_all_channel_counts().

Nicolas George nicolas.george at normalesup.org
Wed Dec 26 18:28:13 CET 2012


Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 libavfilter/formats.c |    6 ++++++
 libavfilter/formats.h |    8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 0e4ff2b..847944a 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -376,6 +376,12 @@ AVFilterChannelLayouts *ff_all_channel_layouts(void)
     return ret;
 }
 
+AVFilterChannelLayouts *ff_all_channel_counts(void)
+{
+    static const int64_t list[] = { AV_CH_LAYOUT_UNKNOWN, -1 };
+    return avfilter_make_format64_list(list);
+}
+
 #define FORMATS_REF(f, ref)                                          \
 do {                                                                 \
     *ref = f;                                                        \
diff --git a/libavfilter/formats.h b/libavfilter/formats.h
index 23fc04c..e609c32 100644
--- a/libavfilter/formats.h
+++ b/libavfilter/formats.h
@@ -116,11 +116,17 @@ AVFilterFormats *ff_merge_samplerates(AVFilterFormats *a,
 
 /**
  * Construct an empty AVFilterChannelLayouts/AVFilterFormats struct --
- * representing any channel layout/sample rate.
+ * representing any channel layout (with known disposition)/sample rate.
  */
 AVFilterChannelLayouts *ff_all_channel_layouts(void);
 AVFilterFormats *ff_all_samplerates(void);
 
+/**
+ * Construct an AVFilterChannelLayouts coding for any channel layout, with
+ * disposition known or unknown, i.e. { AV_CH_LAYOUT_UNKNOWN }.
+ */
+AVFilterChannelLayouts *ff_all_channel_counts(void);
+
 AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts);
 
 
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list