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