VLC  4.0.0-dev
dec.c File Reference
Include dependency graph for dec.c:


static void aout_Drain (audio_output_t *aout)
int aout_DecNew (audio_output_t *p_aout, const audio_sample_format_t *p_format, int profile, vlc_clock_t *clock, const audio_replay_gain_t *p_replay_gain)
 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_DecSynchronize (audio_output_t *aout, vlc_tick_t system_now, vlc_tick_t dec_pts)
static void aout_DecSilence (audio_output_t *aout, vlc_tick_t length, vlc_tick_t pts)
void aout_RequestRetiming (audio_output_t *aout, vlc_tick_t system_ts, vlc_tick_t audio_ts)
int aout_DecPlay (audio_output_t *aout, block_t *block)
void aout_DecGetResetStats (audio_output_t *aout, unsigned *restrict lost, unsigned *restrict played)
void aout_DecChangePause (audio_output_t *aout, bool paused, vlc_tick_t date)
void aout_DecChangeRate (audio_output_t *aout, float rate)
void aout_DecChangeDelay (audio_output_t *aout, vlc_tick_t delay)
void aout_DecFlush (audio_output_t *aout)
void aout_DecDrain (audio_output_t *aout)

Function Documentation

◆ aout_CheckReady()

static int aout_CheckReady ( audio_output_t aout)

◆ aout_DecChangeDelay()

void aout_DecChangeDelay ( audio_output_t aout,
vlc_tick_t  delay 

◆ aout_DecChangePause()

void aout_DecChangePause ( audio_output_t aout,
bool  paused,
vlc_tick_t  date 

◆ aout_DecChangeRate()

void aout_DecChangeRate ( audio_output_t aout,
float  rate 

◆ aout_DecDelete()

void aout_DecDelete ( audio_output_t aout)

◆ aout_DecDrain()

void aout_DecDrain ( audio_output_t aout)

◆ aout_DecFlush()

void aout_DecFlush ( audio_output_t aout)

◆ 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,
int  profile,
vlc_clock_t clock,
const audio_replay_gain_t p_replay_gain 

◆ aout_DecPlay()

int aout_DecPlay ( audio_output_t aout,
block_t block 

◆ aout_DecSilence()

static void aout_DecSilence ( audio_output_t aout,
vlc_tick_t  length,
vlc_tick_t  pts 

◆ aout_DecSynchronize()

static void aout_DecSynchronize ( audio_output_t aout,
vlc_tick_t  system_now,
vlc_tick_t  dec_pts 

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_DecSilence(), aout_owner(), aout_RequestRetiming(), aout_TimeGet(), aout_owner_t::clock, aout_owner_t::discontinuity, aout_owner_t::rate, aout_owner_t::sync, and vlc_clock_ConvertToSystem().

Referenced by aout_DecPlay().

◆ aout_Drain()

static void aout_Drain ( audio_output_t aout)

◆ 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_RequestRetiming()

void aout_RequestRetiming ( audio_output_t aout,
vlc_tick_t  system_ts,
vlc_tick_t  audio_ts 

◆ aout_StopResampling()

static void aout_StopResampling ( audio_output_t aout)