
Defines | |
| #define | AOUT_RESTART_OUTPUT 1 |
| #define | AOUT_RESTART_INPUT 2 |
Functions | |
| static int | ReplayGainCallback (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *) |
| 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. | |
| void | aout_Shutdown (audio_output_t *p_aout) |
| Stops all plugins involved in the audio output. | |
| void | aout_DecDelete (audio_output_t *aout) |
| Stops the decoded audio input. | |
| static void | aout_CheckRestart (audio_output_t *aout) |
| void | aout_RequestRestart (audio_output_t *aout) |
| Marks the audio output for restart, to update any parameter of the output plug-in (e.g. | |
| void | aout_InputRequestRestart (audio_output_t *aout) |
| This function will safely mark aout input to be restarted as soon as possible to take configuration changes into account. | |
| block_t * | aout_DecNewBuffer (audio_output_t *aout, size_t samples) |
| void | aout_DecDeleteBuffer (audio_output_t *aout, block_t *block) |
| int | aout_DecPlay (audio_output_t *p_aout, block_t *p_buffer, int i_input_rate) |
| int | aout_DecGetResetLost (audio_output_t *aout) |
| void | aout_DecChangePause (audio_output_t *aout, bool paused, mtime_t date) |
| void | aout_DecFlush (audio_output_t *aout) |
| bool | aout_DecIsEmpty (audio_output_t *aout) |
| void | aout_TimeReport (audio_output_t *aout, mtime_t ideal) |
| Notifies the audio input of the drift from the requested audio playback timestamp (block_t::i_pts) to the anticipated playback time as reported by the audio output hardware. | |
| #define AOUT_RESTART_INPUT 2 |
Referenced by aout_CheckRestart(), aout_InputRequestRestart(), and aout_RequestRestart().
| #define AOUT_RESTART_OUTPUT 1 |
Referenced by aout_CheckRestart(), and aout_RequestRestart().
| static void aout_CheckRestart | ( | audio_output_t * | aout | ) | [static] |
References aout_assert_locked, aout_InputDelete(), aout_InputNew(), aout_MixerDelete(), aout_MixerNew, aout_OutputDelete(), aout_OutputNew(), aout_owner(), AOUT_RESTART_INPUT, AOUT_RESTART_OUTPUT, audio_format_t::i_format, aout_owner_t::input, aout_owner_t::input_format, likely, aout_owner_t::mixer, aout_owner_t::mixer_format, aout_input_t::request_vout, aout_owner_t::restart, vlc_atomic_swap(), and aout_owner_t::volume.
Referenced by aout_DecPlay().
| void aout_DecChangePause | ( | audio_output_t * | aout, | |
| bool | paused, | |||
| mtime_t | date | |||
| ) |
References aout_lock(), aout_OutputPause(), aout_owner(), aout_unlock(), aout_owner_t::date, date_Set(), aout_owner_t::sync, and VLC_TS_INVALID.
Referenced by aout_new_buffer(), and DecoderOutputChangePause().
| void aout_DecDelete | ( | audio_output_t * | aout | ) |
Stops the decoded audio input.
References aout_Shutdown().
Referenced by aout_new_buffer(), and DeleteDecoder().
| void aout_DecDeleteBuffer | ( | audio_output_t * | aout, | |
| block_t * | block | |||
| ) |
References aout_BufferFree.
Referenced by DecoderDecodeAudio().
| void aout_DecFlush | ( | audio_output_t * | aout | ) |
References aout_lock(), aout_OutputFlush(), aout_owner(), aout_unlock(), aout_owner_t::date, date_Set(), aout_owner_t::sync, and VLC_TS_INVALID.
Referenced by DecoderDecodeAudio(), DecoderProcessAudio(), and DeleteDecoder().
| int aout_DecGetResetLost | ( | audio_output_t * | aout | ) |
References aout_lock(), aout_owner(), aout_unlock(), aout_input_t::i_buffer_lost, aout_owner_t::input, and likely.
Referenced by DecoderPlayAudio().
| bool aout_DecIsEmpty | ( | audio_output_t * | aout | ) |
References aout_lock(), aout_OutputFlush(), aout_owner(), aout_unlock(), aout_owner_t::date, date_Get(), mdate(), aout_owner_t::sync, and VLC_TS_INVALID.
Referenced by input_DecoderIsEmpty().
| 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_FMTS_IDENTICAL, aout_FormatNbChannels(), aout_InputNew(), aout_lock(), aout_MixerDelete(), aout_MixerNew, aout_OutputDelete(), aout_OutputNew(), aout_owner(), aout_ReplayGainInit(), aout_Shutdown(), aout_unlock(), aout_owner_t::data, aout_owner_t::date, date_Init(), date_Set(), aout_owner_t::gain, audio_format_t::i_channels, audio_format_t::i_format, audio_format_t::i_rate, aout_owner_t::input, aout_owner_t::input_format, aout_owner_t::mixer, aout_owner_t::mixer_format, aout_owner_t::module, msg_Err, ReplayGainCallback(), aout_owner_t::restart, aout_owner_t::sync, var_AddCallback, var_Destroy, var_TriggerCallback, vlc_atomic_set(), VLC_TS_INVALID, and aout_owner_t::volume.
Referenced by aout_new_buffer().
| block_t* aout_DecNewBuffer | ( | audio_output_t * | aout, | |
| size_t | samples | |||
| ) |
References aout_owner(), block_Alloc(), audio_format_t::i_bytes_per_frame, audio_format_t::i_frame_length, block_t::i_length, block_t::i_nb_samples, block_t::i_pts, aout_owner_t::input_format, and likely.
Referenced by aout_new_buffer().
| int aout_DecPlay | ( | audio_output_t * | p_aout, | |
| block_t * | p_buffer, | |||
| int | i_input_rate | |||
| ) |
References aout_BufferFree, aout_CheckRestart(), aout_InputPlay(), aout_lock(), AOUT_MAX_INPUT_RATE, aout_MixerRun(), aout_OutputPlay(), aout_owner(), aout_unlock(), aout_owner_t::date, date_Increment(), aout_owner_t::gain, block_t::i_length, block_t::i_nb_samples, block_t::i_pts, audio_format_t::i_rate, aout_owner_t::input, aout_owner_t::input_format, INPUT_RATE_DEFAULT, aout_owner_t::mixer, aout_owner_t::multiplier, aout_owner_t::sync, unlikely, vlc_atomic_getf(), and aout_owner_t::volume.
Referenced by DecoderPlayAudio().
| void aout_InputRequestRestart | ( | audio_output_t * | aout | ) |
This function will safely mark aout input to be restarted as soon as possible to take configuration changes into account.
References aout_owner(), AOUT_RESTART_INPUT, aout_owner_t::restart, and vlc_atomic_compare_swap().
Referenced by aout_EnableFilter(), EqualizerCallback(), and VisualizationCallback().
| void aout_RequestRestart | ( | audio_output_t * | aout | ) |
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(), AOUT_RESTART_INPUT, AOUT_RESTART_OUTPUT, aout_owner_t::restart, and vlc_atomic_set().
Referenced by aout_ChannelsRestart().
| void aout_Shutdown | ( | audio_output_t * | p_aout | ) |
Stops all plugins involved in the audio output.
References aout_InputDelete(), aout_lock(), aout_MixerDelete(), aout_OutputDelete(), aout_owner(), aout_unlock(), aout_owner_t::input, likely, aout_owner_t::mixer, ReplayGainCallback(), var_DelCallback, var_Destroy, and aout_owner_t::volume.
Referenced by aout_DecDelete(), aout_DecNew(), and aout_Destroy().
| void aout_TimeReport | ( | audio_output_t * | aout, | |
| mtime_t | ideal | |||
| ) |
Notifies the audio input of the drift from the requested audio playback timestamp (block_t::i_pts) to the anticipated playback time as reported by the audio output hardware.
Depending on the drift amplitude, the input core may ignore the drift trigger upsampling or downsampling, or even discard samples. Future VLC versions may instead adjust the input decoding speed.
The audio output plugin is responsible for estimating the ideal current playback time defined as follows: ideal time = buffer timestamp - (output latency + pending buffer duration)
Practically, this is the PTS (block_t.i_pts) of the current buffer minus the latency reported by the output programming interface. Computing the estimated drift directly would probably be more intuitive. However the use of an absolute time value does not introduce extra measurement errors due to the CPU scheduling jitter and clock resolution. Furthermore, the ideal while it is an abstract value, is easy for most audio output plugins to compute. The following definition is equivalent but depends on the clock time: ideal time = real time + drift
| ideal | estimated ideal time as defined above. |
References aout_assert_locked, AOUT_MAX_PTS_ADVANCE, AOUT_MAX_PTS_DELAY, aout_owner(), aout_owner_t::date, date_Get(), date_Move(), mdate(), msg_Warn, aout_owner_t::sync, and VLC_TS_INVALID.
| static int ReplayGainCallback | ( | vlc_object_t * | obj, | |
| char const * | var, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | val, | |||
| void * | data | |||
| ) | [static] |
References aout_ReplayGainSelect, aout_owner_t::data, aout_owner_t::gain, aout_owner_t::multiplier, vlc_value_t::psz_string, vlc_atomic_setf(), and VLC_UNUSED.
Referenced by aout_DecNew(), and aout_Shutdown().
1.7.1