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