1 /*****************************************************************************
2 * libvlc.h: libvlc external API
3 *****************************************************************************
4 * Copyright (C) 1998-2005 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
8 * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
9 * Pierre d'Herbemont <pdherbemont@videolan.org>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
27 * \defgroup libvlc libvlc
28 * This is libvlc, the base library of the VLC program.
43 /*****************************************************************************
45 *****************************************************************************/
46 /** \defgroup libvlc_exception libvlc_exception
47 * \ingroup libvlc_core
48 * LibVLC Exceptions handling
53 * Initialize an exception structure. This can be called several times to
54 * reuse an exception structure.
56 * \param p_exception the exception to initialize
58 VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
61 * Has an exception been raised?
63 * \param p_exception the exception to query
64 * \return 0 if the exception was raised, 1 otherwise
67 libvlc_exception_raised( const libvlc_exception_t *p_exception );
70 * Raise an exception using a user-provided message.
72 * \param p_exception the exception to raise
73 * \param psz_format the exception message format string
74 * \param ... the format string arguments
77 libvlc_exception_raise( libvlc_exception_t *p_exception,
78 const char *psz_format, ... );
81 * Clear an exception object so it can be reused.
82 * The exception object must have be initialized.
84 * \param p_exception the exception to clear
86 VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
89 * Get an exception's message.
91 * \param p_exception the exception to query
92 * \return the exception message or NULL if not applicable (exception not
93 * raised, for example)
95 VLC_PUBLIC_API const char *
96 libvlc_exception_get_message( const libvlc_exception_t *p_exception );
100 /*****************************************************************************
102 *****************************************************************************/
104 /** \defgroup libvlc_core libvlc_core
111 * Create and initialize a libvlc instance.
113 * \param argc the number of arguments
114 * \param argv command-line-type arguments. argv[0] must be the path of the
116 * \param p_e an initialized exception pointer
117 * \return the libvlc instance
119 VLC_PUBLIC_API libvlc_instance_t *
120 libvlc_new( int , const char *const *, libvlc_exception_t *);
123 * Return a libvlc instance identifier for legacy APIs. Use of this
124 * function is discouraged, you should convert your program to use the
127 * \param p_instance the instance
128 * \return the instance identifier
130 VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
133 * Decrement the reference count of a libvlc instance, and destroy it
134 * if it reaches zero.
136 * \param p_instance the instance to destroy
138 VLC_PUBLIC_API void libvlc_release( libvlc_instance_t * );
141 * Increments the reference count of a libvlc instance.
142 * The initial reference count is 1 after libvlc_new() returns.
144 * \param p_instance the instance to reference
146 VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
149 * Retrieve libvlc version.
151 * Example: "0.9.0-git Grishenko"
153 * \return a string containing the libvlc version
155 VLC_PUBLIC_API const char * libvlc_get_version();
158 * Retrieve libvlc compiler version.
160 * Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"
162 * \return a string containing the libvlc compiler version
164 VLC_PUBLIC_API const char * libvlc_get_compiler();
167 * Retrieve libvlc changeset.
169 * Example: "aa9bce0bc4"
171 * \return a string containing the libvlc changeset
173 VLC_PUBLIC_API const char * libvlc_get_changeset();
177 /*****************************************************************************
179 *****************************************************************************/
180 /** \defgroup libvlc_media libvlc_media
187 * Create a media with the given MRL.
189 * \param p_instance the instance
190 * \param psz_mrl the MRL to read
191 * \param p_e an initialized exception pointer
192 * \return the newly created media
194 VLC_PUBLIC_API libvlc_media_t * libvlc_media_new(
195 libvlc_instance_t *p_instance,
196 const char * psz_mrl,
197 libvlc_exception_t *p_e );
200 * Create a media as an empty node with the passed name.
202 * \param p_instance the instance
203 * \param psz_name the name of the node
204 * \param p_e an initialized exception pointer
205 * \return the new empty media
207 VLC_PUBLIC_API libvlc_media_t * libvlc_media_new_as_node(
208 libvlc_instance_t *p_instance,
209 const char * psz_name,
210 libvlc_exception_t *p_e );
213 * Add an option to the media.
215 * This option will be used to determine how the media_player will
216 * read the media. This allows to use VLC's advanced
217 * reading/streaming options on a per-media basis.
219 * The options are detailed in vlc --long-help, for instance "--sout-all"
221 * \param p_instance the instance
222 * \param ppsz_options the options (as a string)
223 * \param p_e an initialized exception pointer
225 VLC_PUBLIC_API void libvlc_media_add_option(
226 libvlc_media_t * p_md,
227 const char * ppsz_options,
228 libvlc_exception_t * p_e );
230 VLC_PUBLIC_API void libvlc_media_retain(
231 libvlc_media_t *p_meta_desc );
233 VLC_PUBLIC_API void libvlc_media_release(
234 libvlc_media_t *p_meta_desc );
236 VLC_PUBLIC_API char * libvlc_media_get_mrl( libvlc_media_t * p_md,
237 libvlc_exception_t * p_e );
239 VLC_PUBLIC_API libvlc_media_t * libvlc_media_duplicate( libvlc_media_t * );
242 * Read the meta of the media.
244 * \param p_meta_desc the media to read
245 * \param e_meta_desc the meta to read
246 * \param p_e an initialized exception pointer
247 * \return the media's meta
249 VLC_PUBLIC_API char * libvlc_media_get_meta(
250 libvlc_media_t *p_meta_desc,
251 libvlc_meta_t e_meta,
252 libvlc_exception_t *p_e );
254 VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
255 libvlc_media_t *p_meta_desc,
256 libvlc_exception_t *p_e );
258 VLC_PUBLIC_API libvlc_media_list_t *
259 libvlc_media_subitems( libvlc_media_t *p_md,
260 libvlc_exception_t *p_e );
262 VLC_PUBLIC_API libvlc_event_manager_t *
263 libvlc_media_event_manager( libvlc_media_t * p_md,
264 libvlc_exception_t * p_e );
266 VLC_PUBLIC_API libvlc_time_t
267 libvlc_media_get_duration( libvlc_media_t * p_md,
268 libvlc_exception_t * p_e );
271 libvlc_media_is_preparsed( libvlc_media_t * p_md,
272 libvlc_exception_t * p_e );
275 libvlc_media_set_user_data( libvlc_media_t * p_md,
276 void * p_new_user_data,
277 libvlc_exception_t * p_e);
278 VLC_PUBLIC_API void *
279 libvlc_media_get_user_data( libvlc_media_t * p_md,
280 libvlc_exception_t * p_e);
284 /*****************************************************************************
286 *****************************************************************************/
287 /** \defgroup libvlc_media_player libvlc_media_player
289 * LibVLC Media Player, object that let you play a media
290 * in a libvlc_drawable_t
295 * Create an empty Media Player object
297 * \param p_libvlc_instance the libvlc instance in which the Media Player
299 * \param p_e an initialized exception pointer
301 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );
304 * Create a Media Player object from a Media
306 * \param p_md the media. Afterwards the p_md can be safely
308 * \param p_e an initialized exception pointer
310 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );
313 * Release a media_player after use
315 * \param p_mi the Media Player to free
317 VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );
318 VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
320 /** Set the media that will be used by the media_player. If any,
321 * previous md will be released.
323 * \param p_mi the Media Player
324 * \param p_md the Media. Afterwards the p_md can be safely
326 * \param p_e an initialized exception pointer
328 VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t *, libvlc_exception_t * );
331 * Get the media used by the media_player.
333 * \param p_mi the Media Player
334 * \param p_e an initialized exception pointer
335 * \return the media associated with p_mi, or NULL if no
336 * media is associated
338 VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );
341 * Get the Event Manager from which the media player send event.
343 * \param p_mi the Media Player
344 * \param p_e an initialized exception pointer
345 * \return the event manager associated with p_mi
347 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );
352 * \param p_mi the Media Player
353 * \param p_e an initialized exception pointer
355 VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_exception_t * );
360 * \param p_mi the Media Player
361 * \param p_e an initialized exception pointer
363 VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_exception_t * );
368 * \param p_mi the Media Player
369 * \param p_e an initialized exception pointer
371 VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );
374 * Set the drawable where the media player should render its video output
376 * \param p_mi the Media Player
377 * \param drawable the libvlc_drawable_t where the media player
378 * should render its video
379 * \param p_e an initialized exception pointer
381 VLC_PUBLIC_API void libvlc_media_player_set_drawable ( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
384 * Get the drawable where the media player should render its video output
386 * \param p_mi the Media Player
387 * \param p_e an initialized exception pointer
388 * \return the libvlc_drawable_t where the media player
389 * should render its video
391 VLC_PUBLIC_API libvlc_drawable_t
392 libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );
394 /** \bug This might go away ... to be replaced by a broader system */
395 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length ( libvlc_media_player_t *, libvlc_exception_t *);
396 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time ( libvlc_media_player_t *, libvlc_exception_t *);
397 VLC_PUBLIC_API void libvlc_media_player_set_time ( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
398 VLC_PUBLIC_API float libvlc_media_player_get_position ( libvlc_media_player_t *, libvlc_exception_t *);
399 VLC_PUBLIC_API void libvlc_media_player_set_position ( libvlc_media_player_t *, float, libvlc_exception_t *);
400 VLC_PUBLIC_API void libvlc_media_player_set_chapter ( libvlc_media_player_t *, int, libvlc_exception_t *);
401 VLC_PUBLIC_API int libvlc_media_player_get_chapter (libvlc_media_player_t *, libvlc_exception_t *);
402 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
403 VLC_PUBLIC_API int libvlc_media_player_will_play ( libvlc_media_player_t *, libvlc_exception_t *);
404 VLC_PUBLIC_API float libvlc_media_player_get_rate ( libvlc_media_player_t *, libvlc_exception_t *);
405 VLC_PUBLIC_API void libvlc_media_player_set_rate ( libvlc_media_player_t *, float, libvlc_exception_t *);
406 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state ( libvlc_media_player_t *, libvlc_exception_t *);
407 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
410 * Does this media player have a video output?
412 * \param p_md the media player
413 * \param p_e an initialized exception pointer
415 VLC_PUBLIC_API int libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
418 * Is this media player seekable?
420 * \param p_input the input
421 * \param p_e an initialized exception pointer
423 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
426 * Can this media player be paused?
428 * \param p_input the input
429 * \param p_e an initialized exception pointer
431 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
433 /** \defgroup libvlc_video libvlc_video
434 * \ingroup libvlc_media_player
435 * LibVLC Video handling
440 * Toggle fullscreen status on video output.
442 * \param p_mediaplayer the media player
443 * \param p_e an initialized exception pointer
445 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
448 * Enable or disable fullscreen on a video output.
450 * \param p_mediaplayer the media player
451 * \param b_fullscreen boolean for fullscreen status
452 * \param p_e an initialized exception pointer
454 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
457 * Get current fullscreen status.
459 * \param p_mediaplayer the media player
460 * \param p_e an initialized exception pointer
461 * \return the fullscreen status (boolean)
463 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
466 * Get current video height.
468 * \param p_mediaplayer the media player
469 * \param p_e an initialized exception pointer
470 * \return the video height
472 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
475 * Get current video width.
477 * \param p_mediaplayer the media player
478 * \param p_e an initialized exception pointer
479 * \return the video width
481 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
484 * Get current video aspect ratio.
486 * \param p_mediaplayer the media player
487 * \param p_e an initialized exception pointer
488 * \return the video aspect ratio
490 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
493 * Set new video aspect ratio.
495 * \param p_mediaplayer the media player
496 * \param psz_aspect new video aspect-ratio
497 * \param p_e an initialized exception pointer
499 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, char *, libvlc_exception_t * );
502 * Get current video subtitle.
504 * \param p_mediaplayer the media player
505 * \param p_e an initialized exception pointer
506 * \return the video subtitle selected
508 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
511 * Set new video subtitle.
513 * \param p_mediaplayer the media player
514 * \param i_spu new video subtitle to select
515 * \param p_e an initialized exception pointer
517 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
520 * Set new video subtitle file.
522 * \param p_mediaplayer the media player
523 * \param psz_subtitle new video subtitle file
524 * \param p_e an initialized exception pointer
525 * \return the success status (boolean)
527 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );
530 * Get current crop filter geometry.
532 * \param p_mediaplayer the media player
533 * \param p_e an initialized exception pointer
534 * \return the crop filter geometry
536 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
539 * Set new crop filter geometry.
541 * \param p_mediaplayer the media player
542 * \param psz_geometry new crop filter geometry
543 * \param p_e an initialized exception pointer
545 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );
548 * Toggle teletext transparent status on video output.
550 * \param p_mediaplayer the media player
551 * \param p_e an initialized exception pointer
553 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
556 * Get current teletext page requested.
558 * \param p_mediaplayer the media player
559 * \param p_e an initialized exception pointer
560 * \return the current teletext page requested.
562 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
565 * Set new teletext page to retrieve.
567 * \param p_mediaplayer the media player
568 * \param i_page teletex page number requested
569 * \param p_e an initialized exception pointer
571 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
574 * Take a snapshot of the current video window.
576 * If i_width AND i_height is 0, original size is used.
577 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
579 * \param p_mediaplayer the media player
580 * \param psz_filepath the path where to save the screenshot to
581 * \param i_width the snapshot's width
582 * \param i_height the snapshot's height
583 * \param p_e an initialized exception pointer
585 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * );
587 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exception_t *);
590 * Resize the current video output window.
592 * \param p_instance libvlc instance
593 * \param width new width for video output window
594 * \param height new height for video output window
595 * \param p_e an initialized exception pointer
596 * \return the success status (boolean)
598 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libvlc_exception_t *);
601 * Change the parent for the current the video output.
603 * \param p_instance libvlc instance
604 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
605 * \param p_e an initialized exception pointer
606 * \return the success status (boolean)
608 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
611 * Tell windowless video output to redraw rectangular area (MacOS X only).
613 * \param p_instance libvlc instance
614 * \param area coordinates within video drawable
615 * \param p_e an initialized exception pointer
617 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_player_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
620 * Set the default video output's parent.
622 * This setting will be used as default for all video outputs.
624 * \param p_instance libvlc instance
625 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
626 * \param p_e an initialized exception pointer
628 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
631 * Set the default video output parent.
633 * This setting will be used as default for all video outputs.
635 * \param p_instance libvlc instance
636 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
637 * \param p_e an initialized exception pointer
639 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
642 * Set the default video output size.
644 * This setting will be used as default for all video outputs.
646 * \param p_instance libvlc instance
647 * \param width new width for video drawable
648 * \param height new height for video drawable
649 * \param p_e an initialized exception pointer
651 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
654 * Set the default video output viewport for a windowless video output
657 * This setting will be used as default for all video outputs.
659 * \param p_instance libvlc instance
660 * \param view coordinates within video drawable
661 * \param clip coordinates within video drawable
662 * \param p_e an initialized exception pointer
664 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
668 /** \defgroup libvlc_audio libvlc_audio
669 * \ingroup libvlc_media_player
670 * LibVLC Audio handling
675 * Toggle mute status.
677 * \param p_instance libvlc instance
678 * \param p_e an initialized exception pointer
680 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
683 * Get current mute status.
685 * \param p_instance libvlc instance
686 * \param p_e an initialized exception pointer
687 * \return the mute status (boolean)
689 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
694 * \param p_instance libvlc instance
695 * \param status If status is true then mute, otherwise unmute
696 * \param p_e an initialized exception pointer
698 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
701 * Get current audio level.
703 * \param p_instance libvlc instance
704 * \param p_e an initialized exception pointer
705 * \return the audio level (int)
707 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
710 * Set current audio level.
712 * \param p_instance libvlc instance
713 * \param i_volume the volume (int)
714 * \param p_e an initialized exception pointer
716 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
719 * Get number of available audio tracks.
721 * \param p_mi media player
722 * \param p_e an initialized exception
723 * \return the number of available audio tracks (int)
725 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
728 * Get current audio track.
730 * \param p_mi media player
731 * \param p_e an initialized exception pointer
732 * \return the audio track (int)
734 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
737 * Set current audio track.
739 * \param p_mi media player
740 * \param i_track the track (int)
741 * \param p_e an initialized exception pointer
743 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
746 * Get current audio channel.
748 * \param p_instance vlc instance
749 * \param p_e an initialized exception pointer
750 * \return the audio channel (int)
752 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
755 * Set current audio channel.
757 * \param p_instance vlc instance
758 * \param i_channel the audio channel (int)
759 * \param p_e an initialized exception pointer
761 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
765 /** @} media_player */
767 /*****************************************************************************
769 *****************************************************************************/
771 /** \defgroup libvlc_event libvlc_event
772 * \ingroup libvlc_core
778 * Register for an event notification.
780 * \param p_event_manager the event manager to which you want to attach to.
781 * Generally it is obtained by vlc_my_object_event_manager() where
782 * my_object is the object you want to listen to.
783 * \param i_event_type the desired event to which we want to listen
784 * \param f_callback the function to call when i_event_type occurs
785 * \param user_data user provided data to carry with the event
786 * \param p_e an initialized exception pointer
788 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
789 libvlc_event_type_t i_event_type,
790 libvlc_callback_t f_callback,
792 libvlc_exception_t *p_e );
795 * Unregister an event notification.
797 * \param p_event_manager the event manager
798 * \param i_event_type the desired event to which we want to unregister
799 * \param f_callback the function to call when i_event_type occurs
800 * \param p_user_data user provided data to carry with the event
801 * \param p_e an initialized exception pointer
803 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
804 libvlc_event_type_t i_event_type,
805 libvlc_callback_t f_callback,
807 libvlc_exception_t *p_e );
810 * Get an event's type name.
812 * \param i_event_type the desired event
814 VLC_PUBLIC_API const char * libvlc_event_type_name( libvlc_event_type_t event_type );
818 /*****************************************************************************
820 *****************************************************************************/
821 /** \defgroup libvlc_media_library libvlc_media_library
823 * LibVLC Media Library
826 VLC_PUBLIC_API libvlc_media_library_t *
827 libvlc_media_library_new( libvlc_instance_t * p_inst,
828 libvlc_exception_t * p_e );
830 libvlc_media_library_release( libvlc_media_library_t * p_mlib );
832 libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
836 libvlc_media_library_load( libvlc_media_library_t * p_mlib,
837 libvlc_exception_t * p_e );
840 libvlc_media_library_save( libvlc_media_library_t * p_mlib,
841 libvlc_exception_t * p_e );
843 VLC_PUBLIC_API libvlc_media_list_t *
844 libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
845 libvlc_exception_t * p_e );
851 /*****************************************************************************
852 * Services/Media Discovery
853 *****************************************************************************/
854 /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
856 * LibVLC Media Discoverer
860 VLC_PUBLIC_API libvlc_media_discoverer_t *
861 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
862 const char * psz_name,
863 libvlc_exception_t * p_e );
864 VLC_PUBLIC_API void libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
865 VLC_PUBLIC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
867 VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
869 VLC_PUBLIC_API libvlc_event_manager_t *
870 libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
873 libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
878 /*****************************************************************************
879 * Message log handling
880 *****************************************************************************/
882 /** \defgroup libvlc_log libvlc_log
883 * \ingroup libvlc_core
884 * LibVLC Message Logging
889 * Return the VLC messaging verbosity level.
891 * \param p_instance libvlc instance
892 * \param p_e an initialized exception pointer
894 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
895 libvlc_exception_t *p_e );
898 * Set the VLC messaging verbosity level.
900 * \param p_instance libvlc log instance
901 * \param level log level
902 * \param p_e an initialized exception pointer
904 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
905 libvlc_exception_t *p_e );
908 * Open a VLC message log instance.
910 * \param p_instance libvlc instance
911 * \param p_e an initialized exception pointer
913 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( libvlc_instance_t *, libvlc_exception_t *);
916 * Close a VLC message log instance.
918 * \param p_log libvlc log instance
919 * \param p_e an initialized exception pointer
921 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
924 * Returns the number of messages in a log instance.
926 * \param p_log libvlc log instance
927 * \param p_e an initialized exception pointer
929 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
932 * Clear a log instance.
934 * All messages in the log are removed. The log should be cleared on a
935 * regular basis to avoid clogging.
937 * \param p_log libvlc log instance
938 * \param p_e an initialized exception pointer
940 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
943 * Allocate and returns a new iterator to messages in log.
945 * \param p_log libvlc log instance
946 * \param p_e an initialized exception pointer
948 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
951 * Release a previoulsy allocated iterator.
953 * \param p_iter libvlc log iterator
954 * \param p_e an initialized exception pointer
956 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
959 * Return whether log iterator has more messages.
961 * \param p_iter libvlc log iterator
962 * \param p_e an initialized exception pointer
964 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
967 * Return the next log message.
969 * The message contents must not be freed
971 * \param p_iter libvlc log iterator
972 * \param p_buffer log buffer
973 * \param p_e an initialized exception pointer
975 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
976 libvlc_log_message_t *p_buffer,
977 libvlc_exception_t *p_e );
985 #endif /* <vlc/libvlc.h> */