VLC  3.0.15
Functions
dec.c File Reference
Include dependency graph for dec.c:

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)
 

Function Documentation

◆ aout_ChangeViewpoint()

void aout_ChangeViewpoint ( audio_output_t *  aout,
const vlc_viewpoint_t *  p_viewpoint 
)

◆ aout_CheckReady()

static int aout_CheckReady ( audio_output_t *  aout)
static

◆ aout_DecChangePause()

void aout_DecChangePause ( audio_output_t *  aout,
bool  paused,
mtime_t  date 
)

◆ aout_DecDelete()

void aout_DecDelete ( audio_output_t *  aout)

◆ aout_DecFlush()

void aout_DecFlush ( audio_output_t *  aout,
bool  wait 
)

◆ aout_DecGetResetStats()

void aout_DecGetResetStats ( audio_output_t *  aout,
unsigned *restrict  lost,
unsigned *restrict  played 
)

◆ aout_DecNew()

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 
)

◆ aout_DecPlay()

int aout_DecPlay ( audio_output_t *  aout,
block_t *  block,
int  input_rate 
)

◆ aout_DecSilence()

static void aout_DecSilence ( audio_output_t *  aout,
mtime_t  length,
mtime_t  pts 
)
static

◆ aout_DecSynchronize()

static void aout_DecSynchronize ( audio_output_t *  aout,
mtime_t  dec_pts,
int  input_rate 
)
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().

◆ aout_RequestRestart()

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().

◆ aout_StopResampling()

static void aout_StopResampling ( audio_output_t *  aout)
static