|
VLC 4.0.0-dev
|
Data Structures | |
| struct | libvlc_media_player_time_point_t |
| Media Player timer point. More... | |
| struct | libvlc_media_player_watch_time_cbs |
| struct defining callbacks for libvlc_media_player_watch_time() More... | |
Typedefs | |
| typedef struct libvlc_media_player_time_point_t | libvlc_media_player_time_point_t |
| Media Player timer point. | |
Functions | |
| LIBVLC_API int | libvlc_media_player_watch_time (libvlc_media_player_t *p_mi, libvlc_time_t min_period_us, const struct libvlc_media_player_watch_time_cbs *cbs, void *cbs_opaque) |
| Watch for times updates. | |
| LIBVLC_API void | libvlc_media_player_unwatch_time (libvlc_media_player_t *p_mi) |
| Unwatch time updates. | |
| LIBVLC_API int | libvlc_media_player_time_point_interpolate (const libvlc_media_player_time_point_t *point, libvlc_time_t system_now_us, libvlc_time_t *out_ts_us, double *out_pos) |
| Interpolate a timer value to now. | |
| LIBVLC_API libvlc_time_t | libvlc_media_player_time_point_get_next_date (const libvlc_media_player_time_point_t *point, libvlc_time_t system_now_us, libvlc_time_t interpolated_ts_us, libvlc_time_t next_interval_us) |
| Get the date of the next interval. | |
| typedef struct libvlc_media_player_time_point_t libvlc_media_player_time_point_t |
Media Player timer point.
| LIBVLC_API libvlc_time_t libvlc_media_player_time_point_get_next_date | ( | const libvlc_media_player_time_point_t * | point, |
| libvlc_time_t | system_now_us, | ||
| libvlc_time_t | interpolated_ts_us, | ||
| libvlc_time_t | next_interval_us ) |
Get the date of the next interval.
Can be used to setup an UI timer in order to update some widgets at specific interval. A next_interval of VLC_TICK_FROM_SEC(1) can be used to update a time widget when the media reaches a new second.
| point | time update obtained via the libvlc_media_player_watch_time_on_update() |
| system_now_us | same system date used by libvlc_media_player_time_point_interpolate() |
| interpolated_ts_us | ts returned by libvlc_media_player_time_point_interpolate() |
| next_interval_us | next interval, in us |
| LIBVLC_API int libvlc_media_player_time_point_interpolate | ( | const libvlc_media_player_time_point_t * | point, |
| libvlc_time_t | system_now_us, | ||
| libvlc_time_t * | out_ts_us, | ||
| double * | out_pos ) |
Interpolate a timer value to now.
| point | time update obtained via the libvlc_media_player_watch_time_on_update() callback |
| system_now_us | current system date, in us, returned by libvlc_clock() |
| out_ts_us | pointer where to set the interpolated ts, in us |
| out_pos | pointer where to set the interpolated position |
References LIBVLC_API.
| LIBVLC_API void libvlc_media_player_unwatch_time | ( | libvlc_media_player_t * | p_mi | ) |
Unwatch time updates.
| p_mi | the media player |
References LIBVLC_API.
| LIBVLC_API int libvlc_media_player_watch_time | ( | libvlc_media_player_t * | p_mi, |
| libvlc_time_t | min_period_us, | ||
| const struct libvlc_media_player_watch_time_cbs * | cbs, | ||
| void * | cbs_opaque ) |
Watch for times updates.
| p_mi | the media player |
| min_period_us | corresponds to the minimum period, in us, between each updates, use it to avoid flood from too many source updates, set it to 0 to receive all updates. |
| cbs | callback to listen to events (can't be NULL). The pointed struct must be kept alive (and not modified) by the caller until libvlc_media_player_unwatch_time() is called. |
| cbs_opaque | opaque pointer used by the callbacks |
References LIBVLC_API.