VLC  3.0.21
Data Structures | Macros | Typedefs | Enumerations | Functions
aout_internal.h File Reference
Include dependency graph for aout_internal.h:

Go to the source code of this file.

Data Structures

struct  aout_request_vout
 
struct  aout_owner_t
 
struct  aout_instance_t
 

Macros

#define AOUT_MAX_INPUT_RATE   (4)
 
#define aout_volume_New(o, g)   aout_volume_New(VLC_OBJECT(o), g)
 
#define aout_New(a)   aout_New(VLC_OBJECT(a))
 
#define aout_FormatsPrint(o, t, a, b)   aout_FormatsPrint(VLC_OBJECT(o), t, a, b)
 
#define AOUT_DEC_SUCCESS   0
 
#define AOUT_DEC_CHANGED   1
 
#define AOUT_DEC_FAILED   VLC_EGENERIC
 

Typedefs

typedef struct aout_volume aout_volume_t
 
typedef struct aout_dev aout_dev_t
 

Enumerations

enum  { AOUT_RESAMPLING_NONE =0, AOUT_RESAMPLING_UP, AOUT_RESAMPLING_DOWN }
 

Functions

static aout_owner_taout_owner (audio_output_t *aout)
 
aout_volume_taout_volume_New (vlc_object_t *, const audio_replay_gain_t *)
 Creates a software amplifier. More...
 
int aout_volume_SetFormat (aout_volume_t *, vlc_fourcc_t)
 Selects the current sample format for software amplification. More...
 
void aout_volume_SetVolume (aout_volume_t *, float)
 
int aout_volume_Amplify (aout_volume_t *, block_t *)
 Applies replay gain and software volume to an audio buffer. More...
 
void aout_volume_Delete (aout_volume_t *)
 Destroys a software amplifier. More...
 
audio_output_taout_New (vlc_object_t *)
 Creates an audio output object and initializes an output module. More...
 
void aout_Destroy (audio_output_t *)
 Deinitializes an audio output module and destroys an audio output object. More...
 
int aout_OutputNew (audio_output_t *, audio_sample_format_t *, aout_filters_cfg_t *filters_cfg)
 
int aout_OutputTimeGet (audio_output_t *, vlc_tick_t *)
 
void aout_OutputPlay (audio_output_t *, block_t *)
 Plays a decoded audio buffer. More...
 
void aout_OutputPause (audio_output_t *p_aout, bool, vlc_tick_t)
 Notifies the audio output (if any) of pause/resume events. More...
 
void aout_OutputFlush (audio_output_t *p_aout, bool)
 Flushes or drains the audio output buffers. More...
 
void aout_OutputDelete (audio_output_t *p_aout)
 Stops the audio output stream (undoes aout_OutputNew()). More...
 
void aout_OutputLock (audio_output_t *)
 
void aout_OutputUnlock (audio_output_t *)
 
void aout_FormatsPrint (vlc_object_t *, const char *, const audio_sample_format_t *, const audio_sample_format_t *)
 Prints two formats in a human-readable form. More...
 
bool aout_ChangeFilterString (vlc_object_t *manager, vlc_object_t *aout, const char *var, const char *name, bool b_add)
 
int aout_DecNew (audio_output_t *, const audio_sample_format_t *, const audio_replay_gain_t *, const aout_request_vout_t *)
 Creates an audio output. More...
 
void aout_DecDelete (audio_output_t *)
 Stops all plugins involved in the audio output. More...
 
int aout_DecPlay (audio_output_t *, block_t *, int i_input_rate)
 
void aout_DecGetResetStats (audio_output_t *, unsigned *, unsigned *)
 
void aout_DecChangePause (audio_output_t *, bool b_paused, vlc_tick_t i_date)
 
void aout_DecFlush (audio_output_t *, bool wait)
 
void aout_RequestRestart (audio_output_t *, unsigned)
 Marks the audio output for restart, to update any parameter of the output plug-in (e.g. More...
 
static void aout_InputRequestRestart (audio_output_t *aout)
 
static void aout_SetWavePhysicalChannels (audio_sample_format_t *fmt)
 
bool aout_FiltersCanResample (aout_filters_t *filters)
 
void aout_ChangeViewpoint (audio_output_t *aout, const vlc_viewpoint_t *p_viewpoint)
 

Macro Definition Documentation

◆ AOUT_DEC_CHANGED

#define AOUT_DEC_CHANGED   1

◆ AOUT_DEC_FAILED

#define AOUT_DEC_FAILED   VLC_EGENERIC

◆ AOUT_DEC_SUCCESS

#define AOUT_DEC_SUCCESS   0

◆ aout_FormatsPrint

#define aout_FormatsPrint (   o,
  t,
  a,
 
)    aout_FormatsPrint(VLC_OBJECT(o), t, a, b)

◆ AOUT_MAX_INPUT_RATE

#define AOUT_MAX_INPUT_RATE   (4)

◆ aout_New

#define aout_New (   a)    aout_New(VLC_OBJECT(a))

◆ aout_volume_New

#define aout_volume_New (   o,
 
)    aout_volume_New(VLC_OBJECT(o), g)

Typedef Documentation

◆ aout_dev_t

typedef struct aout_dev aout_dev_t

◆ aout_volume_t

typedef struct aout_volume aout_volume_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
AOUT_RESAMPLING_NONE 
AOUT_RESAMPLING_UP 
AOUT_RESAMPLING_DOWN 

Function Documentation

◆ aout_ChangeFilterString()

bool aout_ChangeFilterString ( vlc_object_t manager,
vlc_object_t aout,
const char *  var,
const char *  name,
bool  b_add 
)

◆ aout_ChangeViewpoint()

void aout_ChangeViewpoint ( audio_output_t aout,
const vlc_viewpoint_t p_viewpoint 
)

◆ aout_DecChangePause()

void aout_DecChangePause ( audio_output_t ,
bool  b_paused,
vlc_tick_t  i_date 
)

◆ aout_DecDelete()

void aout_DecDelete ( audio_output_t )

◆ aout_DecFlush()

void aout_DecFlush ( audio_output_t ,
bool  wait 
)

◆ aout_DecGetResetStats()

void aout_DecGetResetStats ( audio_output_t ,
unsigned *  ,
unsigned *   
)

◆ aout_DecNew()

int aout_DecNew ( audio_output_t ,
const audio_sample_format_t ,
const audio_replay_gain_t ,
const aout_request_vout_t  
)

◆ aout_DecPlay()

int aout_DecPlay ( audio_output_t ,
block_t ,
int  i_input_rate 
)

◆ aout_Destroy()

void aout_Destroy ( audio_output_t )

◆ aout_FiltersCanResample()

bool aout_FiltersCanResample ( aout_filters_t filters)

References aout_filters::resampler.

Referenced by aout_DecSynchronize().

◆ aout_FormatsPrint()

void aout_FormatsPrint ( vlc_object_t ,
const char *  ,
const audio_sample_format_t ,
const audio_sample_format_t  
)

Prints two formats in a human-readable form.

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

◆ aout_InputRequestRestart()

static void aout_InputRequestRestart ( audio_output_t aout)
inlinestatic

◆ aout_New()

audio_output_t* aout_New ( vlc_object_t )

Creates an audio output object and initializes an output module.

References _, aout_Destructor(), aout_DeviceNotify(), aout_GainNotify(), aout_HotplugNotify(), aout_MuteNotify(), aout_owner(), aout_PolicyNotify(), aout_RestartNotify(), aout_VolumeNotify(), config_FindConfig(), aout_owner_t::dev, aout_owner_t::device, audio_output::device_report, audio_output::device_select, audio_output::event, FilterCallback(), audio_output::gain_request, audio_output::hotplug_report, aout_owner_t::initial_stereo_mode, likely, module_config_t::list, module_config_t::list_count, module_config_t::list_text, aout_owner_t::lock, aout_owner_t::module, module_exists(), module_need, msg_Err, aout_owner_t::mute, audio_output::mute_report, audio_output::mute_set, audio_output::policy_report, module_config_t::psz, vlc_value_t::psz_string, aout_owner_t::req, audio_output::restart_request, audio_output::start, StereoModeCallback(), audio_output::stop, unlikely, unset_str, aout_owner_t::update, aout_owner_t::value, var_AddCallback, var_Change, var_Copy(), var_CopyDevice(), var_Create, var_GetInteger, var_GetNonEmptyString, var_SetString, ViewpointCallback(), vlc_custom_create, vlc_gettext(), vlc_mutex_init(), vlc_object_release, vlc_object_set_destructor, VLC_VAR_ADDCHOICE, VLC_VAR_ADDRESS, VLC_VAR_BOOL, VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, VLC_VAR_INTEGER, VLC_VAR_SETTEXT, VLC_VAR_STRING, vlc_viewpoint_init(), aout_owner_t::volume, audio_output::volume_report, audio_output::volume_set, and aout_owner_t::vp.

◆ aout_OutputDelete()

void aout_OutputDelete ( audio_output_t aout)

Stops the audio output stream (undoes aout_OutputNew()).

Note
This can only be called after a successful aout_OutputNew().
Warning
The caller must hold the audio output lock.

References aout_OutputAssertLocked(), and audio_output::stop.

Referenced by aout_CheckReady(), aout_DecDelete(), and aout_DecNew().

◆ aout_OutputFlush()

void aout_OutputFlush ( audio_output_t aout,
bool  wait 
)

Flushes or drains the audio output buffers.

This enables the output to expedite seek and stop.

Parameters
waitif true, wait for buffer playback (i.e. drain), if false, discard the buffers immediately (i.e. flush)
Note
This can only be called after a successful aout_OutputNew().
Warning
The caller must hold the audio output lock.

References aout_OutputAssertLocked(), and audio_output::flush.

Referenced by aout_DecFlush(), aout_DecSynchronize(), and PauseDefault().

◆ aout_OutputLock()

void aout_OutputLock ( audio_output_t )

◆ aout_OutputNew()

int aout_OutputNew ( audio_output_t ,
audio_sample_format_t ,
aout_filters_cfg_t filters_cfg 
)

Referenced by aout_CheckReady(), and aout_DecNew().

◆ aout_OutputPause()

void aout_OutputPause ( audio_output_t aout,
bool  pause,
vlc_tick_t  date 
)

Notifies the audio output (if any) of pause/resume events.

This enables the output to expedite pause, instead of waiting for its buffers to drain.

Note
This can only be called after a successful aout_OutputNew().
Warning
The caller must hold the audio output lock.

References aout_OutputAssertLocked(), audio_output::pause, and PauseDefault().

Referenced by aout_DecChangePause().

◆ aout_OutputPlay()

void aout_OutputPlay ( audio_output_t aout,
block_t block 
)

Plays a decoded audio buffer.

Note
This can only be called after a successful aout_OutputNew().
Warning
The caller must hold the audio output lock.

References aout_OutputAssertLocked(), aout_owner(), block_t::i_buffer, audio_format_t::i_bytes_per_frame, audio_format_t::i_frame_length, block_t::i_nb_samples, aout_owner_t::mixer_format, and audio_output::play.

Referenced by aout_DecFlush(), aout_DecPlay(), and aout_DecSilence().

◆ aout_OutputTimeGet()

int aout_OutputTimeGet ( audio_output_t ,
vlc_tick_t  
)

◆ aout_OutputUnlock()

void aout_OutputUnlock ( audio_output_t )

◆ aout_owner()

static aout_owner_t* aout_owner ( audio_output_t aout)
inlinestatic

◆ aout_RequestRestart()

void aout_RequestRestart ( audio_output_t aout,
unsigned  mode 
)

Marks the audio output for restart, to update any parameter of the output plug-in (e.g.

output device or channel mapping).

References aout_owner(), msg_Dbg, and aout_owner_t::restart.

Referenced by aout_InputRequestRestart(), and aout_RestartNotify().

◆ aout_SetWavePhysicalChannels()

static void aout_SetWavePhysicalChannels ( audio_sample_format_t fmt)
inlinestatic

◆ aout_volume_Amplify()

int aout_volume_Amplify ( aout_volume_t ,
block_t  
)

Applies replay gain and software volume to an audio buffer.

References audio_volume::amplify, aout_volume::gain_factor, aout_volume::module, aout_volume::object, aout_volume::output_factor, unlikely, and vlc_atomic_load_float().

Referenced by aout_DecPlay().

◆ aout_volume_Delete()

void aout_volume_Delete ( aout_volume_t )

◆ aout_volume_New()

aout_volume_t* aout_volume_New ( vlc_object_t ,
const audio_replay_gain_t  
)

Creates a software amplifier.

References vlc_custom_create.

◆ aout_volume_SetFormat()

int aout_volume_SetFormat ( aout_volume_t ,
vlc_fourcc_t   
)

Selects the current sample format for software amplification.

References audio_volume::format, aout_volume::module, module_need, module_unneed, msg_Dbg, aout_volume::object, and unlikely.

Referenced by aout_CheckReady(), and aout_DecNew().

◆ aout_volume_SetVolume()

void aout_volume_SetVolume ( aout_volume_t ,
float   
)

References aout_volume::output_factor, and unlikely.

Referenced by aout_GainNotify().