mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
audioconvert: add av_get_channel_description().
This commit is contained in:
parent
cc55470472
commit
33449b1776
@ -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;
|
||||
|
@ -180,6 +180,14 @@ uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);
|
||||
*/
|
||||
const char *av_get_channel_name(uint64_t channel);
|
||||
|
||||
/**
|
||||
* Get the description of a given channel.
|
||||
*
|
||||
* @param channel a channel layout with a single channel
|
||||
* @return channel description on success, NULL on error
|
||||
*/
|
||||
const char *av_get_channel_description(uint64_t channel);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user