QVisu
Qt-based visualization for smart homes
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
libvlc_events.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * libvlc_events.h: libvlc_events external API structure
3  *****************************************************************************
4  * Copyright (C) 1998-2010 VLC authors and VideoLAN
5  * $Id $
6  *
7  * Authors: Filippo Carone <littlejohn@videolan.org>
8  * Pierre d'Herbemont <pdherbemont@videolan.org>
9  *
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.
14  *
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.
19  *
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  *****************************************************************************/
24 
25 #ifndef LIBVLC_EVENTS_H
26 #define LIBVLC_EVENTS_H 1
27 
33 # ifdef __cplusplus
34 extern "C" {
35 # endif
36 
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,
53  libvlc_MediaFreed,
54  libvlc_MediaStateChanged,
55  libvlc_MediaSubItemTreeAdded,
56 
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 
77  libvlc_MediaListItemAdded=0x200,
78  libvlc_MediaListWillAddItem,
79  libvlc_MediaListItemDeleted,
80  libvlc_MediaListWillDeleteItem,
81 
82  libvlc_MediaListViewItemAdded=0x300,
83  libvlc_MediaListViewWillAddItem,
84  libvlc_MediaListViewItemDeleted,
85  libvlc_MediaListViewWillDeleteItem,
86 
87  libvlc_MediaListPlayerPlayed=0x400,
88  libvlc_MediaListPlayerNextItemSet,
89  libvlc_MediaListPlayerStopped,
90 
91  libvlc_MediaDiscovererStarted=0x500,
92  libvlc_MediaDiscovererEnded,
93 
94  libvlc_VlmMediaAdded=0x600,
95  libvlc_VlmMediaRemoved,
96  libvlc_VlmMediaChanged,
97  libvlc_VlmMediaInstanceStarted,
98  libvlc_VlmMediaInstanceStopped,
99  libvlc_VlmMediaInstanceStatusInit,
100  libvlc_VlmMediaInstanceStatusOpening,
101  libvlc_VlmMediaInstanceStatusPlaying,
102  libvlc_VlmMediaInstanceStatusPause,
103  libvlc_VlmMediaInstanceStatusEnd,
104  libvlc_VlmMediaInstanceStatusError
105 };
106 
110 typedef struct libvlc_event_t
111 {
112  int type;
113  void *p_obj;
114  union
115  {
116  /* media descriptor */
117  struct
118  {
119  libvlc_meta_t meta_type;
120  } media_meta_changed;
121  struct
122  {
123  libvlc_media_t * new_child;
124  } media_subitem_added;
125  struct
126  {
127  int64_t new_duration;
128  } media_duration_changed;
129  struct
130  {
131  int new_status;
132  } media_parsed_changed;
133  struct
134  {
135  libvlc_media_t * md;
136  } media_freed;
137  struct
138  {
139  libvlc_state_t new_state;
140  } media_state_changed;
141  struct
142  {
143  libvlc_media_t * item;
144  } media_subitemtree_added;
145 
146  /* media instance */
147  struct
148  {
149  float new_cache;
150  } media_player_buffering;
151  struct
152  {
153  float new_position;
154  } media_player_position_changed;
155  struct
156  {
157  libvlc_time_t new_time;
158  } media_player_time_changed;
159  struct
160  {
161  int new_title;
162  } media_player_title_changed;
163  struct
164  {
165  int new_seekable;
166  } media_player_seekable_changed;
167  struct
168  {
169  int new_pausable;
170  } media_player_pausable_changed;
171  struct
172  {
173  int new_count;
174  } media_player_vout;
175 
176  /* media list */
177  struct
178  {
179  libvlc_media_t * item;
180  int index;
181  } media_list_item_added;
182  struct
183  {
184  libvlc_media_t * item;
185  int index;
186  } media_list_will_add_item;
187  struct
188  {
189  libvlc_media_t * item;
190  int index;
191  } media_list_item_deleted;
192  struct
193  {
194  libvlc_media_t * item;
195  int index;
196  } media_list_will_delete_item;
197 
198  /* media list player */
199  struct
200  {
201  libvlc_media_t * item;
202  } media_list_player_next_item_set;
203 
204  /* snapshot taken */
205  struct
206  {
207  char* psz_filename ;
208  } media_player_snapshot_taken ;
209 
210  /* Length changed */
211  struct
212  {
213  libvlc_time_t new_length;
214  } media_player_length_changed;
215 
216  /* VLM media */
217  struct
218  {
219  const char * psz_media_name;
220  const char * psz_instance_name;
221  } vlm_media_event;
222 
223  /* Extra MediaPlayer */
224  struct
225  {
226  libvlc_media_t * new_media;
227  } media_player_media_changed;
228  } u;
230 
231 
234 # ifdef __cplusplus
235 }
236 # endif
237 
238 #endif /* _LIBVLC_EVENTS_H */
libvlc_event_e
Definition: libvlc_events.h:45
libvlc_state_t
Definition: libvlc_media.h:85
libvlc_meta_t
Definition: libvlc_media.h:53
union libvlc_event_t::@2 u
void * p_obj
Definition: libvlc_events.h:113
struct libvlc_event_t libvlc_event_t
Definition: libvlc_events.h:110
int type
Definition: libvlc_events.h:112