VLC 4.0.0-dev
|
Data Structures | |
struct | vlc_aout_stream |
|
inlinestatic |
References vlc_aout_stream::instance, and aout_instance_t::output.
Referenced by aout_stream_tracer(), stream_CheckReady(), stream_GetDelay(), stream_HandleDrift(), stream_Silence(), stream_Synchronize(), vlc_aout_stream_ChangePause(), vlc_aout_stream_Delete(), vlc_aout_stream_Drain(), vlc_aout_stream_Flush(), vlc_aout_stream_IsDrained(), vlc_aout_stream_Play(), and vlc_aout_stream_RequestRestart().
|
inlinestatic |
References vlc_aout_stream::instance, and aout_instance_t::owner.
Referenced by stream_CheckReady(), stream_HandleDrift(), stream_Reset(), vlc_aout_stream_Delete(), and vlc_aout_stream_Play().
|
inlinestatic |
References aout_stream_aout(), vlc_aout_stream::str_id, VLC_OBJECT, and vlc_object_get_tracer().
Referenced by stream_CheckReady(), stream_HandleDrift(), vlc_aout_stream_ChangePause(), vlc_aout_stream_Drain(), and vlc_aout_stream_Flush().
|
static |
References AOUT_DEC_CHANGED, AOUT_DEC_FAILED, AOUT_DEC_SUCCESS, AOUT_FILTERS_CFG_INIT, aout_FiltersDelete, aout_FiltersNewWithClock(), aout_FiltersSetClockDelay(), aout_OutputDelete(), aout_OutputNew(), AOUT_RESAMPLING_NONE, AOUT_RESTART_OUTPUT, aout_stream_aout(), aout_stream_owner(), aout_stream_tracer(), aout_volume_SetFormat(), aout_owner_t::bitexact, vlc_aout_stream::clock, vlc_aout_stream::delay, vlc_aout_stream::filter_format, vlc_aout_stream::filters, vlc_aout_stream::filters_cfg, audio_format_t::i_format, vlc_aout_stream::input_format, vlc_aout_stream::input_profile, aout_owner_t::meter, vlc_aout_stream::mixer_format, msg_Dbg, vlc_aout_stream::resamp_type, vlc_aout_stream::restart, vlc_aout_stream::str_id, vlc_aout_stream::sync, unlikely, vlc_audio_meter_Reset(), VLC_OBJECT, vlc_tracer_TraceEvent(), and vlc_aout_stream::volume.
Referenced by vlc_aout_stream_Play().
|
static |
References vlc_aout_stream::audio_ts, vlc_aout_stream::discontinuity, vlc_aout_stream::first_pts, vlc_aout_stream::last_drift, vlc_aout_stream::lock, vlc_aout_stream::original_pts, vlc_aout_stream::played_samples, vlc_aout_stream::sync, vlc_aout_stream::system_ts, vlc_aout_stream::timing, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_TICK_INVALID.
Referenced by stream_Reset(), vlc_aout_stream_New(), and vlc_aout_stream_Play().
|
static |
References aout_stream_aout(), vlc_aout_stream::audio_ts, vlc_aout_stream::first_pts, audio_format_t::i_rate, vlc_aout_stream::lock, vlc_aout_stream::mixer_format, vlc_aout_stream::played_samples, vlc_aout_stream::rate, vlc_aout_stream::sync, vlc_aout_stream::system_ts, audio_output::time_get, vlc_aout_stream::timing, vlc_mutex_lock(), vlc_mutex_unlock(), vlc_tick_from_samples(), VLC_TICK_INVALID, and vlc_tick_now().
Referenced by stream_Synchronize(), and vlc_aout_stream_Drain().
|
static |
References aout_FiltersAdjustResampling(), aout_FiltersCanResample(), AOUT_MAX_PTS_ADVANCE, AOUT_MAX_PTS_DELAY, AOUT_RESAMPLING_DOWN, AOUT_RESAMPLING_NONE, AOUT_RESAMPLING_UP, aout_stream_aout(), aout_stream_owner(), aout_stream_tracer(), aout_owner_t::bitexact, vlc_aout_stream::discontinuity, vlc_aout_stream::filters, msg_Dbg, msg_Warn, vlc_aout_stream::rate, vlc_aout_stream::resamp_start_drift, vlc_aout_stream::resamp_type, vlc_aout_stream::str_id, stream_Silence(), stream_StopResampling(), vlc_aout_stream::sync, unlikely, vlc_aout_stream_Flush(), VLC_TICK_MAX, VLC_TRACE, VLC_TRACE_END, vlc_tracer_Trace, and vlc_tracer_TraceEvent().
Referenced by stream_Synchronize().
|
static |
References aout_FiltersFlush(), aout_FiltersResetClock(), aout_FiltersSetClockDelay(), aout_stream_owner(), vlc_aout_stream::clock, vlc_aout_stream::delay, vlc_aout_stream::drain_deadline, vlc_aout_stream::drained, vlc_aout_stream::filters, audio_format_t::i_format, aout_owner_t::meter, vlc_aout_stream::mixer_format, vlc_aout_stream::rate, vlc_aout_stream::rate_audio_ts, vlc_aout_stream::request_delay, stream_Discontinuity(), vlc_aout_stream::sync, vlc_aout_stream::timing, vlc_audio_meter_Flush(), vlc_clock_Reset(), vlc_clock_SetDelay(), and VLC_TICK_INVALID.
Referenced by vlc_aout_stream_Delete(), and vlc_aout_stream_Flush().
|
static |
References aout_stream_aout(), block_Alloc, vlc_aout_stream::clock, vlc_frame_t::i_buffer, audio_format_t::i_bytes_per_frame, vlc_frame_t::i_dts, audio_format_t::i_frame_length, vlc_frame_t::i_length, vlc_frame_t::i_nb_samples, vlc_frame_t::i_pts, audio_format_t::i_rate, vlc_aout_stream::mixer_format, MS_FROM_VLC_TICK, msg_Dbg, vlc_frame_t::p_buffer, audio_output::play, vlc_aout_stream::played_samples, vlc_aout_stream::rate, samples_from_vlc_tick(), vlc_aout_stream::sync, vlc_aout_stream::timing, unlikely, vlc_clock_ConvertToSystem(), and vlc_tick_now().
Referenced by stream_HandleDrift(), stream_Synchronize(), and vlc_aout_stream_Play().
|
static |
References aout_FiltersAdjustResampling(), AOUT_RESAMPLING_NONE, vlc_aout_stream::filters, vlc_aout_stream::resamp_type, and vlc_aout_stream::sync.
Referenced by stream_HandleDrift().
|
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 vlc_tick_now(). 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 = vlc_tick_now() + delay
References aout_stream_aout(), vlc_aout_stream::clock, vlc_aout_stream::discontinuity, vlc_aout_stream::last_drift, vlc_aout_stream::lock, vlc_aout_stream::rate, stream_GetDelay(), stream_HandleDrift(), stream_Silence(), vlc_aout_stream::sync, audio_output::time_get, vlc_aout_stream::timing, vlc_clock_ConvertToSystem(), vlc_clock_Update(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_TICK_INVALID.
Referenced by vlc_aout_stream_Play().
void vlc_aout_stream_ChangeDelay | ( | vlc_aout_stream * | stream, |
vlc_tick_t | delay | ||
) |
References vlc_aout_stream::request_delay, and vlc_aout_stream::sync.
Referenced by Decoder_ChangeOutputDelay().
void vlc_aout_stream_ChangePause | ( | vlc_aout_stream * | stream, |
bool | paused, | ||
vlc_tick_t | date | ||
) |
References aout_stream_aout(), aout_stream_tracer(), vlc_aout_stream::clock, audio_output::flush, audio_format_t::i_format, vlc_aout_stream::mixer_format, audio_output::pause, vlc_aout_stream::rate, vlc_aout_stream::rate_audio_ts, vlc_aout_stream::rate_system_ts, vlc_aout_stream::str_id, vlc_aout_stream::sync, audio_output::time_get, vlc_aout_stream::timing, vlc_clock_ConvertToSystem(), VLC_TICK_INVALID, and vlc_tracer_TraceEvent().
Referenced by Decoder_ChangeOutputPause().
void vlc_aout_stream_ChangeRate | ( | vlc_aout_stream * | stream, |
float | rate | ||
) |
References vlc_aout_stream::rate, and vlc_aout_stream::sync.
Referenced by Decoder_ChangeOutputRate().
void vlc_aout_stream_Delete | ( | vlc_aout_stream * | stream | ) |
Stops all plugins involved in the audio output.
References aout_FiltersDelete, aout_OutputDelete(), aout_stream_aout(), aout_stream_owner(), aout_volume_Delete(), vlc_aout_stream::filters, audio_format_t::i_format, aout_owner_t::meter, vlc_aout_stream::mixer_format, stream_Reset(), vlc_audio_meter_Reset(), and vlc_aout_stream::volume.
Referenced by DecoderThread_Reload(), DeleteDecoder(), and ModuleThread_UpdateAudioFormat().
void vlc_aout_stream_Drain | ( | vlc_aout_stream * | stream | ) |
References aout_FiltersDrain(), aout_stream_aout(), aout_stream_tracer(), audio_output::drain, vlc_aout_stream::drain_deadline, vlc_aout_stream::drained, vlc_aout_stream::filters, audio_format_t::i_format, vlc_aout_stream::mixer_format, audio_output::play, vlc_aout_stream::str_id, stream_GetDelay(), VLC_TICK_INVALID, vlc_tick_now(), and vlc_tracer_TraceEvent().
Referenced by DecoderThread().
void vlc_aout_stream_Flush | ( | vlc_aout_stream * | stream | ) |
void vlc_aout_stream_GetResetStats | ( | vlc_aout_stream * | stream, |
unsigned *restrict | lost, | ||
unsigned *restrict | played | ||
) |
References vlc_aout_stream::buffers_lost, and vlc_aout_stream::buffers_played.
bool vlc_aout_stream_IsDrained | ( | vlc_aout_stream * | stream | ) |
References aout_stream_aout(), audio_output::drain, vlc_aout_stream::drain_deadline, vlc_aout_stream::drained, VLC_TICK_INVALID, and vlc_tick_now().
Referenced by vlc_input_decoder_IsEmpty().
vlc_aout_stream * vlc_aout_stream_New | ( | audio_output_t * | p_aout, |
const struct vlc_aout_stream_cfg * | cfg | ||
) |
Creates an audio output.
References AOUT_CHAN_MAX, AOUT_FILTERS_CFG_INIT, aout_FiltersNewWithClock(), aout_FormatNbChannels(), aout_instance(), aout_OutputDelete(), aout_OutputNew(), aout_owner(), AOUT_RESAMPLING_NONE, aout_volume_Delete(), aout_volume_New, aout_volume_SetFormat(), aout_owner_t::bitexact, vlc_aout_stream::buffers_lost, vlc_aout_stream::buffers_played, vlc_aout_stream_cfg::clock, vlc_aout_stream::clock, vlc_aout_stream::delay, vlc_aout_stream::drain_deadline, vlc_aout_stream::drained, vlc_aout_stream::filter_format, vlc_aout_stream::filters, vlc_aout_stream::filters_cfg, vlc_aout_stream_cfg::fmt, audio_format_t::i_bitspersample, audio_format_t::i_channels, audio_format_t::i_format, audio_format_t::i_rate, INPUT_CHAN_MAX, vlc_aout_stream::input_format, vlc_aout_stream::input_profile, vlc_aout_stream::instance, vlc_aout_stream::lock, aout_owner_t::meter, vlc_aout_stream::mixer_format, msg_Err, vlc_aout_stream_cfg::profile, vlc_aout_stream::rate, vlc_aout_stream::rate_audio_ts, vlc_aout_stream_cfg::replay_gain, vlc_aout_stream::request_delay, vlc_aout_stream::resamp_type, vlc_aout_stream::restart, vlc_aout_stream_cfg::str_id, vlc_aout_stream::str_id, stream_Discontinuity(), vlc_aout_stream::sync, vlc_aout_stream::timing, aout_owner_t::update, vlc_audio_meter_Reset(), vlc_mutex_init(), VLC_OBJECT, VLC_TICK_INVALID, vlc_aout_stream::volume, and aout_owner_t::vp.
Referenced by ModuleThread_UpdateAudioFormat().
void vlc_aout_stream_NotifyDrained | ( | vlc_aout_stream * | stream | ) |
References vlc_aout_stream::drained.
Referenced by aout_DrainedNotify().
void vlc_aout_stream_NotifyGain | ( | vlc_aout_stream * | stream, |
float | gain | ||
) |
References aout_volume_SetVolume(), and vlc_aout_stream::volume.
Referenced by aout_GainNotify().
void vlc_aout_stream_NotifyTiming | ( | vlc_aout_stream * | stream, |
vlc_tick_t | system_ts, | ||
vlc_tick_t | audio_ts | ||
) |
References vlc_aout_stream::audio_ts, vlc_aout_stream::clock, vlc_aout_stream::first_pts, vlc_aout_stream::last_drift, vlc_aout_stream::lock, vlc_aout_stream::rate, vlc_aout_stream::rate_audio_ts, vlc_aout_stream::rate_system_ts, vlc_aout_stream::sync, vlc_aout_stream::system_ts, vlc_aout_stream::timing, vlc_clock_Update(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_TICK_INVALID.
Referenced by aout_TimingNotify().
int vlc_aout_stream_Play | ( | vlc_aout_stream * | stream, |
block_t * | block | ||
) |
References AOUT_DEC_FAILED, aout_FiltersChangeViewpoint(), aout_FiltersPlay(), aout_FiltersSetClockDelay(), aout_stream_aout(), aout_stream_owner(), aout_volume_Amplify(), BLOCK_FLAG_DISCONTINUITY, block_Release, vlc_aout_stream::buffers_lost, vlc_aout_stream::buffers_played, vlc_aout_stream::clock, vlc_aout_stream::delay, vlc_aout_stream::discontinuity, vlc_aout_stream::filters, vlc_aout_stream::first_pts, vlc_frame_t::i_flags, vlc_frame_t::i_length, vlc_frame_t::i_nb_samples, vlc_frame_t::i_pts, audio_format_t::i_rate, vlc_aout_stream::input_format, vlc_aout_stream::last_drift, aout_owner_t::lock, vlc_aout_stream::lock, aout_owner_t::meter, vlc_aout_stream::original_pts, audio_output::play, vlc_aout_stream::played_samples, vlc_aout_stream::rate, vlc_aout_stream::rate_audio_ts, vlc_aout_stream::rate_system_ts, vlc_aout_stream::request_delay, stream_CheckReady(), stream_Discontinuity(), stream_Silence(), stream_Synchronize(), vlc_aout_stream::sync, audio_output::time_get, vlc_aout_stream::timing, unlikely, aout_owner_t::update, aout_owner_t::value, vlc_audio_meter_Process(), vlc_clock_ConvertToSystem(), vlc_clock_SetDelay(), vlc_clock_Update(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_tick_from_samples(), VLC_TICK_INVALID, VLC_TICK_MAX, vlc_tick_now(), vlc_aout_stream::volume, and aout_owner_t::vp.
Referenced by ModuleThread_PlayAudio().
void vlc_aout_stream_RequestRestart | ( | vlc_aout_stream * | stream, |
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_stream_aout(), msg_Dbg, and vlc_aout_stream::restart.
Referenced by aout_RestartNotify().