VLC 4.0.0-dev
|
LibVLC emits asynchronous events. More...
Typedefs | |
typedef struct libvlc_event_manager_t | libvlc_event_manager_t |
Event manager that belongs to a libvlc object, and from whom events can be received. More... | |
typedef int | libvlc_event_type_t |
Type of a LibVLC event. More... | |
typedef void(* | libvlc_callback_t) (const struct libvlc_event_t *p_event, void *p_data) |
Callback function notification. More... | |
LibVLC emits asynchronous events.
Several LibVLC objects (such libvlc_instance_t as libvlc_media_player_t) generate events asynchronously. Each of them provides libvlc_event_manager_t event manager. You can subscribe to events with libvlc_event_attach() and unsubscribe with libvlc_event_detach().
typedef void(* libvlc_callback_t) (const struct libvlc_event_t *p_event, void *p_data) |
Callback function notification.
p_event | the event triggering the callback |
typedef struct libvlc_event_manager_t libvlc_event_manager_t |
Event manager that belongs to a libvlc object, and from whom events can be received.
typedef struct libvlc_event_t libvlc_event_t |
A LibVLC event.
typedef int libvlc_event_type_t |
Type of a LibVLC event.
enum libvlc_event_e |
Event types.
Enumerator | |
---|---|
libvlc_MediaMetaChanged | Metadata of a media item changed. |
libvlc_MediaSubItemAdded | Subitem was added to a media item.
|
libvlc_MediaDurationChanged | Duration of a media item changed.
|
libvlc_MediaParsedChanged | Parsing state of a media item changed. |
libvlc_MediaSubItemTreeAdded | Subitem tree was added to a media item. |
libvlc_MediaThumbnailGenerated | A thumbnail generation for this media completed. |
libvlc_MediaAttachedThumbnailsFound | One or more embedded thumbnails were found during the media preparsing The user can hold these picture(s) using libvlc_picture_retain if they wish to use them. |
libvlc_MediaPlayerMediaChanged | |
libvlc_MediaPlayerNothingSpecial | |
libvlc_MediaPlayerOpening | |
libvlc_MediaPlayerBuffering | |
libvlc_MediaPlayerPlaying | |
libvlc_MediaPlayerPaused | |
libvlc_MediaPlayerStopped | |
libvlc_MediaPlayerForward | |
libvlc_MediaPlayerBackward | |
libvlc_MediaPlayerStopping | |
libvlc_MediaPlayerEncounteredError | |
libvlc_MediaPlayerTimeChanged | |
libvlc_MediaPlayerPositionChanged | |
libvlc_MediaPlayerSeekableChanged | |
libvlc_MediaPlayerPausableChanged | |
libvlc_MediaPlayerSnapshotTaken | |
libvlc_MediaPlayerLengthChanged | |
libvlc_MediaPlayerVout | |
libvlc_MediaPlayerESAdded | A track was added, cf. media_player_es_changed in libvlc_event_t::u to get the id of the new track. |
libvlc_MediaPlayerESDeleted | A track was removed, cf. media_player_es_changed in libvlc_event_t::u to get the id of the removed track. |
libvlc_MediaPlayerESSelected | Tracks were selected or unselected, cf. media_player_es_selection_changed in libvlc_event_t::u to get the unselected and/or the selected track ids. |
libvlc_MediaPlayerCorked | |
libvlc_MediaPlayerUncorked | |
libvlc_MediaPlayerMuted | |
libvlc_MediaPlayerUnmuted | |
libvlc_MediaPlayerAudioVolume | |
libvlc_MediaPlayerAudioDevice | |
libvlc_MediaPlayerESUpdated | A track was updated, cf. media_player_es_changed in libvlc_event_t::u to get the id of the updated track. |
libvlc_MediaPlayerProgramAdded | |
libvlc_MediaPlayerProgramDeleted | |
libvlc_MediaPlayerProgramSelected | |
libvlc_MediaPlayerProgramUpdated | |
libvlc_MediaPlayerTitleListChanged | The title list changed, call libvlc_media_player_get_full_title_descriptions() to get the new list. |
libvlc_MediaPlayerTitleSelectionChanged | The title selection changed, cf media_player_title_selection_changed in libvlc_event_t::u. |
libvlc_MediaPlayerChapterChanged | |
libvlc_MediaPlayerRecordChanged | |
libvlc_MediaListItemAdded | A media item was added to a media list. |
libvlc_MediaListWillAddItem | A media item is about to get added to a media list. |
libvlc_MediaListItemDeleted | A media item was deleted from a media list. |
libvlc_MediaListWillDeleteItem | A media item is about to get deleted from a media list. |
libvlc_MediaListEndReached | A media list has reached the end. All items were either added (in case of a libvlc_media_discoverer_t) or parsed (preparser). |
LIBVLC_DEPRECATED |
|
LIBVLC_DEPRECATED |
|
LIBVLC_DEPRECATED |
|
LIBVLC_DEPRECATED |
|
libvlc_MediaListPlayerPlayed | Playback of a media list player has started. |
libvlc_MediaListPlayerNextItemSet | The current item of a media list player has changed to a different item. |
libvlc_MediaListPlayerStopped | Playback of a media list player has stopped. |
libvlc_RendererDiscovererItemAdded | A new renderer item was found by a renderer discoverer. The renderer item is valid until deleted. |
libvlc_RendererDiscovererItemDeleted | A previously discovered renderer item was deleted by a renderer discoverer. The renderer item is no longer valid. |
int libvlc_event_attach | ( | libvlc_event_manager_t * | p_event_manager, |
libvlc_event_type_t | i_event_type, | ||
libvlc_callback_t | f_callback, | ||
void * | user_data | ||
) |
Register for an event notification.
p_event_manager | the event manager to which you want to attach to. Generally it is obtained by vlc_my_object_event_manager() where my_object is the object you want to listen to. |
i_event_type | the desired event to which we want to listen |
f_callback | the function to call when i_event_type occurs |
user_data | user provided data to carry with the event |
void libvlc_event_detach | ( | libvlc_event_manager_t * | p_event_manager, |
libvlc_event_type_t | i_event_type, | ||
libvlc_callback_t | f_callback, | ||
void * | p_user_data | ||
) |
Unregister an event notification.
p_event_manager | the event manager |
i_event_type | the desired event to which we want to unregister |
f_callback | the function to call when i_event_type occurs |
p_user_data | user provided data to carry with the event |