[libav-commits] faac: Add .channel_layouts

Alex Converse git at libav.org
Mon Apr 16 23:10:18 CEST 2012


Module: libav
Branch: master
Commit: ca332b1d8c9d869c4dd98a6eae5e464d702948cc

Author:    Alex Converse <alex.converse at gmail.com>
Committer: Alex Converse <alex.converse at gmail.com>
Date:      Mon Apr 16 10:35:11 2012 -0700

faac: Add .channel_layouts

---

 libavcodec/libfaac.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
index bb19083..6627794 100644
--- a/libavcodec/libfaac.c
+++ b/libavcodec/libfaac.c
@@ -29,6 +29,7 @@
 #include "avcodec.h"
 #include "audio_frame_queue.h"
 #include "internal.h"
+#include "libavutil/audioconvert.h"
 
 
 /* libfaac has an encoder delay of 1024 samples */
@@ -214,6 +215,16 @@ static const AVProfile profiles[] = {
     { FF_PROFILE_UNKNOWN },
 };
 
+static const uint64_t faac_channel_layouts[] = {
+    AV_CH_LAYOUT_MONO,
+    AV_CH_LAYOUT_STEREO,
+    AV_CH_LAYOUT_SURROUND,
+    AV_CH_LAYOUT_4POINT0,
+    AV_CH_LAYOUT_5POINT0_BACK,
+    AV_CH_LAYOUT_5POINT1_BACK,
+    0
+};
+
 AVCodec ff_libfaac_encoder = {
     .name           = "libfaac",
     .type           = AVMEDIA_TYPE_AUDIO,
@@ -227,4 +238,5 @@ AVCodec ff_libfaac_encoder = {
                                                      AV_SAMPLE_FMT_NONE },
     .long_name      = NULL_IF_CONFIG_SMALL("libfaac AAC (Advanced Audio Codec)"),
     .profiles       = NULL_IF_CONFIG_SMALL(profiles),
+    .channel_layouts = faac_channel_layouts,
 };



More information about the libav-commits mailing list