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 (mandatory).
 
void(* on_paused )(vlc_tick_t system_date, void *data)
 The player timer is paused (can be NULL).
 
void(* on_seek )(const struct vlc_player_timer_point *value, void *data)
 Called when the player is seeking or finished seeking (can be NULL).
 

Detailed Description

Player timer callbacks.

See also
vlc_player_AddTimer

Field Documentation

◆ on_paused

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

The player timer is paused (can be NULL).

This event is sent when the player is paused or stopping. The player user should stop its "interpolate" timer.

Note
on_update() can be called when paused for those 2 reasons:
Warning
The player is not locked from this callback. It is forbidden to call any player functions from here.
Parameters
system_datesystem date of this event, not valid when stopped. 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_UpdateTimerEvent().

◆ 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 (can be NULL).

Warning
The player is not locked from this callback. It is forbidden to call any player functions from here.
Note
on_update() can be called when seeking. It corresponds to tracks updating their points prior to receiving the asynchronous seek event. The user could discard them manually.
Parameters
valuepoint of the seek request or NULL when seeking is finished
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 (mandatory).

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: