]> git.sesse.net Git - vlc/blob - include/vlc/libvlc.h
688d940fa01992c6bb8e3273ee4e028a0221dec8
[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
38 # ifdef __cplusplus
39 extern "C" {
40 # endif
41
42 /*****************************************************************************
43  * Exception handling
44  *****************************************************************************/
45 /** defgroup libvlc_exception Exceptions
46  * \ingroup libvlc
47  * LibVLC Exceptions handling
48  * @{
49  */
50
51 struct libvlc_exception_t
52 {
53     int b_raised;
54     char *psz_message;
55 };
56 typedef struct libvlc_exception_t libvlc_exception_t;
57
58 /**
59  * Initialize an exception structure. This can be called several times to reuse
60  * an exception structure.
61  * \param p_exception the exception to initialize
62  */
63 void libvlc_exception_init( libvlc_exception_t *p_exception );
64
65 /**
66  * Has an exception been raised ?
67  * \param p_exception the exception to query
68  * \return 0 if no exception raised, 1 else
69  */
70 int libvlc_exception_raised( libvlc_exception_t *p_exception );
71
72 /**
73  * Raise an exception
74  * \param p_exception the exception to raise
75  * \param psz_message the exception message
76  */
77 void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... );
78
79 /**
80  * Clear an exception object so it can be reused.
81  * The exception object must be initialized
82  * \param p_exception the exception to clear
83  */
84 void libvlc_exception_clear( libvlc_exception_t * );
85
86 /**
87  * Get exception message
88  * \param p_exception the exception to query
89  * \return the exception message or NULL if not applicable (exception not raised
90  * for example)
91  */
92 char* libvlc_exception_get_message( libvlc_exception_t *p_exception );
93
94 /**@} */
95
96 /*****************************************************************************
97  * Core handling
98  *****************************************************************************/
99
100 /** defgroup libvlc_core Core
101  * \ingroup libvlc
102  * LibVLC Core
103  * @{
104  */
105
106 /** This structure is opaque. It represents a libvlc instance */
107 typedef struct libvlc_instance_t libvlc_instance_t;
108
109 /**
110  * Create an initialized libvlc instance
111  * \param argc the number of arguments
112  * \param argv command-line-type arguments
113  * \param exception an initialized exception pointer
114  */
115 libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);
116
117 /**
118  * Returns a libvlc instance identifier for legacy APIs. Use of this
119  * function is discouraged, you should convert your program to use the
120  * new API.
121  * \param p_instance the instance
122  */
123 int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
124
125 /**
126  * Destroy a libvlc instance.
127  * \param p_instance the instance to destroy
128  */
129 void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * );
130
131 /** @}*/
132
133 /*****************************************************************************
134  * Playlist
135  *****************************************************************************/
136 /** defgroup libvlc_playlist Playlist
137  * \ingroup libvlc
138  * LibVLC Playlist handling
139  * @{
140  */
141
142 /**
143  * Set loop variable
144  */
145 void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t, libvlc_exception_t * );
146
147 /**
148  * Start playing. You can give some additionnal playlist item options
149  * that will be added to the item before playing it.
150  * \param p_instance the instance
151  * \param i_id the item to play. If this is a negative number, the next
152  * item will be selected. Else, the item with the given ID will be played
153  * \param i_options the number of options to add to the item
154  * \param ppsz_options the options to add to the item
155  * \param p_exception an initialized exception
156  */
157 void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
158                            libvlc_exception_t * );
159
160 /**
161  * Pause a running playlist, resume if it was stopped
162  * \param p_instance the instance to pause
163  * \param p_exception an initialized exception
164  */
165 void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
166
167 /**
168  * Checks if the playlist is running
169  * \param p_instance the instance
170  * \param p_exception an initialized exception
171  * \return 0 if the playlist is stopped or paused, 1 if it is running
172  */
173 int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
174
175 /**
176  * Get the number of items in the playlist
177  * \param p_instance the instance
178  * \param p_exception an initialized exception
179  * \return the number of items
180  */
181 int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
182
183 /**
184  * Stop playing
185  * \param p_instance the instance to stop
186  * \param p_exception an initialized exception
187  */
188 void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * );
189
190 /**
191  * Go to next playlist item (starts playback if it was stopped)
192  * \param p_instance the instance to use
193  * \param p_exception an initialized exception
194  */
195 void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * );
196
197 /**
198  * Go to previous playlist item (starts playback if it was stopped)
199  * \param p_instance the instance to use
200  * \param p_exception an initialized exception
201  */
202 void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * );
203
204 /**
205  * Remove all playlist items
206  * \param p_instance the instance
207  * \param p_exception an initialized exception
208  */
209 void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
210
211 /**
212  * Add an item at the end of the playlist
213  * If you need more advanced options, \see libvlc_playlist_add_extended
214  * \param p_instance the instance
215  * \param psz_uri the URI to open, using VLC format
216  * \param psz_name a name that you might want to give or NULL
217  * \return the identifier of the new item
218  */
219 int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
220                          libvlc_exception_t * );
221
222 /**
223  * Add an item at the end of the playlist, with additional input options
224  * \param p_instance the instance
225  * \param psz_uri the URI to open, using VLC format
226  * \param psz_name a name that you might want to give or NULL
227  * \param i_options the number of options to add
228  * \param ppsz_options strings representing the options to add
229  * \param p_exception an initialized exception
230  * \return the identifier of the new item
231  */
232 int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
233                                   const char *, int, const char **,
234                                   libvlc_exception_t * );
235
236 /** 
237  * Delete the playlist item with the given ID.
238  * \param p_instance the instance
239  * \param i_id the id to remove
240  * \param p_exception an initialized exception
241  * \return
242  */
243 int libvlc_playlist_delete_item( libvlc_instance_t *, int,
244                                  libvlc_exception_t * );
245
246 typedef struct libvlc_input_t libvlc_input_t;
247
248 /* Get the input that is currently being played by the playlist
249  * \param p_instance the instance to use
250  * \param p_exception an initialized excecption
251  * \return an input object
252  */
253 libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *,
254                                            libvlc_exception_t * );
255
256 /** @}*/
257
258 /*****************************************************************************
259  * Input
260  *****************************************************************************/
261 /** defgroup libvlc_input Input
262  * \ingroup libvlc
263  * LibVLC Input handling
264  * @{
265  */
266
267 /** Free an input object
268  * \param p_input the input to free
269  */
270 void libvlc_input_free( libvlc_input_t * );
271
272 /// \bug This might go away ... to be replaced by a broader system
273 vlc_int64_t libvlc_input_get_length     ( libvlc_input_t *, libvlc_exception_t *);
274 vlc_int64_t libvlc_input_get_time       ( libvlc_input_t *, libvlc_exception_t *);
275 void        libvlc_input_set_time       ( libvlc_input_t *, vlc_int64_t, libvlc_exception_t *);
276 float       libvlc_input_get_position   ( libvlc_input_t *, libvlc_exception_t *);
277 void        libvlc_input_set_position   ( libvlc_input_t *, float, libvlc_exception_t *);
278 vlc_bool_t  libvlc_input_will_play      ( libvlc_input_t *, libvlc_exception_t *);
279 float       libvlc_input_get_rate       ( libvlc_input_t *, libvlc_exception_t *);
280 void        libvlc_input_set_rate       ( libvlc_input_t *, float, libvlc_exception_t *);
281 int         libvlc_input_get_state      ( libvlc_input_t *, libvlc_exception_t *);
282
283 /** @} */
284
285 /** defgroup libvlc_video Video
286  * \ingroup libvlc
287  * LibVLC Video handling
288  * @{
289  */
290
291 typedef int libvlc_drawable_t;
292
293 /**
294  * Does this input have a video output ?
295  * \param p_input the input
296  * \param p_exception an initialized exception
297  */
298 vlc_bool_t  libvlc_input_has_vout       ( libvlc_input_t *, libvlc_exception_t *);
299 float       libvlc_input_get_fps        ( libvlc_input_t *, libvlc_exception_t *);
300
301 /**
302  * Toggle fullscreen status on video output
303  * \param p_input the input
304  * \param p_exception an initialized exception
305  */
306 void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * );
307
308 /**
309  * Enable or disable fullscreen on a video output
310  * \param p_input the input
311  * \param b_fullscreen boolean for fullscreen status
312  * \param p_exception an initialized exception
313  */
314 void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * );
315
316 /**
317  * Get current fullscreen status
318  * \param p_input the input
319  * \param p_exception an initialized exception
320  * \return the fullscreen status (boolean)
321  */
322 int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * );
323
324 /**
325  * Get current video height
326  * \param p_input the input
327  * \param p_exception an initialized exception
328  * \return the video height
329  */
330 int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * );
331
332 /**
333  * Get current video width
334  * \param p_input the input
335  * \param p_exception an initialized exception
336  * \return the video width
337  */
338 int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * );
339
340 /**
341  * Get current video aspect ratio
342  * \param p_input the input
343  * \param p_exception an initialized exception
344  * \return the video aspect ratio
345  */
346 char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
347
348 /**
349  * Set new video aspect ratio
350  * \param p_input the input
351  * \param psz_aspect new video aspect-ratio
352  * \param p_exception an initialized exception
353  */
354 void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * );
355
356 /**
357  * Take a snapshot of the current video window
358  * \param p_input the input
359  * \param psz_filepath the path where to save the screenshot to
360  * \param p_exception an initialized exception
361  */
362 void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * );
363
364 int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *);
365
366 /**
367  * Resize the current video output window
368  * \param p_instance libvlc instance
369  * \param width new width for video output window
370  * \param height new height for video output window
371  * \param p_exception an initialized exception
372  * \return the mute status (boolean)
373  */
374 void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *);
375
376 /**
377 * Downcast to this general type as placeholder for a platform specific one, such as:
378 *  Drawable on X11,
379 *  CGrafPort on MacOSX,
380 *  HWND on win32
381 */
382
383 /**
384  * change the parent for the current the video output
385  * \param p_instance libvlc instance
386  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
387  * \param p_exception an initialized exception
388  * \return the mute status (boolean)
389  */
390 int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * );
391
392 /**
393  * Set the default video output parent
394  *  this settings will be used as default for all video outputs
395  * \param p_instance libvlc instance
396  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
397  * \param p_exception an initialized exception
398  */
399 void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
400
401 /**
402  * Set the default video output size
403  *  this settings will be used as default for all video outputs
404  * \param p_instance libvlc instance
405  * \param width new width for video drawable
406  * \param height new height for video drawable
407  * \param p_exception an initialized exception
408  */
409 void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
410
411 /**
412 * Downcast to this general type as placeholder for a platform specific one, such as:
413 *  Drawable on X11,
414 *  CGrafPort on MacOSX,
415 *  HWND on win32
416 */
417 typedef struct
418 {
419     int top, left;
420     int bottom, right;
421 }
422 libvlc_rectangle_t;
423
424 /**
425  * Set the default video output viewport for a windowless video output (MacOS X only)
426  *  this settings will be used as default for all video outputs
427  * \param p_instance libvlc instance
428  * \param view coordinates within video drawable
429  * \param clip coordinates within video drawable
430  * \param p_exception an initialized exception
431  */
432 void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
433
434
435 /** @} */
436
437 /**
438  * defgroup libvlc_vlm VLM
439  * \ingroup libvlc
440  * LibVLC VLM handling
441  * @{
442  */
443
444 /** defgroup libvlc_audio Audio
445  * \ingroup libvlc
446  * LibVLC Audio handling
447  * @{
448  */
449
450 /**
451  * Toggle mute status
452  * \param p_instance libvlc instance
453  * \param p_exception an initialized exception
454  * \return void
455  */
456 void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
457
458 /**
459  * Get current mute status
460  * \param p_instance libvlc instance
461  * \param p_exception an initialized exception
462  * \return the mute status (boolean)
463  */
464 vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
465
466 /**
467  * Set mute status
468  * \param p_instance libvlc instance
469  * \param status If status is VLC_TRUE then mute, otherwise unmute
470  * \param p_exception an initialized exception
471  * \return void
472  */
473 void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
474
475 /**
476  * Get current audio level
477  * \param p_instance libvlc instance
478  * \param p_exception an initialized exception
479  * \return the audio level (int)
480  */
481 int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
482
483 /**
484  * Set current audio level
485  * \param p_instance libvlc instance
486  * \param i_volume the volume (int)
487  * \param p_exception an initialized exception
488  * \return void
489  */
490 void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
491
492 /**
493  * Get current audio track
494  * \param p_instance libvlc instance
495  * \param p_exception an initialized exception
496  * \return the audio track (int)
497  */
498 int libvlc_audio_get_track( libvlc_instance_t *, libvlc_exception_t * );
499
500 /**
501  * Set current audio track
502  * \param p_instance libvlc instance
503  * \param i_track the track (int)
504  * \param p_exception an initialized exception
505  * \return void
506  */
507 void libvlc_audio_set_track( libvlc_instance_t *, int, libvlc_exception_t * );
508
509 /**
510  * Get current audio channel
511  * \param p_instance libvlc instance
512  * \param p_exception an initialized exception
513  * \return the audio channel (char *)
514  */
515 char *libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
516
517 /**
518  * Set current audio track
519  * \param p_instance libvlc instance
520  * \param psz_channel the audio channel (char *)
521  * \param p_exception an initialized exception
522  * \return void
523  */
524 void libvlc_audio_set_channel( libvlc_instance_t *, char *, libvlc_exception_t * );
525
526 /** @} */
527
528
529 /**
530  * Add a broadcast, with one input
531  * \param p_instance the instance
532  * \param psz_name the name of the new broadcast
533  * \param psz_input the input MRL
534  * \param psz_output the output MRL (the parameter to the "sout" variable)
535  * \param i_options number of additional options
536  * \param ppsz_options additional options
537  * \param b_enabled boolean for enabling the new broadcast
538  * \param b_loop Should this broadcast be played in loop ?
539  * \param p_exception an initialized exception
540  */
541 void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
542                                int, char **, int, int, libvlc_exception_t * );
543
544 /**
545  * Delete a media (vod or broadcast)
546  * \param p_instance the instance
547  * \param psz_name the media to delete
548  * \param p_exception an initialized exception
549  */
550 void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
551
552 /**
553  * Enable or disable a media (vod or broadcast)
554  * \param p_instance the instance
555  * \param psz_name the media to work on
556  * \param b_enabled the new status
557  * \param p_exception an initialized exception
558  */
559 void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
560                              libvlc_exception_t *);
561
562 /**
563  * Set the output for a media
564  * \param p_instance the instance
565  * \param psz_name the media to work on
566  * \param psz_output the output MRL (the parameter to the "sout" variable)
567  * \param p_exception an initialized exception
568  */
569 void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
570                             libvlc_exception_t *);
571
572 /**
573  * Set a media's input MRL. This will delete all existing inputs and
574  * add the specified one.
575  * \param p_instance the instance
576  * \param psz_name the media to work on
577  * \param psz_input the input MRL
578  * \param p_exception an initialized exception
579  */
580 void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
581                            libvlc_exception_t *);
582
583 /**
584  * Set output for a media
585  * \param p_instance the instance
586  * \param psz_name the media to work on
587  * \param b_loop the new status
588  * \param p_exception an initialized exception
589  */
590 void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
591                           libvlc_exception_t *);
592
593 /**
594  * Edit the parameters of a media. This will delete all existing inputs and
595  * add the specified one.
596  * \param p_instance the instance
597  * \param psz_name the name of the new broadcast
598  * \param psz_input the input MRL
599  * \param psz_output the output MRL (the parameter to the "sout" variable)
600  * \param i_options number of additional options
601  * \param ppsz_options additional options
602  * \param b_enabled boolean for enabling the new broadcast
603  * \param b_loop Should this broadcast be played in loop ?
604  * \param p_exception an initialized exception
605  */
606 void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
607                               int, char **, int, int, libvlc_exception_t * );
608
609 /**
610  * Plays the named broadcast.
611  * \param p_instance the instance
612  * \param psz_name the name of the broadcast
613  * \param p_exception an initialized exception
614  */
615 void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
616
617 /**
618  * Stops the named broadcast.
619  * \param p_instance the instance
620  * \param psz_name the name of the broadcast
621  * \param p_exception an initialized exception
622  */ 
623 void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
624
625 /**
626  * Pauses the named broadcast.
627  * \param p_instance the instance
628  * \param psz_name the name of the broadcast
629  * \param p_exception an initialized exception
630  */ 
631 void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
632     
633 /**
634  * Seeks in the named broadcast.
635  * \param p_instance the instance
636  * \param psz_name the name of the broadcast
637  * \param f_percentage the percentage to seek to
638  * \param p_exception an initialized exception
639  */ 
640 void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
641                             float, libvlc_exception_t * );
642    
643 /**
644  * Return information of the named broadcast.
645  * \param p_instance the instance
646  * \param psz_name the name of the broadcast
647  * \param p_exception an initialized exception
648  */ 
649 char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
650
651 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
652 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
653                         char *, int , libvlc_exception_t * );
654
655 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
656 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
657 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
658 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
659 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
660 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
661 LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
662
663 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
664
665 /** @} */
666 /** @} */
667
668 /*****************************************************************************
669  * Message log handling
670  *****************************************************************************/
671
672 /** defgroup libvlc_log Log
673  * \ingroup libvlc
674  * LibVLC Message Logging
675  * @{
676  */
677
678 /** This structure is opaque. It represents a libvlc log instance */
679 typedef struct libvlc_log_t libvlc_log_t;
680
681 /** This structure is opaque. It represents a libvlc log iterator */
682 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
683
684 typedef struct libvlc_log_message_t
685 {
686     unsigned    sizeof_msg;   /* sizeof() of message structure, must be filled in by user */
687     int         i_severity;   /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
688     const char *psz_type;     /* module type */
689     const char *psz_name;     /* module name */
690     const char *psz_header;   /* optional header */
691     const char *psz_message;  /* message */
692 } libvlc_log_message_t;
693
694 /**
695  * Returns the VLC messaging verbosity level
696  * \param p_instance libvlc instance
697  * \param exception an initialized exception pointer
698  */
699 unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance, libvlc_exception_t *p_e );
700
701 /**
702  * Set the VLC messaging verbosity level
703  * \param p_log libvlc log instance
704  * \param exception an initialized exception pointer
705  */
706 void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level, libvlc_exception_t *p_e );
707
708 /**
709  * Open an instance to VLC message log 
710  * \param p_instance libvlc instance
711  * \param exception an initialized exception pointer
712  */
713 libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
714
715 /**
716  * Close an instance of VLC message log 
717  * \param p_log libvlc log instance
718  * \param exception an initialized exception pointer
719  */
720 void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
721
722 /**
723  * Returns the number of messages in log
724  * \param p_log libvlc log instance
725  * \param exception an initialized exception pointer
726  */
727 unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
728
729 /**
730  * Clear all messages in log
731  *  the log should be cleared on a regular basis to avoid clogging
732  * \param p_log libvlc log instance
733  * \param exception an initialized exception pointer
734  */
735 void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
736
737 /**
738  * Allocate and returns a new iterator to messages in log
739  * \param p_log libvlc log instance
740  * \param exception an initialized exception pointer
741  */
742 libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
743
744 /**
745  * Releases a previoulsy allocated iterator
746  * \param p_log libvlc log iterator 
747  * \param exception an initialized exception pointer
748  */
749 void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
750
751 /**
752  * Returns whether log iterator has more messages 
753  * \param p_log libvlc log iterator
754  * \param exception an initialized exception pointer
755  */
756 int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
757
758 /**
759  * Returns next log message
760  *   the content of message must not be freed
761  * \param p_log libvlc log iterator
762  * \param exception an initialized exception pointer
763  */
764 libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
765                                                 struct libvlc_log_message_t *buffer,
766                                                 libvlc_exception_t *p_e );
767
768 /** @} */
769
770 # ifdef __cplusplus
771 }
772 # endif
773
774 #endif /* <vlc/libvlc.h> */