VLC 4.0.0-dev
|
Data Structures | |
struct | vlc_clock_listener_id |
struct | vlc_clock_context |
struct | vlc_clock_main_t |
struct | vlc_clock_ops |
struct | vlc_clock_t |
Macros | |
#define | COEFF_THRESHOLD 0.2 /* between 0.8 and 1.2 */ |
#define | MAX_PCR_DELAY VLC_TICK_FROM_SEC(60) |
#define | vlc_clock_SendEvent(main_clock, event) |
Functions | |
vlc_clock_listener_id * | vlc_clock_AddListener (vlc_clock_t *clock, const struct vlc_clock_event_cbs *cbs, void *data) |
Add a listener for events. | |
void | vlc_clock_RemoveListener (vlc_clock_t *clock, vlc_clock_listener_id *listener_id) |
Remove a event listener callback. | |
static void | TraceRender (struct vlc_tracer *tracer, const char *type, const char *id, vlc_tick_t now, vlc_tick_t pts, vlc_tick_t drift) |
static void | context_reset (struct vlc_clock_context *ctx) |
static void | context_init (struct vlc_clock_context *ctx) |
static struct vlc_clock_context * | context_new (void) |
static vlc_tick_t | context_stream_to_system (const struct vlc_clock_context *ctx, vlc_tick_t ts) |
static void | vlc_clock_remove_current_context (vlc_clock_t *clock) |
static void | vlc_clock_attach_context (vlc_clock_t *clock, struct vlc_clock_context *ctx) |
static void | vlc_clock_switch_context (vlc_clock_t *clock, struct vlc_clock_context *ctx) |
static void | context_get_closest (vlc_clock_t *clock, struct vlc_clock_context *ctx, vlc_tick_t system_now, vlc_tick_t ts, struct vlc_clock_context **closest_ctx, vlc_tick_t *closest_diff) |
static struct vlc_clock_context * | vlc_clock_get_context (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t ts, bool update) |
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, vlc_tick_t drift, double rate, unsigned frame_rate, unsigned frame_rate_base) |
static void | vlc_clock_master_update_coeff (vlc_clock_t *clock, struct vlc_clock_context *ctx, vlc_tick_t system_now, vlc_tick_t ts, double rate) |
static vlc_tick_t | vlc_clock_master_update (vlc_clock_t *clock, struct vlc_clock_context *ctx, vlc_tick_t system_now, vlc_tick_t 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 (vlc_clock_t *clock, struct vlc_clock_context *ctx, vlc_tick_t now, vlc_tick_t ts, double rate) |
static vlc_tick_t | vlc_clock_slave_to_system (vlc_clock_t *clock, struct vlc_clock_context *ctx, vlc_tick_t now, vlc_tick_t ts, double rate) |
static vlc_tick_t | vlc_clock_master_to_system (vlc_clock_t *clock, struct vlc_clock_context *ctx, vlc_tick_t now, vlc_tick_t ts, double rate) |
static vlc_tick_t | vlc_clock_slave_update (vlc_clock_t *clock, struct vlc_clock_context *ctx, 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) |
void | vlc_clock_Lock (vlc_clock_t *clock) |
Lock the clock mutex. | |
void | vlc_clock_Unlock (vlc_clock_t *clock) |
Unlock the clock mutex. | |
static void | AssertLocked (const vlc_clock_t *clock) |
bool | vlc_clock_IsPaused (const vlc_clock_t *clock) |
Indicate if the clock is paused. | |
int | vlc_clock_Wait (vlc_clock_t *clock, vlc_tick_t deadline) |
Wait for a timestamp expressed in system time. | |
void | vlc_clock_Wake (vlc_clock_t *clock) |
Wake up any vlc_clock_Wait() | |
vlc_clock_main_t * | vlc_clock_main_New (struct vlc_logger *parent_logger, struct vlc_tracer *parent_tracer) |
This function creates the vlc_clock_main_t of the program. | |
void | vlc_clock_main_Reset (vlc_clock_main_t *main_clock) |
Reset the vlc_clock_main_t. | |
void | vlc_clock_main_SetFirstPcr (vlc_clock_main_t *main_clock, vlc_tick_t system_now, vlc_tick_t ts) |
Set the first PCR point. | |
void | vlc_clock_main_SetInputDejitter (vlc_clock_main_t *main_clock, vlc_tick_t delay) |
Set the input dejitter. | |
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. | |
void | vlc_clock_main_ChangePause (vlc_clock_main_t *main_clock, vlc_tick_t now, bool paused) |
This function allows changing the pause status. | |
void | vlc_clock_main_Delete (vlc_clock_main_t *main_clock) |
Destroy the clock main. | |
void | vlc_clock_main_Lock (vlc_clock_main_t *main_clock) |
Lock the main_clock mutex. | |
void | vlc_clock_main_Unlock (vlc_clock_main_t *main_clock) |
Unlock the main_clock mutex. | |
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. | |
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. | |
void | vlc_clock_Reset (vlc_clock_t *clock) |
This function resets the clock drift. | |
vlc_tick_t | vlc_clock_SetDelay (vlc_clock_t *clock, vlc_tick_t delay) |
This functions change the clock delay. | |
vlc_tick_t | vlc_clock_ConvertToSystem (vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t ts, double rate, uint32_t *clock_id) |
This function converts a timestamp from stream to system. | |
static vlc_clock_t * | vlc_clock_main_Create (vlc_clock_main_t *main_clock, const char *track_str_id, bool input, 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 char *track_str_id, const struct vlc_clock_cbs *cbs, void *cbs_data) |
This function creates a new master vlc_clock_t interface. | |
vlc_clock_t * | vlc_clock_main_CreateInputMaster (vlc_clock_main_t *main_clock) |
This function creates a new input master vlc_clock_t interface. | |
vlc_clock_t * | vlc_clock_main_CreateInputSlave (vlc_clock_main_t *main_clock) |
This function creates a new input slave vlc_clock_t interface. | |
vlc_clock_t * | vlc_clock_main_CreateSlave (vlc_clock_main_t *main_clock, const char *track_str_id, 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. | |
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. | |
void | vlc_clock_Delete (vlc_clock_t *clock) |
This function free the resources allocated by vlc_clock*Create*() | |
Variables | |
static const struct vlc_clock_ops | master_ops |
static const struct vlc_clock_ops | slave_ops |
#define COEFF_THRESHOLD 0.2 /* between 0.8 and 1.2 */ |
#define MAX_PCR_DELAY VLC_TICK_FROM_SEC(60) |
#define vlc_clock_SendEvent | ( | main_clock, | |
event | |||
) |
|
inlinestatic |
References vlc_clock_main_t::lock, vlc_clock_t::owner, and vlc_mutex_assert.
Referenced by vlc_clock_ConvertToSystem(), vlc_clock_IsPaused(), vlc_clock_Reset(), vlc_clock_SetDelay(), vlc_clock_Update(), vlc_clock_UpdateVideo(), vlc_clock_Wait(), and vlc_clock_Wake().
|
static |
References vlc_clock_t::last_conversion, vlc_clock_t::ops, and vlc_clock_ops::to_system.
Referenced by vlc_clock_get_context().
|
static |
References vlc_clock_context::clock_id, context_reset(), vlc_clock_context::using_clocks, and vlc_list_init().
Referenced by context_new().
|
static |
References context_init(), and unlikely.
Referenced by vlc_clock_main_New(), and vlc_clock_main_SetFirstPcr().
|
static |
References clock_point_Create(), vlc_clock_context::coeff, vlc_clock_context::last, vlc_clock_context::offset, vlc_clock_context::rate, VLC_TICK_INVALID, and vlc_clock_context::wait_sync_ref.
Referenced by context_init(), and vlc_clock_main_reset().
|
static |
References vlc_clock_context::coeff, vlc_clock_context::last, vlc_clock_context::offset, vlc_clock_context::rate, clock_point_t::system, and VLC_TICK_INVALID.
Referenced by vlc_clock_master_to_system(), and vlc_clock_slave_to_system().
|
inlinestatic |
References VLC_TICK_INVALID, VLC_TICK_MAX, vlc_tick_now(), VLC_TRACE, VLC_TRACE_END, VLC_TRACE_TICK_NS, vlc_tracer_Trace, and vlc_tracer_TraceWithTs.
Referenced by vlc_clock_on_update().
vlc_clock_listener_id * vlc_clock_AddListener | ( | vlc_clock_t * | clock, |
const struct vlc_clock_event_cbs * | cbs, | ||
void * | data | ||
) |
Add a listener for events.
clock | the locked clock used by the source |
cbs | valid pointer to register events |
data | opaque data used by cbs |
References vlc_clock_listener_id::cbs, vlc_clock_listener_id::clock, vlc_clock_listener_id::data, vlc_clock_main_t::listeners, vlc_clock_main_t::lock, vlc_clock_t::owner, vlc_mutex_assert, and vlc_vector_push.
Referenced by vout_Request().
|
static |
References vlc_clock_t::context, vlc_clock_t::node, vlc_clock_context::using_clocks, and vlc_list_append().
Referenced by vlc_clock_main_Create(), and vlc_clock_switch_context().
vlc_tick_t vlc_clock_ConvertToSystem | ( | vlc_clock_t * | clock, |
vlc_tick_t | system_now, | ||
vlc_tick_t | ts, | ||
double | rate, | ||
uint32_t * | clock_id | ||
) |
This function converts a timestamp from stream to system.
clock | the locked clock used by the source |
clock_id | pointer to the clock id used for conversion. Can be NULL. |
References AssertLocked(), vlc_clock_context::clock_id, vlc_clock_t::last_conversion, vlc_clock_t::ops, vlc_clock_context::rate, vlc_clock_ops::to_system, and vlc_clock_get_context().
Referenced by ModuleThread_GetDisplayDate(), PreparePicture(), PrerenderPicture(), RenderPicture(), spu_channel_UpdateDates(), spu_PutSubpicture(), stream_ClockConvert(), stream_Silence(), UpdateCurrentPicture(), and vlc_aout_stream_ChangePause().
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.
main_clock | the locked main_clock |
References vlc_clock_t::owner, vlc_clock_t::track_str_id, and vlc_clock_main_CreateSlave().
Referenced by aout_filter_GetVout().
void vlc_clock_Delete | ( | vlc_clock_t * | clock | ) |
This function free the resources allocated by vlc_clock*Create*()
clock | the unlocked clock used by the source |
References vlc_clock_t::context, vlc_clock_main_t::input_master, vlc_clock_main_t::lock, vlc_clock_main_t::master, vlc_clock_t::owner, vlc_clock_main_t::rc, vlc_clock_main_reset(), vlc_clock_remove_current_context(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by aout_filter_GetVout(), aout_FiltersPipelineDestroy(), AppendFilter(), EsOutCreateDecoder(), EsOutDestroyDecoder(), ProgramDelete(), sout_ClockDelete(), and sout_ClockMainDelete().
|
static |
References vlc_clock_main_t::context, vlc_clock_t::context, context_get_closest(), vlc_clock_context::node, vlc_clock_t::owner, vlc_clock_main_t::prev_contexts, vlc_clock_switch_context(), vlc_list_is_empty(), vlc_list_next_entry_or_null, and VLC_TICK_MAX.
Referenced by vlc_clock_ConvertToSystem(), vlc_clock_Update(), and vlc_clock_UpdateVideo().
bool vlc_clock_IsPaused | ( | const vlc_clock_t * | clock | ) |
Indicate if the clock is paused.
The clock mutex must be locked.
clock | the locked clock used by the source |
true | if the clock is paused |
false | if the clock is not paused |
References AssertLocked(), vlc_clock_t::owner, vlc_clock_main_t::pause_date, and VLC_TICK_INVALID.
Referenced by RenderPicture().
void vlc_clock_Lock | ( | vlc_clock_t * | clock | ) |
Lock the clock mutex.
clock | the unlocked clock used by the source |
References vlc_clock_main_t::lock, vlc_clock_t::owner, and vlc_mutex_lock().
Referenced by aout_filter_GetVout(), aout_FiltersPipelineDestroy(), aout_FiltersPipelineResetClock(), aout_FiltersPipelineSetClockDelay(), ClockListenerReset(), ClockListenerUpdate(), ModuleThread_GetDisplayDate(), PreparePicture(), PrerenderPicture(), RenderPicture(), spu_channel_UpdateDates(), spu_ClearChannel(), spu_PutSubpicture(), spu_SetClockDelay(), stream_ClockConvert(), stream_Reset(), stream_Silence(), stream_Synchronize(), UpdateCurrentPicture(), vlc_aout_stream_ChangePause(), vlc_aout_stream_Delete(), vlc_aout_stream_NotifyTiming(), vlc_aout_stream_Play(), vout_ChangeDelay(), vout_FlushUnlocked(), vout_ReleaseDisplay(), vout_Request(), and VoutRenderWakeUpUrgent().
void vlc_clock_main_ChangePause | ( | vlc_clock_main_t * | clock, |
vlc_tick_t | system_now, | ||
bool | paused | ||
) |
This function allows changing the pause status.
main_clock | the locked main_clock |
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::context, vlc_clock_main_t::first_pcr, vlc_clock_context::last, vlc_clock_main_t::lock, vlc_clock_context::offset, vlc_clock_main_t::pause_date, clock_point_t::system, vlc_cond_broadcast(), vlc_mutex_assert, VLC_TICK_INVALID, and vlc_clock_context::wait_sync_ref.
Referenced by EsOutProgramChangePause().
|
static |
References vlc_clock_t::cbs, vlc_clock_t::cbs_data, vlc_clock_main_t::context, vlc_clock_t::context, vlc_clock_t::delay, vlc_clock_t::last_conversion, likely, vlc_clock_context::node, vlc_clock_cbs::on_update, vlc_clock_t::owner, vlc_clock_main_t::prev_contexts, vlc_clock_t::priority, vlc_clock_t::track_str_id, vlc_clock_attach_context(), and vlc_list_first_entry_or_null.
Referenced by vlc_clock_main_CreateInputMaster(), vlc_clock_main_CreateInputSlave(), vlc_clock_main_CreateMaster(), and vlc_clock_main_CreateSlave().
vlc_clock_t * vlc_clock_main_CreateInputMaster | ( | vlc_clock_main_t * | main_clock | ) |
This function creates a new input master vlc_clock_t interface.
Once the input master is created, the current or future master clock created from vlc_clock_main_CreateMaster() will be demoted as slave.
You must use vlc_clock_Delete to free it.
main_clock | the locked main_clock |
References vlc_clock_main_t::context, vlc_clock_main_t::input_master, vlc_clock_main_t::lock, vlc_clock_main_t::master, master_ops, vlc_clock_context::offset, vlc_clock_t::ops, vlc_clock_main_t::rc, slave_ops, vlc_clock_main_Create(), vlc_mutex_assert, and VLC_TICK_INVALID.
Referenced by EsOutProgramHandleClockSource().
vlc_clock_t * vlc_clock_main_CreateInputSlave | ( | vlc_clock_main_t * | main_clock | ) |
This function creates a new input slave vlc_clock_t interface.
You must use vlc_clock_Delete to free it.
main_clock | the locked main_clock |
References vlc_clock_main_t::lock, vlc_clock_t::ops, vlc_clock_main_t::rc, slave_ops, vlc_clock_main_Create(), and vlc_mutex_assert.
Referenced by EsOutProgramHandleClockSource(), and sout_ClockMainCreate().
vlc_clock_t * vlc_clock_main_CreateMaster | ( | vlc_clock_main_t * | main_clock, |
const char * | track_str_id, | ||
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.
main_clock | the locked main_clock |
References vlc_clock_main_t::input_master, vlc_clock_main_t::lock, vlc_clock_main_t::master, master_ops, vlc_clock_t::ops, vlc_clock_main_t::rc, slave_ops, vlc_clock_main_Create(), and vlc_mutex_assert.
Referenced by EsOutCreateDecoder().
vlc_clock_t * vlc_clock_main_CreateSlave | ( | vlc_clock_main_t * | main_clock, |
const char * | track_str_id, | ||
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.
main_clock | the locked main_clock |
References AUDIO_ES, vlc_clock_main_t::lock, vlc_clock_t::ops, vlc_clock_main_t::rc, slave_ops, SPU_ES, VIDEO_ES, vlc_clock_main_Create(), and vlc_mutex_assert.
Referenced by EsOutCreateDecoder(), sout_ClockCreate(), and vlc_clock_CreateSlave().
void vlc_clock_main_Delete | ( | vlc_clock_main_t * | main_clock | ) |
Destroy the clock main.
main_clock | the unlocked main_clock |
References vlc_clock_main_t::context, vlc_clock_main_t::listeners, vlc_clock_main_t::logger, vlc_clock_main_t::prev_contexts, vlc_clock_main_t::rc, vlc_clock_main_t::size, vlc_clock_context::using_clocks, vlc_list_is_empty(), vlc_LogDestroy(), and vlc_vector_destroy.
Referenced by EsOutProgramAdd(), ProgramDelete(), sout_ClockMainCreate(), and sout_ClockMainDelete().
void vlc_clock_main_Lock | ( | vlc_clock_main_t * | main_clock | ) |
Lock the main_clock mutex.
All vlc_clock_main_t functions must be called with the lock held, except vlc_clock_main_Delete()
main_clock | the unlocked main_clock |
References vlc_clock_main_t::lock, and vlc_mutex_lock().
Referenced by EsOutCreateDecoder(), EsOutDecodersStopBuffering(), EsOutProgramAdd(), EsOutProgramChangePause(), EsOutProgramHandleClockSource(), EsOutVaPrivControlLocked(), sout_ClockCreate(), sout_ClockMainCreate(), and sout_ClockMainSetFirstPcr().
vlc_clock_main_t * vlc_clock_main_New | ( | struct vlc_logger * | parent_logger, |
struct vlc_tracer * | parent_tracer | ||
) |
This function creates the vlc_clock_main_t of the program.
References AOUT_MAX_PTS_ADVANCE, AvgInit(), AvgResetAndFill(), clock_point_Create(), vlc_clock_context::coeff, vlc_clock_main_t::coeff_avg, vlc_clock_main_t::cond, vlc_clock_main_t::context, context_new(), DEFAULT_PTS_DELAY, vlc_clock_main_t::delay, vlc_clock_main_t::first_pcr, vlc_clock_main_t::input_dejitter, vlc_clock_main_t::input_master, vlc_clock_main_t::listeners, vlc_clock_main_t::lock, vlc_clock_main_t::logger, vlc_clock_main_t::master, vlc_clock_main_t::output_dejitter, vlc_clock_main_t::pause_date, vlc_clock_main_t::prev_contexts, vlc_clock_main_t::rc, vlc_clock_main_t::tracer, unlikely, vlc_cond_init(), vlc_list_init(), vlc_LogHeaderCreate(), vlc_mutex_init(), VLC_TICK_INVALID, vlc_vector_init, and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by EsOutProgramAdd(), and sout_ClockMainCreate().
|
static |
References AvgResetAndFill(), vlc_clock_context::coeff, vlc_clock_main_t::coeff_avg, vlc_clock_main_t::cond, vlc_clock_main_t::context, context_reset(), vlc_cond_broadcast(), and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by vlc_clock_Delete(), vlc_clock_main_Reset(), vlc_clock_main_SetFirstPcr(), vlc_clock_master_reset(), and vlc_clock_master_update_coeff().
void vlc_clock_main_Reset | ( | vlc_clock_main_t * | main_clock | ) |
Reset the vlc_clock_main_t.
main_clock | the locked main_clock |
References clock_point_Create(), vlc_clock_main_t::first_pcr, vlc_clock_main_t::lock, vlc_clock_main_reset(), vlc_mutex_assert, and VLC_TICK_INVALID.
Referenced by EsOutDecodersStopBuffering(), and sout_ClockMainSetFirstPcr().
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.
main_clock | the locked main_clock |
References vlc_clock_main_t::lock, vlc_clock_main_t::output_dejitter, and vlc_mutex_assert.
Referenced by EsOutProgramAdd().
void vlc_clock_main_SetFirstPcr | ( | vlc_clock_main_t * | main_clock, |
vlc_tick_t | system_now, | ||
vlc_tick_t | ts | ||
) |
Set the first PCR point.
main_clock | the locked main_clock |
References vlc_clock_context::clock_id, clock_point_Create(), vlc_clock_main_t::context, context_new(), vlc_clock_main_t::first_pcr, vlc_clock_context::last, vlc_clock_main_t::lock, vlc_clock_main_t::logger, vlc_clock_context::node, vlc_clock_main_t::prev_contexts, clock_point_t::stream, clock_point_t::system, vlc_clock_context::using_clocks, vlc_clock_main_reset(), vlc_list_append(), vlc_list_is_empty(), vlc_mutex_assert, VLC_TICK_INVALID, vlc_warning, vlc_clock_context::wait_sync_ref, and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by ClockListenerUpdate(), EsOutDecodersStopBuffering(), and sout_ClockMainSetFirstPcr().
void vlc_clock_main_SetInputDejitter | ( | vlc_clock_main_t * | main_clock, |
vlc_tick_t | delay | ||
) |
Set the input dejitter.
main_clock | the locked main_clock |
References vlc_clock_main_t::input_dejitter, vlc_clock_main_t::lock, and vlc_mutex_assert.
Referenced by EsOutProgramAdd(), and EsOutVaPrivControlLocked().
void vlc_clock_main_Unlock | ( | vlc_clock_main_t * | main_clock | ) |
Unlock the main_clock mutex.
main_clock | the locked main_clock |
References vlc_clock_main_t::lock, vlc_mutex_assert, and vlc_mutex_unlock().
Referenced by EsOutCreateDecoder(), EsOutDecodersStopBuffering(), EsOutProgramAdd(), EsOutProgramChangePause(), EsOutProgramHandleClockSource(), EsOutVaPrivControlLocked(), sout_ClockCreate(), sout_ClockMainCreate(), and sout_ClockMainSetFirstPcr().
|
static |
|
static |
|
static |
|
static |
|
static |
References AvgGet(), AvgUpdate(), clock_point_Create(), vlc_clock_context::coeff, vlc_clock_main_t::coeff_avg, COEFF_THRESHOLD, vlc_clock_main_t::cond, vlc_clock_context::last, vlc_clock_main_t::lock, vlc_clock_main_t::logger, vlc_clock_context::offset, vlc_clock_t::owner, vlc_clock_context::rate, clock_point_t::stream, clock_point_t::system, vlc_clock_main_t::tracer, vlc_clock_t::track_str_id, vlc_clock_main_reset(), vlc_clock_SendEvent, vlc_cond_broadcast(), vlc_mutex_assert, VLC_TICK_INVALID, VLC_TRACE, VLC_TRACE_END, VLC_TRACE_TICK_NS, vlc_tracer_Trace, vlc_tracer_TraceEvent(), vlc_warning, vlc_clock_context::wait_sync_ref, and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by vlc_clock_master_update().
|
static |
References clock_point_Create(), vlc_clock_main_t::context, vlc_clock_main_t::first_pcr, vlc_clock_main_t::input_dejitter, vlc_clock_main_t::logger, MAX_PCR_DELAY, vlc_clock_main_t::output_dejitter, vlc_clock_t::owner, vlc_clock_t::priority, vlc_clock_context::rate, clock_point_t::stream, clock_point_t::system, vlc_error, VLC_TICK_INVALID, vlc_clock_context::wait_sync_ref, and vlc_clock_main_t::wait_sync_ref_priority.
Referenced by vlc_clock_master_to_system(), and vlc_clock_slave_to_system().
|
inlinestatic |
References vlc_clock_t::cbs, vlc_clock_t::cbs_data, vlc_clock_cbs::on_update, vlc_clock_t::owner, vlc_clock_context::rate, vlc_clock_main_t::tracer, TraceRender(), vlc_clock_t::track_str_id, VLC_TICK_INVALID, and VLC_TICK_MAX.
Referenced by vlc_clock_master_reset(), vlc_clock_master_update(), vlc_clock_slave_reset(), and vlc_clock_slave_update().
|
static |
References vlc_clock_context::clock_id, vlc_clock_main_t::context, vlc_clock_t::context, vlc_clock_main_t::logger, vlc_clock_context::node, vlc_clock_t::node, vlc_clock_t::owner, vlc_clock_t::track_str_id, vlc_clock_context::using_clocks, vlc_list_is_empty(), vlc_list_remove(), and vlc_warning.
Referenced by vlc_clock_Delete(), and vlc_clock_switch_context().
void vlc_clock_RemoveListener | ( | vlc_clock_t * | clock, |
vlc_clock_listener_id * | listener_id | ||
) |
Remove a event listener callback.
clock | the locked clock used by the source |
listener_id | listener id returned by vlc_clock_AddListener() |
References vlc_clock_main_t::listeners, vlc_clock_main_t::lock, vlc_clock_t::owner, vlc_assert_unreachable, vlc_mutex_assert, vlc_vector_foreach, and vlc_vector_remove.
Referenced by vout_ReleaseDisplay(), and vout_Request().
void vlc_clock_Reset | ( | vlc_clock_t * | clock | ) |
This function resets the clock drift.
clock | the locked clock used by the source |
References AssertLocked(), vlc_clock_t::ops, and vlc_clock_ops::reset.
Referenced by aout_FiltersPipelineDestroy(), aout_FiltersPipelineResetClock(), ClockListenerReset(), spu_ClearChannel(), stream_Reset(), vlc_aout_stream_Delete(), and vout_FlushUnlocked().
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.
clock | the locked clock used by the source |
References AssertLocked(), vlc_clock_t::ops, and vlc_clock_ops::set_delay.
Referenced by aout_FiltersPipelineSetClockDelay(), spu_ClearChannel(), spu_SetClockDelay(), stream_Reset(), vlc_aout_stream_Play(), vout_ChangeDelay(), and vout_FlushUnlocked().
|
static |
|
static |
References vlc_clock_main_t::cond, vlc_clock_t::delay, vlc_clock_t::owner, and vlc_cond_broadcast().
|
static |
|
static |
|
static |
void vlc_clock_Unlock | ( | vlc_clock_t * | clock | ) |
Unlock the clock mutex.
clock | the locked clock used by the source |
References vlc_clock_main_t::lock, vlc_clock_t::owner, and vlc_mutex_unlock().
Referenced by aout_filter_GetVout(), aout_FiltersPipelineDestroy(), aout_FiltersPipelineResetClock(), aout_FiltersPipelineSetClockDelay(), ClockListenerReset(), ClockListenerUpdate(), ModuleThread_GetDisplayDate(), PreparePicture(), PrerenderPicture(), RenderPicture(), spu_channel_UpdateDates(), spu_ClearChannel(), spu_PutSubpicture(), spu_SetClockDelay(), stream_ClockConvert(), stream_Reset(), stream_Silence(), stream_Synchronize(), UpdateCurrentPicture(), vlc_aout_stream_ChangePause(), vlc_aout_stream_Delete(), vlc_aout_stream_NotifyTiming(), vlc_aout_stream_Play(), vout_ChangeDelay(), vout_FlushUnlocked(), vout_ReleaseDisplay(), vout_Request(), and VoutRenderWakeUpUrgent().
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.
clock | the locked clock used by the source |
system_now | valid system time or VLC_TICK_MAX is the updated point is forced (when paused for example) |
ts | the timestamp in media time for the updated point |
rate | the current playback speed |
References AssertLocked(), vlc_clock_t::ops, vlc_clock_context::rate, vlc_clock_ops::update, and vlc_clock_get_context().
Referenced by ClockListenerUpdate(), stream_Synchronize(), and vlc_aout_stream_NotifyTiming().
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 AssertLocked(), vlc_clock_t::ops, vlc_clock_context::rate, vlc_clock_ops::update, and vlc_clock_get_context().
Referenced by RenderPicture().
int vlc_clock_Wait | ( | vlc_clock_t * | clock, |
vlc_tick_t | system_deadline | ||
) |
Wait for a timestamp expressed in system time.
The wait will be interrupted (signaled) on clock state changes which could invalidate the computed deadline. In that case, the caller must recompute the new deadline and call it again.
clock | the locked clock used by the source |
References AssertLocked(), vlc_clock_main_t::cond, vlc_clock_main_t::lock, vlc_clock_t::owner, and vlc_cond_timedwait().
Referenced by RenderPicture().
void vlc_clock_Wake | ( | vlc_clock_t * | clock | ) |
Wake up any vlc_clock_Wait()
clock | the locked clock used by the source |
References AssertLocked(), vlc_clock_main_t::cond, vlc_clock_t::owner, and vlc_cond_broadcast().
Referenced by VoutRenderWakeUpUrgent().
|
static |
Referenced by vlc_clock_main_CreateInputMaster(), and vlc_clock_main_CreateMaster().
|
static |
Referenced by vlc_clock_main_CreateInputMaster(), vlc_clock_main_CreateInputSlave(), vlc_clock_main_CreateMaster(), and vlc_clock_main_CreateSlave().