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