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