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.
53 * Metadata of a \link #libvlc_media_t media item\endlink changed
55 libvlc_MediaMetaChanged
=0,
57 * Subitem was added to a \link #libvlc_media_t media item\endlink
58 * \see libvlc_media_subitems()
60 libvlc_MediaSubItemAdded
,
62 * Duration of a \link #libvlc_media_t media item\endlink changed
63 * \see libvlc_media_get_duration()
65 libvlc_MediaDurationChanged
,
67 * Parsing state of a \link #libvlc_media_t media item\endlink changed
68 * \see libvlc_media_parse_with_options(),
69 * libvlc_media_get_parsed_status(),
70 * libvlc_media_parse_stop()
72 libvlc_MediaParsedChanged
,
74 * A \link #libvlc_media_t media item\endlink was freed
78 * \link #libvlc_state_t State\endlink of the \link
79 * #libvlc_media_t media item\endlink changed
80 * \see libvlc_media_get_state()
82 libvlc_MediaStateChanged
,
84 * Subitem tree was added to a \link #libvlc_media_t media item\endlink
86 libvlc_MediaSubItemTreeAdded
,
88 * A thumbnail generation for this \link #libvlc_media_t media \endlink completed.
89 * \see libvlc_media_get_thumbnail()
91 libvlc_MediaThumbnailGenerated
,
93 libvlc_MediaPlayerMediaChanged
=0x100,
94 libvlc_MediaPlayerNothingSpecial
,
95 libvlc_MediaPlayerOpening
,
96 libvlc_MediaPlayerBuffering
,
97 libvlc_MediaPlayerPlaying
,
98 libvlc_MediaPlayerPaused
,
99 libvlc_MediaPlayerStopped
,
100 libvlc_MediaPlayerForward
,
101 libvlc_MediaPlayerBackward
,
102 libvlc_MediaPlayerEndReached
,
103 libvlc_MediaPlayerEncounteredError
,
104 libvlc_MediaPlayerTimeChanged
,
105 libvlc_MediaPlayerPositionChanged
,
106 libvlc_MediaPlayerSeekableChanged
,
107 libvlc_MediaPlayerPausableChanged
,
108 libvlc_MediaPlayerTitleChanged
,
109 libvlc_MediaPlayerSnapshotTaken
,
110 libvlc_MediaPlayerLengthChanged
,
111 libvlc_MediaPlayerVout
,
112 libvlc_MediaPlayerScrambledChanged
,
113 libvlc_MediaPlayerESAdded
,
114 libvlc_MediaPlayerESDeleted
,
115 libvlc_MediaPlayerESSelected
,
116 libvlc_MediaPlayerCorked
,
117 libvlc_MediaPlayerUncorked
,
118 libvlc_MediaPlayerMuted
,
119 libvlc_MediaPlayerUnmuted
,
120 libvlc_MediaPlayerAudioVolume
,
121 libvlc_MediaPlayerAudioDevice
,
122 libvlc_MediaPlayerChapterChanged
,
125 * A \link #libvlc_media_t media item\endlink was added to a
126 * \link #libvlc_media_list_t media list\endlink.
128 libvlc_MediaListItemAdded
=0x200,
130 * A \link #libvlc_media_t media item\endlink is about to get
131 * added to a \link #libvlc_media_list_t media list\endlink.
133 libvlc_MediaListWillAddItem
,
135 * A \link #libvlc_media_t media item\endlink was deleted from
136 * a \link #libvlc_media_list_t media list\endlink.
138 libvlc_MediaListItemDeleted
,
140 * A \link #libvlc_media_t media item\endlink is about to get
141 * deleted from a \link #libvlc_media_list_t media list\endlink.
143 libvlc_MediaListWillDeleteItem
,
145 * A \link #libvlc_media_list_t media list\endlink has reached the
147 * All \link #libvlc_media_t items\endlink were either added (in
148 * case of a \ref libvlc_media_discoverer_t) or parsed (preparser).
150 libvlc_MediaListEndReached
,
153 * \deprecated No longer used.
154 * This belonged to the removed libvlc_media_list_view_t
156 libvlc_MediaListViewItemAdded
=0x300,
158 * \deprecated No longer used.
159 * This belonged to the removed libvlc_media_list_view_t
161 libvlc_MediaListViewWillAddItem
,
163 * \deprecated No longer used.
164 * This belonged to the removed libvlc_media_list_view_t
166 libvlc_MediaListViewItemDeleted
,
168 * \deprecated No longer used.
169 * This belonged to the removed libvlc_media_list_view_t
171 libvlc_MediaListViewWillDeleteItem
,
174 * Playback of a \link #libvlc_media_list_player_t media list
175 * player\endlink has started.
177 libvlc_MediaListPlayerPlayed
=0x400,
180 * The current \link #libvlc_media_t item\endlink of a
181 * \link #libvlc_media_list_player_t media list player\endlink
182 * has changed to a different item.
184 libvlc_MediaListPlayerNextItemSet
,
187 * Playback of a \link #libvlc_media_list_player_t media list
188 * player\endlink has stopped.
190 libvlc_MediaListPlayerStopped
,
193 * A new \link #libvlc_renderer_item_t renderer item\endlink was found by a
194 * \link #libvlc_renderer_discoverer_t renderer discoverer\endlink.
195 * The renderer item is valid until deleted.
197 libvlc_RendererDiscovererItemAdded
=0x502,
200 * A previously discovered \link #libvlc_renderer_item_t renderer item\endlink
201 * was deleted by a \link #libvlc_renderer_discoverer_t renderer discoverer\endlink.
202 * The renderer item is no longer valid.
204 libvlc_RendererDiscovererItemDeleted
,
210 typedef struct libvlc_event_t
212 int type
; /**< Event type (see @ref libvlc_event_e) */
213 void *p_obj
; /**< Object emitting the event */
216 /* media descriptor */
219 libvlc_meta_t meta_type
;
220 } media_meta_changed
;
223 libvlc_media_t
* new_child
;
224 } media_subitem_added
;
227 int64_t new_duration
;
228 } media_duration_changed
;
231 int new_status
; /**< see @ref libvlc_media_parsed_status_t */
232 } media_parsed_changed
;
239 int new_state
; /**< see @ref libvlc_state_t */
240 } media_state_changed
;
243 libvlc_picture_t
* p_thumbnail
;
244 } media_thumbnail_generated
;
247 libvlc_media_t
* item
;
248 } media_subitemtree_added
;
254 } media_player_buffering
;
258 } media_player_chapter_changed
;
262 } media_player_position_changed
;
265 libvlc_time_t new_time
;
266 } media_player_time_changed
;
270 } media_player_title_changed
;
274 } media_player_seekable_changed
;
278 } media_player_pausable_changed
;
282 } media_player_scrambled_changed
;
291 libvlc_media_t
* item
;
293 } media_list_item_added
;
296 libvlc_media_t
* item
;
298 } media_list_will_add_item
;
301 libvlc_media_t
* item
;
303 } media_list_item_deleted
;
306 libvlc_media_t
* item
;
308 } media_list_will_delete_item
;
310 /* media list player */
313 libvlc_media_t
* item
;
314 } media_list_player_next_item_set
;
320 } media_player_snapshot_taken
;
325 libvlc_time_t new_length
;
326 } media_player_length_changed
;
328 /* Extra MediaPlayer */
331 libvlc_media_t
* new_media
;
332 } media_player_media_changed
;
336 libvlc_track_type_t i_type
;
338 } media_player_es_changed
;
343 } media_player_audio_volume
;
348 } media_player_audio_device
;
352 libvlc_renderer_item_t
*item
;
353 } renderer_discoverer_item_added
;
356 libvlc_renderer_item_t
*item
;
357 } renderer_discoverer_item_deleted
;
358 } u
; /**< Type-dependent event description */
368 #endif /* _LIBVLC_EVENTS_H */