Functions

common.c File Reference

Include dependency graph for common.c:

Functions

static void aout_Destructor (vlc_object_t *p_this)
audio_output_taout_New (vlc_object_t *p_parent)
void aout_Destroy (audio_output_t *aout)
unsigned int aout_BitsPerSample (vlc_fourcc_t i_format)
void aout_FormatPrepare (audio_sample_format_t *p_format)
const char * aout_FormatPrintChannels (const audio_sample_format_t *p_format)
void aout_FormatPrint (vlc_object_t *obj, const char *psz_text, const audio_sample_format_t *p_format)
 Prints an audio sample format in a human-readable form.
void aout_FormatsPrint (vlc_object_t *obj, const char *psz_text, const audio_sample_format_t *p_format1, const audio_sample_format_t *p_format2)
 Prints two formats in a human-readable form.
int aout_CheckChannelReorder (const uint32_t *pi_chan_order_in, const uint32_t *pi_chan_order_out, uint32_t i_channel_mask, int i_channels, int *pi_chan_table)
 This function computes the reordering needed to go from pi_chan_order_in to pi_chan_order_out.
void aout_ChannelReorder (uint8_t *p_buf, int i_buffer, int i_channels, const int *pi_chan_table, int i_bits_per_sample)
static void ExtractChannel (uint8_t *pi_dst, int i_dst_channels, const uint8_t *pi_src, int i_src_channels, int i_sample_count, const int *pi_selection, int i_bytes)
void aout_ChannelExtract (void *p_dst, int i_dst_channels, const void *p_src, int i_src_channels, int i_sample_count, const int *pi_selection, int i_bits_per_sample)
 Do the actual channels extraction using the parameters created by aout_CheckChannelExtraction.
bool aout_CheckChannelExtraction (int *pi_selection, uint32_t *pi_layout, int *pi_channels, const uint32_t pi_order_dst[9], const uint32_t *pi_order_src, int i_channels)
 This fonction will compute the extraction parameter into pi_selection to go from i_channels with their type given by pi_order_src[] into the order describe by pi_order_dst.
static int FilterOrder (const char *psz_name)
bool aout_ChangeFilterString (vlc_object_t *p_obj, vlc_object_t *p_aout, const char *psz_variable, const char *psz_name, bool b_add)

Function Documentation

unsigned int aout_BitsPerSample ( vlc_fourcc_t  i_format  ) 
bool aout_ChangeFilterString ( vlc_object_t p_obj,
vlc_object_t p_aout,
const char *  psz_variable,
const char *  psz_name,
bool  b_add 
)
void aout_ChannelExtract ( void *  p_dst,
int  i_dst_channels,
const void *  p_src,
int  i_src_channels,
int  i_sample_count,
const int *  pi_selection,
int  i_bits_per_sample 
)

Do the actual channels extraction using the parameters created by aout_CheckChannelExtraction.

XXX this function does not work in place (p_dst and p_src must not overlap). XXX Only 8, 16, 24, 32, 64 bits per sample are supported.

References ExtractChannel().

void aout_ChannelReorder ( uint8_t *  p_buf,
int  i_buffer,
int  i_channels,
const int *  pi_chan_table,
int  i_bits_per_sample 
)

References AOUT_CHAN_MAX.

bool aout_CheckChannelExtraction ( int *  pi_selection,
uint32_t *  pi_layout,
int *  pi_channels,
const uint32_t  pi_order_dst[9],
const uint32_t *  pi_order_src,
int  i_channels 
)

This fonction will compute the extraction parameter into pi_selection to go from i_channels with their type given by pi_order_src[] into the order describe by pi_order_dst.

It will also set :

  • *pi_channels as the number of channels that will be extracted which is lower (in case of non understood channels type) or equal to i_channels.
  • the layout of the channels (*pi_layout).

It will return true if channel extraction is really needed, in which case aout_ChannelExtract must be used

XXX It must be used when the source may have channel type not understood by VLC. In this case the channel type pi_order_src[] must be set to 0. XXX It must also be used if multiple channels have the same type.

References AOUT_CHAN_CENTER, AOUT_CHAN_RIGHT, and pi_vlc_chan_order_wg4.

int aout_CheckChannelReorder ( const uint32_t *  pi_chan_order_in,
const uint32_t *  pi_chan_order_out,
uint32_t  i_channel_mask,
int  i_channels,
int *  pi_chan_table 
)

This function computes the reordering needed to go from pi_chan_order_in to pi_chan_order_out.

If pi_chan_order_in or pi_chan_order_out is NULL, it will assume that vlc internal (WG4) order is requested.

References AOUT_CHAN_MAX, and pi_vlc_chan_order_wg4.

void aout_Destroy ( audio_output_t aout  ) 
static void aout_Destructor ( vlc_object_t p_this  )  [static]
void aout_FormatPrepare ( audio_sample_format_t p_format  ) 
void aout_FormatPrint ( vlc_object_t obj,
const char *  psz_text,
const audio_sample_format_t p_format 
)
const char* aout_FormatPrintChannels ( const audio_sample_format_t p_format  ) 
void aout_FormatsPrint ( vlc_object_t obj,
const char *  psz_text,
const audio_sample_format_t p_format1,
const audio_sample_format_t p_format2 
)

Prints two formats in a human-readable form.

References aout_FormatPrintChannels(), audio_format_t::i_format, audio_format_t::i_rate, and msg_Dbg.

audio_output_t* aout_New ( vlc_object_t p_parent  ) 
static void ExtractChannel ( uint8_t *  pi_dst,
int  i_dst_channels,
const uint8_t *  pi_src,
int  i_src_channels,
int  i_sample_count,
const int *  pi_selection,
int  i_bytes 
) [inline, static]

Referenced by aout_ChannelExtract().

static int FilterOrder ( const char *  psz_name  )  [static]

Referenced by aout_ChangeFilterString().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines