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