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
38 * \ingroup libvlc_event
46 /* Append new event types at the end of a category.
47 * Do not remove, insert or re-order any entry.
48 * Keep this in sync with lib/event.c:libvlc_event_type_name(). */
49 libvlc_MediaMetaChanged=0,
50 libvlc_MediaSubItemAdded,
51 libvlc_MediaDurationChanged,
52 libvlc_MediaParsedChanged,
54 libvlc_MediaStateChanged,
55 libvlc_MediaSubItemTreeAdded,
57 libvlc_MediaPlayerMediaChanged=0x100,
58 libvlc_MediaPlayerNothingSpecial,
59 libvlc_MediaPlayerOpening,
60 libvlc_MediaPlayerBuffering,
61 libvlc_MediaPlayerPlaying,
62 libvlc_MediaPlayerPaused,
63 libvlc_MediaPlayerStopped,
64 libvlc_MediaPlayerForward,
65 libvlc_MediaPlayerBackward,
66 libvlc_MediaPlayerEndReached,
67 libvlc_MediaPlayerEncounteredError,
68 libvlc_MediaPlayerTimeChanged,
69 libvlc_MediaPlayerPositionChanged,
70 libvlc_MediaPlayerSeekableChanged,
71 libvlc_MediaPlayerPausableChanged,
72 libvlc_MediaPlayerTitleChanged,
73 libvlc_MediaPlayerSnapshotTaken,
74 libvlc_MediaPlayerLengthChanged,
75 libvlc_MediaPlayerVout,
76 libvlc_MediaPlayerScrambledChanged,
77 libvlc_MediaPlayerESAdded,
78 libvlc_MediaPlayerESDeleted,
79 libvlc_MediaPlayerESSelected,
81 libvlc_MediaListItemAdded=0x200,
82 libvlc_MediaListWillAddItem,
83 libvlc_MediaListItemDeleted,
84 libvlc_MediaListWillDeleteItem,
86 libvlc_MediaListViewItemAdded=0x300,
87 libvlc_MediaListViewWillAddItem,
88 libvlc_MediaListViewItemDeleted,
89 libvlc_MediaListViewWillDeleteItem,
91 libvlc_MediaListPlayerPlayed=0x400,
92 libvlc_MediaListPlayerNextItemSet,
93 libvlc_MediaListPlayerStopped,
95 libvlc_MediaDiscovererStarted=0x500,
96 libvlc_MediaDiscovererEnded,
98 libvlc_VlmMediaAdded=0x600,
99 libvlc_VlmMediaRemoved,
100 libvlc_VlmMediaChanged,
101 libvlc_VlmMediaInstanceStarted,
102 libvlc_VlmMediaInstanceStopped,
103 libvlc_VlmMediaInstanceStatusInit,
104 libvlc_VlmMediaInstanceStatusOpening,
105 libvlc_VlmMediaInstanceStatusPlaying,
106 libvlc_VlmMediaInstanceStatusPause,
107 libvlc_VlmMediaInstanceStatusEnd,
108 libvlc_VlmMediaInstanceStatusError
114 typedef struct libvlc_event_t
116 int type; /**< Event type (see @ref libvlc_event_e) */
117 void *p_obj; /**< Object emitting the event */
120 /* media descriptor */
123 libvlc_meta_t meta_type;
124 } media_meta_changed;
127 libvlc_media_t * new_child;
128 } media_subitem_added;
131 int64_t new_duration;
132 } media_duration_changed;
136 } media_parsed_changed;
143 libvlc_state_t new_state;
144 } media_state_changed;
147 libvlc_media_t * item;
148 } media_subitemtree_added;
154 } media_player_buffering;
158 } media_player_position_changed;
161 libvlc_time_t new_time;
162 } media_player_time_changed;
166 } media_player_title_changed;
170 } media_player_seekable_changed;
174 } media_player_pausable_changed;
178 } media_player_scrambled_changed;
187 libvlc_media_t * item;
189 } media_list_item_added;
192 libvlc_media_t * item;
194 } media_list_will_add_item;
197 libvlc_media_t * item;
199 } media_list_item_deleted;
202 libvlc_media_t * item;
204 } media_list_will_delete_item;
206 /* media list player */
209 libvlc_media_t * item;
210 } media_list_player_next_item_set;
216 } media_player_snapshot_taken ;
221 libvlc_time_t new_length;
222 } media_player_length_changed;
227 const char * psz_media_name;
228 const char * psz_instance_name;
231 /* Extra MediaPlayer */
234 libvlc_media_t * new_media;
235 } media_player_media_changed;
239 libvlc_track_type_t i_type;
241 } media_player_es_changed;
242 } u; /**< Type-dependent event description */
252 #endif /* _LIBVLC_EVENTS_H */