VLC
3.0.21
|
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_t * | aout_owner (audio_output_t *aout) |
aout_volume_t * | aout_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_t * | aout_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) |
#define AOUT_DEC_CHANGED 1 |
#define AOUT_DEC_FAILED VLC_EGENERIC |
#define AOUT_DEC_SUCCESS 0 |
#define aout_FormatsPrint | ( | o, | |
t, | |||
a, | |||
b | |||
) | aout_FormatsPrint(VLC_OBJECT(o), t, a, b) |
#define AOUT_MAX_INPUT_RATE (4) |
#define aout_New | ( | a | ) | aout_New(VLC_OBJECT(a)) |
#define aout_volume_New | ( | o, | |
g | |||
) | aout_volume_New(VLC_OBJECT(o), g) |
typedef struct aout_dev aout_dev_t |
typedef struct aout_volume aout_volume_t |
bool aout_ChangeFilterString | ( | vlc_object_t * | manager, |
vlc_object_t * | aout, | ||
const char * | var, | ||
const char * | name, | ||
bool | b_add | ||
) |
Referenced by playlist_EnableAudioFilter().
void aout_ChangeViewpoint | ( | audio_output_t * | aout, |
const vlc_viewpoint_t * | p_viewpoint | ||
) |
References aout_owner(), aout_owner_t::lock, aout_owner_t::update, aout_owner_t::value, vlc_mutex_lock(), vlc_mutex_unlock(), and aout_owner_t::vp.
Referenced by ViewpointCallback().
void aout_DecChangePause | ( | audio_output_t * | , |
bool | b_paused, | ||
vlc_tick_t | i_date | ||
) |
References aout_OutputLock(), aout_OutputPause(), aout_OutputUnlock(), aout_owner(), aout_owner_t::end, audio_format_t::i_format, aout_owner_t::mixer_format, aout_owner_t::sync, and VLC_TICK_INVALID.
Referenced by DecoderThread().
void aout_DecDelete | ( | audio_output_t * | ) |
Stops all plugins involved in the audio output.
References aout_FiltersDelete, aout_OutputDelete(), aout_OutputLock(), aout_OutputUnlock(), aout_owner(), aout_volume_Delete(), aout_owner_t::filters, audio_format_t::i_format, aout_owner_t::mixer_format, and aout_owner_t::volume.
Referenced by aout_update_format(), DeleteDecoder(), and ReloadDecoder().
void aout_DecFlush | ( | audio_output_t * | , |
bool | wait | ||
) |
References aout_FiltersDrain(), aout_FiltersFlush(), aout_OutputFlush(), aout_OutputLock(), aout_OutputPlay(), aout_OutputUnlock(), aout_owner(), aout_owner_t::end, aout_owner_t::filters, audio_format_t::i_format, aout_owner_t::mixer_format, aout_owner_t::sync, and VLC_TICK_INVALID.
Referenced by DecoderThread(), and DeleteDecoder().
void aout_DecGetResetStats | ( | audio_output_t * | , |
unsigned * | , | ||
unsigned * | |||
) |
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.
References AOUT_CHAN_MAX, AOUT_FILTERS_CFG_INIT, aout_FiltersNew, aout_FormatNbChannels(), aout_OutputDelete(), aout_OutputLock(), aout_OutputNew(), aout_OutputUnlock(), aout_owner(), AOUT_RESAMPLING_NONE, aout_volume_Delete(), aout_volume_New, aout_volume_SetFormat(), aout_owner_t::buffers_lost, aout_owner_t::buffers_played, aout_owner_t::discontinuity, aout_owner_t::end, aout_owner_t::filters, aout_owner_t::filters_cfg, audio_format_t::i_bitspersample, audio_format_t::i_channels, audio_format_t::i_format, audio_format_t::i_rate, aout_owner_t::initial_stereo_mode, INPUT_CHAN_MAX, aout_owner_t::input_format, aout_owner_t::mixer_format, msg_Err, aout_owner_t::request_vout, aout_owner_t::resamp_type, aout_owner_t::restart, aout_owner_t::sync, aout_owner_t::update, var_Change, VLC_TICK_INVALID, VLC_VAR_SETVALUE, aout_owner_t::volume, and aout_owner_t::vp.
Referenced by aout_update_format().
int aout_DecPlay | ( | audio_output_t * | , |
block_t * | , | ||
int | i_input_rate | ||
) |
< Unspecified error
References aout_CheckReady(), AOUT_DEC_FAILED, aout_DecSynchronize(), aout_FiltersChangeViewpoint(), aout_FiltersPlay(), AOUT_MAX_ADVANCE_TIME, AOUT_MAX_INPUT_RATE, AOUT_MAX_PTS_DELAY, aout_OutputLock(), aout_OutputPlay(), aout_OutputUnlock(), aout_owner(), aout_volume_Amplify(), BLOCK_FLAG_DISCONTINUITY, block_Release(), aout_owner_t::buffers_lost, aout_owner_t::buffers_played, CLOCK_FREQ, aout_owner_t::discontinuity, aout_owner_t::end, aout_owner_t::filters, block_t::i_flags, block_t::i_length, block_t::i_nb_samples, block_t::i_pts, audio_format_t::i_rate, aout_owner_t::input_format, INPUT_RATE_DEFAULT, aout_owner_t::lock, mdate(), msg_Err, msg_Warn, aout_owner_t::sync, unlikely, aout_owner_t::update, aout_owner_t::value, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_TICK_0, aout_owner_t::volume, and aout_owner_t::vp.
void aout_Destroy | ( | audio_output_t * | ) |
Deinitializes an audio output module and destroys an audio output object.
References aout_OutputLock(), aout_OutputUnlock(), aout_owner(), audio_output::device_select, FilterCallback(), aout_owner_t::module, module_unneed, audio_output::mute_set, audio_output::obj, vlc_common_members::parent, StereoModeCallback(), var_Copy(), var_CopyDevice(), var_DelCallback, var_SetFloat, ViewpointCallback(), vlc_object_release, and audio_output::volume_set.
bool aout_FiltersCanResample | ( | aout_filters_t * | filters | ) |
References aout_filters::resampler.
Referenced by aout_DecSynchronize().
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.
|
inlinestatic |
References aout_RequestRestart(), and AOUT_RESTART_FILTERS.
Referenced by FilterCallback(), and VisualizationCallback().
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.
void aout_OutputDelete | ( | audio_output_t * | aout | ) |
Stops the audio output stream (undoes aout_OutputNew()).
References aout_OutputAssertLocked(), and audio_output::stop.
Referenced by aout_CheckReady(), aout_DecDelete(), and aout_DecNew().
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.
wait | if true, wait for buffer playback (i.e. drain), if false, discard the buffers immediately (i.e. flush) |
References aout_OutputAssertLocked(), and audio_output::flush.
Referenced by aout_DecFlush(), aout_DecSynchronize(), and PauseDefault().
void aout_OutputLock | ( | audio_output_t * | ) |
References aout_owner(), aout_owner_t::lock, and vlc_mutex_lock().
Referenced by aout_DecChangePause(), aout_DecDelete(), aout_DecFlush(), aout_DecNew(), aout_DecPlay(), and aout_Destroy().
int aout_OutputNew | ( | audio_output_t * | , |
audio_sample_format_t * | , | ||
aout_filters_cfg_t * | filters_cfg | ||
) |
Referenced by aout_CheckReady(), and aout_DecNew().
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.
References aout_OutputAssertLocked(), audio_output::pause, and PauseDefault().
Referenced by aout_DecChangePause().
void aout_OutputPlay | ( | audio_output_t * | aout, |
block_t * | block | ||
) |
Plays a decoded audio buffer.
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().
int aout_OutputTimeGet | ( | audio_output_t * | , |
vlc_tick_t * | |||
) |
References aout_OutputAssertLocked(), and audio_output::time_get.
Referenced by aout_DecSynchronize().
void aout_OutputUnlock | ( | audio_output_t * | ) |
References aout_OutputDeviceSet(), aout_OutputMuteSet(), aout_OutputVolumeSet(), aout_owner(), aout_owner_t::device, aout_owner_t::lock, aout_owner_t::mute, aout_owner_t::req, unset_str, vlc_assert_locked(), vlc_mutex_lock(), vlc_mutex_unlock(), and aout_owner_t::volume.
Referenced by aout_DecChangePause(), aout_DecDelete(), aout_DecFlush(), aout_DecNew(), aout_DecPlay(), aout_Destroy(), aout_DeviceSet(), aout_MuteSet(), and aout_VolumeSet().
|
inlinestatic |
Referenced by aout_ChangeViewpoint(), aout_CheckReady(), aout_DecChangePause(), aout_DecDelete(), aout_DecFlush(), aout_DecGetResetStats(), aout_DecNew(), aout_DecPlay(), aout_DecSilence(), aout_DecSynchronize(), aout_Destroy(), aout_Destructor(), aout_DeviceSet(), aout_DevicesList(), aout_GainNotify(), aout_HotplugNotify(), aout_MuteSet(), aout_New(), aout_OutputAssertLocked(), aout_OutputLock(), aout_OutputPlay(), aout_OutputTryLock(), aout_OutputUnlock(), aout_RequestRestart(), aout_StopResampling(), and aout_VolumeSet().
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().
|
inlinestatic |
References AOUT_CHAN_CENTER, AOUT_CHAN_LEFT, AOUT_CHAN_LFE, AOUT_CHAN_MAX, AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT, AOUT_CHAN_REARCENTER, AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_RIGHT, aout_FormatPrepare(), audio_format_t::i_channels, and audio_format_t::i_physical_channels.
Referenced by aout_FiltersNew(), and aout_OutputNew().
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().
void aout_volume_Delete | ( | aout_volume_t * | ) |
Destroys a software amplifier.
References aout_volume::module, module_unneed, audio_volume::obj, aout_volume::object, vlc_common_members::parent, ReplayGainCallback(), var_DelCallback, and vlc_object_release.
Referenced by aout_DecDelete(), and aout_DecNew().
aout_volume_t* aout_volume_New | ( | vlc_object_t * | , |
const audio_replay_gain_t * | |||
) |
Creates a software amplifier.
References vlc_custom_create.
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().
void aout_volume_SetVolume | ( | aout_volume_t * | , |
float | |||
) |
References aout_volume::output_factor, and unlikely.
Referenced by aout_GainNotify().