VLC
3.0.15
|
Functions | |
int | aout_DecNew (audio_output_t *p_aout, const audio_sample_format_t *p_format, const audio_replay_gain_t *p_replay_gain, const aout_request_vout_t *p_request_vout) |
Creates an audio output. More... | |
void | aout_DecDelete (audio_output_t *aout) |
Stops all plugins involved in the audio output. More... | |
static int | aout_CheckReady (audio_output_t *aout) |
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. More... | |
static void | aout_StopResampling (audio_output_t *aout) |
static void | aout_DecSilence (audio_output_t *aout, mtime_t length, mtime_t pts) |
static void | aout_DecSynchronize (audio_output_t *aout, mtime_t dec_pts, int input_rate) |
int | aout_DecPlay (audio_output_t *aout, block_t *block, int input_rate) |
void | aout_DecGetResetStats (audio_output_t *aout, unsigned *restrict lost, unsigned *restrict played) |
void | aout_DecChangePause (audio_output_t *aout, bool paused, mtime_t date) |
void | aout_DecFlush (audio_output_t *aout, bool wait) |
void | aout_ChangeViewpoint (audio_output_t *aout, const vlc_viewpoint_t *p_viewpoint) |
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().
|
static |
< Unspecified error
References AOUT_DEC_CHANGED, AOUT_DEC_FAILED, AOUT_DEC_SUCCESS, AOUT_FILTERS_CFG_INIT, aout_FiltersDelete, aout_FiltersNew, aout_OutputDelete(), aout_OutputNew(), aout_owner(), AOUT_RESAMPLING_NONE, AOUT_RESTART_OUTPUT, aout_volume_SetFormat(), aout_owner_t::end, aout_owner_t::filters, aout_owner_t::filters_cfg, audio_format_t::i_format, aout_owner_t::input_format, aout_owner_t::mixer_format, msg_Dbg, aout_owner_t::request_vout, aout_owner_t::resamp_type, aout_owner_t::restart, aout_owner_t::sync, unlikely, VLC_TS_INVALID, and aout_owner_t::volume.
Referenced by aout_DecPlay().
void aout_DecChangePause | ( | audio_output_t * | aout, |
bool | paused, | ||
mtime_t | 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_TS_INVALID.
Referenced by DecoderThread().
void aout_DecDelete | ( | audio_output_t * | aout | ) |
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 * | aout, |
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_TS_INVALID.
Referenced by DecoderThread(), and DeleteDecoder().
void aout_DecGetResetStats | ( | audio_output_t * | aout, |
unsigned *restrict | lost, | ||
unsigned *restrict | played | ||
) |
References aout_owner(), aout_owner_t::buffers_lost, and aout_owner_t::buffers_played.
int aout_DecNew | ( | audio_output_t * | p_aout, |
const audio_sample_format_t * | p_format, | ||
const audio_replay_gain_t * | p_replay_gain, | ||
const aout_request_vout_t * | p_request_vout | ||
) |
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_TS_INVALID, VLC_VAR_SETVALUE, aout_owner_t::volume, and aout_owner_t::vp.
Referenced by aout_update_format().
int aout_DecPlay | ( | audio_output_t * | aout, |
block_t * | block, | ||
int | 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_TS_0, aout_owner_t::volume, and aout_owner_t::vp.
|
static |
References aout_OutputPlay(), aout_owner(), block_Alloc(), CLOCK_FREQ, block_t::i_buffer, audio_format_t::i_bytes_per_frame, block_t::i_dts, audio_format_t::i_frame_length, block_t::i_length, block_t::i_nb_samples, block_t::i_pts, audio_format_t::i_rate, aout_owner_t::mixer_format, msg_Dbg, block_t::p_buffer, and unlikely.
Referenced by aout_DecSynchronize().
|
static |
Depending on the drift between the actual and intended playback times, the audio core may ignore the drift, trigger upsampling or downsampling, insert silence or even discard samples. Future VLC versions may instead adjust the input rate.
The audio output plugin is responsible for estimating its actual playback time, or rather the estimated time when the next sample will be played. (The actual playback time is always the current time, that is to say mdate(). It is not an useful statistic.)
Most audio output plugins can estimate the delay until playback of the next sample to be written to the buffer, or equally the time until all samples in the buffer will have been played. Then: pts = mdate() + delay
References aout_DecSilence(), aout_FiltersAdjustResampling(), aout_FiltersCanResample(), AOUT_MAX_PTS_ADVANCE, AOUT_MAX_PTS_DELAY, aout_OutputFlush(), aout_OutputTimeGet(), aout_owner(), AOUT_RESAMPLING_DOWN, AOUT_RESAMPLING_NONE, AOUT_RESAMPLING_UP, aout_StopResampling(), aout_owner_t::discontinuity, aout_owner_t::end, aout_owner_t::filters, INPUT_RATE_DEFAULT, mdate(), msg_Dbg, msg_Warn, aout_owner_t::resamp_start_drift, aout_owner_t::resamp_type, aout_owner_t::sync, and VLC_TS_INVALID.
Referenced by aout_DecPlay().
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().
|
static |
References aout_FiltersAdjustResampling(), aout_owner(), AOUT_RESAMPLING_NONE, aout_owner_t::filters, aout_owner_t::resamp_type, and aout_owner_t::sync.
Referenced by aout_DecSynchronize().