vlc_aout.h File Reference

This file defines functions, structures and macros for audio output object. More...

Include dependency graph for vlc_aout.h:

Go to the source code of this file.

Data Structures

struct  aout_alloc_t
 allocation of memory in the audio output More...
struct  aout_fifo_t
 audio output buffer FIFO More...
struct  aout_filter_t
struct  aout_output_t
 an output stream for the audio output More...
struct  aout_instance_t
 audio output thread descriptor More...

Defines

#define VLC_AOUT_H   1
#define AOUT_FMTS_IDENTICAL(p_first, p_second)
#define AOUT_FMTS_SIMILAR(p_first, p_second)
#define VLC_CODEC_SPDIFL   VLC_FOURCC('s','p','d','i')
#define VLC_CODEC_SPDIFB   VLC_FOURCC('s','p','d','b')
#define AOUT_FMT_NON_LINEAR(p_format)
#define FIXED32_FRACBITS   28
#define FIXED32_MIN   ((vlc_fixed_t) -0x80000000L)
#define FIXED32_MAX   ((vlc_fixed_t) +0x7fffffffL)
#define FIXED32_ONE   ((vlc_fixed_t) 0x10000000)
#define AOUT_CHAN_CENTER   0x1
#define AOUT_CHAN_LEFT   0x2
#define AOUT_CHAN_RIGHT   0x4
#define AOUT_CHAN_REARCENTER   0x10
#define AOUT_CHAN_REARLEFT   0x20
#define AOUT_CHAN_REARRIGHT   0x40
#define AOUT_CHAN_MIDDLELEFT   0x100
#define AOUT_CHAN_MIDDLERIGHT   0x200
#define AOUT_CHAN_LFE   0x1000
#define AOUT_CHAN_DOLBYSTEREO   0x10000
#define AOUT_CHAN_DUALMONO   0x20000
#define AOUT_CHAN_REVERSESTEREO   0x40000
#define AOUT_CHAN_PHYSMASK   0xFFFF
#define AOUT_CHAN_MAX   9
#define AOUT_VAR_MONO   1
#define AOUT_VAR_STEREO   2
#define AOUT_VAR_2F2R   4
#define AOUT_VAR_3F2R   5
#define AOUT_VAR_5_1   6
#define AOUT_VAR_6_1   7
#define AOUT_VAR_7_1   8
#define AOUT_VAR_SPDIF   10
#define AOUT_VAR_CHAN_STEREO   1
#define AOUT_VAR_CHAN_RSTEREO   2
#define AOUT_VAR_CHAN_LEFT   3
#define AOUT_VAR_CHAN_RIGHT   4
#define AOUT_VAR_CHAN_DOLBYS   5
#define aout_BufferFree(buffer)   block_Release( buffer )
#define AOUT_SPDIF_SIZE   6144
#define A52_FRAME_NB   1536
#define AOUT_MAX_INPUT_RATE   (4)
#define AOUT_RESAMPLING_NONE   0
#define AOUT_RESAMPLING_UP   1
#define AOUT_RESAMPLING_DOWN   2
#define aout_VolumeGet(a, b)   __aout_VolumeGet(VLC_OBJECT(a), b)
#define aout_VolumeSet(a, b)   __aout_VolumeSet(VLC_OBJECT(a), b)
#define aout_VolumeUp(a, b, c)   __aout_VolumeUp(VLC_OBJECT(a), b, c)
#define aout_VolumeDown(a, b, c)   __aout_VolumeDown(VLC_OBJECT(a), b, c)
#define aout_ToggleMute(a, b)   __aout_ToggleMute(VLC_OBJECT(a), b)
#define aout_EnableFilter(o, n, b)   aout_EnableFilter( VLC_OBJECT(o), n, b )

Typedefs

typedef int32_t vlc_fixed_t
typedef struct
aout_filter_owner_sys_t 
aout_filter_owner_sys_t
 audio output filter
typedef struct aout_filter_sys_t aout_filter_sys_t

Functions

aout_buffer_taout_OutputNextBuffer (aout_instance_t *, mtime_t, bool)
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 *, int, int, const int *, int)
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.
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.
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)
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 *)
mtime_t aout_FifoFirstDate (aout_instance_t *, aout_fifo_t *)
aout_buffer_taout_FifoPop (aout_instance_t *p_aout, aout_fifo_t *p_fifo)
void aout_VolumeSoftInit (aout_instance_t *)
void aout_VolumeNoneInit (aout_instance_t *)
int __aout_VolumeGet (vlc_object_t *, audio_volume_t *)
int __aout_VolumeSet (vlc_object_t *, audio_volume_t)
int __aout_VolumeUp (vlc_object_t *, int, audio_volume_t *)
int __aout_VolumeDown (vlc_object_t *, int, audio_volume_t *)
int __aout_ToggleMute (vlc_object_t *, audio_volume_t *)
int aout_FindAndRestart (vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void *)
int aout_ChannelsRestart (vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void *)
void aout_EnableFilter (vlc_object_t *, const char *, bool)
 Enable or disable an audio filter.
vout_thread_taout_filter_RequestVout (filter_t *, vout_thread_t *p_vout, video_format_t *p_fmt)

Variables

static const uint32_t pi_vlc_chan_order_wg4 []
 It describes the audio channel order VLC except.


Detailed Description

This file defines functions, structures and macros for audio output object.


Define Documentation

#define A52_FRAME_NB   1536

Referenced by Open(), OpenAudio(), and OpenSPDIF().

#define aout_BufferFree ( buffer   )     block_Release( buffer )

#define AOUT_CHAN_CENTER   0x1

#define AOUT_CHAN_DOLBYSTEREO   0x10000

#define AOUT_CHAN_DUALMONO   0x20000

#define AOUT_CHAN_LEFT   0x2

#define AOUT_CHAN_LFE   0x1000

#define AOUT_CHAN_MAX   9

#define AOUT_CHAN_MIDDLELEFT   0x100

#define AOUT_CHAN_MIDDLERIGHT   0x200

#define AOUT_CHAN_PHYSMASK   0xFFFF

#define AOUT_CHAN_REARCENTER   0x10

#define AOUT_CHAN_REARLEFT   0x20

#define AOUT_CHAN_REARRIGHT   0x40

#define AOUT_CHAN_REVERSESTEREO   0x40000

#define AOUT_CHAN_RIGHT   0x4

#define aout_EnableFilter ( o,
n,
 )     aout_EnableFilter( VLC_OBJECT(o), n, b )

#define AOUT_FMT_NON_LINEAR ( p_format   ) 

Value:

( ((p_format)->i_format == VLC_CODEC_SPDIFL)       \
       || ((p_format)->i_format == VLC_CODEC_SPDIFB)   \
       || ((p_format)->i_format == VLC_CODEC_A52)       \
       || ((p_format)->i_format == VLC_CODEC_DTS) )

Referenced by aout_InputNew(), aout_OutputNew(), Create(), MixBuffer(), Open(), and Probe().

#define AOUT_FMTS_IDENTICAL ( p_first,
p_second   ) 

Value:

(                          \
    ((p_first)->i_format == (p_second)->i_format)                           \
      && ((p_first)->i_rate == (p_second)->i_rate)                          \
      && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
      && ((p_first)->i_original_channels == (p_second)->i_original_channels) )

Referenced by aout_FiltersCreatePipeline(), and aout_InputNew().

#define AOUT_FMTS_SIMILAR ( p_first,
p_second   ) 

Value:

(                            \
    ((p_first)->i_rate == (p_second)->i_rate)                               \
      && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
      && ((p_first)->i_original_channels == (p_second)->i_original_channels) )

Referenced by Create_F32ToFL32(), Create_F32ToS16(), Create_S16ToF32(), Create_U8ToF32(), and Open().

#define AOUT_MAX_INPUT_RATE   (4)

#define AOUT_RESAMPLING_DOWN   2

Referenced by aout_InputPlay().

#define AOUT_RESAMPLING_NONE   0

#define AOUT_RESAMPLING_UP   1

Referenced by aout_InputPlay().

#define AOUT_SPDIF_SIZE   6144

Referenced by DoWork(), Open(), OpenAudio(), and OpenSPDIF().

#define aout_ToggleMute ( a,
 )     __aout_ToggleMute(VLC_OBJECT(a), b)

#define AOUT_VAR_2F2R   4

Referenced by Open(), and Probe().

#define AOUT_VAR_3F2R   5

#define AOUT_VAR_5_1   6

Referenced by Open(), and Probe().

#define AOUT_VAR_6_1   7

#define AOUT_VAR_7_1   8

#define AOUT_VAR_CHAN_DOLBYS   5

Referenced by aout_OutputNew().

#define AOUT_VAR_CHAN_LEFT   3

Referenced by aout_OutputNew().

#define AOUT_VAR_CHAN_RIGHT   4

Referenced by aout_OutputNew().

#define AOUT_VAR_CHAN_RSTEREO   2

Referenced by aout_OutputNew().

#define AOUT_VAR_CHAN_STEREO   1

Referenced by aout_OutputNew().

#define AOUT_VAR_MONO   1

Referenced by Open(), and Probe().

#define AOUT_VAR_SPDIF   10

Referenced by Open(), and Probe().

#define AOUT_VAR_STEREO   2

Referenced by Open(), and Probe().

#define aout_VolumeDown ( a,
b,
 )     __aout_VolumeDown(VLC_OBJECT(a), b, c)

#define aout_VolumeGet ( a,
 )     __aout_VolumeGet(VLC_OBJECT(a), b)

#define aout_VolumeSet ( a,
 )     __aout_VolumeSet(VLC_OBJECT(a), b)

#define aout_VolumeUp ( a,
b,
 )     __aout_VolumeUp(VLC_OBJECT(a), b, c)

#define FIXED32_FRACBITS   28

#define FIXED32_MAX   ((vlc_fixed_t) +0x7fffffffL)

#define FIXED32_MIN   ((vlc_fixed_t) -0x80000000L)

#define FIXED32_ONE   ((vlc_fixed_t) 0x10000000)

#define VLC_AOUT_H   1

#define VLC_CODEC_SPDIFB   VLC_FOURCC('s','p','d','b')

Referenced by Create(), DoWork(), and OpenSPDIF().

#define VLC_CODEC_SPDIFL   VLC_FOURCC('s','p','d','i')


Typedef Documentation

audio output filter

typedef int32_t vlc_fixed_t


Function Documentation

int __aout_ToggleMute ( vlc_object_t ,
audio_volume_t  
)

int __aout_VolumeDown ( vlc_object_t ,
int  ,
audio_volume_t  
)

References __aout_VolumeUp().

int __aout_VolumeGet ( vlc_object_t ,
audio_volume_t  
)

int __aout_VolumeSet ( vlc_object_t ,
audio_volume_t   
)

int __aout_VolumeUp ( vlc_object_t ,
int  ,
audio_volume_t  
)

unsigned int aout_BitsPerSample ( vlc_fourcc_t  i_format  ) 

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 *  ,
int  ,
int  ,
const int *  ,
int   
)

References AOUT_CHAN_MAX, and i.

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

int aout_ChannelsRestart ( vlc_object_t ,
const char *  ,
vlc_value_t  ,
vlc_value_t  ,
void *   
)

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, i, 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, i, and pi_vlc_chan_order_wg4.

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

void aout_EnableFilter ( vlc_object_t p_this,
const char *  psz_name,
bool  b_add 
)

Enable or disable an audio filter.

Parameters:
p_this a vlc object
psz_name name of the filter
b_add are we adding or removing the filter ?

References AoutChangeFilterString(), AoutInputsMarkToRestart(), FIND_ANYWHERE, VLC_OBJECT_AOUT, vlc_object_find, and vlc_object_release.

mtime_t aout_FifoFirstDate ( aout_instance_t ,
aout_fifo_t  
)

aout_buffer_t* aout_FifoPop ( aout_instance_t p_aout,
aout_fifo_t p_fifo 
)

vout_thread_t* aout_filter_RequestVout ( filter_t ,
vout_thread_t p_vout,
video_format_t p_fmt 
)

int aout_FindAndRestart ( vlc_object_t ,
const char *  ,
vlc_value_t  ,
vlc_value_t  ,
void *   
)

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  ) 

aout_buffer_t* aout_OutputNextBuffer ( aout_instance_t ,
mtime_t  ,
bool   
)

void aout_VolumeNoneInit ( aout_instance_t  ) 

void aout_VolumeSoftInit ( aout_instance_t  ) 


Variable Documentation

const uint32_t pi_vlc_chan_order_wg4[] [static]

Initial value:

{
     0x2 ,  0x4 ,
     0x100 ,  0x200 ,
     0x20 ,  0x40 ,  0x10 ,
     0x1 ,  0x1000 , 0
}
It describes the audio channel order VLC except.

Referenced by AobHeader(), aout_CheckChannelExtraction(), and aout_CheckChannelReorder().


Generated on Sat Nov 21 08:05:26 2009 for VLC by  doxygen 1.5.6