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