diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-07-30 00:33:38 +0200 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-07-30 11:37:40 +0200 |
commit | 33449b1776169f18c96f485e37ab6ae42769621b (patch) | |
tree | 40b9ceb13bf64b2e2e19e42f68b581e2da683027 /libavutil/audioconvert.c | |
parent | cc554704722c4fdcad5e6b3f1451721a8f17607e (diff) | |
download | ffmpeg-33449b1776169f18c96f485e37ab6ae42769621b.tar.gz |
audioconvert: add av_get_channel_description().
Diffstat (limited to 'libavutil/audioconvert.c')
-rw-r--r-- | libavutil/audioconvert.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c index 8e65d5968a..224db86b04 100644 --- a/libavutil/audioconvert.c +++ b/libavutil/audioconvert.c @@ -219,6 +219,17 @@ const char *av_get_channel_name(uint64_t channel) return NULL; } +const char *av_get_channel_description(uint64_t channel) +{ + int i; + if (av_get_channel_layout_nb_channels(channel) != 1) + return NULL; + for (i = 0; i < FF_ARRAY_ELEMS(channel_names); i++) + if ((1ULL<<i) & channel) + return channel_names[i].description; + return NULL; +} + uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index) { int i; |