Revert "thumbnail: disable broken test"
[vlc.git] / include / vlc / libvlc_events.h
blob13396392729b619626a9cd484ba513fe6fdcdbcd
1 /*****************************************************************************
2 * libvlc_events.h: libvlc_events external API structure
3 *****************************************************************************
4 * Copyright (C) 1998-2010 VLC authors and VideoLAN
5 * $Id $
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
28 /**
29 * \file
30 * This file defines libvlc_event external API
33 # ifdef __cplusplus
34 extern "C" {
35 # endif
37 typedef struct libvlc_renderer_item_t libvlc_renderer_item_t;
39 /**
40 * \ingroup libvlc_event
41 * @{
44 /**
45 * Event types
47 enum libvlc_event_e {
48 /* Append new event types at the end of a category.
49 * Do not remove, insert or re-order any entry.
52 /**
53 * Metadata of a \link #libvlc_media_t media item\endlink changed
55 libvlc_MediaMetaChanged=0,
56 /**
57 * Subitem was added to a \link #libvlc_media_t media item\endlink
58 * \see libvlc_media_subitems()
60 libvlc_MediaSubItemAdded,
61 /**
62 * Duration of a \link #libvlc_media_t media item\endlink changed
63 * \see libvlc_media_get_duration()
65 libvlc_MediaDurationChanged,
66 /**
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,
73 /**
74 * A \link #libvlc_media_t media item\endlink was freed
76 libvlc_MediaFreed,
77 /**
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,
83 /**
84 * Subitem tree was added to a \link #libvlc_media_t media item\endlink
86 libvlc_MediaSubItemTreeAdded,
87 /**
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
146 * end.
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,
208 * A LibVLC event
210 typedef struct libvlc_event_t
212 int type; /**< Event type (see @ref libvlc_event_e) */
213 void *p_obj; /**< Object emitting the event */
214 union
216 /* media descriptor */
217 struct
219 libvlc_meta_t meta_type;
220 } media_meta_changed;
221 struct
223 libvlc_media_t * new_child;
224 } media_subitem_added;
225 struct
227 int64_t new_duration;
228 } media_duration_changed;
229 struct
231 int new_status; /**< see @ref libvlc_media_parsed_status_t */
232 } media_parsed_changed;
233 struct
235 libvlc_media_t * md;
236 } media_freed;
237 struct
239 int new_state; /**< see @ref libvlc_state_t */
240 } media_state_changed;
241 struct
243 libvlc_picture_t* p_thumbnail;
244 } media_thumbnail_generated;
245 struct
247 libvlc_media_t * item;
248 } media_subitemtree_added;
250 /* media instance */
251 struct
253 float new_cache;
254 } media_player_buffering;
255 struct
257 int new_chapter;
258 } media_player_chapter_changed;
259 struct
261 float new_position;
262 } media_player_position_changed;
263 struct
265 libvlc_time_t new_time;
266 } media_player_time_changed;
267 struct
269 int new_title;
270 } media_player_title_changed;
271 struct
273 int new_seekable;
274 } media_player_seekable_changed;
275 struct
277 int new_pausable;
278 } media_player_pausable_changed;
279 struct
281 int new_scrambled;
282 } media_player_scrambled_changed;
283 struct
285 int new_count;
286 } media_player_vout;
288 /* media list */
289 struct
291 libvlc_media_t * item;
292 int index;
293 } media_list_item_added;
294 struct
296 libvlc_media_t * item;
297 int index;
298 } media_list_will_add_item;
299 struct
301 libvlc_media_t * item;
302 int index;
303 } media_list_item_deleted;
304 struct
306 libvlc_media_t * item;
307 int index;
308 } media_list_will_delete_item;
310 /* media list player */
311 struct
313 libvlc_media_t * item;
314 } media_list_player_next_item_set;
316 /* snapshot taken */
317 struct
319 char* psz_filename ;
320 } media_player_snapshot_taken ;
322 /* Length changed */
323 struct
325 libvlc_time_t new_length;
326 } media_player_length_changed;
328 /* Extra MediaPlayer */
329 struct
331 libvlc_media_t * new_media;
332 } media_player_media_changed;
334 struct
336 libvlc_track_type_t i_type;
337 int i_id;
338 } media_player_es_changed;
340 struct
342 float volume;
343 } media_player_audio_volume;
345 struct
347 const char *device;
348 } media_player_audio_device;
350 struct
352 libvlc_renderer_item_t *item;
353 } renderer_discoverer_item_added;
354 struct
356 libvlc_renderer_item_t *item;
357 } renderer_discoverer_item_deleted;
358 } u; /**< Type-dependent event description */
359 } libvlc_event_t;
362 /**@} */
364 # ifdef __cplusplus
366 # endif
368 #endif /* _LIBVLC_EVENTS_H */