1 /*****************************************************************************
2 * libvlc_events.h: libvlc_events external API structure
3 *****************************************************************************
4 * Copyright (C) 1998-2010 VLC authors and VideoLAN
7 * Authors: Filippo Carone <littlejohn@videolan.org>
8 * Pierre d'Herbemont <pdherbemont@videolan.org>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef LIBVLC_EVENTS_H
26 #define LIBVLC_EVENTS_H 1
30 * This file defines libvlc_event external API
37 typedef struct libvlc_renderer_item_t libvlc_renderer_item_t
;
40 * \ingroup libvlc_event
48 /* Append new event types at the end of a category.
49 * Do not remove, insert or re-order any entry.
50 * Keep this in sync with lib/event.c:libvlc_event_type_name(). */
51 libvlc_MediaMetaChanged
=0,
52 libvlc_MediaSubItemAdded
,
53 libvlc_MediaDurationChanged
,
54 libvlc_MediaParsedChanged
,
56 libvlc_MediaStateChanged
,
57 libvlc_MediaSubItemTreeAdded
,
59 libvlc_MediaPlayerMediaChanged
=0x100,
60 libvlc_MediaPlayerNothingSpecial
,
61 libvlc_MediaPlayerOpening
,
62 libvlc_MediaPlayerBuffering
,
63 libvlc_MediaPlayerPlaying
,
64 libvlc_MediaPlayerPaused
,
65 libvlc_MediaPlayerStopped
,
66 libvlc_MediaPlayerForward
,
67 libvlc_MediaPlayerBackward
,
68 libvlc_MediaPlayerEndReached
,
69 libvlc_MediaPlayerEncounteredError
,
70 libvlc_MediaPlayerTimeChanged
,
71 libvlc_MediaPlayerPositionChanged
,
72 libvlc_MediaPlayerSeekableChanged
,
73 libvlc_MediaPlayerPausableChanged
,
74 libvlc_MediaPlayerTitleChanged
,
75 libvlc_MediaPlayerSnapshotTaken
,
76 libvlc_MediaPlayerLengthChanged
,
77 libvlc_MediaPlayerVout
,
78 libvlc_MediaPlayerScrambledChanged
,
79 libvlc_MediaPlayerESAdded
,
80 libvlc_MediaPlayerESDeleted
,
81 libvlc_MediaPlayerESSelected
,
82 libvlc_MediaPlayerCorked
,
83 libvlc_MediaPlayerUncorked
,
84 libvlc_MediaPlayerMuted
,
85 libvlc_MediaPlayerUnmuted
,
86 libvlc_MediaPlayerAudioVolume
,
87 libvlc_MediaPlayerAudioDevice
,
88 libvlc_MediaPlayerChapterChanged
,
90 libvlc_MediaListItemAdded
=0x200,
91 libvlc_MediaListWillAddItem
,
92 libvlc_MediaListItemDeleted
,
93 libvlc_MediaListWillDeleteItem
,
94 libvlc_MediaListEndReached
,
96 libvlc_MediaListViewItemAdded
=0x300,
97 libvlc_MediaListViewWillAddItem
,
98 libvlc_MediaListViewItemDeleted
,
99 libvlc_MediaListViewWillDeleteItem
,
101 libvlc_MediaListPlayerPlayed
=0x400,
102 libvlc_MediaListPlayerNextItemSet
,
103 libvlc_MediaListPlayerStopped
,
106 * \deprecated Useless event, it will be triggered only when calling
107 * libvlc_media_discoverer_start()
109 libvlc_MediaDiscovererStarted
=0x500,
111 * \deprecated Useless event, it will be triggered only when calling
112 * libvlc_media_discoverer_stop()
114 libvlc_MediaDiscovererEnded
,
116 libvlc_RendererDiscovererItemAdded
,
117 libvlc_RendererDiscovererItemDeleted
,
119 libvlc_VlmMediaAdded
=0x600,
120 libvlc_VlmMediaRemoved
,
121 libvlc_VlmMediaChanged
,
122 libvlc_VlmMediaInstanceStarted
,
123 libvlc_VlmMediaInstanceStopped
,
124 libvlc_VlmMediaInstanceStatusInit
,
125 libvlc_VlmMediaInstanceStatusOpening
,
126 libvlc_VlmMediaInstanceStatusPlaying
,
127 libvlc_VlmMediaInstanceStatusPause
,
128 libvlc_VlmMediaInstanceStatusEnd
,
129 libvlc_VlmMediaInstanceStatusError
135 typedef struct libvlc_event_t
137 int type
; /**< Event type (see @ref libvlc_event_e) */
138 void *p_obj
; /**< Object emitting the event */
141 /* media descriptor */
144 libvlc_meta_t meta_type
;
145 } media_meta_changed
;
148 libvlc_media_t
* new_child
;
149 } media_subitem_added
;
152 int64_t new_duration
;
153 } media_duration_changed
;
156 int new_status
; /**< see @ref libvlc_media_parsed_status_t */
157 } media_parsed_changed
;
164 int new_state
; /**< see @ref libvlc_state_t */
165 } media_state_changed
;
168 libvlc_media_t
* item
;
169 } media_subitemtree_added
;
175 } media_player_buffering
;
179 } media_player_chapter_changed
;
183 } media_player_position_changed
;
186 libvlc_time_t new_time
;
187 } media_player_time_changed
;
191 } media_player_title_changed
;
195 } media_player_seekable_changed
;
199 } media_player_pausable_changed
;
203 } media_player_scrambled_changed
;
212 libvlc_media_t
* item
;
214 } media_list_item_added
;
217 libvlc_media_t
* item
;
219 } media_list_will_add_item
;
222 libvlc_media_t
* item
;
224 } media_list_item_deleted
;
227 libvlc_media_t
* item
;
229 } media_list_will_delete_item
;
231 /* media list player */
234 libvlc_media_t
* item
;
235 } media_list_player_next_item_set
;
241 } media_player_snapshot_taken
;
246 libvlc_time_t new_length
;
247 } media_player_length_changed
;
252 const char * psz_media_name
;
253 const char * psz_instance_name
;
256 /* Extra MediaPlayer */
259 libvlc_media_t
* new_media
;
260 } media_player_media_changed
;
264 libvlc_track_type_t i_type
;
266 } media_player_es_changed
;
271 } media_player_audio_volume
;
276 } media_player_audio_device
;
280 libvlc_renderer_item_t
*item
;
281 } renderer_discoverer_item_added
;
284 libvlc_renderer_item_t
*item
;
285 } renderer_discoverer_item_deleted
;
286 } u
; /**< Type-dependent event description */
296 #endif /* _LIBVLC_EVENTS_H */