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 $
7 * Authors: Clément Stenac <zorglub@videolan.org>
8 * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
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.
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.
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 *****************************************************************************/
26 * \defgroup libvlc Libvlc
27 * This is libvlc, the base library of the VLC program.
42 /*****************************************************************************
44 *****************************************************************************/
45 /** defgroup libvlc_exception Exceptions
47 * LibVLC Exceptions handling
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
63 VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
66 * Has an exception been raised ?
67 * \param p_exception the exception to query
68 * \return 0 if no exception raised, 1 else
70 VLC_PUBLIC_API int libvlc_exception_raised( libvlc_exception_t *p_exception );
74 * \param p_exception the exception to raise
75 * \param psz_message the exception message
77 VLC_PUBLIC_API void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... );
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
84 VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
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
92 VLC_PUBLIC_API char* libvlc_exception_get_message( libvlc_exception_t *p_exception );
96 /*****************************************************************************
98 *****************************************************************************/
100 /** defgroup libvlc_core Core
106 /** This structure is opaque. It represents a libvlc instance */
107 typedef struct libvlc_instance_t libvlc_instance_t;
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
115 VLC_PUBLIC_API libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);
118 * Returns a libvlc instance identifier for legacy APIs. Use of this
119 * function is discouraged, you should convert your program to use the
121 * \param p_instance the instance
123 VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
126 * Destroy a libvlc instance.
127 * \param p_instance the instance to destroy
129 VLC_PUBLIC_API void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * );
133 /*****************************************************************************
135 *****************************************************************************/
136 /** defgroup libvlc_playlist Playlist
138 * LibVLC Playlist handling
147 } libvlc_playlist_item_t;
152 VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t,
153 libvlc_exception_t * );
156 * Start playing. You can give some additionnal playlist item options
157 * that will be added to the item before playing it.
158 * \param p_instance the instance
159 * \param i_id the item to play. If this is a negative number, the next
160 * item will be selected. Else, the item with the given ID will be played
161 * \param i_options the number of options to add to the item
162 * \param ppsz_options the options to add to the item
163 * \param p_exception an initialized exception
165 VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
166 libvlc_exception_t * );
169 * Pause a running playlist, resume if it was stopped
170 * \param p_instance the instance to pause
171 * \param p_exception an initialized exception
173 VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
176 * Checks if the playlist is running
177 * \param p_instance the instance
178 * \param p_exception an initialized exception
179 * \return 0 if the playlist is stopped or paused, 1 if it is running
181 VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
184 * Get the number of items in the playlist
185 * \param p_instance the instance
186 * \param p_exception an initialized exception
187 * \return the number of items
189 VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
192 * Lock the playlist instance
193 * \param p_instance the instance
195 VLC_PUBLIC_API void libvlc_playlist_lock( libvlc_instance_t * );
198 * Unlock the playlist instance
199 * \param p_instance the instance
201 VLC_PUBLIC_API void libvlc_playlist_unlock( libvlc_instance_t * );
205 * \param p_instance the instance to stop
206 * \param p_exception an initialized exception
208 VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * );
211 * Go to next playlist item (starts playback if it was stopped)
212 * \param p_instance the instance to use
213 * \param p_exception an initialized exception
215 VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * );
218 * Go to previous playlist item (starts playback if it was stopped)
219 * \param p_instance the instance to use
220 * \param p_exception an initialized exception
222 VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * );
225 * Remove all playlist items
226 * \param p_instance the instance
227 * \param p_exception an initialized exception
229 VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
232 * Add an item at the end of the playlist
233 * If you need more advanced options, \see libvlc_playlist_add_extended
234 * \param p_instance the instance
235 * \param psz_uri the URI to open, using VLC format
236 * \param psz_name a name that you might want to give or NULL
237 * \return the identifier of the new item
239 VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
240 libvlc_exception_t * );
243 * Add an item at the end of the playlist, with additional input options
244 * \param p_instance the instance
245 * \param psz_uri the URI to open, using VLC format
246 * \param psz_name a name that you might want to give or NULL
247 * \param i_options the number of options to add
248 * \param ppsz_options strings representing the options to add
249 * \param p_exception an initialized exception
250 * \return the identifier of the new item
252 VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
253 const char *, int, const char **,
254 libvlc_exception_t * );
257 * Delete the playlist item with the given ID.
258 * \param p_instance the instance
259 * \param i_id the id to remove
260 * \param p_exception an initialized exception
263 VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
264 libvlc_exception_t * );
266 typedef struct libvlc_input_t libvlc_input_t;
268 /* Get the input that is currently being played by the playlist
269 * \param p_instance the instance to use
270 * \param p_exception an initialized excecption
271 * \return an input object
273 VLC_PUBLIC_API libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *,
274 libvlc_exception_t * );
278 /*****************************************************************************
280 *****************************************************************************/
281 /** defgroup libvlc_input Input
283 * LibVLC Input handling
287 /** Free an input object
288 * \param p_input the input to free
290 VLC_PUBLIC_API void libvlc_input_free( libvlc_input_t * );
292 /// \bug This might go away ... to be replaced by a broader system
293 VLC_PUBLIC_API vlc_int64_t libvlc_input_get_length ( libvlc_input_t *, libvlc_exception_t *);
294 VLC_PUBLIC_API vlc_int64_t libvlc_input_get_time ( libvlc_input_t *, libvlc_exception_t *);
295 VLC_PUBLIC_API void libvlc_input_set_time ( libvlc_input_t *, vlc_int64_t, libvlc_exception_t *);
296 VLC_PUBLIC_API float libvlc_input_get_position ( libvlc_input_t *, libvlc_exception_t *);
297 VLC_PUBLIC_API void libvlc_input_set_position ( libvlc_input_t *, float, libvlc_exception_t *);
298 VLC_PUBLIC_API vlc_bool_t libvlc_input_will_play ( libvlc_input_t *, libvlc_exception_t *);
299 VLC_PUBLIC_API float libvlc_input_get_rate ( libvlc_input_t *, libvlc_exception_t *);
300 VLC_PUBLIC_API void libvlc_input_set_rate ( libvlc_input_t *, float, libvlc_exception_t *);
301 VLC_PUBLIC_API int libvlc_input_get_state ( libvlc_input_t *, libvlc_exception_t *);
305 /** defgroup libvlc_video Video
307 * LibVLC Video handling
312 * Downcast to this general type as placeholder for a platform specific one, such as:
314 * CGrafPort on MacOSX,
317 typedef int libvlc_drawable_t;
320 * Rectangle type for video geometry
330 * Does this input have a video output ?
331 * \param p_input the input
332 * \param p_exception an initialized exception
334 VLC_PUBLIC_API vlc_bool_t libvlc_input_has_vout( libvlc_input_t *, libvlc_exception_t *);
335 VLC_PUBLIC_API float libvlc_input_get_fps( libvlc_input_t *, libvlc_exception_t *);
338 * Toggle fullscreen status on video output
339 * \param p_input the input
340 * \param p_exception an initialized exception
342 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * );
345 * Enable or disable fullscreen on a video output
346 * \param p_input the input
347 * \param b_fullscreen boolean for fullscreen status
348 * \param p_exception an initialized exception
350 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * );
353 * Get current fullscreen status
354 * \param p_input the input
355 * \param p_exception an initialized exception
356 * \return the fullscreen status (boolean)
358 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * );
361 * Get current video height
362 * \param p_input the input
363 * \param p_exception an initialized exception
364 * \return the video height
366 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * );
369 * Get current video width
370 * \param p_input the input
371 * \param p_exception an initialized exception
372 * \return the video width
374 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * );
377 * Get current video aspect ratio
378 * \param p_input the input
379 * \param p_exception an initialized exception
380 * \return the video aspect ratio
382 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
385 * Set new video aspect ratio
386 * \param p_input the input
387 * \param psz_aspect new video aspect-ratio
388 * \param p_exception an initialized exception
390 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * );
393 * Get current video subtitle
394 * \param p_input the input
395 * \param p_exception an initialized exception
396 * \return the video subtitle selected
398 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_input_t *, libvlc_exception_t * );
401 * Set new video subtitle
402 * \param p_input the input
403 * \param i_spu new video subtitle to select
404 * \param p_exception an initialized exception
406 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_input_t *, int , libvlc_exception_t * );
409 * Get current crop filter geometry
410 * \param p_input the input
411 * \param p_exception an initialized exception
412 * \return the crop filter geometry
414 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * );
417 * Set new crop filter geometry
418 * \param p_input the input
419 * \param psz_geometry new crop filter geometry
420 * \param p_exception an initialized exception
422 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_t * );
425 * Take a snapshot of the current video window
426 * \param p_input the input
427 * \param psz_filepath the path where to save the screenshot to
428 * \param p_exception an initialized exception
430 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * );
432 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *);
435 * Resize the current video output window
436 * \param p_instance libvlc instance
437 * \param width new width for video output window
438 * \param height new height for video output window
439 * \param p_exception an initialized exception
440 * \return the success status (boolean)
442 VLC_PUBLIC_API void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *);
445 * change the parent for the current the video output
446 * \param p_instance libvlc instance
447 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
448 * \param p_exception an initialized exception
449 * \return the success status (boolean)
451 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * );
454 * Tell windowless video output to redraw rectangular area (MacOS X only)
455 * \param p_instance libvlc instance
456 * \param area coordinates within video drawable
457 * \param p_exception an initialized exception
459 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_input_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
462 * Set the default video output parent
463 * this settings will be used as default for all video outputs
464 * \param p_instance libvlc instance
465 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
466 * \param p_exception an initialized exception
468 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
471 * Set the default video output parent
472 * this settings will be used as default for all video outputs
473 * \param p_instance libvlc instance
474 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
475 * \param p_exception an initialized exception
477 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
480 * Set the default video output size
481 * this settings will be used as default for all video outputs
482 * \param p_instance libvlc instance
483 * \param width new width for video drawable
484 * \param height new height for video drawable
485 * \param p_exception an initialized exception
487 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
490 * Set the default video output viewport for a windowless video output (MacOS X only)
491 * this settings will be used as default for all video outputs
492 * \param p_instance libvlc instance
493 * \param view coordinates within video drawable
494 * \param clip coordinates within video drawable
495 * \param p_exception an initialized exception
497 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
502 * defgroup libvlc_vlm VLM
504 * LibVLC VLM handling
508 /** defgroup libvlc_audio Audio
510 * LibVLC Audio handling
516 * \param p_instance libvlc instance
517 * \param p_exception an initialized exception
520 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
523 * Get current mute status
524 * \param p_instance libvlc instance
525 * \param p_exception an initialized exception
526 * \return the mute status (boolean)
528 VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
532 * \param p_instance libvlc instance
533 * \param status If status is VLC_TRUE then mute, otherwise unmute
534 * \param p_exception an initialized exception
537 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
540 * Get current audio level
541 * \param p_instance libvlc instance
542 * \param p_exception an initialized exception
543 * \return the audio level (int)
545 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
548 * Set current audio level
549 * \param p_instance libvlc instance
550 * \param i_volume the volume (int)
551 * \param p_exception an initialized exception
553 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
556 + * Get current audio track
557 + * \param p_input input instance
558 + * \param p_exception an initialized exception
559 + * \return the audio track (int)
561 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * );
564 * Set current audio track
565 * \param p_input input instance
566 * \param i_track the track (int)
567 * \param p_exception an initialized exception
569 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * );
572 * Get current audio channel
573 * \param p_instance input instance
574 * \param p_exception an initialized exception
575 * \return the audio channel (int)
577 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
580 * Set current audio channel
581 * \param p_instance input instance
582 * \param i_channel the audio channel (int)
583 * \param p_exception an initialized exception
585 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
591 * Add a broadcast, with one input
592 * \param p_instance the instance
593 * \param psz_name the name of the new broadcast
594 * \param psz_input the input MRL
595 * \param psz_output the output MRL (the parameter to the "sout" variable)
596 * \param i_options number of additional options
597 * \param ppsz_options additional options
598 * \param b_enabled boolean for enabling the new broadcast
599 * \param b_loop Should this broadcast be played in loop ?
600 * \param p_exception an initialized exception
602 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
603 int, char **, int, int, libvlc_exception_t * );
606 * Delete a media (vod or broadcast)
607 * \param p_instance the instance
608 * \param psz_name the media to delete
609 * \param p_exception an initialized exception
611 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
614 * Enable or disable a media (vod or broadcast)
615 * \param p_instance the instance
616 * \param psz_name the media to work on
617 * \param b_enabled the new status
618 * \param p_exception an initialized exception
620 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
621 libvlc_exception_t *);
624 * Set the output for a media
625 * \param p_instance the instance
626 * \param psz_name the media to work on
627 * \param psz_output the output MRL (the parameter to the "sout" variable)
628 * \param p_exception an initialized exception
630 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
631 libvlc_exception_t *);
634 * Set a media's input MRL. This will delete all existing inputs and
635 * add the specified one.
636 * \param p_instance the instance
637 * \param psz_name the media to work on
638 * \param psz_input the input MRL
639 * \param p_exception an initialized exception
641 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
642 libvlc_exception_t *);
645 * Add a media's input MRL. This will add the specified one.
646 * \param p_instance the instance
647 * \param psz_name the media to work on
648 * \param psz_input the input MRL
649 * \param p_exception an initialized exception
651 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
652 libvlc_exception_t *p_exception );
654 * Set output for a media
655 * \param p_instance the instance
656 * \param psz_name the media to work on
657 * \param b_loop the new status
658 * \param p_exception an initialized exception
660 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
661 libvlc_exception_t *);
664 * Edit the parameters of a media. This will delete all existing inputs and
665 * add the specified one.
666 * \param p_instance the instance
667 * \param psz_name the name of the new broadcast
668 * \param psz_input the input MRL
669 * \param psz_output the output MRL (the parameter to the "sout" variable)
670 * \param i_options number of additional options
671 * \param ppsz_options additional options
672 * \param b_enabled boolean for enabling the new broadcast
673 * \param b_loop Should this broadcast be played in loop ?
674 * \param p_exception an initialized exception
676 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
677 int, char **, int, int, libvlc_exception_t * );
680 * Plays the named broadcast.
681 * \param p_instance the instance
682 * \param psz_name the name of the broadcast
683 * \param p_exception an initialized exception
685 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
688 * Stops the named broadcast.
689 * \param p_instance the instance
690 * \param psz_name the name of the broadcast
691 * \param p_exception an initialized exception
693 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
696 * Pauses the named broadcast.
697 * \param p_instance the instance
698 * \param psz_name the name of the broadcast
699 * \param p_exception an initialized exception
701 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
704 * Seeks in the named broadcast.
705 * \param p_instance the instance
706 * \param psz_name the name of the broadcast
707 * \param f_percentage the percentage to seek to
708 * \param p_exception an initialized exception
710 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
711 float, libvlc_exception_t * );
714 * Return information of the named broadcast.
715 * \param p_instance the instance
716 * \param psz_name the name of the broadcast
717 * \param p_exception an initialized exception
719 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
721 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
722 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
723 char *, int , libvlc_exception_t * );
725 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
726 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
727 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
728 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
729 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
730 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
731 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
733 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
738 /*****************************************************************************
739 * Message log handling
740 *****************************************************************************/
742 /** defgroup libvlc_log Log
744 * LibVLC Message Logging
748 /** This structure is opaque. It represents a libvlc log instance */
749 typedef struct libvlc_log_t libvlc_log_t;
751 /** This structure is opaque. It represents a libvlc log iterator */
752 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
754 typedef struct libvlc_log_message_t
756 unsigned sizeof_msg; /* sizeof() of message structure, must be filled in by user */
757 int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
758 const char *psz_type; /* module type */
759 const char *psz_name; /* module name */
760 const char *psz_header; /* optional header */
761 const char *psz_message; /* message */
762 } libvlc_log_message_t;
765 * Returns the VLC messaging verbosity level
766 * \param p_instance libvlc instance
767 * \param exception an initialized exception pointer
769 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
770 libvlc_exception_t *p_e );
773 * Set the VLC messaging verbosity level
774 * \param p_log libvlc log instance
775 * \param exception an initialized exception pointer
777 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
778 libvlc_exception_t *p_e );
781 * Open an instance to VLC message log
782 * \param p_instance libvlc instance
783 * \param exception an initialized exception pointer
785 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
788 * Close an instance of VLC message log
789 * \param p_log libvlc log instance
790 * \param exception an initialized exception pointer
792 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
795 * Returns the number of messages in log
796 * \param p_log libvlc log instance
797 * \param exception an initialized exception pointer
799 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
802 * Clear all messages in log
803 * the log should be cleared on a regular basis to avoid clogging
804 * \param p_log libvlc log instance
805 * \param exception an initialized exception pointer
807 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
810 * Allocate and returns a new iterator to messages in log
811 * \param p_log libvlc log instance
812 * \param exception an initialized exception pointer
814 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
817 * Releases a previoulsy allocated iterator
818 * \param p_log libvlc log iterator
819 * \param exception an initialized exception pointer
821 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
824 * Returns whether log iterator has more messages
825 * \param p_log libvlc log iterator
826 * \param exception an initialized exception pointer
828 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
831 * Returns next log message
832 * the content of message must not be freed
833 * \param p_log libvlc log iterator
834 * \param exception an initialized exception pointer
836 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
837 struct libvlc_log_message_t *buffer,
838 libvlc_exception_t *p_e );
846 #endif /* <vlc/libvlc.h> */