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