common.c File Reference

Include dependency graph for common.c:


Defines

#define AOUT_ASSERT_FIFO_LOCKED   aout_assert_fifo_locked(p_aout, p_fifo)

Functions

static void aout_assert_fifo_locked (aout_instance_t *p_aout, aout_fifo_t *p_fifo)
static void aout_Destructor (vlc_object_t *p_this)
aout_instance_t__aout_New (vlc_object_t *p_parent)
unsigned int aout_FormatNbChannels (const audio_sample_format_t *p_format)
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 (aout_instance_t *p_aout, const char *psz_text, const audio_sample_format_t *p_format)
void aout_FormatsPrint (aout_instance_t *p_aout, const char *psz_text, const audio_sample_format_t *p_format1, const audio_sample_format_t *p_format2)
void aout_FifoInit (aout_instance_t *p_aout, aout_fifo_t *p_fifo, uint32_t i_rate)
void aout_FifoPush (aout_instance_t *p_aout, aout_fifo_t *p_fifo, aout_buffer_t *p_buffer)
void aout_FifoSet (aout_instance_t *p_aout, aout_fifo_t *p_fifo, mtime_t date)
void aout_FifoMoveDates (aout_instance_t *p_aout, aout_fifo_t *p_fifo, mtime_t difference)
mtime_t aout_FifoNextStart (aout_instance_t *p_aout, aout_fifo_t *p_fifo)
mtime_t aout_FifoFirstDate (aout_instance_t *p_aout, aout_fifo_t *p_fifo)
aout_buffer_taout_FifoPop (aout_instance_t *p_aout, aout_fifo_t *p_fifo)
void aout_FifoDestroy (aout_instance_t *p_aout, aout_fifo_t *p_fifo)
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.
aout_buffer_taout_BufferAlloc (aout_alloc_t *allocation, mtime_t microseconds, aout_buffer_t *old_buffer)

Define Documentation

#define AOUT_ASSERT_FIFO_LOCKED   aout_assert_fifo_locked(p_aout, p_fifo)


Function Documentation

aout_instance_t* __aout_New ( vlc_object_t p_parent  ) 

static void aout_assert_fifo_locked ( aout_instance_t p_aout,
aout_fifo_t p_fifo 
) [inline, static]

unsigned int aout_BitsPerSample ( vlc_fourcc_t  i_format  ) 

aout_buffer_t* aout_BufferAlloc ( aout_alloc_t allocation,
mtime_t  microseconds,
aout_buffer_t old_buffer 
)

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().

Referenced by SplitBuffer().

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.

Referenced by Demux(), FillBuffer(), Mux(), and paCallback().

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_DUALMONO, AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT, pi_index, and pi_vlc_chan_order_wg4.

Referenced by SetupOutputFormat().

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.

Referenced by AddStream(), ConfigureChannelOrder(), CreateDSBuffer(), Open(), and OpenWaveOut().

static void aout_Destructor ( vlc_object_t p_this  )  [static]

void aout_FifoDestroy ( aout_instance_t p_aout,
aout_fifo_t p_fifo 
)

mtime_t aout_FifoFirstDate ( aout_instance_t p_aout,
aout_fifo_t p_fifo 
)

void aout_FifoInit ( aout_instance_t p_aout,
aout_fifo_t p_fifo,
uint32_t  i_rate 
)

void aout_FifoMoveDates ( aout_instance_t p_aout,
aout_fifo_t p_fifo,
mtime_t  difference 
)

mtime_t aout_FifoNextStart ( aout_instance_t p_aout,
aout_fifo_t p_fifo 
)

aout_buffer_t* aout_FifoPop ( aout_instance_t p_aout,
aout_fifo_t p_fifo 
)

void aout_FifoPush ( aout_instance_t p_aout,
aout_fifo_t p_fifo,
aout_buffer_t p_buffer 
)

void aout_FifoSet ( aout_instance_t p_aout,
aout_fifo_t p_fifo,
mtime_t  date 
)

unsigned int aout_FormatNbChannels ( const audio_sample_format_t p_format  ) 

void aout_FormatPrepare ( audio_sample_format_t p_format  ) 

void aout_FormatPrint ( aout_instance_t p_aout,
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 ( aout_instance_t p_aout,
const char *  psz_text,
const audio_sample_format_t p_format1,
const audio_sample_format_t p_format2 
)

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().


Generated on Tue May 25 08:05:33 2010 for VLC by  doxygen 1.5.6