aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/audioconvert.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-30 10:26:40 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-30 11:38:38 +0200
commitf893904469946cc86e28f329a47603b14d580c76 (patch)
tree15eeb708399f6be114d1ad246246337a6239cfeb /libavutil/audioconvert.c
parent33449b1776169f18c96f485e37ab6ae42769621b (diff)
downloadffmpeg-f893904469946cc86e28f329a47603b14d580c76.tar.gz
audioconvert: add av_get_standard_channel_layout().
Also bump minor version and add APIchanges entry.
Diffstat (limited to 'libavutil/audioconvert.c')
-rw-r--r--libavutil/audioconvert.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c
index 224db86b04..01641711d6 100644
--- a/libavutil/audioconvert.c
+++ b/libavutil/audioconvert.c
@@ -243,3 +243,13 @@ uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index)
}
return 0;
}
+
+int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
+ const char **name)
+{
+ if (index >= FF_ARRAY_ELEMS(channel_layout_map))
+ return AVERROR_EOF;
+ if (layout) *layout = channel_layout_map[index].layout;
+ if (name) *name = channel_layout_map[index].name;
+ return 0;
+}