VLC 4.0.0-dev
Loading...
Searching...
No Matches
dec.c File Reference
Include dependency graph for dec.c:

Data Structures

struct  vlc_aout_stream
 

Functions

static aout_owner_taout_stream_owner (vlc_aout_stream *stream)
 
static audio_output_taout_stream_aout (vlc_aout_stream *stream)
 
static struct vlc_traceraout_stream_tracer (vlc_aout_stream *stream)
 
static int stream_GetDelay (vlc_aout_stream *stream, vlc_tick_t *delay)
 
static void stream_Discontinuity (vlc_aout_stream *stream)
 
static void stream_Reset (vlc_aout_stream *stream)
 
vlc_aout_streamvlc_aout_stream_New (audio_output_t *p_aout, const struct vlc_aout_stream_cfg *cfg)
 Creates an audio output.
 
void vlc_aout_stream_Delete (vlc_aout_stream *stream)
 Stops all plugins involved in the audio output.
 
static int stream_CheckReady (vlc_aout_stream *stream)
 
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.
 
static void stream_StopResampling (vlc_aout_stream *stream)
 
static void stream_Silence (vlc_aout_stream *stream, vlc_tick_t length, vlc_tick_t pts)
 
static void stream_HandleDrift (vlc_aout_stream *stream, vlc_tick_t drift, vlc_tick_t audio_ts)
 
static void stream_Synchronize (vlc_aout_stream *stream, vlc_tick_t system_now, vlc_tick_t play_date, vlc_tick_t dec_pts)
 
void vlc_aout_stream_NotifyTiming (vlc_aout_stream *stream, vlc_tick_t system_ts, vlc_tick_t audio_ts)
 
int vlc_aout_stream_Play (vlc_aout_stream *stream, block_t *block)
 
void vlc_aout_stream_GetResetStats (vlc_aout_stream *stream, unsigned *restrict lost, unsigned *restrict played)
 
void vlc_aout_stream_ChangePause (vlc_aout_stream *stream, bool paused, vlc_tick_t date)
 
void vlc_aout_stream_ChangeRate (vlc_aout_stream *stream, float rate)
 
void vlc_aout_stream_ChangeDelay (vlc_aout_stream *stream, vlc_tick_t delay)
 
void vlc_aout_stream_Flush (vlc_aout_stream *stream)
 
void vlc_aout_stream_NotifyGain (vlc_aout_stream *stream, float gain)
 
void vlc_aout_stream_NotifyDrained (vlc_aout_stream *stream)
 
bool vlc_aout_stream_IsDrained (vlc_aout_stream *stream)
 
void vlc_aout_stream_Drain (vlc_aout_stream *stream)
 

Function Documentation

◆ aout_stream_aout()

◆ aout_stream_owner()

◆ aout_stream_tracer()

◆ stream_CheckReady()

◆ stream_Discontinuity()

◆ stream_GetDelay()

◆ stream_HandleDrift()

◆ stream_Reset()

◆ stream_Silence()

◆ stream_StopResampling()

◆ stream_Synchronize()

static void stream_Synchronize ( vlc_aout_stream stream,
vlc_tick_t  system_now,
vlc_tick_t  play_date,
vlc_tick_t  dec_pts 
)
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_Lock(), vlc_clock_Unlock(), vlc_clock_Update(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_TICK_INVALID.

Referenced by vlc_aout_stream_Play().

◆ vlc_aout_stream_ChangeDelay()

void vlc_aout_stream_ChangeDelay ( vlc_aout_stream stream,
vlc_tick_t  delay 
)

◆ vlc_aout_stream_ChangePause()

◆ vlc_aout_stream_ChangeRate()

void vlc_aout_stream_ChangeRate ( vlc_aout_stream stream,
float  rate 
)

◆ vlc_aout_stream_Delete()

◆ vlc_aout_stream_Drain()

◆ vlc_aout_stream_Flush()

◆ vlc_aout_stream_GetResetStats()

void vlc_aout_stream_GetResetStats ( vlc_aout_stream stream,
unsigned *restrict  lost,
unsigned *restrict  played 
)

◆ vlc_aout_stream_IsDrained()

◆ vlc_aout_stream_New()

vlc_aout_stream * vlc_aout_stream_New ( audio_output_t p_aout,
const struct vlc_aout_stream_cfg cfg 
)

◆ vlc_aout_stream_NotifyDrained()

void vlc_aout_stream_NotifyDrained ( vlc_aout_stream stream)

References vlc_aout_stream::drained.

Referenced by aout_DrainedNotify().

◆ vlc_aout_stream_NotifyGain()

void vlc_aout_stream_NotifyGain ( vlc_aout_stream stream,
float  gain 
)

◆ vlc_aout_stream_NotifyTiming()

◆ vlc_aout_stream_Play()

◆ vlc_aout_stream_RequestRestart()

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