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
182 * LibVLC Media Descriptor
187 * Create a media descriptor 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 descriptor
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 descriptor 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 descriptor
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 descriptor.
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 psz_mrl the MRL to read
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 descriptor.
244 * \param p_meta_desc the media descriptor to read
245 * \param p_meta_desc the meta to read
246 * \param p_e an initialized exception pointer
247 * \return the media descriptor'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 Instance, object that let you play a media descriptor
290 * in a libvlc_drawable_t
295 * Create an empty Media Instance object
297 * \param p_libvlc_instance the libvlc instance in which the Media Instance
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 Instance object from a Media Descriptor
306 * \param p_md the media descriptor. 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 Instance 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 descriptor that will be used by the media_player. If any,
321 * previous md will be released.
323 * \param p_mi the Media Instance
324 * \param p_md the Media Descriptor. 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 descriptor used by the media_player.
333 * \param p_mi the Media Instance
334 * \param p_e an initialized exception pointer
335 * \return the media descriptor associated with p_mi, or NULL if no
336 * media descriptor 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 instance send event.
343 * \param p_mi the Media Instance
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 Instance
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 Instance
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 Instance
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 instance should render its video output
376 * \param p_mi the Media Instance
377 * \param drawable the libvlc_drawable_t where the media instance
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 instance should render its video output
386 * \param p_mi the Media Instance
387 * \param p_e an initialized exception pointer
388 * \return the libvlc_drawable_t where the media instance
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 instance have a video output?
412 * \param p_md the media instance
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 instance 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 instance 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_input the input
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_input the input
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_input the input
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_input the input
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_input the input
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_input the input
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_input the input
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_input the input
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_input the input
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 * Get current crop filter geometry.
522 * \param p_input the input
523 * \param p_e an initialized exception pointer
524 * \return the crop filter geometry
526 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
529 * Set new crop filter geometry.
531 * \param p_input the input
532 * \param psz_geometry new crop filter geometry
533 * \param p_e an initialized exception pointer
535 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );
538 * Toggle teletext transparent status on video output.
540 * \param p_input the input
541 * \param p_e an initialized exception pointer
543 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
546 * Get current teletext page requested.
548 * \param p_input the input
549 * \param p_e an initialized exception pointer
550 * \return the current teletext page requested.
552 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
555 * Set new teletext page to retrieve.
557 * \param p_input the input
558 * \param i_page teletex page number requested
559 * \param p_e an initialized exception pointer
561 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
564 * Take a snapshot of the current video window.
566 * If i_width AND i_height is 0, original size is used.
567 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
569 * \param p_input the input
570 * \param psz_filepath the path where to save the screenshot to
571 * \param i_width the snapshot's width
572 * \param i_height the snapshot's height
573 * \param p_e an initialized exception pointer
575 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * );
577 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exception_t *);
580 * Resize the current video output window.
582 * \param p_instance libvlc instance
583 * \param width new width for video output window
584 * \param height new height for video output window
585 * \param p_e an initialized exception pointer
586 * \return the success status (boolean)
588 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libvlc_exception_t *);
591 * Change the parent for the current the video output.
593 * \param p_instance libvlc instance
594 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
595 * \param p_e an initialized exception pointer
596 * \return the success status (boolean)
598 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
601 * Tell windowless video output to redraw rectangular area (MacOS X only).
603 * \param p_instance libvlc instance
604 * \param area coordinates within video drawable
605 * \param p_e an initialized exception pointer
607 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_player_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
610 * Set the default video output's parent.
612 * This setting will be used as default for all video outputs.
614 * \param p_instance libvlc instance
615 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
616 * \param p_e an initialized exception pointer
618 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
621 * Set the default video output parent.
623 * This setting will be used as default for all video outputs.
625 * \param p_instance libvlc instance
626 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
627 * \param p_e an initialized exception pointer
629 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
632 * Set the default video output size.
634 * This setting will be used as default for all video outputs.
636 * \param p_instance libvlc instance
637 * \param width new width for video drawable
638 * \param height new height for video drawable
639 * \param p_e an initialized exception pointer
641 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
644 * Set the default video output viewport for a windowless video output
647 * This setting will be used as default for all video outputs.
649 * \param p_instance libvlc instance
650 * \param view coordinates within video drawable
651 * \param clip coordinates within video drawable
652 * \param p_e an initialized exception pointer
654 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
658 /** \defgroup libvlc_audio libvlc_audio
659 * \ingroup libvlc_media_player
660 * LibVLC Audio handling
665 * Toggle mute status.
667 * \param p_instance libvlc instance
668 * \param p_e an initialized exception pointer
670 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
673 * Get current mute status.
675 * \param p_instance libvlc instance
676 * \param p_e an initialized exception pointer
677 * \return the mute status (boolean)
679 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
684 * \param p_instance libvlc instance
685 * \param status If status is VLC_TRUE then mute, otherwise unmute
686 * \param p_e an initialized exception pointer
688 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
691 * Get current audio level.
693 * \param p_instance libvlc instance
694 * \param p_e an initialized exception pointer
695 * \return the audio level (int)
697 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
700 * Set current audio level.
702 * \param p_instance libvlc instance
703 * \param i_volume the volume (int)
704 * \param p_e an initialized exception pointer
706 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
709 * Get number of available audio tracks.
711 * \param p_mi media instance
712 * \param p_e an initialized exception
713 * \return the number of available audio tracks (int)
715 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
718 * Get current audio track.
720 * \param p_input input instance
721 * \param p_e an initialized exception pointer
722 * \return the audio track (int)
724 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
727 * Set current audio track.
729 * \param p_input input instance
730 * \param i_track the track (int)
731 * \param p_e an initialized exception pointer
733 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
736 * Get current audio channel.
738 * \param p_instance input instance
739 * \param p_e an initialized exception pointer
740 * \return the audio channel (int)
742 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
745 * Set current audio channel.
747 * \param p_instance input instance
748 * \param i_channel the audio channel (int)
749 * \param p_e an initialized exception pointer
751 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
755 /** @} media_player */
757 /*****************************************************************************
759 *****************************************************************************/
761 /** \defgroup libvlc_event libvlc_event
762 * \ingroup libvlc_core
768 * Register for an event notification.
770 * \param p_event_manager the event manager to which you want to attach to.
771 * Generally it is obtained by vlc_my_object_event_manager() where
772 * my_object is the object you want to listen to.
773 * \param i_event_type the desired event to which we want to listen
774 * \param f_callback the function to call when i_event_type occurs
775 * \param user_data user provided data to carry with the event
776 * \param p_e an initialized exception pointer
778 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
779 libvlc_event_type_t i_event_type,
780 libvlc_callback_t f_callback,
782 libvlc_exception_t *p_e );
785 * Unregister an event notification.
787 * \param p_event_manager the event manager
788 * \param i_event_type the desired event to which we want to unregister
789 * \param f_callback the function to call when i_event_type occurs
790 * \param p_user_data user provided data to carry with the event
791 * \param p_e an initialized exception pointer
793 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
794 libvlc_event_type_t i_event_type,
795 libvlc_callback_t f_callback,
797 libvlc_exception_t *p_e );
800 * Get an event's type name.
802 * \param i_event_type the desired event
804 VLC_PUBLIC_API const char * libvlc_event_type_name( libvlc_event_type_t event_type );
808 /*****************************************************************************
810 *****************************************************************************/
811 /** \defgroup libvlc_media_library libvlc_media_library
813 * LibVLC Media Library
816 VLC_PUBLIC_API libvlc_media_library_t *
817 libvlc_media_library_new( libvlc_instance_t * p_inst,
818 libvlc_exception_t * p_e );
820 libvlc_media_library_release( libvlc_media_library_t * p_mlib );
822 libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
826 libvlc_media_library_load( libvlc_media_library_t * p_mlib,
827 libvlc_exception_t * p_e );
830 libvlc_media_library_save( libvlc_media_library_t * p_mlib,
831 libvlc_exception_t * p_e );
833 VLC_PUBLIC_API libvlc_media_list_t *
834 libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
835 libvlc_exception_t * p_e );
841 /*****************************************************************************
842 * Services/Media Discovery
843 *****************************************************************************/
844 /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
846 * LibVLC Media Discoverer
850 VLC_PUBLIC_API libvlc_media_discoverer_t *
851 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
852 const char * psz_name,
853 libvlc_exception_t * p_e );
854 VLC_PUBLIC_API void libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
855 VLC_PUBLIC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
857 VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
859 VLC_PUBLIC_API libvlc_event_manager_t *
860 libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
863 libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
868 /*****************************************************************************
869 * Message log handling
870 *****************************************************************************/
872 /** \defgroup libvlc_log libvlc_log
873 * \ingroup libvlc_core
874 * LibVLC Message Logging
879 * Return the VLC messaging verbosity level.
881 * \param p_instance libvlc instance
882 * \param p_e an initialized exception pointer
884 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
885 libvlc_exception_t *p_e );
888 * Set the VLC messaging verbosity level.
890 * \param p_instance libvlc log instance
891 * \param level log level
892 * \param p_e an initialized exception pointer
894 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
895 libvlc_exception_t *p_e );
898 * Open a VLC message log instance.
900 * \param p_instance libvlc instance
901 * \param p_e an initialized exception pointer
903 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( libvlc_instance_t *, libvlc_exception_t *);
906 * Close a VLC message log instance.
908 * \param p_log libvlc log instance
909 * \param p_e an initialized exception pointer
911 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
914 * Returns the number of messages in a log instance.
916 * \param p_log libvlc log instance
917 * \param p_e an initialized exception pointer
919 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
922 * Clear a log instance.
924 * All messages in the log are removed. The log should be cleared on a
925 * regular basis to avoid clogging.
927 * \param p_log libvlc log instance
928 * \param p_e an initialized exception pointer
930 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
933 * Allocate and returns a new iterator to messages in log.
935 * \param p_log libvlc log instance
936 * \param p_e an initialized exception pointer
938 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
941 * Release a previoulsy allocated iterator.
943 * \param p_iter libvlc log iterator
944 * \param p_e an initialized exception pointer
946 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
949 * Return whether log iterator has more messages.
951 * \param p_iter libvlc log iterator
952 * \param p_e an initialized exception pointer
954 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
957 * Return the next log message.
959 * The message contents must not be freed
961 * \param p_iter libvlc log iterator
962 * \param p_buffer log buffer
963 * \param p_e an initialized exception pointer
965 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
966 libvlc_log_message_t *p_buffer,
967 libvlc_exception_t *p_e );
975 #endif /* <vlc/libvlc.h> */