VLC
4.0.0-dev
|
Data Structures | |
struct | vlc_clock_main_t |
struct | vlc_clock_t |
Functions | |
static vlc_tick_t | main_stream_to_system (vlc_clock_main_t *main_clock, vlc_tick_t ts) |
static void | vlc_clock_main_reset (vlc_clock_main_t *main_clock) |
static void | vlc_clock_on_update (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t ts, double rate, unsigned frame_rate, unsigned frame_rate_base) |
static vlc_tick_t | vlc_clock_master_update (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t original_ts, double rate, unsigned frame_rate, unsigned frame_rate_base) |
static void | vlc_clock_master_reset (vlc_clock_t *clock) |
static vlc_tick_t | vlc_clock_master_set_delay (vlc_clock_t *clock, vlc_tick_t delay) |
static vlc_tick_t | vlc_clock_monotonic_to_system_locked (vlc_clock_t *clock, vlc_tick_t now, vlc_tick_t ts, double rate) |
static vlc_tick_t | vlc_clock_slave_to_system_locked (vlc_clock_t *clock, vlc_tick_t now, vlc_tick_t ts, double rate) |
static vlc_tick_t | vlc_clock_master_to_system_locked (vlc_clock_t *clock, vlc_tick_t now, vlc_tick_t ts, double rate) |
static vlc_tick_t | vlc_clock_slave_update (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t ts, double rate, unsigned frame_rate, unsigned frame_rate_base) |
static void | vlc_clock_slave_reset (vlc_clock_t *clock) |
static vlc_tick_t | vlc_clock_slave_set_delay (vlc_clock_t *clock, vlc_tick_t delay) |
int | vlc_clock_Wait (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t ts, double rate, vlc_tick_t max_duration) |
Wait for a timestamp expressed in stream time. More... | |
vlc_clock_main_t * | vlc_clock_main_New (void) |
This function creates the vlc_clock_main_t of the program. More... | |
void | vlc_clock_main_Abort (vlc_clock_main_t *main_clock) |
Abort all the pending vlc_clock_Wait. More... | |
void | vlc_clock_main_Reset (vlc_clock_main_t *main_clock) |
Reset the vlc_clock_main_t. More... | |
void | vlc_clock_main_SetFirstPcr (vlc_clock_main_t *main_clock, vlc_tick_t system_now, vlc_tick_t ts) |
void | vlc_clock_main_SetInputDejitter (vlc_clock_main_t *main_clock, vlc_tick_t delay) |
void | vlc_clock_main_SetDejitter (vlc_clock_main_t *main_clock, vlc_tick_t dejitter) |
This function sets the dejitter delay to absorb the clock jitter. More... | |
void | vlc_clock_main_ChangePause (vlc_clock_main_t *main_clock, vlc_tick_t now, bool paused) |
This function allows changing the pause status. More... | |
void | vlc_clock_main_Delete (vlc_clock_main_t *main_clock) |
Destroy the clock main. More... | |
vlc_tick_t | vlc_clock_Update (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t ts, double rate) |
This function will update the clock drift and returns the drift. More... | |
vlc_tick_t | vlc_clock_UpdateVideo (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t ts, double rate, unsigned frame_rate, unsigned frame_rate_base) |
This function will update the video clock drift and returns the drift. More... | |
void | vlc_clock_Reset (vlc_clock_t *clock) |
This function resets the clock drift. More... | |
vlc_tick_t | vlc_clock_SetDelay (vlc_clock_t *clock, vlc_tick_t delay) |
This functions change the clock delay. More... | |
vlc_tick_t | vlc_clock_ConvertToSystem (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t ts, double rate) |
This function converts a timestamp from stream to system. More... | |
void | vlc_clock_ConvertArrayToSystem (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t *ts_array, size_t ts_count, double rate) |
This functon converts an array of timestamp from stream to system. More... | |
static void | vlc_clock_set_master_callbacks (vlc_clock_t *clock) |
static void | vlc_clock_set_slave_callbacks (vlc_clock_t *clock) |
static vlc_clock_t * | vlc_clock_main_Create (vlc_clock_main_t *main_clock, unsigned priority, const struct vlc_clock_cbs *cbs, void *cbs_data) |
vlc_clock_t * | vlc_clock_main_CreateMaster (vlc_clock_main_t *main_clock, const struct vlc_clock_cbs *cbs, void *cbs_data) |
This function creates a new master vlc_clock_t interface. More... | |
vlc_clock_t * | vlc_clock_main_CreateSlave (vlc_clock_main_t *main_clock, enum es_format_category_e cat, const struct vlc_clock_cbs *cbs, void *cbs_data) |
This function creates a new slave vlc_clock_t interface. More... | |
vlc_clock_t * | vlc_clock_CreateSlave (const vlc_clock_t *clock, enum es_format_category_e cat) |
This function creates a new slave vlc_clock_t interface. More... | |
void | vlc_clock_main_SetMaster (vlc_clock_main_t *main_clock, vlc_clock_t *clock) |
This function set the allocated interface as the master making the current master if any a slave. More... | |
void | vlc_clock_Delete (vlc_clock_t *clock) |
This function free the resources allocated by vlc_clock*Create*() More... | |
|
static |
References vlc_clock_main_t::coeff, vlc_clock_main_t::offset, vlc_clock_main_t::rate, and VLC_TICK_INVALID.
Referenced by vlc_clock_master_to_system_locked(), and vlc_clock_slave_to_system_locked().
void vlc_clock_ConvertArrayToSystem | ( | vlc_clock_t * | clock, |
vlc_tick_t | system_now, | ||
vlc_tick_t * | ts_array, | ||
size_t | ts_count, | ||
double | rate | ||
) |
This functon converts an array of timestamp from stream to system.
References vlc_clock_main_t::lock, vlc_clock_t::owner, vlc_clock_t::to_system_locked, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by spu_channel_UpdateDates(), and spu_PutSubpicture().
vlc_tick_t vlc_clock_ConvertToSystem | ( | vlc_clock_t * | clock, |
vlc_tick_t | system_now, | ||
vlc_tick_t | ts, | ||
double | rate | ||
) |
This function converts a timestamp from stream to system.
References vlc_clock_main_t::lock, vlc_clock_t::owner, vlc_clock_t::to_system_locked, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by aout_DecPlay(), aout_DecSilence(), aout_DecSynchronize(), ModuleThread_GetDisplayDate(), ThreadDisplayPicture(), ThreadDisplayPreparePicture(), and ThreadDisplayRenderPicture().
vlc_clock_t* vlc_clock_CreateSlave | ( | const vlc_clock_t * | clock, |
enum es_format_category_e | cat | ||
) |
This function creates a new slave vlc_clock_t interface.
You must use vlc_clock_Delete to free it.
References vlc_clock_t::owner, and vlc_clock_main_CreateSlave().
Referenced by aout_FiltersNewWithClock().
void vlc_clock_Delete | ( | vlc_clock_t * | clock | ) |
This function free the resources allocated by vlc_clock*Create*()
References vlc_clock_main_t::lock, vlc_clock_main_t::master, vlc_clock_t::owner, vlc_clock_main_t::rc, vlc_clock_main_reset(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by aout_FiltersDelete(), aout_FiltersNewWithClock(), EsOutCreateDecoder(), and EsOutDestroyDecoder().
void vlc_clock_main_Abort | ( | vlc_clock_main_t * | main_clock | ) |
Abort all the pending vlc_clock_Wait.
References vlc_clock_main_t::abort, vlc_clock_main_t::cond, vlc_clock_main_t::lock, vlc_cond_broadcast(), vlc_mutex_lock(), and vlc_mutex_unlock().
void vlc_clock_main_ChangePause | ( | vlc_clock_main_t * | main_clock, |
vlc_tick_t | now, | ||
bool | paused | ||
) |
This function allows changing the pause status.
Only apply a delay if the clock has a reference point to avoid messing up the timings if the stream was paused then seeked
References vlc_clock_main_t::cond, vlc_clock_main_t::delay, vlc_clock_main_t::first_pcr, vlc_clock_main_t::last, vlc_clock_main_t::lock, vlc_clock_main_t::offset, vlc_clock_main_t::pause_date, clock_point_t::system, vlc_cond_broadcast(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_TICK_INVALID, and vlc_clock_main_t::wait_sync_ref.
Referenced by EsOutProgramChangePause().
|
static |
References vlc_clock_t::cbs, vlc_clock_t::cbs_data, vlc_clock_t::delay, vlc_clock_cbs::on_update, vlc_clock_t::owner, and vlc_clock_t::priority.
Referenced by vlc_clock_main_CreateMaster(), and vlc_clock_main_CreateSlave().
vlc_clock_t* vlc_clock_main_CreateMaster | ( | vlc_clock_main_t * | main_clock, |
const struct vlc_clock_cbs * | cbs, | ||
void * | cbs_data | ||
) |
This function creates a new master vlc_clock_t interface.
You must use vlc_clock_Delete to free it.
References vlc_clock_main_t::lock, vlc_clock_main_t::master, vlc_clock_main_t::rc, vlc_clock_main_Create(), vlc_clock_master_reset(), vlc_clock_set_master_callbacks(), vlc_clock_set_slave_callbacks(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by EsOutCreateDecoder().
vlc_clock_t* vlc_clock_main_CreateSlave | ( | vlc_clock_main_t * | main_clock, |
enum es_format_category_e | cat, | ||
const struct vlc_clock_cbs * | cbs, | ||
void * | cbs_data | ||
) |
This function creates a new slave vlc_clock_t interface.
You must use vlc_clock_Delete to free it.
References AUDIO_ES, vlc_clock_main_t::lock, vlc_clock_main_t::rc, SPU_ES, VIDEO_ES, vlc_clock_main_Create(), vlc_clock_set_slave_callbacks(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by EsOutCreateDecoder(), and vlc_clock_CreateSlave().
void vlc_clock_main_Delete | ( | vlc_clock_main_t * | main_clock | ) |
vlc_clock_main_t* vlc_clock_main_New | ( | void | ) |
This function creates the vlc_clock_main_t of the program.
References vlc_clock_main_t::abort, AOUT_MAX_PTS_ADVANCE, AvgInit(), clock_point_Create(), vlc_clock_main_t::coeff, vlc_clock_main_t::coeff_avg, vlc_clock_main_t::cond, DEFAULT_PTS_DELAY, vlc_clock_main_t::delay, vlc_clock_main_t::first_pcr, vlc_clock_main_t::input_dejitter, vlc_clock_main_t::last, vlc_clock_main_t::lock, vlc_clock_main_t::master, vlc_clock_main_t::offset, vlc_clock_main_t::output_dejitter, vlc_clock_main_t::pause_date, vlc_clock_main_t::rate, vlc_clock_main_t::rc, vlc_cond_init(), vlc_mutex_init(), VLC_TICK_INVALID, vlc_clock_main_t::wait_sync_ref, and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by EsOutProgramAdd().
|
static |
References AvgReset(), clock_point_Create(), vlc_clock_main_t::coeff, vlc_clock_main_t::coeff_avg, vlc_clock_main_t::cond, vlc_clock_main_t::last, vlc_clock_main_t::offset, vlc_clock_main_t::rate, vlc_cond_broadcast(), VLC_TICK_INVALID, vlc_clock_main_t::wait_sync_ref, and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by vlc_clock_Delete(), vlc_clock_main_Reset(), and vlc_clock_master_reset().
void vlc_clock_main_Reset | ( | vlc_clock_main_t * | main_clock | ) |
Reset the vlc_clock_main_t.
References clock_point_Create(), vlc_clock_main_t::first_pcr, vlc_clock_main_t::lock, vlc_clock_main_reset(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_TICK_INVALID.
Referenced by EsOutChangePosition().
void vlc_clock_main_SetDejitter | ( | vlc_clock_main_t * | main_clock, |
vlc_tick_t | dejitter | ||
) |
This function sets the dejitter delay to absorb the clock jitter.
Also used as the maximum delay before the synchro is considered to kick in.
References vlc_clock_main_t::lock, vlc_clock_main_t::output_dejitter, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by EsOutProgramAdd().
void vlc_clock_main_SetFirstPcr | ( | vlc_clock_main_t * | main_clock, |
vlc_tick_t | system_now, | ||
vlc_tick_t | ts | ||
) |
void vlc_clock_main_SetInputDejitter | ( | vlc_clock_main_t * | main_clock, |
vlc_tick_t | delay | ||
) |
References vlc_clock_main_t::delay, vlc_clock_main_t::input_dejitter, vlc_clock_main_t::lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by EsOutProgramAdd(), and EsOutVaPrivControlLocked().
void vlc_clock_main_SetMaster | ( | vlc_clock_main_t * | main_clock, |
vlc_clock_t * | clock | ||
) |
This function set the allocated interface as the master making the current master if any a slave.
References vlc_clock_main_t::lock, vlc_clock_main_t::master, vlc_clock_master_reset(), vlc_clock_set_master_callbacks(), vlc_clock_set_slave_callbacks(), vlc_mutex_lock(), and vlc_mutex_unlock().
|
static |
References vlc_clock_main_t::delay, vlc_clock_t::delay, vlc_clock_main_t::lock, vlc_clock_t::owner, vlc_clock_main_reset(), vlc_clock_on_update(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_TICK_INVALID.
Referenced by vlc_clock_main_CreateMaster(), vlc_clock_main_SetMaster(), and vlc_clock_set_master_callbacks().
|
static |
|
static |
References vlc_clock_t::delay, main_stream_to_system(), vlc_clock_t::owner, vlc_clock_main_t::rate, vlc_clock_monotonic_to_system_locked(), and VLC_TICK_INVALID.
Referenced by vlc_clock_set_master_callbacks().
|
static |
References AvgGet(), AvgUpdate(), clock_point_Create(), vlc_clock_main_t::coeff, vlc_clock_main_t::coeff_avg, vlc_clock_main_t::cond, vlc_clock_t::delay, vlc_clock_main_t::last, vlc_clock_main_t::lock, vlc_clock_main_t::offset, vlc_clock_t::owner, vlc_clock_main_t::rate, clock_point_t::stream, clock_point_t::system, unlikely, vlc_clock_on_update(), vlc_cond_broadcast(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_TICK_INVALID, vlc_clock_main_t::wait_sync_ref, and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by vlc_clock_set_master_callbacks().
|
static |
References clock_point_Create(), vlc_clock_main_t::delay, vlc_clock_main_t::first_pcr, vlc_clock_main_t::input_dejitter, vlc_clock_main_t::output_dejitter, vlc_clock_t::owner, vlc_clock_t::priority, clock_point_t::stream, clock_point_t::system, VLC_TICK_INVALID, vlc_clock_main_t::wait_sync_ref, and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by vlc_clock_master_to_system_locked(), and vlc_clock_slave_to_system_locked().
|
inlinestatic |
References vlc_clock_t::cbs, vlc_clock_t::cbs_data, and vlc_clock_cbs::on_update.
Referenced by vlc_clock_master_reset(), vlc_clock_master_update(), vlc_clock_slave_reset(), and vlc_clock_slave_update().
void vlc_clock_Reset | ( | vlc_clock_t * | clock | ) |
This function resets the clock drift.
References vlc_clock_t::reset.
Referenced by aout_DecDrain(), aout_DecFlush(), aout_FiltersResetClock(), spu_ClearChannel(), and vout_FlushUnlocked().
|
static |
References vlc_clock_t::reset, vlc_clock_t::set_delay, vlc_clock_t::to_system_locked, vlc_clock_t::update, vlc_clock_master_reset(), vlc_clock_master_set_delay(), vlc_clock_master_to_system_locked(), and vlc_clock_master_update().
Referenced by vlc_clock_main_CreateMaster(), and vlc_clock_main_SetMaster().
|
static |
References vlc_clock_t::reset, vlc_clock_t::set_delay, vlc_clock_t::to_system_locked, vlc_clock_t::update, vlc_clock_slave_reset(), vlc_clock_slave_set_delay(), vlc_clock_slave_to_system_locked(), and vlc_clock_slave_update().
Referenced by vlc_clock_main_CreateMaster(), vlc_clock_main_CreateSlave(), and vlc_clock_main_SetMaster().
vlc_tick_t vlc_clock_SetDelay | ( | vlc_clock_t * | clock, |
vlc_tick_t | ts_delay | ||
) |
This functions change the clock delay.
It returns the amount of time the clock owner need to wait in order to reach the time introduced by the new positive delay.
References vlc_clock_t::set_delay.
Referenced by aout_DecFlush(), aout_DecPlay(), aout_FiltersSetClockDelay(), spu_ClearChannel(), spu_SetClockDelay(), vout_ChangeDelay(), and vout_FlushUnlocked().
|
static |
|
static |
|
static |
|
static |
References vlc_clock_main_t::lock, vlc_clock_t::owner, vlc_clock_t::to_system_locked, vlc_clock_on_update(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vlc_clock_set_slave_callbacks().
vlc_tick_t vlc_clock_Update | ( | vlc_clock_t * | clock, |
vlc_tick_t | system_now, | ||
vlc_tick_t | ts, | ||
double | rate | ||
) |
This function will update the clock drift and returns the drift.
system_now | valid system time or INT64_MAX is the updated point is forced (when paused for example) |
References vlc_clock_t::update.
Referenced by aout_RequestRetiming().
vlc_tick_t vlc_clock_UpdateVideo | ( | vlc_clock_t * | clock, |
vlc_tick_t | system_now, | ||
vlc_tick_t | ts, | ||
double | rate, | ||
unsigned | frame_rate, | ||
unsigned | frame_rate_base | ||
) |
This function will update the video clock drift and returns the drift.
Same behavior than vlc_clock_Update() except that the video is passed to the clock, this will be used for clock update callbacks.
References vlc_clock_t::update.
Referenced by ThreadDisplayRenderPicture().
int vlc_clock_Wait | ( | vlc_clock_t * | clock, |
vlc_tick_t | system_now, | ||
vlc_tick_t | ts, | ||
double | rate, | ||
vlc_tick_t | max_duration | ||
) |
Wait for a timestamp expressed in stream time.
References vlc_clock_main_t::abort, vlc_clock_main_t::cond, vlc_clock_main_t::lock, vlc_clock_t::owner, vlc_clock_main_t::pause_date, vlc_clock_t::to_system_locked, vlc_cond_timedwait(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_TICK_INVALID.
Referenced by ThreadDisplayRenderPicture().