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

struct defining callbacks for libvlc_media_player_watch_time() More...

#include <libvlc_media_player.h>

Data Fields

uint32_t version
 Version of struct libvlc_media_player_watch_time_cbs.
void(* on_update )(void *opaque, const libvlc_media_player_time_point_t *value)
 Callback prototype that notify when the player state or time changed.
void(* on_paused )(void *opaque, libvlc_time_t system_date_us)
 Callback prototype that notify when the timer is paused.
void(* on_seek )(void *opaque, const libvlc_media_player_time_point_t *value)
 Callback prototype that notify when the player is seeking or finished seeking.

Detailed Description

struct defining callbacks for libvlc_media_player_watch_time()

Field Documentation

◆ on_paused

void(* libvlc_media_player_watch_time_cbs::on_paused) (void *opaque, libvlc_time_t system_date_us)

Callback prototype that notify when the timer is paused.

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

Note
Optional (can be NULL), available since version 0
libvlc_media_player_watch_time_on_update() can be called when paused for those 2 reasons:
  • playback is resumed (libvlc_media_player_time_point_t.system_date is valid)
  • a track, likely video (next-frame) is outputted when paused (libvlc_media_player_time_point_t.system_date = INT64_MAX)
Warning
It is forbidden to call any Media Player functions from here.
Parameters
opaqueopaque pointer set by libvlc_media_player_watch_time()
system_date_ussystem date, in us, of this event, only valid (> 0) when paused. It can be used to interpolate the last updated point to this date in order to get the last paused ts/position.

◆ on_seek

void(* libvlc_media_player_watch_time_cbs::on_seek) (void *opaque, const libvlc_media_player_time_point_t *value)

Callback prototype that notify when the player is seeking or finished seeking.

Note
Optional (can be NULL), available since version 0
Warning
It is forbidden to call any Media Player functions from here.
Parameters
opaqueopaque pointer set by libvlc_media_player_watch_time()
valuepoint of the seek request or NULL when seeking is finished.

◆ on_update

void(* libvlc_media_player_watch_time_cbs::on_update) (void *opaque, const libvlc_media_player_time_point_t *value)

Callback prototype that notify when the player state or 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...). Users of this timer may need to update the position at a higher frequency from their own mainloop via libvlc_media_player_time_point_interpolate().

Note
Mandatory (can't be NULL), available since version 0
Warning
It is forbidden to call any Media Player functions from here.
Parameters
opaqueopaque pointer set by libvlc_media_player_watch_time()
valuealways valid, the time corresponding to the state

◆ version

uint32_t libvlc_media_player_watch_time_cbs::version

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