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 * );
125 /*****************************************************************************
127 *****************************************************************************/
128 /** defgroup libvlc_media_descriptor Media Descriptor
130 * LibVLC Media Descriptor
135 * Create a media descriptor with the given mrl.
136 * \param p_instance the instance
137 * \param psz_mrl the mrl to read
139 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_descriptor_new(
140 libvlc_instance_t *p_instance,
141 const char * psz_mrl,
142 libvlc_exception_t *p_e );
144 VLC_PUBLIC_API void libvlc_media_descriptor_retain(
145 libvlc_media_descriptor_t *p_meta_desc );
147 VLC_PUBLIC_API void libvlc_media_descriptor_release(
148 libvlc_media_descriptor_t *p_meta_desc );
151 * Read the meta of the media descriptor.
152 * \param p_meta_desc the media descriptor to read
153 * \param p_meta_desc the meta to read
155 VLC_PUBLIC_API char * libvlc_media_descriptor_get_meta(
156 libvlc_media_descriptor_t *p_meta_desc,
157 libvlc_meta_t e_meta,
158 libvlc_exception_t *p_e );
162 /*****************************************************************************
164 *****************************************************************************/
165 /** defgroup libvlc_playlist Playlist
167 * LibVLC Playlist handling
174 VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t,
175 libvlc_exception_t * );
178 * Start playing. You can give some additionnal playlist item options
179 * that will be added to the item before playing it.
180 * \param p_instance the instance
181 * \param i_id the item to play. If this is a negative number, the next
182 * item will be selected. Else, the item with the given ID will be played
183 * \param i_options the number of options to add to the item
184 * \param ppsz_options the options to add to the item
185 * \param p_exception an initialized exception
187 VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
188 libvlc_exception_t * );
191 * Pause a running playlist, resume if it was stopped
192 * \param p_instance the instance to pause
193 * \param p_exception an initialized exception
195 VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
198 * Checks if the playlist is running
199 * \param p_instance the instance
200 * \param p_exception an initialized exception
201 * \return 0 if the playlist is stopped or paused, 1 if it is running
203 VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
206 * Get the number of items in the playlist
207 * \param p_instance the instance
208 * \param p_exception an initialized exception
209 * \return the number of items
211 VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
214 * Lock the playlist instance
215 * \param p_instance the instance
217 VLC_PUBLIC_API void libvlc_playlist_lock( libvlc_instance_t * );
220 * Unlock the playlist instance
221 * \param p_instance the instance
223 VLC_PUBLIC_API void libvlc_playlist_unlock( libvlc_instance_t * );
227 * \param p_instance the instance to stop
228 * \param p_exception an initialized exception
230 VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * );
233 * Go to next playlist item (starts playback if it was stopped)
234 * \param p_instance the instance to use
235 * \param p_exception an initialized exception
237 VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * );
240 * Go to previous playlist item (starts playback if it was stopped)
241 * \param p_instance the instance to use
242 * \param p_exception an initialized exception
244 VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * );
247 * Remove all playlist items
248 * \param p_instance the instance
249 * \param p_exception an initialized exception
251 VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
254 * Add an item at the end of the playlist
255 * If you need more advanced options, \see libvlc_playlist_add_extended
256 * \param p_instance the instance
257 * \param psz_uri the URI to open, using VLC format
258 * \param psz_name a name that you might want to give or NULL
259 * \return the identifier of the new item
261 VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
262 libvlc_exception_t * );
265 * Add an item at the end of the playlist, with additional input options
266 * \param p_instance the instance
267 * \param psz_uri the URI to open, using VLC format
268 * \param psz_name a name that you might want to give or NULL
269 * \param i_options the number of options to add
270 * \param ppsz_options strings representing the options to add
271 * \param p_exception an initialized exception
272 * \return the identifier of the new item
274 VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
275 const char *, int, const char **,
276 libvlc_exception_t * );
279 * Delete the playlist item with the given ID.
280 * \param p_instance the instance
281 * \param i_id the id to remove
282 * \param p_exception an initialized exception
285 VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
286 libvlc_exception_t * );
288 /* Get the input that is currently being played by the playlist
289 * \param p_instance the instance to use
290 * \param p_exception an initialized excecption
291 * \return an input object
293 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_playlist_get_media_instance(
294 libvlc_instance_t *, libvlc_exception_t * );
298 /*****************************************************************************
300 *****************************************************************************/
301 /** defgroup libvlc_media_instance Media Instance
303 * LibVLC Media Instance
307 /** Create an empty Media Instance object
308 * \param p_libvlc_instance the libvlc instance in which the Media Instance
309 * should be (not used for now).
311 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new( libvlc_instance_t *, libvlc_exception_t * );
313 /** Create a Media Instance object from a Media Descriptor
314 * \param p_md the media descriptor. Afterwards the p_md can safely be
317 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new_from_media_descriptor( libvlc_media_descriptor_t *, libvlc_exception_t * );
319 /** Release a media_instance after use
320 * \param p_mi the Media Instance to free
322 VLC_PUBLIC_API void libvlc_media_instance_release( libvlc_media_instance_t * );
323 VLC_PUBLIC_API void libvlc_media_instance_retain( libvlc_media_instance_t * );
325 /** Set the media descriptor that will be used by the media_instance. If any,
326 * previous md will be released.
327 * \param p_mi the Media Instance
328 * \param p_md the Media Descriptor. Afterwards the p_md can safely be
331 VLC_PUBLIC_API void libvlc_media_instance_set_media_descriptor( libvlc_media_instance_t *, libvlc_media_descriptor_t *, libvlc_exception_t * );
333 /** Get the media descriptor used by the media_instance (if any). A copy of
334 * the md is returned. NULL is returned if no media instance is associated.
335 * \param p_mi the Media Instance
337 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_instance_get_media_descriptor( libvlc_media_instance_t *, libvlc_exception_t * );
339 /** Get the Event Manager from which the media instance send event.
340 * \param p_mi the Media Instance
342 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_instance_event_manager ( libvlc_media_instance_t *, libvlc_exception_t * );
344 VLC_PUBLIC_API void libvlc_media_instance_play ( libvlc_media_instance_t *, libvlc_exception_t * );
345 VLC_PUBLIC_API void libvlc_media_instance_pause ( libvlc_media_instance_t *, libvlc_exception_t * );
346 VLC_PUBLIC_API void libvlc_media_instance_stop ( libvlc_media_instance_t *, libvlc_exception_t * );
348 /// \bug This might go away ... to be replaced by a broader system
349 VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_length ( libvlc_media_instance_t *, libvlc_exception_t *);
350 VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_time ( libvlc_media_instance_t *, libvlc_exception_t *);
351 VLC_PUBLIC_API void libvlc_media_instance_set_time ( libvlc_media_instance_t *, vlc_int64_t, libvlc_exception_t *);
352 VLC_PUBLIC_API float libvlc_media_instance_get_position ( libvlc_media_instance_t *, libvlc_exception_t *);
353 VLC_PUBLIC_API void libvlc_media_instance_set_position ( libvlc_media_instance_t *, float, libvlc_exception_t *);
354 VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_will_play ( libvlc_media_instance_t *, libvlc_exception_t *);
355 VLC_PUBLIC_API float libvlc_media_instance_get_rate ( libvlc_media_instance_t *, libvlc_exception_t *);
356 VLC_PUBLIC_API void libvlc_media_instance_set_rate ( libvlc_media_instance_t *, float, libvlc_exception_t *);
357 VLC_PUBLIC_API int libvlc_media_instance_get_state ( libvlc_media_instance_t *, libvlc_exception_t *);
360 * Does this input have a video output ?
361 * \param p_input the input
362 * \param p_exception an initialized exception
364 VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
365 VLC_PUBLIC_API float libvlc_media_instance_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
370 /*****************************************************************************
372 *****************************************************************************/
373 /** defgroup libvlc_tag_query Tag Query
378 VLC_PUBLIC_API libvlc_tag_query_t *
379 libvlc_tag_query_new( libvlc_instance_t *, libvlc_exception_t * );
382 libvlc_tag_query_release( libvlc_tag_query_t * );
385 libvlc_tag_query_retain( libvlc_tag_query_t * );
387 VLC_PUBLIC_API vlc_bool_t
388 libvlc_tag_query_match( libvlc_tag_query_t *, libvlc_media_descriptor_t *,
389 libvlc_exception_t * );
393 /*****************************************************************************
395 *****************************************************************************/
396 /** defgroup libvlc_media_list MediaList
401 VLC_PUBLIC_API libvlc_media_list_t *
402 libvlc_media_list_new( libvlc_instance_t *, libvlc_exception_t * );
405 libvlc_media_list_release( libvlc_media_list_t * );
408 libvlc_media_list_retain( libvlc_media_list_t * );
411 libvlc_media_list_add_media_descriptor( libvlc_media_list_t *,
412 libvlc_media_descriptor_t *,
413 libvlc_exception_t * );
415 libvlc_media_list_insert_media_descriptor( libvlc_media_list_t *,
416 libvlc_media_descriptor_t *,
418 libvlc_exception_t * );
420 libvlc_media_list_remove_index( libvlc_media_list_t *, int,
421 libvlc_exception_t * );
424 libvlc_media_list_count( libvlc_media_list_t * p_mlist,
425 libvlc_exception_t * p_e );
427 VLC_PUBLIC_API libvlc_media_descriptor_t *
428 libvlc_media_list_item_at_index( libvlc_media_list_t *, int,
429 libvlc_exception_t * );
431 libvlc_media_list_index_of_item( libvlc_media_list_t *,
432 libvlc_media_descriptor_t *,
433 libvlc_exception_t * );
436 libvlc_media_list_lock( libvlc_media_list_t * );
438 libvlc_media_list_unlock( libvlc_media_list_t * );
440 VLC_PUBLIC_API libvlc_event_manager_t *
441 libvlc_media_list_event_manager( libvlc_media_list_t *,
442 libvlc_exception_t * );
444 VLC_PUBLIC_API libvlc_media_list_t *
445 libvlc_media_list_dynamic_sublist( libvlc_media_list_t *,
446 libvlc_tag_query_t *,
447 libvlc_exception_t * );
451 /*****************************************************************************
453 *****************************************************************************/
454 /** defgroup libvlc_media_list_player MediaListPlayer
456 * LibVLC Media List Player
459 VLC_PUBLIC_API libvlc_media_list_player_t *
460 libvlc_media_list_player_new( libvlc_instance_t * p_instance,
461 libvlc_exception_t * p_e );
463 libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
466 libvlc_media_list_player_set_media_instance(
467 libvlc_media_list_player_t * p_mlp,
468 libvlc_media_instance_t * p_mi,
469 libvlc_exception_t * p_e );
472 libvlc_media_list_player_set_media_list(
473 libvlc_media_list_player_t * p_mlp,
474 libvlc_media_list_t * p_mlist,
475 libvlc_exception_t * p_e );
478 libvlc_media_list_player_play( libvlc_media_list_player_t * p_mlp,
479 libvlc_exception_t * p_e );
482 libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
483 libvlc_exception_t * p_e );
485 libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
486 libvlc_exception_t * p_e );
490 /** defgroup libvlc_video Video
492 * LibVLC Video handling
497 * Does this input have a video output ?
498 * \param p_input the input
499 * \param p_exception an initialized exception
501 VLC_PUBLIC_API vlc_bool_t libvlc_input_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
502 VLC_PUBLIC_API float libvlc_input_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
505 * Toggle fullscreen status on video output
506 * \param p_input the input
507 * \param p_exception an initialized exception
509 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
512 * Enable or disable fullscreen on a video output
513 * \param p_input the input
514 * \param b_fullscreen boolean for fullscreen status
515 * \param p_exception an initialized exception
517 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_instance_t *, int, libvlc_exception_t * );
520 * Get current fullscreen status
521 * \param p_input the input
522 * \param p_exception an initialized exception
523 * \return the fullscreen status (boolean)
525 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
528 * Get current video height
529 * \param p_input the input
530 * \param p_exception an initialized exception
531 * \return the video height
533 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_instance_t *, libvlc_exception_t * );
536 * Get current video width
537 * \param p_input the input
538 * \param p_exception an initialized exception
539 * \return the video width
541 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_instance_t *, libvlc_exception_t * );
544 * Get current video aspect ratio
545 * \param p_input the input
546 * \param p_exception an initialized exception
547 * \return the video aspect ratio
549 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_instance_t *, libvlc_exception_t * );
552 * Set new video aspect ratio
553 * \param p_input the input
554 * \param psz_aspect new video aspect-ratio
555 * \param p_exception an initialized exception
557 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_instance_t *, char *, libvlc_exception_t * );
560 * Get current video subtitle
561 * \param p_input the input
562 * \param p_exception an initialized exception
563 * \return the video subtitle selected
565 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_instance_t *, libvlc_exception_t * );
568 * Set new video subtitle
569 * \param p_input the input
570 * \param i_spu new video subtitle to select
571 * \param p_exception an initialized exception
573 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_instance_t *, int , libvlc_exception_t * );
576 * Get current crop filter geometry
577 * \param p_input the input
578 * \param p_exception an initialized exception
579 * \return the crop filter geometry
581 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_instance_t *, libvlc_exception_t * );
584 * Set new crop filter geometry
585 * \param p_input the input
586 * \param psz_geometry new crop filter geometry
587 * \param p_exception an initialized exception
589 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_instance_t *, char *, libvlc_exception_t * );
592 * Get current teletext page requested.
593 * \param p_input the input
594 * \param p_exception an initialized exception
595 * \return the current teletext page requested.
597 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_instance_t *, libvlc_exception_t * );
600 * Set new teletext page to retrieve
601 * \param p_input the input
602 * \param i_page teletex page number requested
603 * \param p_exception an initialized exception
605 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_instance_t *, int, libvlc_exception_t * );
608 * Take a snapshot of the current video window
609 * \param p_input the input
610 * \param psz_filepath the path where to save the screenshot to
611 * \param p_exception an initialized exception
613 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_instance_t *, char *, libvlc_exception_t * );
615 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_media_instance_t *, libvlc_exception_t *);
618 * Resize the current video output window
619 * \param p_instance libvlc instance
620 * \param width new width for video output window
621 * \param height new height for video output window
622 * \param p_exception an initialized exception
623 * \return the success status (boolean)
625 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_instance_t *, int, int, libvlc_exception_t *);
628 * change the parent for the current the video output
629 * \param p_instance libvlc instance
630 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
631 * \param p_exception an initialized exception
632 * \return the success status (boolean)
634 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
637 * Tell windowless video output to redraw rectangular area (MacOS X only)
638 * \param p_instance libvlc instance
639 * \param area coordinates within video drawable
640 * \param p_exception an initialized exception
642 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_instance_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
645 * Set the default video output parent
646 * this settings will be used as default for all video outputs
647 * \param p_instance libvlc instance
648 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
649 * \param p_exception an initialized exception
651 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
654 * Set the default video output parent
655 * this settings will be used as default for all video outputs
656 * \param p_instance libvlc instance
657 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
658 * \param p_exception an initialized exception
660 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
663 * Set the default video output size
664 * this settings will be used as default for all video outputs
665 * \param p_instance libvlc instance
666 * \param width new width for video drawable
667 * \param height new height for video drawable
668 * \param p_exception an initialized exception
670 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
673 * Set the default video output viewport for a windowless video output (MacOS X only)
674 * this settings will be used as default for all video outputs
675 * \param p_instance libvlc instance
676 * \param view coordinates within video drawable
677 * \param clip coordinates within video drawable
678 * \param p_exception an initialized exception
680 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
685 * defgroup libvlc_vlm VLM
687 * LibVLC VLM handling
691 /** defgroup libvlc_audio Audio
693 * LibVLC Audio handling
699 * \param p_instance libvlc instance
700 * \param p_exception an initialized exception
703 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
706 * Get current mute status
707 * \param p_instance libvlc instance
708 * \param p_exception an initialized exception
709 * \return the mute status (boolean)
711 VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
715 * \param p_instance libvlc instance
716 * \param status If status is VLC_TRUE then mute, otherwise unmute
717 * \param p_exception an initialized exception
720 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
723 * Get current audio level
724 * \param p_instance libvlc instance
725 * \param p_exception an initialized exception
726 * \return the audio level (int)
728 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
731 * Set current audio level
732 * \param p_instance libvlc instance
733 * \param i_volume the volume (int)
734 * \param p_exception an initialized exception
736 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
739 + * Get current audio track
740 + * \param p_input input instance
741 + * \param p_exception an initialized exception
742 + * \return the audio track (int)
744 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_instance_t *, libvlc_exception_t * );
747 * Set current audio track
748 * \param p_input input instance
749 * \param i_track the track (int)
750 * \param p_exception an initialized exception
752 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_instance_t *, int, libvlc_exception_t * );
755 * Get current audio channel
756 * \param p_instance input instance
757 * \param p_exception an initialized exception
758 * \return the audio channel (int)
760 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
763 * Set current audio channel
764 * \param p_instance input instance
765 * \param i_channel the audio channel (int)
766 * \param p_exception an initialized exception
768 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
774 * Add a broadcast, with one input
775 * \param p_instance the instance
776 * \param psz_name the name of the new broadcast
777 * \param psz_input the input MRL
778 * \param psz_output the output MRL (the parameter to the "sout" variable)
779 * \param i_options number of additional options
780 * \param ppsz_options additional options
781 * \param b_enabled boolean for enabling the new broadcast
782 * \param b_loop Should this broadcast be played in loop ?
783 * \param p_exception an initialized exception
785 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
786 int, char **, int, int, libvlc_exception_t * );
789 * Delete a media (vod or broadcast)
790 * \param p_instance the instance
791 * \param psz_name the media to delete
792 * \param p_exception an initialized exception
794 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
797 * Enable or disable a media (vod or broadcast)
798 * \param p_instance the instance
799 * \param psz_name the media to work on
800 * \param b_enabled the new status
801 * \param p_exception an initialized exception
803 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
804 libvlc_exception_t *);
807 * Set the output for a media
808 * \param p_instance the instance
809 * \param psz_name the media to work on
810 * \param psz_output the output MRL (the parameter to the "sout" variable)
811 * \param p_exception an initialized exception
813 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
814 libvlc_exception_t *);
817 * Set a media's input MRL. This will delete all existing inputs and
818 * add the specified one.
819 * \param p_instance the instance
820 * \param psz_name the media to work on
821 * \param psz_input the input MRL
822 * \param p_exception an initialized exception
824 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
825 libvlc_exception_t *);
828 * Add a media's input MRL. This will add the specified one.
829 * \param p_instance the instance
830 * \param psz_name the media to work on
831 * \param psz_input the input MRL
832 * \param p_exception an initialized exception
834 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
835 libvlc_exception_t *p_exception );
837 * Set output for a media
838 * \param p_instance the instance
839 * \param psz_name the media to work on
840 * \param b_loop the new status
841 * \param p_exception an initialized exception
843 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
844 libvlc_exception_t *);
847 * Edit the parameters of a media. This will delete all existing inputs and
848 * add the specified one.
849 * \param p_instance the instance
850 * \param psz_name the name of the new broadcast
851 * \param psz_input the input MRL
852 * \param psz_output the output MRL (the parameter to the "sout" variable)
853 * \param i_options number of additional options
854 * \param ppsz_options additional options
855 * \param b_enabled boolean for enabling the new broadcast
856 * \param b_loop Should this broadcast be played in loop ?
857 * \param p_exception an initialized exception
859 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
860 int, char **, int, int, libvlc_exception_t * );
863 * Plays the named broadcast.
864 * \param p_instance the instance
865 * \param psz_name the name of the broadcast
866 * \param p_exception an initialized exception
868 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
871 * Stops the named broadcast.
872 * \param p_instance the instance
873 * \param psz_name the name of the broadcast
874 * \param p_exception an initialized exception
876 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
879 * Pauses the named broadcast.
880 * \param p_instance the instance
881 * \param psz_name the name of the broadcast
882 * \param p_exception an initialized exception
884 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
887 * Seeks in the named broadcast.
888 * \param p_instance the instance
889 * \param psz_name the name of the broadcast
890 * \param f_percentage the percentage to seek to
891 * \param p_exception an initialized exception
893 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
894 float, libvlc_exception_t * );
897 * Return information of the named broadcast.
898 * \param p_instance the instance
899 * \param psz_name the name of the broadcast
900 * \param p_exception an initialized exception
902 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
904 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
905 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
906 char *, int , libvlc_exception_t * );
908 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
909 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
910 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
911 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
912 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
913 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
914 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
916 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
921 /*****************************************************************************
922 * Message log handling
923 *****************************************************************************/
925 /** defgroup libvlc_log Log
927 * LibVLC Message Logging
932 * Returns the VLC messaging verbosity level
933 * \param p_instance libvlc instance
934 * \param exception an initialized exception pointer
936 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
937 libvlc_exception_t *p_e );
940 * Set the VLC messaging verbosity level
941 * \param p_log libvlc log instance
942 * \param exception an initialized exception pointer
944 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
945 libvlc_exception_t *p_e );
948 * Open an instance to VLC message log
949 * \param p_instance libvlc instance
950 * \param exception an initialized exception pointer
952 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
955 * Close an instance of VLC message log
956 * \param p_log libvlc log instance
957 * \param exception an initialized exception pointer
959 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
962 * Returns the number of messages in log
963 * \param p_log libvlc log instance
964 * \param exception an initialized exception pointer
966 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
969 * Clear all messages in log
970 * the log should be cleared on a regular basis to avoid clogging
971 * \param p_log libvlc log instance
972 * \param exception an initialized exception pointer
974 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
977 * Allocate and returns a new iterator to messages in log
978 * \param p_log libvlc log instance
979 * \param exception an initialized exception pointer
981 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
984 * Releases a previoulsy allocated iterator
985 * \param p_log libvlc log iterator
986 * \param exception an initialized exception pointer
988 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
991 * Returns whether log iterator has more messages
992 * \param p_log libvlc log iterator
993 * \param exception an initialized exception pointer
995 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
998 * Returns next log message
999 * the content of message must not be freed
1000 * \param p_log libvlc log iterator
1001 * \param exception an initialized exception pointer
1003 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
1004 struct libvlc_log_message_t *buffer,
1005 libvlc_exception_t *p_e );
1009 /*****************************************************************************
1011 *****************************************************************************/
1013 /** defgroup libvlc_callbacks Callbacks
1020 * Register for an event notification
1021 * \param p_event_manager the event manager to which you want to attach to
1022 * Generally it is obtained by vlc_my_object_event_manager() where my_object
1023 * Is the object you want to listen to.
1024 * \param i_event_type the desired event to which we want to listen
1025 * \param f_callback the function to call when i_event_type occurs
1026 * \param user_data user provided data to carry with the event
1027 * \param p_e an initialized exception pointer
1029 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
1030 libvlc_event_type_t i_event_type,
1031 libvlc_callback_t f_callback,
1033 libvlc_exception_t *p_e );
1036 * Unregister an event notification
1037 * \param p_event_manager the event manager
1038 * \param i_event_type the desired event to which we want to unregister
1039 * \param f_callback the function to call when i_event_type occurs
1040 * \param p_e an initialized exception pointer
1042 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
1043 libvlc_event_type_t i_event_type,
1044 libvlc_callback_t f_callback,
1046 libvlc_exception_t *p_e );
1050 * Get an event type name
1051 * \param i_event_type the desired event
1053 #define libvlc_event_type_name(a) #a
1062 #endif /* <vlc/libvlc.h> */