diff options
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 8e65d59..224db86 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; |