]> git.sesse.net Git - vlc/blob - include/vlc/libvlc.h
control/media_descriptor.c: Give access to the subitems.
[vlc] / include / vlc / libvlc.h
1 /*****************************************************************************
2  * libvlc.h:  libvlc_* new external API
3  *****************************************************************************
4  * Copyright (C) 1998-2005 the VideoLAN team
5  * $Id: vlc.h 13701 2005-12-12 17:58:56Z zorglub $
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 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 General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 /**
26  * \defgroup libvlc Libvlc
27  * This is libvlc, the base library of the VLC program.
28  *
29  * @{
30  */
31
32
33 #ifndef _LIBVLC_H
34 #define _LIBVLC_H 1
35
36 #include <vlc/vlc.h>
37 #include <vlc/libvlc_structures.h>
38
39 # ifdef __cplusplus
40 extern "C" {
41 # endif
42
43 /*****************************************************************************
44  * Exception handling
45  *****************************************************************************/
46 /** defgroup libvlc_exception Exceptions
47  * \ingroup libvlc
48  * LibVLC Exceptions handling
49  * @{
50  */
51
52 /**
53  * Initialize an exception structure. This can be called several times to reuse
54  * an exception structure.
55  * \param p_exception the exception to initialize
56  */
57 VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
58
59 /**
60  * Has an exception been raised ?
61  * \param p_exception the exception to query
62  * \return 0 if no exception raised, 1 else
63  */
64 VLC_PUBLIC_API int libvlc_exception_raised( libvlc_exception_t *p_exception );
65
66 /**
67  * Raise an exception
68  * \param p_exception the exception to raise
69  * \param psz_message the exception message
70  */
71 VLC_PUBLIC_API void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... );
72
73 /**
74  * Clear an exception object so it can be reused.
75  * The exception object must be initialized
76  * \param p_exception the exception to clear
77  */
78 VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
79
80 /**
81  * Get exception message
82  * \param p_exception the exception to query
83  * \return the exception message or NULL if not applicable (exception not raised
84  * for example)
85  */
86 VLC_PUBLIC_API char* libvlc_exception_get_message( libvlc_exception_t *p_exception );
87
88 /**@} */
89
90 /*****************************************************************************
91  * Core handling
92  *****************************************************************************/
93
94 /** defgroup libvlc_core Core
95  * \ingroup libvlc
96  * LibVLC Core
97  * @{
98  */
99
100 /**
101  * Create an initialized libvlc instance
102  * \param argc the number of arguments
103  * \param argv command-line-type arguments
104  * \param exception an initialized exception pointer
105  */
106 VLC_PUBLIC_API libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);
107
108 /**
109  * Returns a libvlc instance identifier for legacy APIs. Use of this
110  * function is discouraged, you should convert your program to use the
111  * new API.
112  * \param p_instance the instance
113  */
114 VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
115
116 /**
117  * Destroy a libvlc instance.
118  * \param p_instance the instance to destroy
119  */
120 VLC_PUBLIC_API void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * );
121
122 /** @}*/
123
124 /*****************************************************************************
125  * Tree
126  *****************************************************************************/
127 /** defgroup libvlc_tree Tree
128  * \ingroup libvlc
129  * LibVLC Tree. A tree holds an item plus several subtrees.
130  * @{
131  */
132 VLC_PUBLIC_API libvlc_tree_t *
133     libvlc_tree_new_with_media_list_as_item( libvlc_media_list_t * p_mlist,
134                                              libvlc_exception_t * p_e );
135
136 VLC_PUBLIC_API libvlc_tree_t *
137     libvlc_tree_new_with_string_as_item( const char * psz,
138                                          libvlc_exception_t * p_e );
139 VLC_PUBLIC_API void
140     libvlc_tree_release( libvlc_tree_t * p_tree );
141
142 VLC_PUBLIC_API void
143     libvlc_tree_retain( libvlc_tree_t * p_tree );
144
145 VLC_PUBLIC_API char *
146     libvlc_tree_item_as_string( libvlc_tree_t * p_tree,
147                                 libvlc_exception_t * p_e );
148
149 VLC_PUBLIC_API libvlc_media_list_t *
150     libvlc_tree_item_as_media_list( libvlc_tree_t * p_tree,
151                                     libvlc_exception_t * p_e );
152
153 VLC_PUBLIC_API int
154     libvlc_tree_subtree_count( libvlc_tree_t * p_tree, libvlc_exception_t * p_e );
155
156 VLC_PUBLIC_API libvlc_tree_t *
157     libvlc_tree_subtree_at_index( libvlc_tree_t * p_tree,
158                               int index,
159                               libvlc_exception_t * p_e );
160
161 VLC_PUBLIC_API void
162     libvlc_tree_insert_subtree_at_index( libvlc_tree_t * p_tree,
163                                          libvlc_tree_t * p_subtree,
164                                          int index,
165                                          libvlc_exception_t * p_e );
166
167 VLC_PUBLIC_API void
168     libvlc_tree_remove_subtree_at_index( libvlc_tree_t * p_tree,
169                                          int index,
170                                          libvlc_exception_t * p_e );
171
172 /**@} */
173
174
175
176 /*****************************************************************************
177  * Media descriptor
178  *****************************************************************************/
179 /** defgroup libvlc_media_descriptor Media Descriptor
180  * \ingroup libvlc
181  * LibVLC Media Descriptor
182  * @{
183  */
184  
185 /**
186  * Create a media descriptor with the given mrl.
187  * \param p_instance the instance
188  * \param psz_mrl the mrl to read
189  */
190 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_descriptor_new(
191                                    libvlc_instance_t *p_instance,
192                                    const char * psz_mrl,
193                                    libvlc_exception_t *p_e );
194
195 VLC_PUBLIC_API void libvlc_media_descriptor_retain(
196                                    libvlc_media_descriptor_t *p_meta_desc );
197
198 VLC_PUBLIC_API void libvlc_media_descriptor_release(
199                                    libvlc_media_descriptor_t *p_meta_desc );
200
201 VLC_PUBLIC_API char * libvlc_media_descriptor_get_mrl( libvlc_media_descriptor_t * p_md,
202                                                        libvlc_exception_t * p_e );
203
204 /**
205  * Read the meta of the media descriptor.
206  * \param p_meta_desc the media descriptor to read
207  * \param p_meta_desc the meta to read
208  */
209 VLC_PUBLIC_API char * libvlc_media_descriptor_get_meta(
210                                    libvlc_media_descriptor_t *p_meta_desc,
211                                    libvlc_meta_t e_meta,
212                                    libvlc_exception_t *p_e );
213
214 /* Tags */
215 VLC_PUBLIC_API void libvlc_media_descriptor_add_tag( libvlc_media_descriptor_t *p_md,
216                                                      const char * key,
217                                                      const libvlc_tag_t tag,
218                                                      libvlc_exception_t *p_e );
219
220 VLC_PUBLIC_API void libvlc_media_descriptor_remove_tag( libvlc_media_descriptor_t *p_md,
221                                                          const char * key,
222                                                          const libvlc_tag_t tag,
223                                                          libvlc_exception_t *p_e );
224
225 VLC_PUBLIC_API int
226     libvlc_media_descriptor_tags_count_for_key( libvlc_media_descriptor_t *p_md,
227                                                 const char * key,
228                                                 libvlc_exception_t *p_e );
229
230 VLC_PUBLIC_API libvlc_tag_t
231     libvlc_media_descriptor_tag_at_index_for_key( libvlc_media_descriptor_t *p_md,
232                                                   int i,
233                                                   const char * key,
234                                                   libvlc_exception_t *p_e );
235
236 VLC_PUBLIC_API libvlc_media_list_t *
237     libvlc_media_descriptor_subitems( libvlc_media_descriptor_t *p_md,
238                                       libvlc_exception_t *p_e );
239
240 /** @}*/
241
242 /*****************************************************************************
243  * Playlist
244  *****************************************************************************/
245 /** defgroup libvlc_playlist Playlist
246  * \ingroup libvlc
247  * LibVLC Playlist handling
248  * @{
249  */
250
251 /**
252  * Set loop variable
253  */
254 VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t,
255                                           libvlc_exception_t * );
256
257 /**
258  * Start playing. You can give some additionnal playlist item options
259  * that will be added to the item before playing it.
260  * \param p_instance the instance
261  * \param i_id the item to play. If this is a negative number, the next
262  * item will be selected. Else, the item with the given ID will be played
263  * \param i_options the number of options to add to the item
264  * \param ppsz_options the options to add to the item
265  * \param p_exception an initialized exception
266  */
267 VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
268                                           libvlc_exception_t * );
269
270 /**
271  * Pause a running playlist, resume if it was stopped
272  * \param p_instance the instance to pause
273  * \param p_exception an initialized exception
274  */
275 VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
276
277 /**
278  * Checks if the playlist is running
279  * \param p_instance the instance
280  * \param p_exception an initialized exception
281  * \return 0 if the playlist is stopped or paused, 1 if it is running
282  */
283 VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
284
285 /**
286  * Get the number of items in the playlist
287  * \param p_instance the instance
288  * \param p_exception an initialized exception
289  * \return the number of items
290  */
291 VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
292
293 /**
294  * Lock the playlist instance
295  * \param p_instance the instance
296  */
297 VLC_PUBLIC_API void libvlc_playlist_lock( libvlc_instance_t * );
298
299 /**
300  * Unlock the playlist instance
301  * \param p_instance the instance
302  */
303 VLC_PUBLIC_API void libvlc_playlist_unlock( libvlc_instance_t * );
304
305 /**
306  * Stop playing
307  * \param p_instance the instance to stop
308  * \param p_exception an initialized exception
309  */
310 VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * );
311
312 /**
313  * Go to next playlist item (starts playback if it was stopped)
314  * \param p_instance the instance to use
315  * \param p_exception an initialized exception
316  */
317 VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * );
318
319 /**
320  * Go to previous playlist item (starts playback if it was stopped)
321  * \param p_instance the instance to use
322  * \param p_exception an initialized exception
323  */
324 VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * );
325
326 /**
327  * Remove all playlist items
328  * \param p_instance the instance
329  * \param p_exception an initialized exception
330  */
331 VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
332
333 /**
334  * Add an item at the end of the playlist
335  * If you need more advanced options, \see libvlc_playlist_add_extended
336  * \param p_instance the instance
337  * \param psz_uri the URI to open, using VLC format
338  * \param psz_name a name that you might want to give or NULL
339  * \return the identifier of the new item
340  */
341 VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
342                                         libvlc_exception_t * );
343
344 /**
345  * Add an item at the end of the playlist, with additional input options
346  * \param p_instance the instance
347  * \param psz_uri the URI to open, using VLC format
348  * \param psz_name a name that you might want to give or NULL
349  * \param i_options the number of options to add
350  * \param ppsz_options strings representing the options to add
351  * \param p_exception an initialized exception
352  * \return the identifier of the new item
353  */
354 VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
355                                                  const char *, int, const char **,
356                                                  libvlc_exception_t * );
357
358 /**
359  * Delete the playlist item with the given ID.
360  * \param p_instance the instance
361  * \param i_id the id to remove
362  * \param p_exception an initialized exception
363  * \return
364  */
365 VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
366                                                 libvlc_exception_t * );
367
368 /* Get the input that is currently being played by the playlist
369  * \param p_instance the instance to use
370  * \param p_exception an initialized excecption
371  * \return an input object
372  */
373 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_playlist_get_media_instance(
374                                 libvlc_instance_t *, libvlc_exception_t * );
375
376 /** @}*/
377
378 /*****************************************************************************
379  * Media Instance
380  *****************************************************************************/
381 /** defgroup libvlc_media_instance Media Instance
382  * \ingroup libvlc
383  * LibVLC Media Instance
384  * @{
385  */
386
387 /** Create an empty Media Instance object
388  * \param p_libvlc_instance the libvlc instance in which the Media Instance
389  * should be (not used for now).
390  */
391 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new( libvlc_instance_t *, libvlc_exception_t * );
392
393 /** Create a Media Instance object from a Media Descriptor
394  * \param p_md the media descriptor. Afterwards the p_md can safely be
395  * destroyed.
396  */
397 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new_from_media_descriptor( libvlc_media_descriptor_t *, libvlc_exception_t * );
398
399 /** Release a media_instance after use
400  * \param p_mi the Media Instance to free
401  */
402 VLC_PUBLIC_API void libvlc_media_instance_release( libvlc_media_instance_t * );
403 VLC_PUBLIC_API void libvlc_media_instance_retain( libvlc_media_instance_t * );
404
405 /** Set the media descriptor that will be used by the media_instance. If any,
406  * previous md will be released.
407  * \param p_mi the Media Instance 
408  * \param p_md the Media Descriptor. Afterwards the p_md can safely be
409  * destroyed.
410  */
411 VLC_PUBLIC_API void libvlc_media_instance_set_media_descriptor( libvlc_media_instance_t *, libvlc_media_descriptor_t *, libvlc_exception_t * );
412
413 /** Get the media descriptor used by the media_instance (if any). A copy of
414  * the md is returned. NULL is returned if no media instance is associated.
415  * \param p_mi the Media Instance 
416  */
417 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_instance_get_media_descriptor( libvlc_media_instance_t *, libvlc_exception_t * );
418
419 /** Get the Event Manager from which the media instance send event.
420  * \param p_mi the Media Instance 
421  */
422 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_instance_event_manager ( libvlc_media_instance_t *, libvlc_exception_t * );
423
424 VLC_PUBLIC_API void libvlc_media_instance_play ( libvlc_media_instance_t *, libvlc_exception_t * );
425 VLC_PUBLIC_API void libvlc_media_instance_pause ( libvlc_media_instance_t *, libvlc_exception_t * );
426 VLC_PUBLIC_API void libvlc_media_instance_stop ( libvlc_media_instance_t *, libvlc_exception_t * );
427
428 VLC_PUBLIC_API void libvlc_media_instance_set_drawable ( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
429
430 /// \bug This might go away ... to be replaced by a broader system
431 VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_length     ( libvlc_media_instance_t *, libvlc_exception_t *);
432 VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_time       ( libvlc_media_instance_t *, libvlc_exception_t *);
433 VLC_PUBLIC_API void        libvlc_media_instance_set_time       ( libvlc_media_instance_t *, vlc_int64_t, libvlc_exception_t *);
434 VLC_PUBLIC_API float       libvlc_media_instance_get_position   ( libvlc_media_instance_t *, libvlc_exception_t *);
435 VLC_PUBLIC_API void        libvlc_media_instance_set_position   ( libvlc_media_instance_t *, float, libvlc_exception_t *);
436 VLC_PUBLIC_API vlc_bool_t  libvlc_media_instance_will_play      ( libvlc_media_instance_t *, libvlc_exception_t *);
437 VLC_PUBLIC_API float       libvlc_media_instance_get_rate       ( libvlc_media_instance_t *, libvlc_exception_t *);
438 VLC_PUBLIC_API void        libvlc_media_instance_set_rate       ( libvlc_media_instance_t *, float, libvlc_exception_t *);
439 VLC_PUBLIC_API int         libvlc_media_instance_get_state      ( libvlc_media_instance_t *, libvlc_exception_t *);
440
441 /**
442  * Does this input have a video output ?
443  * \param p_input the input
444  * \param p_exception an initialized exception
445  */
446 VLC_PUBLIC_API vlc_bool_t  libvlc_media_instance_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
447 VLC_PUBLIC_API float       libvlc_media_instance_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
448
449
450 /** @} */
451
452 /*****************************************************************************
453  * Tag Query
454  *****************************************************************************/
455 /** defgroup libvlc_tag_query Tag Query
456  * \ingroup libvlc
457  * LibVLC Tag query
458  * @{
459  */
460 VLC_PUBLIC_API libvlc_tag_query_t * 
461     libvlc_tag_query_new( libvlc_instance_t *, libvlc_exception_t * );
462
463 VLC_PUBLIC_API void 
464     libvlc_tag_query_release( libvlc_tag_query_t * );
465
466 VLC_PUBLIC_API void 
467     libvlc_tag_query_retain( libvlc_tag_query_t * );
468
469 VLC_PUBLIC_API void
470     libvlc_tag_query_set_match_tag_and_key( libvlc_tag_query_t * p_q,
471                                             libvlc_tag_t tag,
472                                             char * psz_tag_key,
473                                             libvlc_exception_t * );
474
475 VLC_PUBLIC_API vlc_bool_t 
476     libvlc_tag_query_match( libvlc_tag_query_t *, libvlc_media_descriptor_t *,
477                             libvlc_exception_t * );
478
479 /** @} */
480
481 /*****************************************************************************
482  * Media List
483  *****************************************************************************/
484 /** defgroup libvlc_media_list MediaList
485  * \ingroup libvlc
486  * LibVLC Media List
487  * @{
488  */
489 VLC_PUBLIC_API libvlc_media_list_t *
490     libvlc_media_list_new( libvlc_instance_t *, libvlc_exception_t * );
491
492 VLC_PUBLIC_API void
493     libvlc_media_list_release( libvlc_media_list_t * );
494
495 VLC_PUBLIC_API void
496     libvlc_media_list_retain( libvlc_media_list_t * );
497
498 VLC_PUBLIC_API void
499     libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
500                                         const char * psz_uri,
501                                         libvlc_exception_t * p_e );
502
503 VLC_PUBLIC_API void
504     libvlc_media_list_set_name( libvlc_media_list_t *,
505                                 const char * psz_name,
506                                 libvlc_exception_t *);
507
508 VLC_PUBLIC_API char *
509     libvlc_media_list_name( libvlc_media_list_t *,
510                             libvlc_exception_t *);
511
512 VLC_PUBLIC_API void
513     libvlc_media_list_add_media_descriptor( libvlc_media_list_t *,
514                                             libvlc_media_descriptor_t *,
515                                             libvlc_exception_t * );
516 VLC_PUBLIC_API void
517     libvlc_media_list_insert_media_descriptor( libvlc_media_list_t *,
518                                                libvlc_media_descriptor_t *,
519                                                int,
520                                                libvlc_exception_t * );
521 VLC_PUBLIC_API void
522     libvlc_media_list_remove_index( libvlc_media_list_t *, int,
523                                     libvlc_exception_t * );
524
525 VLC_PUBLIC_API int
526     libvlc_media_list_count( libvlc_media_list_t * p_mlist,
527                              libvlc_exception_t * p_e );
528
529 VLC_PUBLIC_API libvlc_media_descriptor_t *
530     libvlc_media_list_item_at_index( libvlc_media_list_t *, int,
531                                      libvlc_exception_t * );
532 VLC_PUBLIC_API int
533     libvlc_media_list_index_of_item( libvlc_media_list_t *,
534                                      libvlc_media_descriptor_t *,
535                                      libvlc_exception_t * );
536
537 VLC_PUBLIC_API void
538     libvlc_media_list_lock( libvlc_media_list_t * );
539 VLC_PUBLIC_API void
540     libvlc_media_list_unlock( libvlc_media_list_t * );
541
542 VLC_PUBLIC_API libvlc_media_list_t *
543     libvlc_media_list_flat_media_list( libvlc_media_list_t *,
544                                        libvlc_exception_t * );
545
546 VLC_PUBLIC_API libvlc_event_manager_t *
547     libvlc_media_list_event_manager( libvlc_media_list_t *,
548                                     libvlc_exception_t * );
549 /** @} */
550
551 /*****************************************************************************
552  * Dynamic Media List
553  *****************************************************************************/
554 /** defgroup libvlc_media_list MediaList
555  * \ingroup libvlc
556  * LibVLC Media List
557  * @{ */
558
559 VLC_PUBLIC_API libvlc_dynamic_media_list_t *
560     libvlc_dynamic_media_list_new(  libvlc_media_list_t * p_mlist,
561                                     libvlc_tag_query_t * p_query,
562                                     libvlc_tag_t tag,
563                                     libvlc_exception_t * p_e );
564 VLC_PUBLIC_API void
565     libvlc_dynamic_media_list_release( libvlc_dynamic_media_list_t * p_dmlist );
566
567 VLC_PUBLIC_API void
568     libvlc_dynamic_media_list_retain( libvlc_dynamic_media_list_t * p_dmlist );
569
570 libvlc_media_list_t *
571     libvlc_dynamic_media_list_media_list( libvlc_dynamic_media_list_t * p_dmlist,
572                                           libvlc_exception_t * p_e );
573
574 /** @} */
575
576 /*****************************************************************************
577  * Media Library
578  *****************************************************************************/
579 /** defgroup libvlc_media_library Media Library
580  * \ingroup libvlc
581  * LibVLC Media Library
582  * @{
583  */
584 VLC_PUBLIC_API libvlc_media_library_t *
585     libvlc_media_library_new( libvlc_instance_t * p_inst,
586                               libvlc_exception_t * p_e );
587 VLC_PUBLIC_API void
588     libvlc_media_library_release( libvlc_media_library_t * p_mlib );
589 VLC_PUBLIC_API void
590     libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
591
592
593 VLC_PUBLIC_API void
594     libvlc_media_library_load( libvlc_media_library_t * p_mlib,
595                                libvlc_exception_t * p_e );
596
597 VLC_PUBLIC_API void
598     libvlc_media_library_save( libvlc_media_library_t * p_mlib,
599                                libvlc_exception_t * p_e );
600
601 VLC_PUBLIC_API libvlc_media_list_t *
602     libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
603                                      libvlc_exception_t * p_e );
604
605
606 /** @} */
607
608 /*****************************************************************************
609  * Media List Player
610  *****************************************************************************/
611 /** defgroup libvlc_media_list_player MediaListPlayer
612  * \ingroup libvlc
613  * LibVLC Media List Player
614  * @{
615  */
616 VLC_PUBLIC_API libvlc_media_list_player_t *
617     libvlc_media_list_player_new( libvlc_instance_t * p_instance,
618                                   libvlc_exception_t * p_e );
619 VLC_PUBLIC_API void
620     libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
621
622 VLC_PUBLIC_API void
623     libvlc_media_list_player_set_media_instance(
624                                      libvlc_media_list_player_t * p_mlp,
625                                      libvlc_media_instance_t * p_mi,
626                                      libvlc_exception_t * p_e );
627
628 VLC_PUBLIC_API void
629     libvlc_media_list_player_set_media_list(
630                                      libvlc_media_list_player_t * p_mlp,
631                                      libvlc_media_list_t * p_mlist,
632                                      libvlc_exception_t * p_e );
633
634 VLC_PUBLIC_API void
635     libvlc_media_list_player_play( libvlc_media_list_player_t * p_mlp,
636                                    libvlc_exception_t * p_e );
637
638 VLC_PUBLIC_API void
639     libvlc_media_list_player_play_item_at_index(
640                                    libvlc_media_list_player_t * p_mlp,
641                                    int i_index,
642                                    libvlc_exception_t * p_e );
643
644 VLC_PUBLIC_API void
645     libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
646                                    libvlc_exception_t * p_e );
647 VLC_PUBLIC_API void
648     libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
649                                    libvlc_exception_t * p_e );
650
651 /** @} */
652
653 /** defgroup libvlc_video Video
654  * \ingroup libvlc
655  * LibVLC Video handling
656  * @{
657  */
658
659 /**
660  * Does this input have a video output ?
661  * \param p_input the input
662  * \param p_exception an initialized exception
663  */
664 VLC_PUBLIC_API vlc_bool_t  libvlc_input_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
665 VLC_PUBLIC_API float       libvlc_input_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
666
667 /**
668  * Toggle fullscreen status on video output
669  * \param p_input the input
670  * \param p_exception an initialized exception
671  */
672 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
673
674 /**
675  * Enable or disable fullscreen on a video output
676  * \param p_input the input
677  * \param b_fullscreen boolean for fullscreen status
678  * \param p_exception an initialized exception
679  */
680 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_instance_t *, int, libvlc_exception_t * );
681
682 /**
683  * Get current fullscreen status
684  * \param p_input the input
685  * \param p_exception an initialized exception
686  * \return the fullscreen status (boolean)
687  */
688 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
689
690 /**
691  * Get current video height
692  * \param p_input the input
693  * \param p_exception an initialized exception
694  * \return the video height
695  */
696 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_instance_t *, libvlc_exception_t * );
697
698 /**
699  * Get current video width
700  * \param p_input the input
701  * \param p_exception an initialized exception
702  * \return the video width
703  */
704 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_instance_t *, libvlc_exception_t * );
705
706 /**
707  * Get current video aspect ratio
708  * \param p_input the input
709  * \param p_exception an initialized exception
710  * \return the video aspect ratio
711  */
712 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_instance_t *, libvlc_exception_t * );
713
714 /**
715  * Set new video aspect ratio
716  * \param p_input the input
717  * \param psz_aspect new video aspect-ratio
718  * \param p_exception an initialized exception
719  */
720 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_instance_t *, char *, libvlc_exception_t * );
721
722 /**
723  * Get current video subtitle
724  * \param p_input the input
725  * \param p_exception an initialized exception
726  * \return the video subtitle selected
727  */
728 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_instance_t *, libvlc_exception_t * );
729
730 /**
731  * Set new video subtitle
732  * \param p_input the input
733  * \param i_spu new video subtitle to select
734  * \param p_exception an initialized exception
735  */
736 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_instance_t *, int , libvlc_exception_t * );
737
738 /**
739  * Get current crop filter geometry
740  * \param p_input the input
741  * \param p_exception an initialized exception
742  * \return the crop filter geometry
743  */
744 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_instance_t *, libvlc_exception_t * );
745
746 /**
747  * Set new crop filter geometry
748  * \param p_input the input
749  * \param psz_geometry new crop filter geometry
750  * \param p_exception an initialized exception
751  */
752 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_instance_t *, char *, libvlc_exception_t * );
753
754 /**
755  * Get current teletext page requested.
756  * \param p_input the input
757  * \param p_exception an initialized exception
758  * \return the current teletext page requested.
759  */
760 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_instance_t *, libvlc_exception_t * );
761
762 /**
763  * Set new teletext page to retrieve
764  * \param p_input the input
765  * \param i_page teletex page number requested
766  * \param p_exception an initialized exception
767  */
768 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_instance_t *, int, libvlc_exception_t * );
769
770 /**
771  * Take a snapshot of the current video window
772  * \param p_input the input
773  * \param psz_filepath the path where to save the screenshot to
774  * \param p_exception an initialized exception
775  */
776 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_instance_t *, char *, libvlc_exception_t * );
777
778 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_media_instance_t *, libvlc_exception_t *);
779
780 /**
781  * Resize the current video output window
782  * \param p_instance libvlc instance
783  * \param width new width for video output window
784  * \param height new height for video output window
785  * \param p_exception an initialized exception
786  * \return the success status (boolean)
787  */
788 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_instance_t *, int, int, libvlc_exception_t *);
789
790 /**
791  * change the parent for the current the video output
792  * \param p_instance libvlc instance
793  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
794  * \param p_exception an initialized exception
795  * \return the success status (boolean)
796  */
797 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
798
799 /**
800  * Tell windowless video output to redraw rectangular area (MacOS X only)
801  * \param p_instance libvlc instance
802  * \param area coordinates within video drawable
803  * \param p_exception an initialized exception
804  */
805 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_instance_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
806
807 /**
808  * Set the default video output parent
809  *  this settings will be used as default for all video outputs
810  * \param p_instance libvlc instance
811  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
812  * \param p_exception an initialized exception
813  */
814 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
815
816 /**
817  * Set the default video output parent
818  *  this settings will be used as default for all video outputs
819  * \param p_instance libvlc instance
820  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
821  * \param p_exception an initialized exception
822  */
823 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
824
825 /**
826  * Set the default video output size
827  *  this settings will be used as default for all video outputs
828  * \param p_instance libvlc instance
829  * \param width new width for video drawable
830  * \param height new height for video drawable
831  * \param p_exception an initialized exception
832  */
833 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
834
835 /**
836  * Set the default video output viewport for a windowless video output (MacOS X only)
837  *  this settings will be used as default for all video outputs
838  * \param p_instance libvlc instance
839  * \param view coordinates within video drawable
840  * \param clip coordinates within video drawable
841  * \param p_exception an initialized exception
842  */
843 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
844
845 /** @} */
846
847 /** defgroup libvlc_audio Audio
848  * \ingroup libvlc
849  * LibVLC Audio handling
850  * @{
851  */
852
853 /**
854  * Toggle mute status
855  * \param p_instance libvlc instance
856  * \param p_exception an initialized exception
857  * \return void
858  */
859 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
860
861 /**
862  * Get current mute status
863  * \param p_instance libvlc instance
864  * \param p_exception an initialized exception
865  * \return the mute status (boolean)
866  */
867 VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
868
869 /**
870  * Set mute status
871  * \param p_instance libvlc instance
872  * \param status If status is VLC_TRUE then mute, otherwise unmute
873  * \param p_exception an initialized exception
874  * \return void
875  */
876 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
877
878 /**
879  * Get current audio level
880  * \param p_instance libvlc instance
881  * \param p_exception an initialized exception
882  * \return the audio level (int)
883  */
884 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
885
886 /**
887  * Set current audio level
888  * \param p_instance libvlc instance
889  * \param i_volume the volume (int)
890  * \param p_exception an initialized exception
891  */
892 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
893
894 /**
895 +  * Get current audio track
896 +  * \param p_input input instance
897 +  * \param p_exception an initialized exception
898 +  * \return the audio track (int)
899 +  */
900 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_instance_t *, libvlc_exception_t * );
901
902 /**
903  * Set current audio track
904  * \param p_input input instance
905  * \param i_track the track (int)
906  * \param p_exception an initialized exception
907  */
908 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_instance_t *, int, libvlc_exception_t * );
909
910 /**
911  * Get current audio channel
912  * \param p_instance input instance
913  * \param p_exception an initialized exception
914  * \return the audio channel (int)
915  */
916 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
917
918 /**
919  * Set current audio channel
920  * \param p_instance input instance
921  * \param i_channel the audio channel (int)
922  * \param p_exception an initialized exception
923  */
924 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
925
926 /** @} */
927
928 /*****************************************************************************
929  * Services/Media Discovery
930  *****************************************************************************/
931 /** defgroup libvlc_media_discoverer Media Discoverer
932  * \ingroup libvlc
933  * LibVLC Media Discoverer
934  * @{
935  */
936
937 VLC_PUBLIC_API libvlc_media_discoverer_t *
938 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
939                                        const char * psz_name,
940                                        libvlc_exception_t * p_e );
941 VLC_PUBLIC_API void   libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
942 VLC_PUBLIC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
943
944 VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
945
946 /**@} */
947
948 /*****************************************************************************
949  * VLM
950  *****************************************************************************/
951 /** defgroup libvlc_vlm VLM
952  * \ingroup libvlc
953  * LibVLC VLM
954  * @{
955  */
956
957 /**
958  * Add a broadcast, with one input
959  * \param p_instance the instance
960  * \param psz_name the name of the new broadcast
961  * \param psz_input the input MRL
962  * \param psz_output the output MRL (the parameter to the "sout" variable)
963  * \param i_options number of additional options
964  * \param ppsz_options additional options
965  * \param b_enabled boolean for enabling the new broadcast
966  * \param b_loop Should this broadcast be played in loop ?
967  * \param p_exception an initialized exception
968  */
969 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
970                                               int, char **, int, int, libvlc_exception_t * );
971
972 /**
973  * Delete a media (vod or broadcast)
974  * \param p_instance the instance
975  * \param psz_name the media to delete
976  * \param p_exception an initialized exception
977  */
978 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
979
980 /**
981  * Enable or disable a media (vod or broadcast)
982  * \param p_instance the instance
983  * \param psz_name the media to work on
984  * \param b_enabled the new status
985  * \param p_exception an initialized exception
986  */
987 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
988                                             libvlc_exception_t *);
989
990 /**
991  * Set the output for a media
992  * \param p_instance the instance
993  * \param psz_name the media to work on
994  * \param psz_output the output MRL (the parameter to the "sout" variable)
995  * \param p_exception an initialized exception
996  */
997 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
998                                            libvlc_exception_t *);
999
1000 /**
1001  * Set a media's input MRL. This will delete all existing inputs and
1002  * add the specified one.
1003  * \param p_instance the instance
1004  * \param psz_name the media to work on
1005  * \param psz_input the input MRL
1006  * \param p_exception an initialized exception
1007  */
1008 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
1009                                           libvlc_exception_t *);
1010
1011 /**
1012  * Add a media's input MRL. This will add the specified one.
1013  * \param p_instance the instance
1014  * \param psz_name the media to work on
1015  * \param psz_input the input MRL
1016  * \param p_exception an initialized exception
1017  */
1018 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
1019                                           libvlc_exception_t *p_exception );
1020 /**
1021  * Set output for a media
1022  * \param p_instance the instance
1023  * \param psz_name the media to work on
1024  * \param b_loop the new status
1025  * \param p_exception an initialized exception
1026  */
1027 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
1028                                          libvlc_exception_t *);
1029
1030 /**
1031  * Edit the parameters of a media. This will delete all existing inputs and
1032  * add the specified one.
1033  * \param p_instance the instance
1034  * \param psz_name the name of the new broadcast
1035  * \param psz_input the input MRL
1036  * \param psz_output the output MRL (the parameter to the "sout" variable)
1037  * \param i_options number of additional options
1038  * \param ppsz_options additional options
1039  * \param b_enabled boolean for enabling the new broadcast
1040  * \param b_loop Should this broadcast be played in loop ?
1041  * \param p_exception an initialized exception
1042  */
1043 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
1044                                              int, char **, int, int, libvlc_exception_t * );
1045
1046 /**
1047  * Plays the named broadcast.
1048  * \param p_instance the instance
1049  * \param psz_name the name of the broadcast
1050  * \param p_exception an initialized exception
1051  */
1052 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
1053
1054 /**
1055  * Stops the named broadcast.
1056  * \param p_instance the instance
1057  * \param psz_name the name of the broadcast
1058  * \param p_exception an initialized exception
1059  */ 
1060 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
1061
1062 /**
1063  * Pauses the named broadcast.
1064  * \param p_instance the instance
1065  * \param psz_name the name of the broadcast
1066  * \param p_exception an initialized exception
1067  */ 
1068 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
1069     
1070 /**
1071  * Seeks in the named broadcast.
1072  * \param p_instance the instance
1073  * \param psz_name the name of the broadcast
1074  * \param f_percentage the percentage to seek to
1075  * \param p_exception an initialized exception
1076  */ 
1077 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
1078                                            float, libvlc_exception_t * );
1079    
1080 /**
1081  * Return information of the named broadcast.
1082  * \param p_instance the instance
1083  * \param psz_name the name of the broadcast
1084  * \param p_exception an initialized exception
1085  */ 
1086 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
1087
1088 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
1089 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
1090                         char *, int , libvlc_exception_t * );
1091
1092 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
1093 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
1094 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
1095 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
1096 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
1097 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
1098 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
1099
1100 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
1101
1102 /** @} */
1103
1104 /*****************************************************************************
1105  * Message log handling
1106  *****************************************************************************/
1107
1108 /** defgroup libvlc_log Log
1109  * \ingroup libvlc
1110  * LibVLC Message Logging
1111  * @{
1112  */
1113
1114 /**
1115  * Returns the VLC messaging verbosity level
1116  * \param p_instance libvlc instance
1117  * \param exception an initialized exception pointer
1118  */
1119 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
1120                                                   libvlc_exception_t *p_e );
1121
1122 /**
1123  * Set the VLC messaging verbosity level
1124  * \param p_log libvlc log instance
1125  * \param exception an initialized exception pointer
1126  */
1127 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
1128                                               libvlc_exception_t *p_e );
1129
1130 /**
1131  * Open an instance to VLC message log 
1132  * \param p_instance libvlc instance
1133  * \param exception an initialized exception pointer
1134  */
1135 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
1136
1137 /**
1138  * Close an instance of VLC message log 
1139  * \param p_log libvlc log instance
1140  * \param exception an initialized exception pointer
1141  */
1142 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
1143
1144 /**
1145  * Returns the number of messages in log
1146  * \param p_log libvlc log instance
1147  * \param exception an initialized exception pointer
1148  */
1149 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
1150
1151 /**
1152  * Clear all messages in log
1153  *  the log should be cleared on a regular basis to avoid clogging
1154  * \param p_log libvlc log instance
1155  * \param exception an initialized exception pointer
1156  */
1157 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
1158
1159 /**
1160  * Allocate and returns a new iterator to messages in log
1161  * \param p_log libvlc log instance
1162  * \param exception an initialized exception pointer
1163  */
1164 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
1165
1166 /**
1167  * Releases a previoulsy allocated iterator
1168  * \param p_log libvlc log iterator 
1169  * \param exception an initialized exception pointer
1170  */
1171 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1172
1173 /**
1174  * Returns whether log iterator has more messages 
1175  * \param p_log libvlc log iterator
1176  * \param exception an initialized exception pointer
1177  */
1178 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1179
1180 /**
1181  * Returns next log message
1182  *   the content of message must not be freed
1183  * \param p_log libvlc log iterator
1184  * \param exception an initialized exception pointer
1185  */
1186 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
1187                                                                struct libvlc_log_message_t *buffer,
1188                                                                libvlc_exception_t *p_e );
1189
1190 /** @} */
1191
1192 /*****************************************************************************
1193  * Event handling
1194  *****************************************************************************/
1195
1196 /** defgroup libvlc_callbacks Callbacks
1197  * \ingroup libvlc
1198  * LibVLC Events
1199  * @{
1200  */
1201
1202 /**
1203  * Register for an event notification
1204  * \param p_event_manager the event manager to which you want to attach to
1205  * Generally it is obtained by vlc_my_object_event_manager() where my_object
1206  * Is the object you want to listen to.
1207  * \param i_event_type the desired event to which we want to listen
1208  * \param f_callback the function to call when i_event_type occurs
1209  * \param user_data user provided data to carry with the event
1210  * \param p_e an initialized exception pointer
1211  */
1212 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
1213                                          libvlc_event_type_t i_event_type,
1214                                          libvlc_callback_t f_callback,
1215                                          void *user_data,
1216                                          libvlc_exception_t *p_e );
1217
1218 /**
1219  * Unregister an event notification
1220  * \param p_event_manager the event manager
1221  * \param i_event_type the desired event to which we want to unregister
1222  * \param f_callback the function to call when i_event_type occurs
1223  * \param p_e an initialized exception pointer
1224  */
1225 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
1226                                          libvlc_event_type_t i_event_type,
1227                                          libvlc_callback_t f_callback,
1228                                          void *p_user_data,
1229                                          libvlc_exception_t *p_e );
1230
1231
1232 /**
1233  * Get an event type name 
1234  * \param i_event_type the desired event
1235  */
1236 #define libvlc_event_type_name(a) #a
1237
1238 /** @} */
1239
1240
1241 # ifdef __cplusplus
1242 }
1243 # endif
1244
1245 #endif /* <vlc/libvlc.h> */