]> git.sesse.net Git - vlc/blob - include/vlc/libvlc.h
Documentation updates.
[vlc] / include / vlc / libvlc.h
1 /*****************************************************************************
2  * libvlc.h:  libvlc_* new external API
3  *****************************************************************************
4  * Copyright (C) 1998-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
9  *
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.
14  *
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.
19  *
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  *****************************************************************************/
24
25 /**
26  * \defgroup libvlc Libvlc
27  * This is libvlc, the base library of the VLC program.
28  *
29  * @{
30  */
31
32
33 #ifndef _LIBVLC_H
34 #define _LIBVLC_H 1
35
36 #include <vlc/vlc.h>
37 #include <vlc/libvlc_structures.h>
38
39 # ifdef __cplusplus
40 extern "C" {
41 # endif
42
43 /*****************************************************************************
44  * Exception handling
45  *****************************************************************************/
46 /** defgroup libvlc_exception Exceptions
47  * \ingroup libvlc
48  * LibVLC Exceptions handling
49  * @{
50  */
51
52 /**
53  * Initialize an exception structure. This can be called several times to
54  * reuse an exception structure.
55  *
56  * \param p_exception the exception to initialize
57  */
58 VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
59
60 /**
61  * Has an exception been raised?
62  *
63  * \param p_exception the exception to query
64  * \return 0 if the exception was raised, 1 otherwise
65  */
66 VLC_PUBLIC_API int
67 libvlc_exception_raised( const libvlc_exception_t *p_exception );
68
69 /**
70  * Raise an exception using a user-provided message.
71  *
72  * \param p_exception the exception to raise
73  * \param psz_message the exception message format string
74  * \param ... the format string arguments
75  */
76 VLC_PUBLIC_API void
77 libvlc_exception_raise( libvlc_exception_t *p_exception,
78                         const char *psz_format, ... );
79
80 /**
81  * Clear an exception object so it can be reused.
82  * The exception object must have be initialized.
83  *
84  * \param p_exception the exception to clear
85  */
86 VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
87
88 /**
89  * Get an exception's message.
90  *
91  * \param p_exception the exception to query
92  * \return the exception message or NULL if not applicable (exception not
93  *         raised, for example)
94  */
95 VLC_PUBLIC_API const char *
96 libvlc_exception_get_message( const libvlc_exception_t *p_exception );
97
98 /**@} */
99
100 /*****************************************************************************
101  * Core handling
102  *****************************************************************************/
103
104 /** defgroup libvlc_core Core
105  * \ingroup libvlc
106  * LibVLC Core
107  * @{
108  */
109
110 /**
111  * Create and initialize a libvlc instance.
112  *
113  * \param argc the number of arguments
114  * \param argv command-line-type arguments. argv[0] must be the path of the
115  *        calling program.
116  * \param p_e an initialized exception pointer
117  * \return the libvlc instance
118  */
119 VLC_PUBLIC_API libvlc_instance_t *
120 libvlc_new( int , const char *const *, libvlc_exception_t *);
121
122 /**
123  * Return a libvlc instance identifier for legacy APIs. Use of this
124  * function is discouraged, you should convert your program to use the
125  * new API.
126  *
127  * \param p_instance the instance
128  * \return the instance identifier
129  */
130 VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
131
132 /**
133  * Decrement the reference count of a libvlc instance, and destroy it
134  * if it reaches zero.
135  *
136  * \param p_instance the instance to destroy
137  */
138 VLC_PUBLIC_API void libvlc_release( libvlc_instance_t * );
139
140 /**
141  * Increments the reference count of a libvlc instance.
142  * The initial reference count is 1 after libvlc_new() returns.
143  *
144  * \param p_instance the instance to reference
145  */
146 VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
147
148 /** @}*/
149
150 /*****************************************************************************
151  * Media descriptor
152  *****************************************************************************/
153 /** defgroup libvlc_media_descriptor Media Descriptor
154  * \ingroup libvlc
155  * LibVLC Media Descriptor
156  * @{
157  */
158
159 /**
160  * Create a media descriptor with the given MRL.
161  *
162  * \param p_instance the instance
163  * \param psz_mrl the MRL to read
164  * \param p_e an initialized exception pointer
165  * \return the newly created media descriptor
166  */
167 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_descriptor_new(
168                                    libvlc_instance_t *p_instance,
169                                    const char * psz_mrl,
170                                    libvlc_exception_t *p_e );
171
172 /**
173  * Create a media descriptor as an empty node with the passed name.
174  *
175  * \param p_instance the instance
176  * \param psz_name the name of the node
177  * \param p_e an initialized exception pointer
178  * \return the new empty media descriptor
179  */
180 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_descriptor_new_as_node(
181                                    libvlc_instance_t *p_instance,
182                                    const char * psz_name,
183                                    libvlc_exception_t *p_e );
184
185 /**
186  * Add an option to the media descriptor.
187  *
188  * This option will be used to determine how the media_instance will
189  * read the media_descriptor. This allows to use VLC's advanced
190  * reading/streaming options on a per-media basis.
191  *
192  * The options are detailed in vlc --long-help, for instance "--sout-all"
193  *
194  * \param p_instance the instance
195  * \param psz_mrl the MRL to read
196  * \param p_e an initialized exception pointer
197  */
198 VLC_PUBLIC_API void libvlc_media_descriptor_add_option(
199                                    libvlc_media_descriptor_t * p_md,
200                                    const char * ppsz_options,
201                                    libvlc_exception_t * p_e );
202
203 VLC_PUBLIC_API void libvlc_media_descriptor_retain(
204                                    libvlc_media_descriptor_t *p_meta_desc );
205
206 VLC_PUBLIC_API void libvlc_media_descriptor_release(
207                                    libvlc_media_descriptor_t *p_meta_desc );
208
209 VLC_PUBLIC_API char * libvlc_media_descriptor_get_mrl( libvlc_media_descriptor_t * p_md,
210                                                        libvlc_exception_t * p_e );
211
212 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_descriptor_duplicate( libvlc_media_descriptor_t * );
213
214 /**
215  * Read the meta of the media descriptor.
216  *
217  * \param p_meta_desc the media descriptor to read
218  * \param p_meta_desc the meta to read
219  * \param p_e an initialized exception pointer
220  * \return the media descriptor's meta
221  */
222 VLC_PUBLIC_API char * libvlc_media_descriptor_get_meta(
223                                    libvlc_media_descriptor_t *p_meta_desc,
224                                    libvlc_meta_t e_meta,
225                                    libvlc_exception_t *p_e );
226
227 VLC_PUBLIC_API libvlc_state_t libvlc_media_descriptor_get_state(
228                                    libvlc_media_descriptor_t *p_meta_desc,
229                                    libvlc_exception_t *p_e );
230
231 /* Tags */
232 VLC_PUBLIC_API void libvlc_media_descriptor_add_tag( libvlc_media_descriptor_t *p_md,
233                                                      const char * key,
234                                                      const libvlc_tag_t tag,
235                                                      libvlc_exception_t *p_e );
236
237 VLC_PUBLIC_API void libvlc_media_descriptor_remove_tag( libvlc_media_descriptor_t *p_md,
238                                                          const char * key,
239                                                          const libvlc_tag_t tag,
240                                                          libvlc_exception_t *p_e );
241
242 VLC_PUBLIC_API int
243     libvlc_media_descriptor_tags_count_for_key( libvlc_media_descriptor_t *p_md,
244                                                 const char * key,
245                                                 libvlc_exception_t *p_e );
246
247 VLC_PUBLIC_API libvlc_tag_t
248     libvlc_media_descriptor_tag_at_index_for_key( libvlc_media_descriptor_t *p_md,
249                                                   int i,
250                                                   const char * key,
251                                                   libvlc_exception_t *p_e );
252
253 VLC_PUBLIC_API libvlc_media_list_t *
254     libvlc_media_descriptor_subitems( libvlc_media_descriptor_t *p_md,
255                                       libvlc_exception_t *p_e );
256
257 VLC_PUBLIC_API libvlc_event_manager_t *
258     libvlc_media_descriptor_event_manager( libvlc_media_descriptor_t * p_md,
259                                            libvlc_exception_t * p_e );
260
261 VLC_PUBLIC_API libvlc_time_t
262    libvlc_media_descriptor_get_duration( libvlc_media_descriptor_t * p_md,
263                                          libvlc_exception_t * p_e );
264
265 VLC_PUBLIC_API int
266    libvlc_media_descriptor_is_preparsed( libvlc_media_descriptor_t * p_md,
267                                          libvlc_exception_t * p_e );
268
269 VLC_PUBLIC_API void
270     libvlc_media_descriptor_set_user_data( libvlc_media_descriptor_t * p_md,
271                                            void * p_new_user_data,
272                                            libvlc_exception_t * p_e);
273 VLC_PUBLIC_API void *
274     libvlc_media_descriptor_get_user_data( libvlc_media_descriptor_t * p_md,
275                                            libvlc_exception_t * p_e);
276
277 /** @}*/
278
279 /*****************************************************************************
280  * Playlist
281  *****************************************************************************/
282 /** defgroup libvlc_playlist Playlist
283  * \ingroup libvlc
284  * LibVLC Playlist handling
285  * @{
286  */
287
288 /**
289  * Set the playlist's loop attribute. If set, the playlist runs continuously
290  * and wraps around when it reaches the end.
291  *
292  * \param p_instance the playlist instance
293  * \param loop the loop attribute. 1 sets looping, 0 disables it
294  * \param p_e an initialized exception pointer
295  */
296 VLC_PUBLIC_API void libvlc_playlist_loop( libvlc_instance_t* , int,
297                                           libvlc_exception_t * );
298
299 /**
300  * Start playing.
301  *
302  * Additionnal playlist item options can be specified for addition to the
303  * item before it is played.
304  *
305  * \param p_instance the playlist instance
306  * \param i_id the item to play. If this is a negative number, the next
307  *        item will be selected. Otherwise, the item with the given ID will be
308  *        played
309  * \param i_options the number of options to add to the item
310  * \param ppsz_options the options to add to the item
311  * \param p_e an initialized exception pointer
312  */
313 VLC_PUBLIC_API void libvlc_playlist_play( libvlc_instance_t*, int, int,
314                                           char **, libvlc_exception_t * );
315
316 /**
317  * Toggle the playlist's pause status.
318  *
319  * If the playlist was running, it is paused. If it was paused, it is resumed.
320  *
321  * \param p_instance the playlist instance to pause
322  * \param p_e an initialized exception pointer
323  */
324 VLC_PUBLIC_API void libvlc_playlist_pause( libvlc_instance_t *,
325                                            libvlc_exception_t * );
326
327 /**
328  * Checks whether the playlist is running
329  *
330  * \param p_instance the playlist instance
331  * \param p_e an initialized exception pointer
332  * \return 0 if the playlist is stopped or paused, 1 if it is running
333  */
334 VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *,
335                                               libvlc_exception_t * );
336
337 /**
338  * Get the number of items in the playlist
339  *
340  * \param p_instance the playlist instance
341  * \param p_e an initialized exception pointer
342  * \return the number of items
343  */
344 VLC_PUBLIC_API int libvlc_playlist_items_count( libvlc_instance_t *,
345                                                 libvlc_exception_t * );
346
347 /**
348  * Lock the playlist.
349  *
350  * \param p_instance the playlist instance
351  */
352 VLC_PUBLIC_API void libvlc_playlist_lock( libvlc_instance_t * );
353
354 /**
355  * Unlock the playlist.
356  *
357  * \param p_instance the playlist instance
358  */
359 VLC_PUBLIC_API void libvlc_playlist_unlock( libvlc_instance_t * );
360
361 /**
362  * Stop playing.
363  *
364  * \param p_instance the playlist instance to stop
365  * \param p_e an initialized exception pointer
366  */
367 VLC_PUBLIC_API void libvlc_playlist_stop( libvlc_instance_t *,
368                                           libvlc_exception_t * );
369
370 /**
371  * Go to the next playlist item. If the playlist was stopped, playback
372  * is started.
373  *
374  * \param p_instance the playlist instance
375  * \param p_e an initialized exception pointer
376  */
377 VLC_PUBLIC_API void libvlc_playlist_next( libvlc_instance_t *,
378                                           libvlc_exception_t * );
379
380 /**
381  * Go to the previous playlist item. If the playlist was stopped, playback
382  * is started.
383  *
384  * \param p_instance the playlist instance
385  * \param p_e an initialized exception pointer
386  */
387 VLC_PUBLIC_API void libvlc_playlist_prev( libvlc_instance_t *,
388                                           libvlc_exception_t * );
389
390 /**
391  * Empty a playlist. All items in the playlist are removed.
392  *
393  * \param p_instance the playlist instance
394  * \param p_e an initialized exception pointer
395  */
396 VLC_PUBLIC_API void libvlc_playlist_clear( libvlc_instance_t *,
397                                            libvlc_exception_t * );
398
399 /**
400  * Append an item to the playlist. The item is added at the end. If more
401  * advanced options are required, \see libvlc_playlist_add_extended instead.
402  *
403  * \param p_instance the playlist instance
404  * \param psz_uri the URI to open, using VLC format
405  * \param psz_name a name that you might want to give or NULL
406  * \param p_e an initialized exception pointer
407  * \return the identifier of the new item
408  */
409 VLC_PUBLIC_API int libvlc_playlist_add( libvlc_instance_t *, const char *,
410                                         const char *, libvlc_exception_t * );
411
412 /**
413  * Append an item to the playlist. The item is added at the end, with
414  * additional input options.
415  *
416  * \param p_instance the playlist instance
417  * \param psz_uri the URI to open, using VLC format
418  * \param psz_name a name that you might want to give or NULL
419  * \param i_options the number of options to add
420  * \param ppsz_options strings representing the options to add
421  * \param p_e an initialized exception pointer
422  * \return the identifier of the new item
423  */
424 VLC_PUBLIC_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
425                                                  const char *, int, const char **,
426                                                  libvlc_exception_t * );
427
428 /**
429  * Delete the playlist item with the given ID.
430  *
431  * \param p_instance the playlist instance
432  * \param i_id the id to remove
433  * \param p_e an initialized exception pointer
434  * \return 0 in case of success, a non-zero value otherwise
435  */
436 VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
437                                                 libvlc_exception_t * );
438
439 /** Get the input that is currently being played by the playlist.
440  *
441  * \param p_instance the playlist instance to use
442  * \param p_e an initialized exception pointern
443  * \return a media instance object
444  */
445 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_playlist_get_media_instance(
446                                 libvlc_instance_t *, libvlc_exception_t * );
447
448 VLC_PUBLIC_API int libvlc_media_instance_is_seekable(
449                                  libvlc_media_instance_t *p_mi,
450                                  libvlc_exception_t *p_e );
451
452 VLC_PUBLIC_API int libvlc_media_instance_can_pause(
453                                  libvlc_media_instance_t *p_mi,
454                                  libvlc_exception_t *p_e );
455
456 /** @}*/
457
458 /*****************************************************************************
459  * Media Instance
460  *****************************************************************************/
461 /** defgroup libvlc_media_instance Media Instance
462  * \ingroup libvlc
463  * LibVLC Media Instance
464  * @{
465  */
466
467 /** Create an empty Media Instance object
468  *
469  * \param p_libvlc_instance the libvlc instance in which the Media Instance
470  *        should be (unused for now).
471  * \param p_e an initialized exception pointer
472  */
473 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new( libvlc_instance_t *, libvlc_exception_t * );
474
475 /** Create a Media Instance object from a Media Descriptor
476  * \param p_md the media descriptor. Afterwards the p_md can be safely
477  *        destroyed.
478  * \param p_e an initialized exception pointer
479  */
480 VLC_PUBLIC_API libvlc_media_instance_t * libvlc_media_instance_new_from_media_descriptor( libvlc_media_descriptor_t *, libvlc_exception_t * );
481
482 /** Release a media_instance after use
483  * \param p_mi the Media Instance to free
484  */
485 VLC_PUBLIC_API void libvlc_media_instance_release( libvlc_media_instance_t * );
486 VLC_PUBLIC_API void libvlc_media_instance_retain( libvlc_media_instance_t * );
487
488 /** Set the media descriptor that will be used by the media_instance. If any,
489  * previous md will be released.
490  *
491  * \param p_mi the Media Instance
492  * \param p_md the Media Descriptor. Afterwards the p_md can be safely
493  *        destroyed.
494  * \param p_e an initialized exception pointer
495  */
496 VLC_PUBLIC_API void libvlc_media_instance_set_media_descriptor( libvlc_media_instance_t *, libvlc_media_descriptor_t *, libvlc_exception_t * );
497
498 /** Get the media descriptor used by the media_instance (if any). A copy of
499  * the md is returned. NULL is returned if no media instance is associated.
500  *
501  * \param p_mi the Media Instance
502  * \param p_e an initialized exception pointer
503  */
504 VLC_PUBLIC_API libvlc_media_descriptor_t * libvlc_media_instance_get_media_descriptor( libvlc_media_instance_t *, libvlc_exception_t * );
505
506 /** Get the Event Manager from which the media instance send event.
507  *
508  * \param p_mi the Media Instance
509  * \param p_e an initialized exception pointer
510  */
511 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_instance_event_manager ( libvlc_media_instance_t *, libvlc_exception_t * );
512
513 VLC_PUBLIC_API void libvlc_media_instance_play ( libvlc_media_instance_t *, libvlc_exception_t * );
514 VLC_PUBLIC_API void libvlc_media_instance_pause ( libvlc_media_instance_t *, libvlc_exception_t * );
515 VLC_PUBLIC_API void libvlc_media_instance_stop ( libvlc_media_instance_t *, libvlc_exception_t * );
516
517 VLC_PUBLIC_API void libvlc_media_instance_set_drawable ( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
518 VLC_PUBLIC_API libvlc_drawable_t
519                     libvlc_media_instance_get_drawable ( libvlc_media_instance_t *, libvlc_exception_t * );
520
521 /** \bug This might go away ... to be replaced by a broader system */
522 VLC_PUBLIC_API libvlc_time_t libvlc_media_instance_get_length     ( libvlc_media_instance_t *, libvlc_exception_t *);
523 VLC_PUBLIC_API libvlc_time_t libvlc_media_instance_get_time       ( libvlc_media_instance_t *, libvlc_exception_t *);
524 VLC_PUBLIC_API void          libvlc_media_instance_set_time       ( libvlc_media_instance_t *, libvlc_time_t, libvlc_exception_t *);
525 VLC_PUBLIC_API float         libvlc_media_instance_get_position   ( libvlc_media_instance_t *, libvlc_exception_t *);
526 VLC_PUBLIC_API void          libvlc_media_instance_set_position   ( libvlc_media_instance_t *, float, libvlc_exception_t *);
527 VLC_PUBLIC_API void          libvlc_media_instance_set_chapter    ( libvlc_media_instance_t *, int, libvlc_exception_t *);
528 VLC_PUBLIC_API int           libvlc_media_instance_get_chapter    (libvlc_media_instance_t *, libvlc_exception_t *);
529 VLC_PUBLIC_API int           libvlc_media_instance_get_chapter_count( libvlc_media_instance_t *, libvlc_exception_t *);
530 VLC_PUBLIC_API int    libvlc_media_instance_will_play      ( libvlc_media_instance_t *, libvlc_exception_t *);
531 VLC_PUBLIC_API float         libvlc_media_instance_get_rate       ( libvlc_media_instance_t *, libvlc_exception_t *);
532 VLC_PUBLIC_API void          libvlc_media_instance_set_rate       ( libvlc_media_instance_t *, float, libvlc_exception_t *);
533 VLC_PUBLIC_API libvlc_state_t libvlc_media_instance_get_state   ( libvlc_media_instance_t *, libvlc_exception_t *);
534
535 /**
536  * Does this input have a video output?
537  *
538  * \param p_input the input
539  * \param p_e an initialized exception pointer
540  */
541 VLC_PUBLIC_API int  libvlc_media_instance_has_vout( libvlc_media_instance_t *, libvlc_exception_t *);
542 VLC_PUBLIC_API float       libvlc_media_instance_get_fps( libvlc_media_instance_t *, libvlc_exception_t *);
543
544
545 /** @} */
546
547 /*****************************************************************************
548  * Tag Query
549  *****************************************************************************/
550 /** defgroup libvlc_tag_query Tag Query
551  * \ingroup libvlc
552  * LibVLC Tag query
553  * @{
554  */
555 VLC_PUBLIC_API libvlc_tag_query_t *
556     libvlc_tag_query_new( libvlc_instance_t *, libvlc_exception_t * );
557
558 VLC_PUBLIC_API void
559     libvlc_tag_query_release( libvlc_tag_query_t * );
560
561 VLC_PUBLIC_API void
562     libvlc_tag_query_retain( libvlc_tag_query_t * );
563
564 VLC_PUBLIC_API void
565     libvlc_tag_query_set_match_tag_and_key( libvlc_tag_query_t * p_q,
566                                             libvlc_tag_t tag,
567                                             char * psz_tag_key,
568                                             libvlc_exception_t * );
569
570 VLC_PUBLIC_API int
571     libvlc_tag_query_match( libvlc_tag_query_t *, libvlc_media_descriptor_t *,
572                             libvlc_exception_t * );
573
574 /** @} */
575
576 /*****************************************************************************
577  * Media List
578  *****************************************************************************/
579 /** defgroup libvlc_media_list MediaList
580  * \ingroup libvlc
581  * LibVLC Media List
582  * @{
583  */
584 VLC_PUBLIC_API libvlc_media_list_t *
585     libvlc_media_list_new( libvlc_instance_t *, libvlc_exception_t * );
586
587 VLC_PUBLIC_API void
588     libvlc_media_list_release( libvlc_media_list_t * );
589
590 VLC_PUBLIC_API void
591     libvlc_media_list_retain( libvlc_media_list_t * );
592
593 VLC_PUBLIC_API void
594     libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
595                                         const char * psz_uri,
596                                         libvlc_exception_t * p_e );
597
598 VLC_PUBLIC_API void
599     libvlc_media_list_set_media_descriptor( libvlc_media_list_t *,
600                                             libvlc_media_descriptor_t *,
601                                             libvlc_exception_t *);
602
603 VLC_PUBLIC_API libvlc_media_descriptor_t *
604     libvlc_media_list_media_descriptor( libvlc_media_list_t *,
605                                         libvlc_exception_t *);
606
607 VLC_PUBLIC_API void
608     libvlc_media_list_add_media_descriptor( libvlc_media_list_t *,
609                                             libvlc_media_descriptor_t *,
610                                             libvlc_exception_t * );
611 VLC_PUBLIC_API void
612     libvlc_media_list_insert_media_descriptor( libvlc_media_list_t *,
613                                                libvlc_media_descriptor_t *,
614                                                int,
615                                                libvlc_exception_t * );
616 VLC_PUBLIC_API void
617     libvlc_media_list_remove_index( libvlc_media_list_t *, int,
618                                     libvlc_exception_t * );
619
620 VLC_PUBLIC_API int
621     libvlc_media_list_count( libvlc_media_list_t * p_mlist,
622                              libvlc_exception_t * p_e );
623
624 VLC_PUBLIC_API libvlc_media_descriptor_t *
625     libvlc_media_list_item_at_index( libvlc_media_list_t *, int,
626                                      libvlc_exception_t * );
627 VLC_PUBLIC_API int
628     libvlc_media_list_index_of_item( libvlc_media_list_t *,
629                                      libvlc_media_descriptor_t *,
630                                      libvlc_exception_t * );
631
632 /* This indicates if this media list is read-only from a user point of view */
633 VLC_PUBLIC_API int
634     libvlc_media_list_is_readonly( libvlc_media_list_t * p_mlist );
635
636 VLC_PUBLIC_API void
637     libvlc_media_list_lock( libvlc_media_list_t * );
638 VLC_PUBLIC_API void
639     libvlc_media_list_unlock( libvlc_media_list_t * );
640
641 VLC_PUBLIC_API libvlc_media_list_view_t *
642     libvlc_media_list_flat_view( libvlc_media_list_t *,
643                                  libvlc_exception_t * );
644
645 VLC_PUBLIC_API libvlc_media_list_view_t *
646     libvlc_media_list_hierarchical_view( libvlc_media_list_t *,
647                                          libvlc_exception_t * );
648
649 VLC_PUBLIC_API libvlc_media_list_view_t *
650     libvlc_media_list_hierarchical_node_view( libvlc_media_list_t *,
651                                               libvlc_exception_t * );
652
653 VLC_PUBLIC_API libvlc_event_manager_t *
654     libvlc_media_list_event_manager( libvlc_media_list_t *,
655                                      libvlc_exception_t * );
656 /** @} */
657
658
659 /*****************************************************************************
660  * Media List View
661  *****************************************************************************/
662 /** defgroup libvlc_media_list_view MediaListView
663  * \ingroup libvlc
664  * LibVLC Media List View
665  * @{ */
666
667 VLC_PUBLIC_API void
668     libvlc_media_list_view_retain( libvlc_media_list_view_t * p_mlv );
669
670 VLC_PUBLIC_API void
671     libvlc_media_list_view_release( libvlc_media_list_view_t * p_mlv );
672
673 VLC_PUBLIC_API libvlc_event_manager_t *
674     libvlc_media_list_view_event_manager(  libvlc_media_list_view_t * p_mlv );
675
676 VLC_PUBLIC_API int
677     libvlc_media_list_view_count(  libvlc_media_list_view_t * p_mlv,
678                                    libvlc_exception_t * p_e );
679
680 VLC_PUBLIC_API libvlc_media_descriptor_t *
681     libvlc_media_list_view_item_at_index(  libvlc_media_list_view_t * p_mlv,
682                                            int index,
683                                            libvlc_exception_t * p_e );
684
685 VLC_PUBLIC_API libvlc_media_list_view_t *
686     libvlc_media_list_view_children_at_index(  libvlc_media_list_view_t * p_mlv,
687                                            int index,
688                                            libvlc_exception_t * p_e );
689
690 VLC_PUBLIC_API libvlc_media_list_view_t *
691     libvlc_media_list_view_children_for_item(  libvlc_media_list_view_t * p_mlv,
692                                            libvlc_media_descriptor_t * p_md,
693                                            libvlc_exception_t * p_e );
694
695
696 VLC_PUBLIC_API int
697     libvlc_media_list_view_index_of_item(  libvlc_media_list_view_t * p_mlv,
698                                            libvlc_media_descriptor_t * p_md,
699                                            libvlc_exception_t * p_e );
700
701 VLC_PUBLIC_API void
702     libvlc_media_list_view_insert_at_index(  libvlc_media_list_view_t * p_mlv,
703                                              libvlc_media_descriptor_t * p_md,
704                                              int index,
705                                              libvlc_exception_t * p_e );
706
707 VLC_PUBLIC_API void
708     libvlc_media_list_view_remove_at_index(  libvlc_media_list_view_t * p_mlv,
709                                              int index,
710                                              libvlc_exception_t * p_e );
711
712 VLC_PUBLIC_API void
713     libvlc_media_list_view_add_item(  libvlc_media_list_view_t * p_mlv,
714                                       libvlc_media_descriptor_t * p_md,
715                                       libvlc_exception_t * p_e );
716
717 VLC_PUBLIC_API libvlc_media_list_t *
718     libvlc_media_list_view_parent_media_list(  libvlc_media_list_view_t * p_mlv,
719                                                libvlc_exception_t * p_e );
720
721 /** @} */
722
723 /*****************************************************************************
724  * Dynamic Media List (Deprecated)
725  *****************************************************************************/
726 /** defgroup libvlc_media_list MediaList
727  * \ingroup libvlc
728  * LibVLC Media List
729  * @{ */
730
731 VLC_PUBLIC_API libvlc_dynamic_media_list_t *
732     libvlc_dynamic_media_list_new(  libvlc_media_list_t * p_mlist,
733                                     libvlc_tag_query_t * p_query,
734                                     libvlc_tag_t tag,
735                                     libvlc_exception_t * p_e );
736 VLC_PUBLIC_API void
737     libvlc_dynamic_media_list_release( libvlc_dynamic_media_list_t * p_dmlist );
738
739 VLC_PUBLIC_API void
740     libvlc_dynamic_media_list_retain( libvlc_dynamic_media_list_t * p_dmlist );
741
742 libvlc_media_list_t *
743     libvlc_dynamic_media_list_media_list( libvlc_dynamic_media_list_t * p_dmlist,
744                                           libvlc_exception_t * p_e );
745
746 /** @} */
747
748 /*****************************************************************************
749  * Media Library
750  *****************************************************************************/
751 /** defgroup libvlc_media_library Media Library
752  * \ingroup libvlc
753  * LibVLC Media Library
754  * @{
755  */
756 VLC_PUBLIC_API libvlc_media_library_t *
757     libvlc_media_library_new( libvlc_instance_t * p_inst,
758                               libvlc_exception_t * p_e );
759 VLC_PUBLIC_API void
760     libvlc_media_library_release( libvlc_media_library_t * p_mlib );
761 VLC_PUBLIC_API void
762     libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
763
764
765 VLC_PUBLIC_API void
766     libvlc_media_library_load( libvlc_media_library_t * p_mlib,
767                                libvlc_exception_t * p_e );
768
769 VLC_PUBLIC_API void
770     libvlc_media_library_save( libvlc_media_library_t * p_mlib,
771                                libvlc_exception_t * p_e );
772
773 VLC_PUBLIC_API libvlc_media_list_t *
774     libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
775                                      libvlc_exception_t * p_e );
776
777
778 /** @} */
779
780 /*****************************************************************************
781  * Media List Player
782  *****************************************************************************/
783 /** defgroup libvlc_media_list_player MediaListPlayer
784  * \ingroup libvlc
785  * LibVLC Media List Player
786  * @{
787  */
788 VLC_PUBLIC_API libvlc_media_list_player_t *
789     libvlc_media_list_player_new( libvlc_instance_t * p_instance,
790                                   libvlc_exception_t * p_e );
791 VLC_PUBLIC_API void
792     libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
793
794 VLC_PUBLIC_API void
795     libvlc_media_list_player_set_media_instance(
796                                      libvlc_media_list_player_t * p_mlp,
797                                      libvlc_media_instance_t * p_mi,
798                                      libvlc_exception_t * p_e );
799
800 VLC_PUBLIC_API void
801     libvlc_media_list_player_set_media_list(
802                                      libvlc_media_list_player_t * p_mlp,
803                                      libvlc_media_list_t * p_mlist,
804                                      libvlc_exception_t * p_e );
805
806 VLC_PUBLIC_API void
807     libvlc_media_list_player_play( libvlc_media_list_player_t * p_mlp,
808                                    libvlc_exception_t * p_e );
809
810 VLC_PUBLIC_API void
811     libvlc_media_list_player_pause( libvlc_media_list_player_t * p_mlp,
812                                    libvlc_exception_t * p_e );
813
814 VLC_PUBLIC_API int
815     libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp,
816                                          libvlc_exception_t * p_e );
817
818 VLC_PUBLIC_API libvlc_state_t
819     libvlc_media_list_player_get_state( libvlc_media_list_player_t * p_mlp,
820                                         libvlc_exception_t * p_e );
821
822 VLC_PUBLIC_API void
823     libvlc_media_list_player_play_item_at_index(
824                                    libvlc_media_list_player_t * p_mlp,
825                                    int i_index,
826                                    libvlc_exception_t * p_e );
827
828 VLC_PUBLIC_API void
829     libvlc_media_list_player_play_item(
830                                    libvlc_media_list_player_t * p_mlp,
831                                    libvlc_media_descriptor_t * p_md,
832                                    libvlc_exception_t * p_e );
833
834 VLC_PUBLIC_API void
835     libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
836                                    libvlc_exception_t * p_e );
837 VLC_PUBLIC_API void
838     libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
839                                    libvlc_exception_t * p_e );
840
841 /** @} */
842
843 /** defgroup libvlc_video Video
844  * \ingroup libvlc
845  * LibVLC Video handling
846  * @{
847  */
848
849 /**
850  * Toggle fullscreen status on video output.
851  *
852  * \param p_input the input
853  * \param p_e an initialized exception pointer
854  */
855 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
856
857 /**
858  * Enable or disable fullscreen on a video output.
859  *
860  * \param p_input the input
861  * \param b_fullscreen boolean for fullscreen status
862  * \param p_e an initialized exception pointer
863  */
864 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_instance_t *, int, libvlc_exception_t * );
865
866 /**
867  * Get current fullscreen status.
868  *
869  * \param p_input the input
870  * \param p_e an initialized exception pointer
871  * \return the fullscreen status (boolean)
872  */
873 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_instance_t *, libvlc_exception_t * );
874
875 /**
876  * Get current video height.
877  *
878  * \param p_input the input
879  * \param p_e an initialized exception pointer
880  * \return the video height
881  */
882 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_instance_t *, libvlc_exception_t * );
883
884 /**
885  * Get current video width.
886  *
887  * \param p_input the input
888  * \param p_e an initialized exception pointer
889  * \return the video width
890  */
891 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_instance_t *, libvlc_exception_t * );
892
893 /**
894  * Get current video aspect ratio.
895  *
896  * \param p_input the input
897  * \param p_e an initialized exception pointer
898  * \return the video aspect ratio
899  */
900 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_instance_t *, libvlc_exception_t * );
901
902 /**
903  * Set new video aspect ratio.
904  *
905  * \param p_input the input
906  * \param psz_aspect new video aspect-ratio
907  * \param p_e an initialized exception pointer
908  */
909 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_instance_t *, char *, libvlc_exception_t * );
910
911 /**
912  * Get current video subtitle.
913  *
914  * \param p_input the input
915  * \param p_e an initialized exception pointer
916  * \return the video subtitle selected
917  */
918 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_instance_t *, libvlc_exception_t * );
919
920 /**
921  * Set new video subtitle.
922  *
923  * \param p_input the input
924  * \param i_spu new video subtitle to select
925  * \param p_e an initialized exception pointer
926  */
927 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_instance_t *, int , libvlc_exception_t * );
928
929 /**
930  * Get current crop filter geometry.
931  *
932  * \param p_input the input
933  * \param p_e an initialized exception pointer
934  * \return the crop filter geometry
935  */
936 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_instance_t *, libvlc_exception_t * );
937
938 /**
939  * Set new crop filter geometry.
940  *
941  * \param p_input the input
942  * \param psz_geometry new crop filter geometry
943  * \param p_e an initialized exception pointer
944  */
945 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_instance_t *, char *, libvlc_exception_t * );
946
947 /**
948  * Toggle teletext transparent status on video output.
949  *
950  * \param p_input the input
951  * \param p_e an initialized exception pointer
952  */
953 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_instance_t *, libvlc_exception_t * );
954
955 /**
956  * Get current teletext page requested.
957  *
958  * \param p_input the input
959  * \param p_e an initialized exception pointer
960  * \return the current teletext page requested.
961  */
962 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_instance_t *, libvlc_exception_t * );
963
964 /**
965  * Set new teletext page to retrieve.
966  *
967  * \param p_input the input
968  * \param i_page teletex page number requested
969  * \param p_e an initialized exception pointer
970  */
971 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_instance_t *, int, libvlc_exception_t * );
972
973 /**
974  * Take a snapshot of the current video window.
975  *
976  * If i_width AND i_height is 0, original size is used.
977  * If i_width XOR i_height is 0, original aspect-ratio is preserved.
978  *
979  * \param p_input the input
980  * \param psz_filepath the path where to save the screenshot to
981  * \param i_width the snapshot's width
982  * \param i_height the snapshot's height
983  * \param p_e an initialized exception pointer
984  */
985 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_instance_t *, char *,unsigned int, unsigned int, libvlc_exception_t * );
986
987 VLC_PUBLIC_API int libvlc_video_destroy( libvlc_media_instance_t *, libvlc_exception_t *);
988
989 /**
990  * Resize the current video output window.
991  *
992  * \param p_instance libvlc instance
993  * \param width new width for video output window
994  * \param height new height for video output window
995  * \param p_e an initialized exception pointer
996  * \return the success status (boolean)
997  */
998 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_instance_t *, int, int, libvlc_exception_t *);
999
1000 /**
1001  * Change the parent for the current the video output.
1002  *
1003  * \param p_instance libvlc instance
1004  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
1005  * \param p_e an initialized exception pointer
1006  * \return the success status (boolean)
1007  */
1008 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
1009
1010 /**
1011  * Tell windowless video output to redraw rectangular area (MacOS X only).
1012  *
1013  * \param p_instance libvlc instance
1014  * \param area coordinates within video drawable
1015  * \param p_e an initialized exception pointer
1016  */
1017 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_instance_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
1018
1019 /**
1020  * Set the default video output's parent.
1021  *
1022  * This setting will be used as default for all video outputs.
1023  *
1024  * \param p_instance libvlc instance
1025  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
1026  * \param p_e an initialized exception pointer
1027  */
1028 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
1029
1030 /**
1031  * Set the default video output parent.
1032  *
1033  * This setting will be used as default for all video outputs.
1034  *
1035  * \param p_instance libvlc instance
1036  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
1037  * \param p_e an initialized exception pointer
1038  */
1039 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
1040
1041 /**
1042  * Set the default video output size.
1043  *
1044  * This setting will be used as default for all video outputs.
1045  *
1046  * \param p_instance libvlc instance
1047  * \param width new width for video drawable
1048  * \param height new height for video drawable
1049  * \param p_e an initialized exception pointer
1050  */
1051 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
1052
1053 /**
1054  * Set the default video output viewport for a windowless video output
1055  * (MacOS X only).
1056  *
1057  * This setting will be used as default for all video outputs.
1058  *
1059  * \param p_instance libvlc instance
1060  * \param view coordinates within video drawable
1061  * \param clip coordinates within video drawable
1062  * \param p_e an initialized exception pointer
1063  */
1064 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
1065
1066 /** @} */
1067
1068 /** defgroup libvlc_audio Audio
1069  * \ingroup libvlc
1070  * LibVLC Audio handling
1071  * @{
1072  */
1073
1074 /**
1075  * Toggle mute status.
1076  *
1077  * \param p_instance libvlc instance
1078  * \param p_e an initialized exception pointer
1079  */
1080 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
1081
1082 /**
1083  * Get current mute status.
1084  *
1085  * \param p_instance libvlc instance
1086  * \param p_e an initialized exception pointer
1087  * \return the mute status (boolean)
1088  */
1089 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
1090
1091 /**
1092  * Set mute status.
1093  *
1094  * \param p_instance libvlc instance
1095  * \param status If status is VLC_TRUE then mute, otherwise unmute
1096  * \param p_e an initialized exception pointer
1097  */
1098 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
1099
1100 /**
1101  * Get current audio level.
1102  *
1103  * \param p_instance libvlc instance
1104  * \param p_e an initialized exception pointer
1105  * \return the audio level (int)
1106  */
1107 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
1108
1109 /**
1110  * Set current audio level.
1111  *
1112  * \param p_instance libvlc instance
1113  * \param i_volume the volume (int)
1114  * \param p_e an initialized exception pointer
1115  */
1116 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
1117
1118 /**
1119  * Get number of available audio tracks.
1120  *
1121  * \param p_mi media instance
1122  * \param p_e an initialized exception
1123  * \return the number of available audio tracks (int)
1124  */
1125 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_instance_t *,  libvlc_exception_t * );
1126
1127 /**
1128  * Get current audio track.
1129  *
1130  * \param p_input input instance
1131  * \param p_e an initialized exception pointer
1132  * \return the audio track (int)
1133  */
1134 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_instance_t *, libvlc_exception_t * );
1135
1136 /**
1137  * Set current audio track.
1138  *
1139  * \param p_input input instance
1140  * \param i_track the track (int)
1141  * \param p_e an initialized exception pointer
1142  */
1143 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_instance_t *, int, libvlc_exception_t * );
1144
1145 /**
1146  * Get current audio channel.
1147  *
1148  * \param p_instance input instance
1149  * \param p_e an initialized exception pointer
1150  * \return the audio channel (int)
1151  */
1152 VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
1153
1154 /**
1155  * Set current audio channel.
1156  *
1157  * \param p_instance input instance
1158  * \param i_channel the audio channel (int)
1159  * \param p_e an initialized exception pointer
1160  */
1161 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
1162
1163 /** @} */
1164
1165 /*****************************************************************************
1166  * Services/Media Discovery
1167  *****************************************************************************/
1168 /** defgroup libvlc_media_discoverer Media Discoverer
1169  * \ingroup libvlc
1170  * LibVLC Media Discoverer
1171  * @{
1172  */
1173
1174 VLC_PUBLIC_API libvlc_media_discoverer_t *
1175 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
1176                                        const char * psz_name,
1177                                        libvlc_exception_t * p_e );
1178 VLC_PUBLIC_API void   libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
1179 VLC_PUBLIC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
1180
1181 VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
1182
1183 VLC_PUBLIC_API libvlc_event_manager_t *
1184         libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
1185
1186 VLC_PUBLIC_API int
1187         libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
1188
1189 /**@} */
1190
1191 /*****************************************************************************
1192  * VLM
1193  *****************************************************************************/
1194 /** defgroup libvlc_vlm VLM
1195  * \ingroup libvlc
1196  * LibVLC VLM
1197  * @{
1198  */
1199
1200 /**
1201  * Add a broadcast, with one input.
1202  *
1203  * \param p_instance the instance
1204  * \param psz_name the name of the new broadcast
1205  * \param psz_input the input MRL
1206  * \param psz_output the output MRL (the parameter to the "sout" variable)
1207  * \param i_options number of additional options
1208  * \param ppsz_options additional options
1209  * \param b_enabled boolean for enabling the new broadcast
1210  * \param b_loop Should this broadcast be played in loop ?
1211  * \param p_e an initialized exception pointer
1212  */
1213 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
1214                                               int, char **, int, int, libvlc_exception_t * );
1215
1216 /**
1217  * Delete a media (VOD or broadcast).
1218  *
1219  * \param p_instance the instance
1220  * \param psz_name the media to delete
1221  * \param p_e an initialized exception pointer
1222  */
1223 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
1224
1225 /**
1226  * Enable or disable a media (VOD or broadcast).
1227  *
1228  * \param p_instance the instance
1229  * \param psz_name the media to work on
1230  * \param b_enabled the new status
1231  * \param p_e an initialized exception pointer
1232  */
1233 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
1234                                             libvlc_exception_t *);
1235
1236 /**
1237  * Set the output for a media.
1238  *
1239  * \param p_instance the instance
1240  * \param psz_name the media to work on
1241  * \param psz_output the output MRL (the parameter to the "sout" variable)
1242  * \param p_e an initialized exception pointer
1243  */
1244 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
1245                                            libvlc_exception_t *);
1246
1247 /**
1248  * Set a media's input MRL. This will delete all existing inputs and
1249  * add the specified one.
1250  *
1251  * \param p_instance the instance
1252  * \param psz_name the media to work on
1253  * \param psz_input the input MRL
1254  * \param p_e an initialized exception pointer
1255  */
1256 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
1257                                           libvlc_exception_t *);
1258
1259 /**
1260  * Add a media's input MRL. This will add the specified one.
1261  *
1262  * \param p_instance the instance
1263  * \param psz_name the media to work on
1264  * \param psz_input the input MRL
1265  * \param p_e an initialized exception pointer
1266  */
1267 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
1268                                           libvlc_exception_t *p_exception );
1269 /**
1270  * Set a media's loop status.
1271  *
1272  * \param p_instance the instance
1273  * \param psz_name the media to work on
1274  * \param b_loop the new status
1275  * \param p_e an initialized exception pointer
1276  */
1277 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
1278                                          libvlc_exception_t *);
1279
1280 /**
1281  * Edit the parameters of a media. This will delete all existing inputs and
1282  * add the specified one.
1283  *
1284  * \param p_instance the instance
1285  * \param psz_name the name of the new broadcast
1286  * \param psz_input the input MRL
1287  * \param psz_output the output MRL (the parameter to the "sout" variable)
1288  * \param i_options number of additional options
1289  * \param ppsz_options additional options
1290  * \param b_enabled boolean for enabling the new broadcast
1291  * \param b_loop Should this broadcast be played in loop ?
1292  * \param p_e an initialized exception pointer
1293  */
1294 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
1295                                              int, char **, int, int, libvlc_exception_t * );
1296
1297 /**
1298  * Play the named broadcast.
1299  *
1300  * \param p_instance the instance
1301  * \param psz_name the name of the broadcast
1302  * \param p_e an initialized exception pointer
1303  */
1304 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
1305
1306 /**
1307  * Stop the named broadcast.
1308  *
1309  * \param p_instance the instance
1310  * \param psz_name the name of the broadcast
1311  * \param p_e an initialized exception pointer
1312  */
1313 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
1314
1315 /**
1316  * Pause the named broadcast.
1317  *
1318  * \param p_instance the instance
1319  * \param psz_name the name of the broadcast
1320  * \param p_e an initialized exception pointer
1321  */
1322 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
1323
1324 /**
1325  * Seek in the named broadcast.
1326  *
1327  * \param p_instance the instance
1328  * \param psz_name the name of the broadcast
1329  * \param f_percentage the percentage to seek to
1330  * \param p_e an initialized exception pointer
1331  */
1332 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
1333                                            float, libvlc_exception_t * );
1334
1335 /**
1336  * Return information about the named broadcast.
1337  *
1338  * \param p_instance the instance
1339  * \param psz_name the name of the broadcast
1340  * \param p_e an initialized exception pointer
1341  */
1342 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
1343
1344 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
1345 returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
1346                         char *, int , libvlc_exception_t * );
1347
1348 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
1349 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
1350 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
1351 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
1352 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
1353 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
1354 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
1355
1356 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
1357
1358 /** @} */
1359
1360 /*****************************************************************************
1361  * Message log handling
1362  *****************************************************************************/
1363
1364 /** defgroup libvlc_log Log
1365  * \ingroup libvlc
1366  * LibVLC Message Logging
1367  * @{
1368  */
1369
1370 /**
1371  * Return the VLC messaging verbosity level.
1372  *
1373  * \param p_instance libvlc instance
1374  * \param exception an initialized exception pointer
1375  */
1376 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
1377                                                   libvlc_exception_t *p_e );
1378
1379 /**
1380  * Set the VLC messaging verbosity level.
1381  *
1382  * \param p_log libvlc log instance
1383  * \param exception an initialized exception pointer
1384  */
1385 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
1386                                               libvlc_exception_t *p_e );
1387
1388 /**
1389  * Open a VLC message log instance.
1390  *
1391  * \param p_instance libvlc instance
1392  * \param exception an initialized exception pointer
1393  */
1394 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( libvlc_instance_t *, libvlc_exception_t *);
1395
1396 /**
1397  * Close a VLC message log instance.
1398  *
1399  * \param p_log libvlc log instance
1400  * \param exception an initialized exception pointer
1401  */
1402 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
1403
1404 /**
1405  * Returns the number of messages in a log instance.
1406  *
1407  * \param p_log libvlc log instance
1408  * \param exception an initialized exception pointer
1409  */
1410 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
1411
1412 /**
1413  * Clear a log instance.
1414  *
1415  * All messages in the log are removed. The log should be cleared on a
1416  * regular basis to avoid clogging.
1417  *
1418  * \param p_log libvlc log instance
1419  * \param exception an initialized exception pointer
1420  */
1421 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
1422
1423 /**
1424  * Allocate and returns a new iterator to messages in log.
1425  *
1426  * \param p_log libvlc log instance
1427  * \param exception an initialized exception pointer
1428  */
1429 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
1430
1431 /**
1432  * Release a previoulsy allocated iterator.
1433  *
1434  * \param p_log libvlc log iterator
1435  * \param exception an initialized exception pointer
1436  */
1437 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1438
1439 /**
1440  * Return whether log iterator has more messages.
1441  *
1442  * \param p_log libvlc log iterator
1443  * \param exception an initialized exception pointer
1444  */
1445 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1446
1447 /**
1448  * Return the next log message.
1449  *
1450  * The message contents must not be freed
1451  *
1452  * \param p_log libvlc log iterator
1453  * \param exception an initialized exception pointer
1454  */
1455 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
1456                                                                struct libvlc_log_message_t *buffer,
1457                                                                libvlc_exception_t *p_e );
1458
1459 /** @} */
1460
1461 /*****************************************************************************
1462  * Event handling
1463  *****************************************************************************/
1464
1465 /** defgroup libvlc_callbacks Callbacks
1466  * \ingroup libvlc
1467  * LibVLC Events
1468  * @{
1469  */
1470
1471 /**
1472  * Register for an event notification.
1473  *
1474  * \param p_event_manager the event manager to which you want to attach to.
1475  *        Generally it is obtained by vlc_my_object_event_manager() where
1476  *        my_object is the object you want to listen to.
1477  * \param i_event_type the desired event to which we want to listen
1478  * \param f_callback the function to call when i_event_type occurs
1479  * \param user_data user provided data to carry with the event
1480  * \param p_e an initialized exception pointer
1481  */
1482 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
1483                                          libvlc_event_type_t i_event_type,
1484                                          libvlc_callback_t f_callback,
1485                                          void *user_data,
1486                                          libvlc_exception_t *p_e );
1487
1488 /**
1489  * Unregister an event notification.
1490  *
1491  * \param p_event_manager the event manager
1492  * \param i_event_type the desired event to which we want to unregister
1493  * \param f_callback the function to call when i_event_type occurs
1494  * \param p_e an initialized exception pointer
1495  */
1496 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
1497                                          libvlc_event_type_t i_event_type,
1498                                          libvlc_callback_t f_callback,
1499                                          void *p_user_data,
1500                                          libvlc_exception_t *p_e );
1501
1502 /**
1503  * Get an event's type name.
1504  *
1505  * \param i_event_type the desired event
1506  */
1507 VLC_PUBLIC_API const char * libvlc_event_type_name( libvlc_event_type_t event_type );
1508
1509 /** @} */
1510
1511
1512 # ifdef __cplusplus
1513 }
1514 # endif
1515
1516 #endif /* <vlc/libvlc.h> */