VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups 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 
28 /**
29  * \file
30  * This file defines libvlc_event external API
31  */
32 
33 # ifdef __cplusplus
34 extern "C" {
35 # endif
36 
37 /**
38  * \ingroup libvlc_event
39  * @{
40  */
41 
42 /**
43  * Event types
44  */
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(). */
55 
75 
80 
85 
89 
92 
104 };
105 
106 /**
107  * A LibVLC event
108  */
109 typedef struct libvlc_event_t
110 {
111  int type; /**< Event type (see @ref libvlc_event_e) */
112  void *p_obj; /**< Object emitting the event */
113  union
114  {
115  /* media descriptor */
116  struct
117  {
120  struct
121  {
124  struct
125  {
126  int64_t new_duration;
128  struct
129  {
132  struct
133  {
135  } media_freed;
136  struct
137  {
140 
141  /* media instance */
142  struct
143  {
144  float new_cache;
146  struct
147  {
150  struct
151  {
154  struct
155  {
158  struct
159  {
162  struct
163  {
166  struct
167  {
170 
171  /* media list */
172  struct
173  {
175  int index;
177  struct
178  {
180  int index;
182  struct
183  {
185  int index;
187  struct
188  {
190  int index;
192 
193  /* media list player */
194  struct
195  {
198 
199  /* snapshot taken */
200  struct
201  {
202  char* psz_filename ;
204 
205  /* Length changed */
206  struct
207  {
210 
211  /* VLM media */
212  struct
213  {
214  const char * psz_media_name;
215  const char * psz_instance_name;
216  } vlm_media_event;
217 
218  /* Extra MediaPlayer */
219  struct
220  {
223  } u; /**< Type-dependent event description */
225 
226 
227 /**@} */
228 
229 # ifdef __cplusplus
230 }
231 # endif
232 
233 #endif /* _LIBVLC_EVENTS_H */