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.
37 #include <vlc/libvlc_structures.h>
43 /*****************************************************************************
45 *****************************************************************************/
46 /** defgroup libvlc_exception Exceptions
48 * LibVLC Exceptions handling
53 * Initialize an exception structure. This can be called several times to reuse
54 * an exception structure.
55 * \param p_exception the exception to initialize
57 VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
60 * Has an exception been raised ?
61 * \param p_exception the exception to query
62 * \return 0 if no exception raised, 1 else
64 VLC_PUBLIC_API int libvlc_exception_raised( libvlc_exception_t *p_exception );
68 * \param p_exception the exception to raise
69 * \param psz_message the exception message
71 VLC_PUBLIC_API void libvlc_exception_raise( libvlc_exception_t *p_exception, const char *psz_format, ... );
74 * Clear an exception object so it can be reused.
75 * The exception object must be initialized
76 * \param p_exception the exception to clear
78 VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
81 * Get exception message
82 * \param p_exception the exception to query
83 * \return the exception message or NULL if not applicable (exception not raised
86 VLC_PUBLIC_API char* libvlc_exception_get_message( libvlc_exception_t *p_exception );
90 /*****************************************************************************
92 *****************************************************************************/
94 /** defgroup libvlc_core Core
101 * Create an initialized libvlc instance
102 * \param argc the number of arguments
103 * \param argv command-line-type arguments
104 * \param exception an initialized exception pointer
106 VLC_PUBLIC_API libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);
109 * Returns a libvlc instance identifier for legacy APIs. Use of this
110 * function is discouraged, you should convert your program to use the
112 * \param p_instance the instance
114 VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
117 * Destroy a libvlc instance.
118 * \param p_instance the instance to destroy
120 VLC_PUBLIC_API void libvlc_destroy( libvlc_instance_t *, libvlc_exception_t * );
124 /*****************************************************************************
126 *****************************************************************************/
127 /** defgroup libvlc_playlist Playlist
129 * LibVLC Playlist handling
136 VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t,
137 libvlc_exception_t * );
140 * Start playing. You can give some additionnal playlist item options
141 * that will be added to the item before playing it.
142 * \param p_instance the instance
143 * \param i_id the item to play. If this is a negative number, the next
144 * item will be selected. Else, the item with the given ID will be played
145 * \param i_options the number of options to add to the item
146 * \param ppsz_options the options to add to the item
147 * \param p_exception an initialized exception
149 VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
150 libvlc_exception_t * );
153 * Pause a running playlist, resume if it was stopped
154 * \param p_instance the instance to pause
155 * \param p_exception an initialized exception
157 VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
160 * Checks if the playlist is running
161 * \param p_instance the instance
162 * \param p_exception an initialized exception
163 * \return 0 if the playlist is stopped or paused, 1 if it is running
165 VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
168 * Get the number of items in the playlist
169 * \param p_instance the instance
170 * \param p_exception an initialized exception
171 * \return the number of items
173 VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
176 * Lock the playlist instance
177 * \param p_instance the instance
179 VLC_PUBLIC_API void libvlc_playlist_lock( libvlc_instance_t * );
182 * Unlock the playlist instance
183 * \param p_instance the instance
185 VLC_PUBLIC_API void libvlc_playlist_unlock( libvlc_instance_t * );
189 * \param p_instance the instance to stop
190 * \param p_exception an initialized exception
192 VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * );
195 * Go to next playlist item (starts playback if it was stopped)
196 * \param p_instance the instance to use
197 * \param p_exception an initialized exception
199 VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * );
202 * Go to previous playlist item (starts playback if it was stopped)
203 * \param p_instance the instance to use
204 * \param p_exception an initialized exception
206 VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * );
209 * Remove all playlist items
210 * \param p_instance the instance
211 * \param p_exception an initialized exception
213 VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
216 * Add an item at the end of the playlist
217 * If you need more advanced options, \see libvlc_playlist_add_extended
218 * \param p_instance the instance
219 * \param psz_uri the URI to open, using VLC format
220 * \param psz_name a name that you might want to give or NULL
221 * \return the identifier of the new item
223 VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
224 libvlc_exception_t * );
227 * Add an item at the end of the playlist, with additional input options
228 * \param p_instance the instance
229 * \param psz_uri the URI to open, using VLC format
230 * \param psz_name a name that you might want to give or NULL
231 * \param i_options the number of options to add
232 * \param ppsz_options strings representing the options to add
233 * \param p_exception an initialized exception
234 * \return the identifier of the new item
236 VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
237 const char *, int, const char **,
238 libvlc_exception_t * );
241 * Delete the playlist item with the given ID.
242 * \param p_instance the instance
243 * \param i_id the id to remove
244 * \param p_exception an initialized exception
247 VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
248 libvlc_exception_t * );
250 typedef struct libvlc_input_t libvlc_input_t;
252 /* Get the input that is currently being played by the playlist
253 * \param p_instance the instance to use
254 * \param p_exception an initialized excecption
255 * \return an input object
257 VLC_PUBLIC_API libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *,
258 libvlc_exception_t * );
262 /*****************************************************************************
264 *****************************************************************************/
265 /** defgroup libvlc_input Input
267 * LibVLC Input handling
271 /** Free an input object
272 * \param p_input the input to free
274 VLC_PUBLIC_API void libvlc_input_free( libvlc_input_t * );
276 /// \bug This might go away ... to be replaced by a broader system
277 VLC_PUBLIC_API vlc_int64_t libvlc_input_get_length ( libvlc_input_t *, libvlc_exception_t *);
278 VLC_PUBLIC_API vlc_int64_t libvlc_input_get_time ( libvlc_input_t *, libvlc_exception_t *);
279 VLC_PUBLIC_API void libvlc_input_set_time ( libvlc_input_t *, vlc_int64_t, libvlc_exception_t *);
280 VLC_PUBLIC_API float libvlc_input_get_position ( libvlc_input_t *, libvlc_exception_t *);
281 VLC_PUBLIC_API void libvlc_input_set_position ( libvlc_input_t *, float, libvlc_exception_t *);
282 VLC_PUBLIC_API vlc_bool_t libvlc_input_will_play ( libvlc_input_t *, libvlc_exception_t *);
283 VLC_PUBLIC_API float libvlc_input_get_rate ( libvlc_input_t *, libvlc_exception_t *);
284 VLC_PUBLIC_API void libvlc_input_set_rate ( libvlc_input_t *, float, libvlc_exception_t *);
285 VLC_PUBLIC_API int libvlc_input_get_state ( libvlc_input_t *, libvlc_exception_t *);
289 /** defgroup libvlc_video Video
291 * LibVLC Video handling
296 * Does this input have a video output ?
297 * \param p_input the input
298 * \param p_exception an initialized exception
300 VLC_PUBLIC_API vlc_bool_t libvlc_input_has_vout( libvlc_input_t *, libvlc_exception_t *);
301 VLC_PUBLIC_API float libvlc_input_get_fps( libvlc_input_t *, libvlc_exception_t *);
304 * Toggle fullscreen status on video output
305 * \param p_input the input
306 * \param p_exception an initialized exception
308 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_input_t *, libvlc_exception_t * );
311 * Enable or disable fullscreen on a video output
312 * \param p_input the input
313 * \param b_fullscreen boolean for fullscreen status
314 * \param p_exception an initialized exception
316 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_input_t *, int, libvlc_exception_t * );
319 * Get current fullscreen status
320 * \param p_input the input
321 * \param p_exception an initialized exception
322 * \return the fullscreen status (boolean)
324 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_input_t *, libvlc_exception_t * );
327 * Get current video height
328 * \param p_input the input
329 * \param p_exception an initialized exception
330 * \return the video height
332 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_input_t *, libvlc_exception_t * );
335 * Get current video width
336 * \param p_input the input
337 * \param p_exception an initialized exception
338 * \return the video width
340 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_input_t *, libvlc_exception_t * );
343 * Get current video aspect ratio
344 * \param p_input the input
345 * \param p_exception an initialized exception
346 * \return the video aspect ratio
348 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
351 * Set new video aspect ratio
352 * \param p_input the input
353 * \param psz_aspect new video aspect-ratio
354 * \param p_exception an initialized exception
356 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * );
359 * Get current video subtitle
360 * \param p_input the input
361 * \param p_exception an initialized exception
362 * \return the video subtitle selected
364 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_input_t *, libvlc_exception_t * );
367 * Set new video subtitle
368 * \param p_input the input
369 * \param i_spu new video subtitle to select
370 * \param p_exception an initialized exception
372 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_input_t *, int , libvlc_exception_t * );
375 * Get current crop filter geometry
376 * \param p_input the input
377 * \param p_exception an initialized exception
378 * \return the crop filter geometry
380 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * );
383 * Set new crop filter geometry
384 * \param p_input the input
385 * \param psz_geometry new crop filter geometry
386 * \param p_exception an initialized exception
388 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_t * );
391 * Take a snapshot of the current video window
392 * \param p_input the input
393 * \param psz_filepath the path where to save the screenshot to
394 * \param p_exception an initialized exception
396 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_input_t *, char *, libvlc_exception_t * );
398 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_input_t *, libvlc_exception_t *);
401 * Resize the current video output window
402 * \param p_instance libvlc instance
403 * \param width new width for video output window
404 * \param height new height for video output window
405 * \param p_exception an initialized exception
406 * \return the success status (boolean)
408 VLC_PUBLIC_API void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *);
411 * change the parent for the current the video output
412 * \param p_instance libvlc instance
413 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
414 * \param p_exception an initialized exception
415 * \return the success status (boolean)
417 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_input_t *, libvlc_drawable_t, libvlc_exception_t * );
420 * Tell windowless video output to redraw rectangular area (MacOS X only)
421 * \param p_instance libvlc instance
422 * \param area coordinates within video drawable
423 * \param p_exception an initialized exception
425 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_input_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
428 * Set the default video output parent
429 * this settings will be used as default for all video outputs
430 * \param p_instance libvlc instance
431 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
432 * \param p_exception an initialized exception
434 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
437 * Set the default video output parent
438 * this settings will be used as default for all video outputs
439 * \param p_instance libvlc instance
440 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
441 * \param p_exception an initialized exception
443 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
446 * Set the default video output size
447 * this settings will be used as default for all video outputs
448 * \param p_instance libvlc instance
449 * \param width new width for video drawable
450 * \param height new height for video drawable
451 * \param p_exception an initialized exception
453 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
456 * Set the default video output viewport for a windowless video output (MacOS X only)
457 * this settings will be used as default for all video outputs
458 * \param p_instance libvlc instance
459 * \param view coordinates within video drawable
460 * \param clip coordinates within video drawable
461 * \param p_exception an initialized exception
463 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
468 * defgroup libvlc_vlm VLM
470 * LibVLC VLM handling
474 /** defgroup libvlc_audio Audio
476 * LibVLC Audio handling
482 * \param p_instance libvlc instance
483 * \param p_exception an initialized exception
486 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
489 * Get current mute status
490 * \param p_instance libvlc instance
491 * \param p_exception an initialized exception
492 * \return the mute status (boolean)
494 VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
498 * \param p_instance libvlc instance
499 * \param status If status is VLC_TRUE then mute, otherwise unmute
500 * \param p_exception an initialized exception
503 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
506 * Get current audio level
507 * \param p_instance libvlc instance
508 * \param p_exception an initialized exception
509 * \return the audio level (int)
511 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
514 * Set current audio level
515 * \param p_instance libvlc instance
516 * \param i_volume the volume (int)
517 * \param p_exception an initialized exception
519 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
522 + * Get current audio track
523 + * \param p_input input instance
524 + * \param p_exception an initialized exception
525 + * \return the audio track (int)
527 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_input_t *, libvlc_exception_t * );
530 * Set current audio track
531 * \param p_input input instance
532 * \param i_track the track (int)
533 * \param p_exception an initialized exception
535 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_input_t *, int, libvlc_exception_t * );
538 * Get current audio channel
539 * \param p_instance input instance
540 * \param p_exception an initialized exception
541 * \return the audio channel (int)
543 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
546 * Set current audio channel
547 * \param p_instance input instance
548 * \param i_channel the audio channel (int)
549 * \param p_exception an initialized exception
551 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
557 * Add a broadcast, with one input
558 * \param p_instance the instance
559 * \param psz_name the name of the new broadcast
560 * \param psz_input the input MRL
561 * \param psz_output the output MRL (the parameter to the "sout" variable)
562 * \param i_options number of additional options
563 * \param ppsz_options additional options
564 * \param b_enabled boolean for enabling the new broadcast
565 * \param b_loop Should this broadcast be played in loop ?
566 * \param p_exception an initialized exception
568 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
569 int, char **, int, int, libvlc_exception_t * );
572 * Delete a media (vod or broadcast)
573 * \param p_instance the instance
574 * \param psz_name the media to delete
575 * \param p_exception an initialized exception
577 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
580 * Enable or disable a media (vod or broadcast)
581 * \param p_instance the instance
582 * \param psz_name the media to work on
583 * \param b_enabled the new status
584 * \param p_exception an initialized exception
586 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
587 libvlc_exception_t *);
590 * Set the output for a media
591 * \param p_instance the instance
592 * \param psz_name the media to work on
593 * \param psz_output the output MRL (the parameter to the "sout" variable)
594 * \param p_exception an initialized exception
596 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
597 libvlc_exception_t *);
600 * Set a media's input MRL. This will delete all existing inputs and
601 * add the specified one.
602 * \param p_instance the instance
603 * \param psz_name the media to work on
604 * \param psz_input the input MRL
605 * \param p_exception an initialized exception
607 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
608 libvlc_exception_t *);
611 * Add a media's input MRL. This will add the specified one.
612 * \param p_instance the instance
613 * \param psz_name the media to work on
614 * \param psz_input the input MRL
615 * \param p_exception an initialized exception
617 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
618 libvlc_exception_t *p_exception );
620 * Set output for a media
621 * \param p_instance the instance
622 * \param psz_name the media to work on
623 * \param b_loop the new status
624 * \param p_exception an initialized exception
626 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
627 libvlc_exception_t *);
630 * Edit the parameters of a media. This will delete all existing inputs and
631 * add the specified one.
632 * \param p_instance the instance
633 * \param psz_name the name of the new broadcast
634 * \param psz_input the input MRL
635 * \param psz_output the output MRL (the parameter to the "sout" variable)
636 * \param i_options number of additional options
637 * \param ppsz_options additional options
638 * \param b_enabled boolean for enabling the new broadcast
639 * \param b_loop Should this broadcast be played in loop ?
640 * \param p_exception an initialized exception
642 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
643 int, char **, int, int, libvlc_exception_t * );
646 * Plays the named broadcast.
647 * \param p_instance the instance
648 * \param psz_name the name of the broadcast
649 * \param p_exception an initialized exception
651 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
654 * Stops the named broadcast.
655 * \param p_instance the instance
656 * \param psz_name the name of the broadcast
657 * \param p_exception an initialized exception
659 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
662 * Pauses the named broadcast.
663 * \param p_instance the instance
664 * \param psz_name the name of the broadcast
665 * \param p_exception an initialized exception
667 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
670 * Seeks in the named broadcast.
671 * \param p_instance the instance
672 * \param psz_name the name of the broadcast
673 * \param f_percentage the percentage to seek to
674 * \param p_exception an initialized exception
676 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
677 float, libvlc_exception_t * );
680 * Return information of 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 char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
687 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
688 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
689 char *, int , libvlc_exception_t * );
691 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
692 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
693 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
694 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
695 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
696 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
697 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
699 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
704 /*****************************************************************************
705 * Message log handling
706 *****************************************************************************/
708 /** defgroup libvlc_log Log
710 * LibVLC Message Logging
715 * Returns the VLC messaging verbosity level
716 * \param p_instance libvlc instance
717 * \param exception an initialized exception pointer
719 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
720 libvlc_exception_t *p_e );
723 * Set the VLC messaging verbosity level
724 * \param p_log libvlc log instance
725 * \param exception an initialized exception pointer
727 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
728 libvlc_exception_t *p_e );
731 * Open an instance to VLC message log
732 * \param p_instance libvlc instance
733 * \param exception an initialized exception pointer
735 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
738 * Close an instance of VLC message log
739 * \param p_log libvlc log instance
740 * \param exception an initialized exception pointer
742 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
745 * Returns the number of messages in log
746 * \param p_log libvlc log instance
747 * \param exception an initialized exception pointer
749 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
752 * Clear all messages in log
753 * the log should be cleared on a regular basis to avoid clogging
754 * \param p_log libvlc log instance
755 * \param exception an initialized exception pointer
757 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
760 * Allocate and returns a new iterator to messages in log
761 * \param p_log libvlc log instance
762 * \param exception an initialized exception pointer
764 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
767 * Releases a previoulsy allocated iterator
768 * \param p_log libvlc log iterator
769 * \param exception an initialized exception pointer
771 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
774 * Returns whether log iterator has more messages
775 * \param p_log libvlc log iterator
776 * \param exception an initialized exception pointer
778 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
781 * Returns next log message
782 * the content of message must not be freed
783 * \param p_log libvlc log iterator
784 * \param exception an initialized exception pointer
786 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
787 struct libvlc_log_message_t *buffer,
788 libvlc_exception_t *p_e );
792 /*****************************************************************************
794 *****************************************************************************/
796 /** defgroup libvlc_callbacks Callbacks
798 * LibVLC Event Callbacks
803 * Register for a callback notification
804 * \param p_instance the libvlc instance
805 * \param i_event_type the desired event mask to which we want to listen
806 * \param f_callback the function to call when i_event_type occurs
807 * \param user_data user provided data to carry with the event
808 * \param p_e an initialized exception pointer
810 VLC_PUBLIC_API void libvlc_callback_register_for_event( libvlc_instance_t *p_instance,
811 libvlc_event_type_t i_event_type,
812 libvlc_callback_t f_callback,
814 libvlc_exception_t *p_e );
817 * Unregister a callback notification
818 * \param p_instance the libvlc instance
819 * \param i_event_type the desired event mask to which we want to unregister
820 * \param f_callback the function to call when i_event_type occurs
821 * \param p_e an initialized exception pointer
823 VLC_PUBLIC_API void libvlc_callback_unregister_for_event( libvlc_instance_t *p_instance,
824 libvlc_event_type_t i_event_type,
825 libvlc_callback_t f_callback,
826 libvlc_exception_t *p_e );
835 #endif /* <vlc/libvlc.h> */