audioconvert.c File Reference

audio conversion routines More...

#include "avstring.h"
#include "avutil.h"
#include "audioconvert.h"

Go to the source code of this file.

Functions

static const char * get_channel_name (int channel_id)
 
uint64_t av_get_channel_layout (const char *name)
 Return a channel layout id that matches name, 0 if no match. More...
 
void av_get_channel_layout_string (char *buf, int buf_size, int nb_channels, uint64_t channel_layout)
 Return a description of a channel layout. More...
 
int av_get_channel_layout_nb_channels (uint64_t channel_layout)
 Return the number of channels in the channel layout. More...
 

Variables

static const char *const channel_names []
 
struct {
   const char *   name
 
   int   nb_channels
 
   uint64_t   layout
 
channel_layout_map []
 

Detailed Description

audio conversion routines

Definition in file audioconvert.c.

Function Documentation

static const char* get_channel_name ( int  channel_id)
static

Definition at line 53 of file audioconvert.c.

Referenced by av_get_channel_layout_string().

Variable Documentation

struct { ... } channel_layout_map[]
Initial value:
= {
{ "mono", 1, AV_CH_LAYOUT_MONO },
{ "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.1", 6, AV_CH_LAYOUT_5POINT1 },
{ "7.1", 8, AV_CH_LAYOUT_7POINT1 },
{ "7.1(wide)", 8, AV_CH_LAYOUT_7POINT1_WIDE },
{ 0 }
}

Referenced by av_get_channel_layout(), and av_get_channel_layout_string().

const char* const channel_names[]
static
Initial value:
= {
[0] = "FL",
[1] = "FR",
[2] = "FC",
[3] = "LFE",
[4] = "BL",
[5] = "BR",
[6] = "FLC",
[7] = "FRC",
[8] = "BC",
[9] = "SL",
[10] = "SR",
[11] = "TC",
[12] = "TFL",
[13] = "TFC",
[14] = "TFR",
[15] = "TBL",
[16] = "TBC",
[17] = "TBR",
[29] = "DL",
[30] = "DR",
}

Definition at line 30 of file audioconvert.c.

Referenced by get_channel_name().