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.
35 #define VLC_LIBVLC_H 1
37 #if defined (WIN32) && defined (DLL_EXPORT)
38 # define VLC_PUBLIC_API __declspec(dllexport)
40 # define VLC_PUBLIC_API
44 /* Avoid unuseful warnings from libvlc with our deprecated APIs */
45 # define VLC_DEPRECATED_API VLC_PUBLIC_API
46 #elif defined(__GNUC__) && \
47 (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
48 # define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
50 # define VLC_DEPRECATED_API VLC_PUBLIC_API
57 /*****************************************************************************
59 *****************************************************************************/
60 /** \defgroup libvlc_exception libvlc_exception
61 * \ingroup libvlc_core
62 * LibVLC Exceptions handling
67 * Initialize an exception structure. This can be called several times to
68 * reuse an exception structure.
70 * \param p_exception the exception to initialize
72 VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
75 * Has an exception been raised?
77 * \param p_exception the exception to query
78 * \return 0 if the exception was raised, 1 otherwise
81 libvlc_exception_raised( const libvlc_exception_t *p_exception );
84 * Raise an exception using a user-provided message.
86 * \param p_exception the exception to raise
87 * \param psz_format the exception message format string
88 * \param ... the format string arguments
91 libvlc_exception_raise( libvlc_exception_t *p_exception,
92 const char *psz_format, ... );
95 * Clear an exception object so it can be reused.
96 * The exception object must have be initialized.
98 * \param p_exception the exception to clear
100 VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
103 * Get an exception's message.
105 * \param p_exception the exception to query
106 * \return the exception message or NULL if not applicable (exception not
107 * raised, for example)
109 VLC_PUBLIC_API const char *
110 libvlc_exception_get_message( const libvlc_exception_t *p_exception );
114 /*****************************************************************************
116 *****************************************************************************/
118 /** \defgroup libvlc_core libvlc_core
125 * Create and initialize a libvlc instance.
127 * \param argc the number of arguments
128 * \param argv command-line-type arguments. argv[0] must be the path of the
130 * \param p_e an initialized exception pointer
131 * \return the libvlc instance
133 VLC_PUBLIC_API libvlc_instance_t *
134 libvlc_new( int , const char *const *, libvlc_exception_t *);
137 * Return a libvlc instance identifier for legacy APIs. Use of this
138 * function is discouraged, you should convert your program to use the
141 * \param p_instance the instance
142 * \return the instance identifier
144 VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
147 * Decrement the reference count of a libvlc instance, and destroy it
148 * if it reaches zero.
150 * \param p_instance the instance to destroy
152 VLC_PUBLIC_API void libvlc_release( libvlc_instance_t * );
155 * Increments the reference count of a libvlc instance.
156 * The initial reference count is 1 after libvlc_new() returns.
158 * \param p_instance the instance to reference
160 VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
163 * Try to start a user interface for the libvlc instance, and wait until the
166 * \param p_instance the instance
167 * \param name interface name, or NULL for default
168 * \param p_exception an initialized exception pointer
171 void libvlc_add_intf( libvlc_instance_t *p_instance, const char *name,
172 libvlc_exception_t *p_exception );
175 * Waits until an interface causes the instance to exit.
176 * You should start at least one interface first, using libvlc_add_intf().
178 * \param p_instance the instance
181 void libvlc_wait( libvlc_instance_t *p_instance );
184 * Retrieve libvlc version.
186 * Example: "0.9.0-git Grishenko"
188 * \return a string containing the libvlc version
190 VLC_PUBLIC_API const char * libvlc_get_version(void);
193 * Retrieve libvlc compiler version.
195 * Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"
197 * \return a string containing the libvlc compiler version
199 VLC_PUBLIC_API const char * libvlc_get_compiler(void);
202 * Retrieve libvlc changeset.
204 * Example: "aa9bce0bc4"
206 * \return a string containing the libvlc changeset
208 VLC_PUBLIC_API const char * libvlc_get_changeset(void);
212 /*****************************************************************************
214 *****************************************************************************/
215 /** \defgroup libvlc_media libvlc_media
222 * Create a media with the given MRL.
224 * \param p_instance the instance
225 * \param psz_mrl the MRL to read
226 * \param p_e an initialized exception pointer
227 * \return the newly created media
229 VLC_PUBLIC_API libvlc_media_t * libvlc_media_new(
230 libvlc_instance_t *p_instance,
231 const char * psz_mrl,
232 libvlc_exception_t *p_e );
235 * Create a media as an empty node with the passed name.
237 * \param p_instance the instance
238 * \param psz_name the name of the node
239 * \param p_e an initialized exception pointer
240 * \return the new empty media
242 VLC_PUBLIC_API libvlc_media_t * libvlc_media_new_as_node(
243 libvlc_instance_t *p_instance,
244 const char * psz_name,
245 libvlc_exception_t *p_e );
248 * Add an option to the media.
250 * This option will be used to determine how the media_player will
251 * read the media. This allows to use VLC's advanced
252 * reading/streaming options on a per-media basis.
254 * The options are detailed in vlc --long-help, for instance "--sout-all"
256 * \param p_instance the instance
257 * \param ppsz_options the options (as a string)
258 * \param p_e an initialized exception pointer
260 VLC_PUBLIC_API void libvlc_media_add_option(
261 libvlc_media_t * p_md,
262 const char * ppsz_options,
263 libvlc_exception_t * p_e );
265 VLC_PUBLIC_API void libvlc_media_retain(
266 libvlc_media_t *p_meta_desc );
268 VLC_PUBLIC_API void libvlc_media_release(
269 libvlc_media_t *p_meta_desc );
271 VLC_PUBLIC_API char * libvlc_media_get_mrl( libvlc_media_t * p_md,
272 libvlc_exception_t * p_e );
274 VLC_PUBLIC_API libvlc_media_t * libvlc_media_duplicate( libvlc_media_t * );
277 * Read the meta of the media.
279 * \param p_meta_desc the media to read
280 * \param e_meta_desc the meta to read
281 * \param p_e an initialized exception pointer
282 * \return the media's meta
284 VLC_PUBLIC_API char * libvlc_media_get_meta(
285 libvlc_media_t *p_meta_desc,
286 libvlc_meta_t e_meta,
287 libvlc_exception_t *p_e );
289 VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
290 libvlc_media_t *p_meta_desc,
291 libvlc_exception_t *p_e );
293 VLC_PUBLIC_API libvlc_media_list_t *
294 libvlc_media_subitems( libvlc_media_t *p_md,
295 libvlc_exception_t *p_e );
297 VLC_PUBLIC_API libvlc_event_manager_t *
298 libvlc_media_event_manager( libvlc_media_t * p_md,
299 libvlc_exception_t * p_e );
301 VLC_PUBLIC_API libvlc_time_t
302 libvlc_media_get_duration( libvlc_media_t * p_md,
303 libvlc_exception_t * p_e );
306 libvlc_media_is_preparsed( libvlc_media_t * p_md,
307 libvlc_exception_t * p_e );
310 libvlc_media_set_user_data( libvlc_media_t * p_md,
311 void * p_new_user_data,
312 libvlc_exception_t * p_e);
313 VLC_PUBLIC_API void *
314 libvlc_media_get_user_data( libvlc_media_t * p_md,
315 libvlc_exception_t * p_e);
319 /*****************************************************************************
321 *****************************************************************************/
322 /** \defgroup libvlc_media_player libvlc_media_player
324 * LibVLC Media Player, object that let you play a media
325 * in a libvlc_drawable_t
330 * Create an empty Media Player object
332 * \param p_libvlc_instance the libvlc instance in which the Media Player
334 * \param p_e an initialized exception pointer
336 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );
339 * Create a Media Player object from a Media
341 * \param p_md the media. Afterwards the p_md can be safely
343 * \param p_e an initialized exception pointer
345 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );
348 * Release a media_player after use
350 * \param p_mi the Media Player to free
352 VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );
353 VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
355 /** Set the media that will be used by the media_player. If any,
356 * previous md will be released.
358 * \param p_mi the Media Player
359 * \param p_md the Media. Afterwards the p_md can be safely
361 * \param p_e an initialized exception pointer
363 VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t *, libvlc_exception_t * );
366 * Get the media used by the media_player.
368 * \param p_mi the Media Player
369 * \param p_e an initialized exception pointer
370 * \return the media associated with p_mi, or NULL if no
371 * media is associated
373 VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );
376 * Get the Event Manager from which the media player send event.
378 * \param p_mi the Media Player
379 * \param p_e an initialized exception pointer
380 * \return the event manager associated with p_mi
382 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );
387 * \param p_mi the Media Player
388 * \param p_e an initialized exception pointer
390 VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_exception_t * );
395 * \param p_mi the Media Player
396 * \param p_e an initialized exception pointer
398 VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_exception_t * );
403 * \param p_mi the Media Player
404 * \param p_e an initialized exception pointer
406 VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );
409 * Set the drawable where the media player should render its video output
411 * \param p_mi the Media Player
412 * \param drawable the libvlc_drawable_t where the media player
413 * should render its video
414 * \param p_e an initialized exception pointer
416 VLC_PUBLIC_API void libvlc_media_player_set_drawable ( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
419 * Get the drawable where the media player should render its video output
421 * \param p_mi the Media Player
422 * \param p_e an initialized exception pointer
423 * \return the libvlc_drawable_t where the media player
424 * should render its video
426 VLC_PUBLIC_API libvlc_drawable_t
427 libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );
429 /** \bug This might go away ... to be replaced by a broader system */
430 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length ( libvlc_media_player_t *, libvlc_exception_t *);
431 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time ( libvlc_media_player_t *, libvlc_exception_t *);
432 VLC_PUBLIC_API void libvlc_media_player_set_time ( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
433 VLC_PUBLIC_API float libvlc_media_player_get_position ( libvlc_media_player_t *, libvlc_exception_t *);
434 VLC_PUBLIC_API void libvlc_media_player_set_position ( libvlc_media_player_t *, float, libvlc_exception_t *);
435 VLC_PUBLIC_API void libvlc_media_player_set_chapter ( libvlc_media_player_t *, int, libvlc_exception_t *);
436 VLC_PUBLIC_API int libvlc_media_player_get_chapter (libvlc_media_player_t *, libvlc_exception_t *);
437 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
438 VLC_PUBLIC_API int libvlc_media_player_will_play ( libvlc_media_player_t *, libvlc_exception_t *);
439 VLC_PUBLIC_API float libvlc_media_player_get_rate ( libvlc_media_player_t *, libvlc_exception_t *);
440 VLC_PUBLIC_API void libvlc_media_player_set_rate ( libvlc_media_player_t *, float, libvlc_exception_t *);
441 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state ( libvlc_media_player_t *, libvlc_exception_t *);
442 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
445 * Does this media player have a video output?
447 * \param p_md the media player
448 * \param p_e an initialized exception pointer
450 VLC_PUBLIC_API int libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
453 * Is this media player seekable?
455 * \param p_input the input
456 * \param p_e an initialized exception pointer
458 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
461 * Can this media player be paused?
463 * \param p_input the input
464 * \param p_e an initialized exception pointer
466 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
468 /** \defgroup libvlc_video libvlc_video
469 * \ingroup libvlc_media_player
470 * LibVLC Video handling
475 * Toggle fullscreen status on video output.
477 * \param p_mediaplayer the media player
478 * \param p_e an initialized exception pointer
480 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
483 * Enable or disable fullscreen on a video output.
485 * \param p_mediaplayer the media player
486 * \param b_fullscreen boolean for fullscreen status
487 * \param p_e an initialized exception pointer
489 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
492 * Get current fullscreen status.
494 * \param p_mediaplayer the media player
495 * \param p_e an initialized exception pointer
496 * \return the fullscreen status (boolean)
498 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
501 * Get current video height.
503 * \param p_mediaplayer the media player
504 * \param p_e an initialized exception pointer
505 * \return the video height
507 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
510 * Get current video width.
512 * \param p_mediaplayer the media player
513 * \param p_e an initialized exception pointer
514 * \return the video width
516 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
519 * Get current video aspect ratio.
521 * \param p_mediaplayer the media player
522 * \param p_e an initialized exception pointer
523 * \return the video aspect ratio
525 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
528 * Set new video aspect ratio.
530 * \param p_mediaplayer the media player
531 * \param psz_aspect new video aspect-ratio
532 * \param p_e an initialized exception pointer
534 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, char *, libvlc_exception_t * );
537 * Get current video subtitle.
539 * \param p_mediaplayer the media player
540 * \param p_e an initialized exception pointer
541 * \return the video subtitle selected
543 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
546 * Set new video subtitle.
548 * \param p_mediaplayer the media player
549 * \param i_spu new video subtitle to select
550 * \param p_e an initialized exception pointer
552 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
555 * Set new video subtitle file.
557 * \param p_mediaplayer the media player
558 * \param psz_subtitle new video subtitle file
559 * \param p_e an initialized exception pointer
560 * \return the success status (boolean)
562 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );
565 * Get current crop filter geometry.
567 * \param p_mediaplayer the media player
568 * \param p_e an initialized exception pointer
569 * \return the crop filter geometry
571 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
574 * Set new crop filter geometry.
576 * \param p_mediaplayer the media player
577 * \param psz_geometry new crop filter geometry
578 * \param p_e an initialized exception pointer
580 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );
583 * Toggle teletext transparent status on video output.
585 * \param p_mediaplayer the media player
586 * \param p_e an initialized exception pointer
588 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
591 * Get current teletext page requested.
593 * \param p_mediaplayer the media player
594 * \param p_e an initialized exception pointer
595 * \return the current teletext page requested.
597 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
600 * Set new teletext page to retrieve.
602 * \param p_mediaplayer the media player
603 * \param i_page teletex page number requested
604 * \param p_e an initialized exception pointer
606 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
609 * Take a snapshot of the current video window.
611 * If i_width AND i_height is 0, original size is used.
612 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
614 * \param p_mediaplayer the media player
615 * \param psz_filepath the path where to save the screenshot to
616 * \param i_width the snapshot's width
617 * \param i_height the snapshot's height
618 * \param p_e an initialized exception pointer
620 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * );
622 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exception_t *);
625 * Resize the current video output window.
627 * \param p_instance libvlc instance
628 * \param width new width for video output window
629 * \param height new height for video output window
630 * \param p_e an initialized exception pointer
631 * \return the success status (boolean)
633 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libvlc_exception_t *);
636 * Change the parent for the current the video output.
638 * \param p_instance libvlc instance
639 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
640 * \param p_e an initialized exception pointer
641 * \return the success status (boolean)
643 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
646 * Tell windowless video output to redraw rectangular area (MacOS X only).
648 * \param p_instance libvlc instance
649 * \param area coordinates within video drawable
650 * \param p_e an initialized exception pointer
652 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_player_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
655 * Set the default video output's parent.
657 * This setting will be used as default for all video outputs.
659 * \param p_instance libvlc instance
660 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
661 * \param p_e an initialized exception pointer
663 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
666 * Set the default video output parent.
668 * This setting will be used as default for all video outputs.
670 * \param p_instance libvlc instance
671 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
672 * \param p_e an initialized exception pointer
674 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
677 * Set the default video output size.
679 * This setting will be used as default for all video outputs.
681 * \param p_instance libvlc instance
682 * \param width new width for video drawable
683 * \param height new height for video drawable
684 * \param p_e an initialized exception pointer
686 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
689 * Set the default video output viewport for a windowless video output
692 * This setting will be used as default for all video outputs.
694 * \param p_instance libvlc instance
695 * \param view coordinates within video drawable
696 * \param clip coordinates within video drawable
697 * \param p_e an initialized exception pointer
699 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
703 /** \defgroup libvlc_audio libvlc_audio
704 * \ingroup libvlc_media_player
705 * LibVLC Audio handling
710 * Toggle mute status.
712 * \param p_instance libvlc instance
713 * \param p_e an initialized exception pointer
715 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
718 * Get current mute status.
720 * \param p_instance libvlc instance
721 * \param p_e an initialized exception pointer
722 * \return the mute status (boolean)
724 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
729 * \param p_instance libvlc instance
730 * \param status If status is true then mute, otherwise unmute
731 * \param p_e an initialized exception pointer
733 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
736 * Get current audio level.
738 * \param p_instance libvlc instance
739 * \param p_e an initialized exception pointer
740 * \return the audio level (int)
742 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
745 * Set current audio level.
747 * \param p_instance libvlc instance
748 * \param i_volume the volume (int)
749 * \param p_e an initialized exception pointer
751 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
754 * Get number of available audio tracks.
756 * \param p_mi media player
757 * \param p_e an initialized exception
758 * \return the number of available audio tracks (int)
760 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
763 * Get current audio track.
765 * \param p_mi media player
766 * \param p_e an initialized exception pointer
767 * \return the audio track (int)
769 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
772 * Set current audio track.
774 * \param p_mi media player
775 * \param i_track the track (int)
776 * \param p_e an initialized exception pointer
778 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
781 * Get current audio channel.
783 * \param p_instance vlc instance
784 * \param p_e an initialized exception pointer
785 * \return the audio channel (int)
787 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
790 * Set current audio channel.
792 * \param p_instance vlc instance
793 * \param i_channel the audio channel (int)
794 * \param p_e an initialized exception pointer
796 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
800 /** @} media_player */
802 /*****************************************************************************
804 *****************************************************************************/
806 /** \defgroup libvlc_event libvlc_event
807 * \ingroup libvlc_core
813 * Register for an event notification.
815 * \param p_event_manager the event manager to which you want to attach to.
816 * Generally it is obtained by vlc_my_object_event_manager() where
817 * my_object is the object you want to listen to.
818 * \param i_event_type the desired event to which we want to listen
819 * \param f_callback the function to call when i_event_type occurs
820 * \param user_data user provided data to carry with the event
821 * \param p_e an initialized exception pointer
823 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
824 libvlc_event_type_t i_event_type,
825 libvlc_callback_t f_callback,
827 libvlc_exception_t *p_e );
830 * Unregister an event notification.
832 * \param p_event_manager the event manager
833 * \param i_event_type the desired event to which we want to unregister
834 * \param f_callback the function to call when i_event_type occurs
835 * \param p_user_data user provided data to carry with the event
836 * \param p_e an initialized exception pointer
838 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
839 libvlc_event_type_t i_event_type,
840 libvlc_callback_t f_callback,
842 libvlc_exception_t *p_e );
845 * Get an event's type name.
847 * \param i_event_type the desired event
849 VLC_PUBLIC_API const char * libvlc_event_type_name( libvlc_event_type_t event_type );
853 /*****************************************************************************
855 *****************************************************************************/
856 /** \defgroup libvlc_media_library libvlc_media_library
858 * LibVLC Media Library
861 VLC_PUBLIC_API libvlc_media_library_t *
862 libvlc_media_library_new( libvlc_instance_t * p_inst,
863 libvlc_exception_t * p_e );
865 libvlc_media_library_release( libvlc_media_library_t * p_mlib );
867 libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
871 libvlc_media_library_load( libvlc_media_library_t * p_mlib,
872 libvlc_exception_t * p_e );
875 libvlc_media_library_save( libvlc_media_library_t * p_mlib,
876 libvlc_exception_t * p_e );
878 VLC_PUBLIC_API libvlc_media_list_t *
879 libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
880 libvlc_exception_t * p_e );
886 /*****************************************************************************
887 * Services/Media Discovery
888 *****************************************************************************/
889 /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
891 * LibVLC Media Discoverer
895 VLC_PUBLIC_API libvlc_media_discoverer_t *
896 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
897 const char * psz_name,
898 libvlc_exception_t * p_e );
899 VLC_PUBLIC_API void libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
900 VLC_PUBLIC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
902 VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
904 VLC_PUBLIC_API libvlc_event_manager_t *
905 libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
908 libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
913 /*****************************************************************************
914 * Message log handling
915 *****************************************************************************/
917 /** \defgroup libvlc_log libvlc_log
918 * \ingroup libvlc_core
919 * LibVLC Message Logging
924 * Return the VLC messaging verbosity level.
926 * \param p_instance libvlc instance
927 * \param p_e an initialized exception pointer
929 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
930 libvlc_exception_t *p_e );
933 * Set the VLC messaging verbosity level.
935 * \param p_instance libvlc log instance
936 * \param level log level
937 * \param p_e an initialized exception pointer
939 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
940 libvlc_exception_t *p_e );
943 * Open a VLC message log instance.
945 * \param p_instance libvlc instance
946 * \param p_e an initialized exception pointer
948 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( libvlc_instance_t *, libvlc_exception_t *);
951 * Close a VLC message log instance.
953 * \param p_log libvlc log instance
954 * \param p_e an initialized exception pointer
956 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
959 * Returns the number of messages in a log instance.
961 * \param p_log libvlc log instance
962 * \param p_e an initialized exception pointer
964 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
967 * Clear a log instance.
969 * All messages in the log are removed. The log should be cleared on a
970 * regular basis to avoid clogging.
972 * \param p_log libvlc log instance
973 * \param p_e an initialized exception pointer
975 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
978 * Allocate and returns a new iterator to messages in log.
980 * \param p_log libvlc log instance
981 * \param p_e an initialized exception pointer
983 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
986 * Release a previoulsy allocated iterator.
988 * \param p_iter libvlc log iterator
989 * \param p_e an initialized exception pointer
991 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
994 * Return whether log iterator has more messages.
996 * \param p_iter libvlc log iterator
997 * \param p_e an initialized exception pointer
999 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1002 * Return the next log message.
1004 * The message contents must not be freed
1006 * \param p_iter libvlc log iterator
1007 * \param p_buffer log buffer
1008 * \param p_e an initialized exception pointer
1010 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
1011 libvlc_log_message_t *p_buffer,
1012 libvlc_exception_t *p_e );
1020 #endif /* <vlc/libvlc.h> */