summaryrefslogtreecommitdiffstats
path: root/libavutil/audioconvert.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/audioconvert.c')
-rw-r--r--libavutil/audioconvert.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c
index 7250e36..d89796d 100644
--- a/libavutil/audioconvert.c
+++ b/libavutil/audioconvert.c
@@ -1,20 +1,20 @@
/*
* Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -66,13 +66,13 @@ static const struct {
{ "stereo", 2, AV_CH_LAYOUT_STEREO },
{ "4.0", 4, AV_CH_LAYOUT_4POINT0 },
{ "quad", 4, AV_CH_LAYOUT_QUAD },
- { "5.0", 5, AV_CH_LAYOUT_5POINT0 },
+ { "5.0(side)", 5, AV_CH_LAYOUT_5POINT0 },
{ "5.0", 5, AV_CH_LAYOUT_5POINT0_BACK },
- { "5.1", 6, AV_CH_LAYOUT_5POINT1 },
+ { "5.1(side)", 6, AV_CH_LAYOUT_5POINT1 },
{ "5.1", 6, AV_CH_LAYOUT_5POINT1_BACK },
- { "5.1+downmix", 8, AV_CH_LAYOUT_5POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX, },
{ "7.1", 8, AV_CH_LAYOUT_7POINT1 },
{ "7.1(wide)", 8, AV_CH_LAYOUT_7POINT1_WIDE },
+ { "5.1+downmix", 8, AV_CH_LAYOUT_5POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX, },
{ "7.1+downmix", 10, AV_CH_LAYOUT_7POINT1|AV_CH_LAYOUT_STEREO_DOWNMIX, },
{ 0 }
};
@@ -131,3 +131,11 @@ int av_get_channel_layout_nb_channels(int64_t channel_layout)
x &= x-1; // unset lowest set bit
return count;
}
+
+int64_t av_get_default_channel_layout(int nb_channels) {
+ int i;
+ for (i = 0; channel_layout_map[i].name; i++)
+ if (nb_channels == channel_layout_map[i].nb_channels)
+ return channel_layout_map[i].layout;
+ return 0;
+}
OpenPOWER on IntegriCloud