|
VLC 4.0.0-dev
|
struct defining callbacks for libvlc_media_player_new() More...
#include <libvlc_media_player.h>
Data Fields | |
| uint32_t | version |
| Version of struct libvlc_media_player_cbs. | |
| void(* | on_media_changed )(void *opaque, libvlc_media_t *media) |
| Callback prototype that notify when the player changed media. | |
| void(* | on_media_stopping )(void *opaque, libvlc_media_t *media, libvlc_stopping_reason_t stopping_reason) |
| Callback prototype that notify when the player will stop the current media. | |
| void(* | on_state_changed )(void *opaque, libvlc_state_t state) |
| Callback prototype that notify when the player state changed. | |
| void(* | on_buffering_changed )(void *opaque, float buffering) |
| Callback prototype that notify when the player buffering changed. | |
| void(* | on_capabilities_changed )(void *opaque, libvlc_capability_t old_caps, libvlc_capability_t new_caps) |
| Callback prototype that notify when the player capabilities changed. | |
| void(* | on_position_changed )(void *opaque, libvlc_time_t time, double pos) |
| Callback prototype that notify when the player position changed. | |
| void(* | on_length_changed )(void *opaque, libvlc_time_t length) |
| Callback prototype that notify when the player length changed. | |
| void(* | on_track_list_changed )(void *opaque, libvlc_list_action_t action, libvlc_track_type_t type, const char *id) |
| Callback prototype that notify when the player added, removed or updated a track. | |
| void(* | on_track_selection_changed )(void *opaque, libvlc_track_type_t type, const char *unselected_id, const char *selected_id) |
| Callback prototype that notify when a track is selected or unselected by the player. | |
| void(* | on_program_list_changed )(void *opaque, libvlc_list_action_t action, int group_id) |
| Callback prototype that notify when the player added, removed or updated a program. | |
| void(* | on_program_selection_changed )(void *opaque, int unselected_group_id, int selected_group_id) |
| Callback prototype that notify when a program is selected or unselected by the player. | |
| void(* | on_titles_changed )(void *opaque) |
| Callback prototype that notify when the player changed titles. | |
| void(* | on_title_selection_changed )(void *opaque, const libvlc_title_description_t *title, unsigned idx) |
| Callback prototype that notify when the player selected a new title. | |
| void(* | on_chapter_selection_changed )(void *opaque, const libvlc_title_description_t *title, unsigned title_idx, const libvlc_chapter_description_t *chapter, unsigned chapter_idx) |
| Callback prototype that notify when the player selected a new chapter. | |
| void(* | on_recording_changed )(void *opaque, bool recording, const char *file_path) |
| Callback prototype that notify when the player recording state changed. | |
| void(* | on_screenshot_taken )(void *opaque, const char *file_path) |
| Callback prototype that notify when the player took a screenshot. | |
| void(* | on_media_parsed )(void *opaque, libvlc_media_t *media) |
| Callback prototype that notify when the player parsed the current media. | |
| void(* | on_media_meta_changed )(void *opaque, libvlc_media_t *media) |
| Callback prototype that notify when metadata were update by the player. | |
| void(* | on_media_subitems_changed )(void *opaque, libvlc_media_t *media) |
| Callback prototype that notify when the player added new subitems to the current media. | |
| void(* | on_media_attachments_added )(void *opaque, libvlc_media_t *media, libvlc_picture_list_t *list) |
| Callback prototype that notify when the player added new attachments to the current media. | |
| void(* | on_next_frame_status )(void *opaque, int status) |
| Callback prototype that notify when the next frame, following a call to libvlc_media_player_next_frame(), is about to displayed. | |
| void(* | on_prev_frame_status )(void *opaque, int status) |
| Callback prototype that notify when the previous frame, following a call to libvlc_media_player_previous_frame(), is about to be displayed. | |
| void(* | on_vout_changed )(void *opaque, unsigned vout_count) |
| Callback prototype that notify when a new player vout is added or removed. | |
| void(* | on_cork_changed )(void *opaque, bool corked) |
| Callback prototype that notify when the player is corked/uncorked. | |
| void(* | on_audio_volume_changed )(void *opaque, float volume) |
| Callback prototype that notify when the audio volume has changed. | |
| void(* | on_audio_mute_changed )(void *opaque, bool muted) |
| Callback prototype that notify when the audio mute state has changed. | |
| void(* | on_audio_device_changed )(void *opaque, const char *device) |
| Callback prototype that notify when the audio device state has changed. | |
struct defining callbacks for libvlc_media_player_new()
| void(* libvlc_media_player_cbs::on_audio_device_changed) (void *opaque, const char *device) |
Callback prototype that notify when the audio device state has changed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| device | the device name |
| void(* libvlc_media_player_cbs::on_audio_mute_changed) (void *opaque, bool muted) |
Callback prototype that notify when the audio mute state has changed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| muted | true if muted |
| void(* libvlc_media_player_cbs::on_audio_volume_changed) (void *opaque, float volume) |
Callback prototype that notify when the audio volume has changed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| volume | volume in the range [0;2.f] |
| void(* libvlc_media_player_cbs::on_buffering_changed) (void *opaque, float buffering) |
Callback prototype that notify when the player buffering changed.
This event is always called with the 0 and 1 values before a playback (in case of success). Values in between depends on the media type.
| opaque | opaque pointer set by libvlc_media_player_new() |
| buffering | buffering in the range [0:1] |
| void(* libvlc_media_player_cbs::on_capabilities_changed) (void *opaque, libvlc_capability_t old_caps, libvlc_capability_t new_caps) |
Callback prototype that notify when the player capabilities changed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| old_caps | old player capabilities |
| new_caps | new player capabilities |
| void(* libvlc_media_player_cbs::on_chapter_selection_changed) (void *opaque, const libvlc_title_description_t *title, unsigned title_idx, const libvlc_chapter_description_t *chapter, unsigned chapter_idx) |
Callback prototype that notify when the player selected a new chapter.
| opaque | opaque pointer set by libvlc_media_player_new() |
| title | description of the new selected title, valid only from this callback, do not release |
| title_idx | index of the title |
| chapter | description of the new selected chapter, valid only from this callback, do not release |
| chapter_idx | index of the new selected chapter |
| void(* libvlc_media_player_cbs::on_cork_changed) (void *opaque, bool corked) |
Callback prototype that notify when the player is corked/uncorked.
The player can be corked when the audio output loose focus or when a renderer was paused from the outside.
| opaque | opaque pointer set by libvlc_media_player_new() |
| corked | true if the player is corked. In that case, the user should pause the player and release all external resource needed by the player |
| void(* libvlc_media_player_cbs::on_length_changed) (void *opaque, libvlc_time_t length) |
Callback prototype that notify when the player length changed.
May be called when the media is opening or during playback. A started and playing media doesn't have necessarily a valid length.
| opaque | opaque pointer set by libvlc_media_player_new() |
| length | a valid length or 0 |
| void(* libvlc_media_player_cbs::on_media_attachments_added) (void *opaque, libvlc_media_t *media, libvlc_picture_list_t *list) |
Callback prototype that notify when the player added new attachments to the current media.
| opaque | opaque pointer set by libvlc_media_player_new() |
| media | media being played/parsed |
| list | list of pictures, the list is only valid from this callback, each pictures can be held separatly with libvlc_picture_retain(). |
| void(* libvlc_media_player_cbs::on_media_changed) (void *opaque, libvlc_media_t *media) |
Callback prototype that notify when the player changed media.
| opaque | opaque pointer set by libvlc_media_player_new() |
| media | new played media |
| void(* libvlc_media_player_cbs::on_media_meta_changed) (void *opaque, libvlc_media_t *media) |
Callback prototype that notify when metadata were update by the player.
| opaque | opaque pointer set by libvlc_media_player_new() |
| media | media being played/parsed, call libvlc_media_get_meta() to get new metadata |
| void(* libvlc_media_player_cbs::on_media_parsed) (void *opaque, libvlc_media_t *media) |
Callback prototype that notify when the player parsed the current media.
Called once per media, this won't be called if the media has already been parsed by the parser, use on_media_meta_changed() to get notified when media meta is updated.
| opaque | opaque pointer set by libvlc_media_player_new() |
| media | media being played/parsed |
| void(* libvlc_media_player_cbs::on_media_stopping) (void *opaque, libvlc_media_t *media, libvlc_stopping_reason_t stopping_reason) |
Callback prototype that notify when the player will stop the current media.
This can be called from the PLAYING state, before the player requests the next media, or from the STOPPING state, ie. when the player is stopping, or by an internal transition (e.g., when the media reaches the end of file or errors out).
| opaque | opaque pointer set by libvlc_media_player_new() |
| media | stopping media |
| stopping_reason | reason why the media is stopping |
| void(* libvlc_media_player_cbs::on_media_subitems_changed) (void *opaque, libvlc_media_t *media) |
Callback prototype that notify when the player added new subitems to the current media.
| opaque | opaque pointer set by libvlc_media_player_new() |
| media | media being played/parsed, call libvlc_media_subitems() to get sub items |
| void(* libvlc_media_player_cbs::on_next_frame_status) (void *opaque, int status) |
Callback prototype that notify when the next frame, following a call to libvlc_media_player_next_frame(), is about to displayed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| status | 0 in case of success, -EAGAIN on first call (paused), -EBUSY in case of video error, -ENOTSUP if can't pause, -EINVAL in case of invalid state |
| void(* libvlc_media_player_cbs::on_position_changed) (void *opaque, libvlc_time_t time, double pos) |
Callback prototype that notify when the player position changed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| time | a valid time or 0 |
| pos | a valid position |
| void(* libvlc_media_player_cbs::on_prev_frame_status) (void *opaque, int status) |
Callback prototype that notify when the previous frame, following a call to libvlc_media_player_previous_frame(), is about to be displayed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| status | 0 in case of success, -EAGAIN on first call (paused), -EBUSY in case of video error, -ENOTSUP if can't pause, -EINVAL in case of invalid state, -ERANGE if the player could not seek back |
| void(* libvlc_media_player_cbs::on_program_list_changed) (void *opaque, libvlc_list_action_t action, int group_id) |
Callback prototype that notify when the player added, removed or updated a program.
| opaque | opaque pointer set by libvlc_media_player_new() |
| action | added, removed or updated |
| group_id | valid group id, call libvlc_media_player_get_program_from_id() to get the program description. |
| void(* libvlc_media_player_cbs::on_program_selection_changed) (void *opaque, int unselected_group_id, int selected_group_id) |
Callback prototype that notify when a program is selected or unselected by the player.
| opaque | opaque pointer set by libvlc_media_player_new() |
| unselected_group_id | valid group id |
| selected_group_id | valid group id, call libvlc_media_player_get_program_from_id() to get the program description. |
| void(* libvlc_media_player_cbs::on_recording_changed) (void *opaque, bool recording, const char *file_path) |
Callback prototype that notify when the player recording state changed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| recording | true if recording is enabled |
| file_path | file path of the recording, only valid when the recording ends (recording == false) |
| void(* libvlc_media_player_cbs::on_screenshot_taken) (void *opaque, const char *file_path) |
Callback prototype that notify when the player took a screenshot.
| opaque | opaque pointer set by libvlc_media_player_new() |
| file_path | file path of the screenshot |
| void(* libvlc_media_player_cbs::on_state_changed) (void *opaque, libvlc_state_t state) |
Callback prototype that notify when the player state changed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| state | new player state |
| void(* libvlc_media_player_cbs::on_title_selection_changed) (void *opaque, const libvlc_title_description_t *title, unsigned idx) |
Callback prototype that notify when the player selected a new title.
| opaque | opaque pointer set by libvlc_media_player_new() |
| title | description of the new selected title, valid only from this callback, do not release |
| idx | index of the new title |
| void(* libvlc_media_player_cbs::on_titles_changed) (void *opaque) |
Callback prototype that notify when the player changed titles.
Call libvlc_media_player_get_full_title_descriptions() to get the description of new titles.
| opaque | opaque pointer set by libvlc_media_player_new() |
| void(* libvlc_media_player_cbs::on_track_list_changed) (void *opaque, libvlc_list_action_t action, libvlc_track_type_t type, const char *id) |
Callback prototype that notify when the player added, removed or updated a track.
| opaque | opaque pointer set by libvlc_media_player_new() |
| action | added, removed or updated |
| type | type of the track |
| id | valid track id, call libvlc_media_player_get_track_from_id() to get the track description. |
| void(* libvlc_media_player_cbs::on_track_selection_changed) (void *opaque, libvlc_track_type_t type, const char *unselected_id, const char *selected_id) |
Callback prototype that notify when a track is selected or unselected by the player.
| opaque | opaque pointer set by libvlc_media_player_new() |
| type | type of tracks being unselected or selected |
| unselected_id | valid track id or NULL (when nothing is unselected) |
| selected_id | valid track id or NULL (when nothing is selected), call libvlc_media_player_get_track_from_id() to get the track description. |
| void(* libvlc_media_player_cbs::on_vout_changed) (void *opaque, unsigned vout_count) |
Callback prototype that notify when a new player vout is added or removed.
| opaque | opaque pointer set by libvlc_media_player_new() |
| vout_count | number of active vouts |
| uint32_t libvlc_media_player_cbs::version |
Version of struct libvlc_media_player_cbs.