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 * Set the default video output parent
455 * this settings will be used as default for all video outputs
456 * \param p_instance libvlc instance
457 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
458 * \param p_exception an initialized exception
460 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
463 * Set the default video output parent
464 * this settings will be used as default for all video outputs
465 * \param p_instance libvlc instance
466 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
467 * \param p_exception an initialized exception
469 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
472 * Set the default video output size
473 * this settings will be used as default for all video outputs
474 * \param p_instance libvlc instance
475 * \param width new width for video drawable
476 * \param height new height for video drawable
477 * \param p_exception an initialized exception
479 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
482 * Set the default video output viewport for a windowless video output (MacOS X only)
483 * this settings will be used as default for all video outputs
484 * \param p_instance libvlc instance
485 * \param view coordinates within video drawable
486 * \param clip coordinates within video drawable
487 * \param p_exception an initialized exception
489 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
495 * defgroup libvlc_vlm VLM
497 * LibVLC VLM handling
501 /** defgroup libvlc_audio Audio
503 * LibVLC Audio handling
509 * \param p_instance libvlc instance
510 * \param p_exception an initialized exception
513 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
516 * Get current mute status
517 * \param p_instance libvlc instance
518 * \param p_exception an initialized exception
519 * \return the mute status (boolean)
521 VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
525 * \param p_instance libvlc instance
526 * \param status If status is VLC_TRUE then mute, otherwise unmute
527 * \param p_exception an initialized exception
530 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
533 * Get current audio level
534 * \param p_instance libvlc instance
535 * \param p_exception an initialized exception
536 * \return the audio level (int)
538 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
541 * Set current audio level
542 * \param p_instance libvlc instance
543 * \param i_volume the volume (int)
544 * \param p_exception an initialized exception
546 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
549 + * Get current audio track
550 + * \param p_input input instance
551 + * \param p_exception an initialized exception
552 + * \return the audio track (int)
554 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * );
557 * Set current audio track
558 * \param p_input input instance
559 * \param i_track the track (int)
560 * \param p_exception an initialized exception
562 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * );
565 * Get current audio channel
566 * \param p_instance input instance
567 * \param p_exception an initialized exception
568 * \return the audio channel (int)
570 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
573 * Set current audio channel
574 * \param p_instance input instance
575 * \param i_channel the audio channel (int)
576 * \param p_exception an initialized exception
578 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
584 * Add a broadcast, with one input
585 * \param p_instance the instance
586 * \param psz_name the name of the new broadcast
587 * \param psz_input the input MRL
588 * \param psz_output the output MRL (the parameter to the "sout" variable)
589 * \param i_options number of additional options
590 * \param ppsz_options additional options
591 * \param b_enabled boolean for enabling the new broadcast
592 * \param b_loop Should this broadcast be played in loop ?
593 * \param p_exception an initialized exception
595 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
596 int, char **, int, int, libvlc_exception_t * );
599 * Delete a media (vod or broadcast)
600 * \param p_instance the instance
601 * \param psz_name the media to delete
602 * \param p_exception an initialized exception
604 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
607 * Enable or disable a media (vod or broadcast)
608 * \param p_instance the instance
609 * \param psz_name the media to work on
610 * \param b_enabled the new status
611 * \param p_exception an initialized exception
613 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
614 libvlc_exception_t *);
617 * Set the output for a media
618 * \param p_instance the instance
619 * \param psz_name the media to work on
620 * \param psz_output the output MRL (the parameter to the "sout" variable)
621 * \param p_exception an initialized exception
623 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
624 libvlc_exception_t *);
627 * Set a media's input MRL. This will delete all existing inputs and
628 * add the specified one.
629 * \param p_instance the instance
630 * \param psz_name the media to work on
631 * \param psz_input the input MRL
632 * \param p_exception an initialized exception
634 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
635 libvlc_exception_t *);
638 * Add a media's input MRL. This will add the specified one.
639 * \param p_instance the instance
640 * \param psz_name the media to work on
641 * \param psz_input the input MRL
642 * \param p_exception an initialized exception
644 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
645 libvlc_exception_t *p_exception );
647 * Set output for a media
648 * \param p_instance the instance
649 * \param psz_name the media to work on
650 * \param b_loop the new status
651 * \param p_exception an initialized exception
653 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
654 libvlc_exception_t *);
657 * Edit the parameters of a media. This will delete all existing inputs and
658 * add the specified one.
659 * \param p_instance the instance
660 * \param psz_name the name of the new broadcast
661 * \param psz_input the input MRL
662 * \param psz_output the output MRL (the parameter to the "sout" variable)
663 * \param i_options number of additional options
664 * \param ppsz_options additional options
665 * \param b_enabled boolean for enabling the new broadcast
666 * \param b_loop Should this broadcast be played in loop ?
667 * \param p_exception an initialized exception
669 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
670 int, char **, int, int, libvlc_exception_t * );
673 * Plays the named broadcast.
674 * \param p_instance the instance
675 * \param psz_name the name of the broadcast
676 * \param p_exception an initialized exception
678 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
681 * Stops the named broadcast.
682 * \param p_instance the instance
683 * \param psz_name the name of the broadcast
684 * \param p_exception an initialized exception
686 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
689 * Pauses the named broadcast.
690 * \param p_instance the instance
691 * \param psz_name the name of the broadcast
692 * \param p_exception an initialized exception
694 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
697 * Seeks in the named broadcast.
698 * \param p_instance the instance
699 * \param psz_name the name of the broadcast
700 * \param f_percentage the percentage to seek to
701 * \param p_exception an initialized exception
703 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
704 float, libvlc_exception_t * );
707 * Return information of the named broadcast.
708 * \param p_instance the instance
709 * \param psz_name the name of the broadcast
710 * \param p_exception an initialized exception
712 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
714 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
715 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
716 char *, int , libvlc_exception_t * );
718 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
719 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
720 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
721 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
722 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
723 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
724 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
726 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
731 /*****************************************************************************
732 * Message log handling
733 *****************************************************************************/
735 /** defgroup libvlc_log Log
737 * LibVLC Message Logging
741 /** This structure is opaque. It represents a libvlc log instance */
742 typedef struct libvlc_log_t libvlc_log_t;
744 /** This structure is opaque. It represents a libvlc log iterator */
745 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
747 typedef struct libvlc_log_message_t
749 unsigned sizeof_msg; /* sizeof() of message structure, must be filled in by user */
750 int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
751 const char *psz_type; /* module type */
752 const char *psz_name; /* module name */
753 const char *psz_header; /* optional header */
754 const char *psz_message; /* message */
755 } libvlc_log_message_t;
758 * Returns the VLC messaging verbosity level
759 * \param p_instance libvlc instance
760 * \param exception an initialized exception pointer
762 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
763 libvlc_exception_t *p_e );
766 * Set the VLC messaging verbosity level
767 * \param p_log libvlc log instance
768 * \param exception an initialized exception pointer
770 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
771 libvlc_exception_t *p_e );
774 * Open an instance to VLC message log
775 * \param p_instance libvlc instance
776 * \param exception an initialized exception pointer
778 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
781 * Close an instance of VLC message log
782 * \param p_log libvlc log instance
783 * \param exception an initialized exception pointer
785 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
788 * Returns the number of messages in log
789 * \param p_log libvlc log instance
790 * \param exception an initialized exception pointer
792 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
795 * Clear all messages in log
796 * the log should be cleared on a regular basis to avoid clogging
797 * \param p_log libvlc log instance
798 * \param exception an initialized exception pointer
800 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
803 * Allocate and returns a new iterator to messages in log
804 * \param p_log libvlc log instance
805 * \param exception an initialized exception pointer
807 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
810 * Releases a previoulsy allocated iterator
811 * \param p_log libvlc log iterator
812 * \param exception an initialized exception pointer
814 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
817 * Returns whether log iterator has more messages
818 * \param p_log libvlc log iterator
819 * \param exception an initialized exception pointer
821 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
824 * Returns next log message
825 * the content of message must not be freed
826 * \param p_log libvlc log iterator
827 * \param exception an initialized exception pointer
829 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
830 struct libvlc_log_message_t *buffer,
831 libvlc_exception_t *p_e );
839 #endif /* <vlc/libvlc.h> */