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_MediaFreed | A media item was freed. |
libvlc_MediaStateChanged | State of the media item changed
|
libvlc_MediaSubItemTreeAdded | Subitem tree was added to a media item. |
libvlc_MediaThumbnailGenerated | A thumbnail generation for this media completed.
|
libvlc_MediaPlayerMediaChanged | |
libvlc_MediaPlayerNothingSpecial | |
libvlc_MediaPlayerOpening | |
libvlc_MediaPlayerBuffering | |
libvlc_MediaPlayerPlaying | |
libvlc_MediaPlayerPaused | |
libvlc_MediaPlayerStopped | |
libvlc_MediaPlayerForward | |
libvlc_MediaPlayerBackward | |
libvlc_MediaPlayerEndReached | |
libvlc_MediaPlayerEncounteredError | |
libvlc_MediaPlayerTimeChanged | |
libvlc_MediaPlayerPositionChanged | |
libvlc_MediaPlayerSeekableChanged | |
libvlc_MediaPlayerPausableChanged | |
libvlc_MediaPlayerTitleChanged | |
libvlc_MediaPlayerSnapshotTaken | |
libvlc_MediaPlayerLengthChanged | |
libvlc_MediaPlayerVout | |
libvlc_MediaPlayerScrambledChanged | |
libvlc_MediaPlayerESAdded | |
libvlc_MediaPlayerESDeleted | |
libvlc_MediaPlayerESSelected | |
libvlc_MediaPlayerCorked | |
libvlc_MediaPlayerUncorked | |
libvlc_MediaPlayerMuted | |
libvlc_MediaPlayerUnmuted | |
libvlc_MediaPlayerAudioVolume | |
libvlc_MediaPlayerAudioDevice | |
libvlc_MediaPlayerChapterChanged | |
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_MediaListViewItemAdded |
This belonged to the removed libvlc_media_list_view_t |
libvlc_MediaListViewWillAddItem |
This belonged to the removed libvlc_media_list_view_t |
libvlc_MediaListViewItemDeleted |
This belonged to the removed libvlc_media_list_view_t |
libvlc_MediaListViewWillDeleteItem |
This belonged to the removed libvlc_media_list_view_t |
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 |