VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_player_timer_cbs Struct Reference

Player timer callbacks. More...

#include <vlc_player.h>

Data Fields

void(* on_update )(const struct vlc_player_timer_point *value, void *data)
 Called when the state or the time changed.
 
void(* on_discontinuity )(vlc_tick_t system_date, void *data)
 The player is paused or a discontinuity occurred, likely caused by seek from the user or because the playback is stopped.
 
void(* on_seek )(const struct vlc_player_timer_point *value, void *data)
 Called when the player is seeking or finished seeking.
 

Detailed Description

Player timer callbacks.

See also
vlc_player_AddTimer

Field Documentation

◆ on_discontinuity

void(* vlc_player_timer_cbs::on_discontinuity) (vlc_tick_t system_date, void *data)

The player is paused or a discontinuity occurred, likely caused by seek from the user or because the playback is stopped.

The player user should stop its "interpolate" timer.

Parameters
system_datesystem date of this event, only valid when paused. It can be used to interpolate the last updated point to this date in order to get the last paused ts/position.
dataopaque pointer set by vlc_player_AddTimer()

Referenced by vlc_player_UpdateTimerState().

◆ on_seek

void(* vlc_player_timer_cbs::on_seek) (const struct vlc_player_timer_point *value, void *data)

Called when the player is seeking or finished seeking.

Parameters
valuepoint of the seek request or NULL when seeking is finished value.system_date = VLC_TICK_MAX in that case
dataopaque pointer set by vlc_player_AddTimer()

Referenced by vlc_player_SendTimerSeek().

◆ on_update

void(* vlc_player_timer_cbs::on_update) (const struct vlc_player_timer_point *value, void *data)

Called when the state or the time changed.

Get notified when the time is updated by the input or output source. The input source is the 'demux' or the 'access_demux'. The output source are audio and video outputs: an update is received each time a video frame is displayed or an audio sample is written. The delay between each updates may depend on the input and source type (it can be every 5ms, 30ms, 1s or 10s...). The user of this timer may need to update the position at a higher frequency from its own mainloop via vlc_player_timer_point_Interpolate().

Warning
The player is not locked from this callback. It is forbidden to call any player functions from here.
Parameters
valuealways valid, the time corresponding to the state
dataopaque pointer set by vlc_player_AddTimer()

Referenced by vlc_player_AddSmpteTimer(), vlc_player_AddTimer(), and vlc_player_SendTimerSourceUpdates().


The documentation for this struct was generated from the following file: