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