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 );
145 * Destroy a media descriptor object.
146 * \param p_meta_desc the md to destroy
148 VLC_PUBLIC_API void libvlc_media_descriptor_destroy(
149 libvlc_media_descriptor_t *p_meta_desc );
152 * Read the meta of the media descriptor.
153 * \param p_meta_desc the media descriptor to read
154 * \param p_meta_desc the meta to read
156 VLC_PUBLIC_API char * libvlc_media_descriptor_get_meta(
157 libvlc_media_descriptor_t *p_meta_desc,
158 libvlc_meta_t e_meta,
159 libvlc_exception_t *p_e );
163 /*****************************************************************************
165 *****************************************************************************/
166 /** defgroup libvlc_playlist Playlist
168 * LibVLC Playlist handling
175 VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , vlc_bool_t,
176 libvlc_exception_t * );
179 * Start playing. You can give some additionnal playlist item options
180 * that will be added to the item before playing it.
181 * \param p_instance the instance
182 * \param i_id the item to play. If this is a negative number, the next
183 * item will be selected. Else, the item with the given ID will be played
184 * \param i_options the number of options to add to the item
185 * \param ppsz_options the options to add to the item
186 * \param p_exception an initialized exception
188 VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int, char **,
189 libvlc_exception_t * );
192 * Pause a running playlist, resume if it was stopped
193 * \param p_instance the instance to pause
194 * \param p_exception an initialized exception
196 VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *, libvlc_exception_t * );
199 * Checks if the playlist is running
200 * \param p_instance the instance
201 * \param p_exception an initialized exception
202 * \return 0 if the playlist is stopped or paused, 1 if it is running
204 VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_exception_t * );
207 * Get the number of items in the playlist
208 * \param p_instance the instance
209 * \param p_exception an initialized exception
210 * \return the number of items
212 VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *, libvlc_exception_t * );
215 * Lock the playlist instance
216 * \param p_instance the instance
218 VLC_PUBLIC_API void libvlc_playlist_lock( libvlc_instance_t * );
221 * Unlock the playlist instance
222 * \param p_instance the instance
224 VLC_PUBLIC_API void libvlc_playlist_unlock( libvlc_instance_t * );
228 * \param p_instance the instance to stop
229 * \param p_exception an initialized exception
231 VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *, libvlc_exception_t * );
234 * Go to next playlist item (starts playback if it was stopped)
235 * \param p_instance the instance to use
236 * \param p_exception an initialized exception
238 VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *, libvlc_exception_t * );
241 * Go to previous playlist item (starts playback if it was stopped)
242 * \param p_instance the instance to use
243 * \param p_exception an initialized exception
245 VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *, libvlc_exception_t * );
248 * Remove all playlist items
249 * \param p_instance the instance
250 * \param p_exception an initialized exception
252 VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *, libvlc_exception_t * );
255 * Add an item at the end of the playlist
256 * If you need more advanced options, \see libvlc_playlist_add_extended
257 * \param p_instance the instance
258 * \param psz_uri the URI to open, using VLC format
259 * \param psz_name a name that you might want to give or NULL
260 * \return the identifier of the new item
262 VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *, const char *,
263 libvlc_exception_t * );
266 * Add an item at the end of the playlist, with additional input options
267 * \param p_instance the instance
268 * \param psz_uri the URI to open, using VLC format
269 * \param psz_name a name that you might want to give or NULL
270 * \param i_options the number of options to add
271 * \param ppsz_options strings representing the options to add
272 * \param p_exception an initialized exception
273 * \return the identifier of the new item
275 VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
276 const char *, int, const char **,
277 libvlc_exception_t * );
280 * Delete the playlist item with the given ID.
281 * \param p_instance the instance
282 * \param i_id the id to remove
283 * \param p_exception an initialized exception
286 VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
287 libvlc_exception_t * );
289 /* Get the input that is currently being played by the playlist
290 * \param p_instance the instance to use
291 * \param p_exception an initialized excecption
292 * \return an input object
294 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_playlist_get_media_instance(
295 libvlc_instance_t *, libvlc_exception_t * );
299 /*****************************************************************************
301 *****************************************************************************/
302 /** defgroup libvlc_media_instance Media Instance
304 * LibVLC Media Instance
308 /** Create an empty Media Instance object
309 * \param p_libvlc_instance the libvlc instance in which the Media Instance
310 * should be (not used for now).
312 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new( libvlc_instance_t *, libvlc_exception_t * );
314 /** Create a Media Instance object from a Media Descriptor
315 * \param p_md the media descriptor. Afterwards the p_md can safely be
318 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new_from_media_descriptor( libvlc_media_descriptor_t *, libvlc_exception_t * );
320 /** Release a media_instance after use
321 * \param p_mi the Media Instance to free
323 VLC_PUBLIC_API void libvlc_media_instance_release( 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 * );
347 /// \bug This might go away ... to be replaced by a broader system
348 VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_length ( libvlc_media_instance_t *, libvlc_exception_t *);
349 VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_time ( libvlc_media_instance_t *, libvlc_exception_t *);
350 VLC_PUBLIC_API void libvlc_media_instance_set_time ( libvlc_media_instance_t *, vlc_int64_t, libvlc_exception_t *);
351 VLC_PUBLIC_API float libvlc_media_instance_get_position ( libvlc_media_instance_t *, libvlc_exception_t *);
352 VLC_PUBLIC_API void libvlc_media_instance_set_position ( libvlc_media_instance_t *, float, libvlc_exception_t *);
353 VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_will_play ( libvlc_media_instance_t *, libvlc_exception_t *);
354 VLC_PUBLIC_API float libvlc_media_instance_get_rate ( libvlc_media_instance_t *, libvlc_exception_t *);
355 VLC_PUBLIC_API void libvlc_media_instance_set_rate ( libvlc_media_instance_t *, float, libvlc_exception_t *);
356 VLC_PUBLIC_API int libvlc_media_instance_get_state ( libvlc_media_instance_t *, libvlc_exception_t *);
359 * Does this input have a video output ?
360 * \param p_input the input
361 * \param p_exception an initialized exception
363 VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
364 VLC_PUBLIC_API float libvlc_media_instance_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
369 /** defgroup libvlc_video Video
371 * LibVLC Video handling
376 * Does this input have a video output ?
377 * \param p_input the input
378 * \param p_exception an initialized exception
380 VLC_PUBLIC_API vlc_bool_t libvlc_input_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
381 VLC_PUBLIC_API float libvlc_input_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
384 * Toggle fullscreen status on video output
385 * \param p_input the input
386 * \param p_exception an initialized exception
388 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
391 * Enable or disable fullscreen on a video output
392 * \param p_input the input
393 * \param b_fullscreen boolean for fullscreen status
394 * \param p_exception an initialized exception
396 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_instance_t *, int, libvlc_exception_t * );
399 * Get current fullscreen status
400 * \param p_input the input
401 * \param p_exception an initialized exception
402 * \return the fullscreen status (boolean)
404 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
407 * Get current video height
408 * \param p_input the input
409 * \param p_exception an initialized exception
410 * \return the video height
412 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_instance_t *, libvlc_exception_t * );
415 * Get current video width
416 * \param p_input the input
417 * \param p_exception an initialized exception
418 * \return the video width
420 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_instance_t *, libvlc_exception_t * );
423 * Get current video aspect ratio
424 * \param p_input the input
425 * \param p_exception an initialized exception
426 * \return the video aspect ratio
428 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_instance_t *, libvlc_exception_t * );
431 * Set new video aspect ratio
432 * \param p_input the input
433 * \param psz_aspect new video aspect-ratio
434 * \param p_exception an initialized exception
436 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_instance_t *, char *, libvlc_exception_t * );
439 * Get current video subtitle
440 * \param p_input the input
441 * \param p_exception an initialized exception
442 * \return the video subtitle selected
444 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_instance_t *, libvlc_exception_t * );
447 * Set new video subtitle
448 * \param p_input the input
449 * \param i_spu new video subtitle to select
450 * \param p_exception an initialized exception
452 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_instance_t *, int , libvlc_exception_t * );
455 * Get current crop filter geometry
456 * \param p_input the input
457 * \param p_exception an initialized exception
458 * \return the crop filter geometry
460 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_instance_t *, libvlc_exception_t * );
463 * Set new crop filter geometry
464 * \param p_input the input
465 * \param psz_geometry new crop filter geometry
466 * \param p_exception an initialized exception
468 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_instance_t *, char *, libvlc_exception_t * );
471 * Get current teletext page requested.
472 * \param p_input the input
473 * \param p_exception an initialized exception
474 * \return the current teletext page requested.
476 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_instance_t *, libvlc_exception_t * );
479 * Set new teletext page to retrieve
480 * \param p_input the input
481 * \param i_page teletex page number requested
482 * \param p_exception an initialized exception
484 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_instance_t *, int, libvlc_exception_t * );
487 * Take a snapshot of the current video window
488 * \param p_input the input
489 * \param psz_filepath the path where to save the screenshot to
490 * \param p_exception an initialized exception
492 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_instance_t *, char *, libvlc_exception_t * );
494 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_media_instance_t *, libvlc_exception_t *);
497 * Resize the current video output window
498 * \param p_instance libvlc instance
499 * \param width new width for video output window
500 * \param height new height for video output window
501 * \param p_exception an initialized exception
502 * \return the success status (boolean)
504 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_instance_t *, int, int, libvlc_exception_t *);
507 * change the parent for the current the video output
508 * \param p_instance libvlc instance
509 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
510 * \param p_exception an initialized exception
511 * \return the success status (boolean)
513 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
516 * Tell windowless video output to redraw rectangular area (MacOS X only)
517 * \param p_instance libvlc instance
518 * \param area coordinates within video drawable
519 * \param p_exception an initialized exception
521 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_instance_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
524 * Set the default video output parent
525 * this settings will be used as default for all video outputs
526 * \param p_instance libvlc instance
527 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
528 * \param p_exception an initialized exception
530 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
533 * Set the default video output parent
534 * this settings will be used as default for all video outputs
535 * \param p_instance libvlc instance
536 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
537 * \param p_exception an initialized exception
539 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
542 * Set the default video output size
543 * this settings will be used as default for all video outputs
544 * \param p_instance libvlc instance
545 * \param width new width for video drawable
546 * \param height new height for video drawable
547 * \param p_exception an initialized exception
549 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
552 * Set the default video output viewport for a windowless video output (MacOS X only)
553 * this settings will be used as default for all video outputs
554 * \param p_instance libvlc instance
555 * \param view coordinates within video drawable
556 * \param clip coordinates within video drawable
557 * \param p_exception an initialized exception
559 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
564 * defgroup libvlc_vlm VLM
566 * LibVLC VLM handling
570 /** defgroup libvlc_audio Audio
572 * LibVLC Audio handling
578 * \param p_instance libvlc instance
579 * \param p_exception an initialized exception
582 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
585 * Get current mute status
586 * \param p_instance libvlc instance
587 * \param p_exception an initialized exception
588 * \return the mute status (boolean)
590 VLC_PUBLIC_API vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
594 * \param p_instance libvlc instance
595 * \param status If status is VLC_TRUE then mute, otherwise unmute
596 * \param p_exception an initialized exception
599 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t * );
602 * Get current audio level
603 * \param p_instance libvlc instance
604 * \param p_exception an initialized exception
605 * \return the audio level (int)
607 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
610 * Set current audio level
611 * \param p_instance libvlc instance
612 * \param i_volume the volume (int)
613 * \param p_exception an initialized exception
615 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
618 + * Get current audio track
619 + * \param p_input input instance
620 + * \param p_exception an initialized exception
621 + * \return the audio track (int)
623 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_instance_t *, libvlc_exception_t * );
626 * Set current audio track
627 * \param p_input input instance
628 * \param i_track the track (int)
629 * \param p_exception an initialized exception
631 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_instance_t *, int, libvlc_exception_t * );
634 * Get current audio channel
635 * \param p_instance input instance
636 * \param p_exception an initialized exception
637 * \return the audio channel (int)
639 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
642 * Set current audio channel
643 * \param p_instance input instance
644 * \param i_channel the audio channel (int)
645 * \param p_exception an initialized exception
647 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
653 * Add a broadcast, with one input
654 * \param p_instance the instance
655 * \param psz_name the name of the new broadcast
656 * \param psz_input the input MRL
657 * \param psz_output the output MRL (the parameter to the "sout" variable)
658 * \param i_options number of additional options
659 * \param ppsz_options additional options
660 * \param b_enabled boolean for enabling the new broadcast
661 * \param b_loop Should this broadcast be played in loop ?
662 * \param p_exception an initialized exception
664 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
665 int, char **, int, int, libvlc_exception_t * );
668 * Delete a media (vod or broadcast)
669 * \param p_instance the instance
670 * \param psz_name the media to delete
671 * \param p_exception an initialized exception
673 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
676 * Enable or disable a media (vod or broadcast)
677 * \param p_instance the instance
678 * \param psz_name the media to work on
679 * \param b_enabled the new status
680 * \param p_exception an initialized exception
682 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
683 libvlc_exception_t *);
686 * Set the output for a media
687 * \param p_instance the instance
688 * \param psz_name the media to work on
689 * \param psz_output the output MRL (the parameter to the "sout" variable)
690 * \param p_exception an initialized exception
692 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
693 libvlc_exception_t *);
696 * Set a media's input MRL. This will delete all existing inputs and
697 * add the specified one.
698 * \param p_instance the instance
699 * \param psz_name the media to work on
700 * \param psz_input the input MRL
701 * \param p_exception an initialized exception
703 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
704 libvlc_exception_t *);
707 * Add a media's input MRL. This will add the specified one.
708 * \param p_instance the instance
709 * \param psz_name the media to work on
710 * \param psz_input the input MRL
711 * \param p_exception an initialized exception
713 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
714 libvlc_exception_t *p_exception );
716 * Set output for a media
717 * \param p_instance the instance
718 * \param psz_name the media to work on
719 * \param b_loop the new status
720 * \param p_exception an initialized exception
722 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
723 libvlc_exception_t *);
726 * Edit the parameters of a media. This will delete all existing inputs and
727 * add the specified one.
728 * \param p_instance the instance
729 * \param psz_name the name of the new broadcast
730 * \param psz_input the input MRL
731 * \param psz_output the output MRL (the parameter to the "sout" variable)
732 * \param i_options number of additional options
733 * \param ppsz_options additional options
734 * \param b_enabled boolean for enabling the new broadcast
735 * \param b_loop Should this broadcast be played in loop ?
736 * \param p_exception an initialized exception
738 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
739 int, char **, int, int, libvlc_exception_t * );
742 * Plays the named broadcast.
743 * \param p_instance the instance
744 * \param psz_name the name of the broadcast
745 * \param p_exception an initialized exception
747 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
750 * Stops the named broadcast.
751 * \param p_instance the instance
752 * \param psz_name the name of the broadcast
753 * \param p_exception an initialized exception
755 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
758 * Pauses the named broadcast.
759 * \param p_instance the instance
760 * \param psz_name the name of the broadcast
761 * \param p_exception an initialized exception
763 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
766 * Seeks in the named broadcast.
767 * \param p_instance the instance
768 * \param psz_name the name of the broadcast
769 * \param f_percentage the percentage to seek to
770 * \param p_exception an initialized exception
772 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
773 float, libvlc_exception_t * );
776 * Return information of the named broadcast.
777 * \param p_instance the instance
778 * \param psz_name the name of the broadcast
779 * \param p_exception an initialized exception
781 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
783 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
784 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
785 char *, int , libvlc_exception_t * );
787 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
788 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
789 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
790 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
791 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
792 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
793 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
795 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
800 /*****************************************************************************
801 * Message log handling
802 *****************************************************************************/
804 /** defgroup libvlc_log Log
806 * LibVLC Message Logging
811 * Returns the VLC messaging verbosity level
812 * \param p_instance libvlc instance
813 * \param exception an initialized exception pointer
815 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
816 libvlc_exception_t *p_e );
819 * Set the VLC messaging verbosity level
820 * \param p_log libvlc log instance
821 * \param exception an initialized exception pointer
823 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
824 libvlc_exception_t *p_e );
827 * Open an instance to VLC message log
828 * \param p_instance libvlc instance
829 * \param exception an initialized exception pointer
831 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( const libvlc_instance_t *, libvlc_exception_t *);
834 * Close an instance of VLC message log
835 * \param p_log libvlc log instance
836 * \param exception an initialized exception pointer
838 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
841 * Returns the number of messages in log
842 * \param p_log libvlc log instance
843 * \param exception an initialized exception pointer
845 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
848 * Clear all messages in log
849 * the log should be cleared on a regular basis to avoid clogging
850 * \param p_log libvlc log instance
851 * \param exception an initialized exception pointer
853 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
856 * Allocate and returns a new iterator to messages in log
857 * \param p_log libvlc log instance
858 * \param exception an initialized exception pointer
860 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
863 * Releases a previoulsy allocated iterator
864 * \param p_log libvlc log iterator
865 * \param exception an initialized exception pointer
867 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
870 * Returns whether log iterator has more messages
871 * \param p_log libvlc log iterator
872 * \param exception an initialized exception pointer
874 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
877 * Returns next log message
878 * the content of message must not be freed
879 * \param p_log libvlc log iterator
880 * \param exception an initialized exception pointer
882 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
883 struct libvlc_log_message_t *buffer,
884 libvlc_exception_t *p_e );
888 /*****************************************************************************
890 *****************************************************************************/
892 /** defgroup libvlc_callbacks Callbacks
899 * Register for an event notification
900 * \param p_event_manager the event manager to which you want to attach to
901 * Generally it is obtained by vlc_my_object_event_manager() where my_object
902 * Is the object you want to listen to.
903 * \param i_event_type the desired event to which we want to listen
904 * \param f_callback the function to call when i_event_type occurs
905 * \param user_data user provided data to carry with the event
906 * \param p_e an initialized exception pointer
908 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
909 libvlc_event_type_t i_event_type,
910 libvlc_callback_t f_callback,
912 libvlc_exception_t *p_e );
915 * Unregister an event notification
916 * \param p_event_manager the event manager
917 * \param i_event_type the desired event to which we want to unregister
918 * \param f_callback the function to call when i_event_type occurs
919 * \param p_e an initialized exception pointer
921 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
922 libvlc_event_type_t i_event_type,
923 libvlc_callback_t f_callback,
925 libvlc_exception_t *p_e );
929 * Get an event type name
930 * \param i_event_type the desired event
932 #define libvlc_event_type_name(a) #a
941 #endif /* <vlc/libvlc.h> */