Defines | Functions

dec.c File Reference

Include dependency graph for dec.c:

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_taout_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 Documentation

#define AOUT_RESTART_INPUT   2
#define AOUT_RESTART_OUTPUT   1

Function Documentation

static void aout_CheckRestart ( audio_output_t aout  )  [static]
void aout_DecChangePause ( audio_output_t aout,
bool  paused,
mtime_t  date 
)
void aout_DecDelete ( audio_output_t aout  ) 

Stops the decoded audio input.

Note:
Due to output recycling, this function is esssentially a stub.

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  ) 
int aout_DecGetResetLost ( audio_output_t aout  ) 
bool aout_DecIsEmpty ( audio_output_t aout  ) 
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 
)
block_t* aout_DecNewBuffer ( audio_output_t aout,
size_t  samples 
)
int aout_DecPlay ( audio_output_t p_aout,
block_t p_buffer,
int  i_input_rate 
)
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  ) 
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

Note:
If aout_LatencyReport() is never called, the core will assume that there is no drift.
Parameters:
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]
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines