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