]> git.sesse.net Git - vlc/blob - include/vlc/libvlc.h
df79fb28868a5fe4666c04fc0168c5cc3874def9
[vlc] / include / vlc / libvlc.h
1 /*****************************************************************************
2  * libvlc.h:  libvlc external API
3  *****************************************************************************
4  * Copyright (C) 1998-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Paul Saman <jpsaman@videolan.org>
9  *          Pierre d'Herbemont <pdherbemont@videolan.org>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25
26 /**
27  * \file
28  * This file defines libvlc external API
29  */
30
31 /**
32  * \defgroup libvlc libvlc
33  * This is libvlc, the base library of the VLC program.
34  *
35  * @{
36  */
37
38 #ifndef VLC_LIBVLC_H
39 #define VLC_LIBVLC_H 1
40
41 #if defined (WIN32) && defined (DLL_EXPORT)
42 # define VLC_PUBLIC_API __declspec(dllexport)
43 #else
44 # define VLC_PUBLIC_API
45 #endif
46
47 #ifdef __LIBVLC__
48 /* Avoid unuseful warnings from libvlc with our deprecated APIs */
49 #   define VLC_DEPRECATED_API VLC_PUBLIC_API
50 #elif defined(__GNUC__) && \
51       (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
52 # define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
53 #else
54 # define VLC_DEPRECATED_API VLC_PUBLIC_API
55 #endif
56
57 # ifdef __cplusplus
58 extern "C" {
59 # endif
60
61 /*****************************************************************************
62  * Exception handling
63  *****************************************************************************/
64 /** \defgroup libvlc_exception libvlc_exception
65  * \ingroup libvlc_core
66  * LibVLC Exceptions handling
67  * @{
68  */
69
70 /**
71  * Initialize an exception structure. This can be called several times to
72  * reuse an exception structure.
73  *
74  * \param p_exception the exception to initialize
75  */
76 VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
77
78 /**
79  * Has an exception been raised?
80  *
81  * \param p_exception the exception to query
82  * \return 0 if the exception was raised, 1 otherwise
83  */
84 VLC_PUBLIC_API int
85 libvlc_exception_raised( const libvlc_exception_t *p_exception );
86
87 /**
88  * Raise an exception using a user-provided message.
89  *
90  * \param p_exception the exception to raise
91  * \param psz_format the exception message format string
92  * \param ... the format string arguments
93  */
94 VLC_PUBLIC_API void
95 libvlc_exception_raise( libvlc_exception_t *p_exception,
96                         const char *psz_format, ... );
97
98 /**
99  * Clear an exception object so it can be reused.
100  * The exception object must have be initialized.
101  *
102  * \param p_exception the exception to clear
103  */
104 VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
105
106 /**
107  * Get an exception's message.
108  *
109  * \param p_exception the exception to query
110  * \return the exception message or NULL if not applicable (exception not
111  *         raised, for example)
112  */
113 VLC_PUBLIC_API const char *
114 libvlc_exception_get_message( const libvlc_exception_t *p_exception );
115
116 /**@} */
117
118 /*****************************************************************************
119  * Core handling
120  *****************************************************************************/
121
122 /** \defgroup libvlc_core libvlc_core
123  * \ingroup libvlc
124  * LibVLC Core
125  * @{
126  */
127
128 /**
129  * Create and initialize a libvlc instance.
130  *
131  * \param argc the number of arguments
132  * \param argv command-line-type arguments. argv[0] must be the path of the
133  *        calling program.
134  * \param p_e an initialized exception pointer
135  * \return the libvlc instance
136  */
137 VLC_PUBLIC_API libvlc_instance_t *
138 libvlc_new( int , const char *const *, libvlc_exception_t *);
139
140 /**
141  * Return a libvlc instance identifier for legacy APIs. Use of this
142  * function is discouraged, you should convert your program to use the
143  * new API.
144  *
145  * \param p_instance the instance
146  * \return the instance identifier
147  */
148 VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
149
150 /**
151  * Decrement the reference count of a libvlc instance, and destroy it
152  * if it reaches zero.
153  *
154  * \param p_instance the instance to destroy
155  */
156 VLC_PUBLIC_API void libvlc_release( libvlc_instance_t * );
157
158 /**
159  * Increments the reference count of a libvlc instance.
160  * The initial reference count is 1 after libvlc_new() returns.
161  *
162  * \param p_instance the instance to reference
163  */
164 VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
165
166 /**
167  * Try to start a user interface for the libvlc instance, and wait until the
168  * user exits.
169  *
170  * \param p_instance the instance
171  * \param name interface name, or NULL for default
172  * \param p_exception an initialized exception pointer
173  */
174 VLC_PUBLIC_API
175 void libvlc_add_intf( libvlc_instance_t *p_instance, const char *name,
176                       libvlc_exception_t *p_exception );
177
178 /**
179  * Waits until an interface causes the instance to exit.
180  * You should start at least one interface first, using libvlc_add_intf().
181  *
182  * \param p_instance the instance
183  */
184 VLC_PUBLIC_API
185 void libvlc_wait( libvlc_instance_t *p_instance );
186
187 /**
188  * Retrieve libvlc version.
189  *
190  * Example: "0.9.0-git Grishenko"
191  *
192  * \return a string containing the libvlc version
193  */
194 VLC_PUBLIC_API const char * libvlc_get_version(void);
195
196 /**
197  * Retrieve libvlc compiler version.
198  *
199  * Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"
200  *
201  * \return a string containing the libvlc compiler version
202  */
203 VLC_PUBLIC_API const char * libvlc_get_compiler(void);
204
205 /**
206  * Retrieve libvlc changeset.
207  *
208  * Example: "aa9bce0bc4"
209  *
210  * \return a string containing the libvlc changeset
211  */
212 VLC_PUBLIC_API const char * libvlc_get_changeset(void);
213
214 /** @}*/
215
216 /*****************************************************************************
217  * media
218  *****************************************************************************/
219 /** \defgroup libvlc_media libvlc_media
220  * \ingroup libvlc
221  * LibVLC Media
222  * @{
223  */
224
225 /**
226  * Create a media with the given MRL.
227  *
228  * \param p_instance the instance
229  * \param psz_mrl the MRL to read
230  * \param p_e an initialized exception pointer
231  * \return the newly created media
232  */
233 VLC_PUBLIC_API libvlc_media_t * libvlc_media_new(
234                                    libvlc_instance_t *p_instance,
235                                    const char * psz_mrl,
236                                    libvlc_exception_t *p_e );
237
238 /**
239  * Create a media as an empty node with the passed name.
240  *
241  * \param p_instance the instance
242  * \param psz_name the name of the node
243  * \param p_e an initialized exception pointer
244  * \return the new empty media
245  */
246 VLC_PUBLIC_API libvlc_media_t * libvlc_media_new_as_node(
247                                    libvlc_instance_t *p_instance,
248                                    const char * psz_name,
249                                    libvlc_exception_t *p_e );
250
251 /**
252  * Add an option to the media.
253  *
254  * This option will be used to determine how the media_player will
255  * read the media. This allows to use VLC's advanced
256  * reading/streaming options on a per-media basis.
257  *
258  * The options are detailed in vlc --long-help, for instance "--sout-all"
259  *
260  * \param p_instance the instance
261  * \param ppsz_options the options (as a string)
262  * \param p_e an initialized exception pointer
263  */
264 VLC_PUBLIC_API void libvlc_media_add_option(
265                                    libvlc_media_t * p_md,
266                                    const char * ppsz_options,
267                                    libvlc_exception_t * p_e );
268
269 /**
270  * Retain a reference to a media descriptor object (libvlc_media_t). Use
271  * libvlc_media_release() to decrement the reference count of a
272  * media descriptor object.
273  *
274  * \param p_meta_desc a media descriptor object.
275  */
276 VLC_PUBLIC_API void libvlc_media_retain(
277                                    libvlc_media_t *p_meta_desc );
278
279 /**
280  * Decrement the reference count of a media descriptor object. If the
281  * reference count is 0, then libvlc_media_release() will release the
282  * media descriptor object. It will send out an libvlc_MediaFreed event
283  * to all listeners. If the media descriptor object has been released it
284  * should not be used again.
285  *
286  * \param p_meta_desc a media descriptor object.
287  */
288 VLC_PUBLIC_API void libvlc_media_release(
289                                    libvlc_media_t *p_meta_desc );
290
291
292 /**
293  * Get the media resource locator (mrl) from a media descriptor object
294  *
295  * \param p_md a media descriptor object
296  * \param p_e an initialized exception object
297  * \return string with mrl of media descriptor object
298  */
299 VLC_PUBLIC_API char * libvlc_media_get_mrl( libvlc_media_t * p_md,
300                                                        libvlc_exception_t * p_e );
301
302 /**
303  * Duplicate a media descriptor object.
304  *
305  * \param p_meta_desc a media descriptor object.
306  */
307 VLC_PUBLIC_API libvlc_media_t * libvlc_media_duplicate( libvlc_media_t * );
308
309 /**
310  * Read the meta of the media.
311  *
312  * \param p_meta_desc the media to read
313  * \param e_meta_desc the meta to read
314  * \param p_e an initialized exception pointer
315  * \return the media's meta
316  */
317 VLC_PUBLIC_API char * libvlc_media_get_meta(
318                                    libvlc_media_t *p_meta_desc,
319                                    libvlc_meta_t e_meta,
320                                    libvlc_exception_t *p_e );
321 /**
322  * Get current state of media descriptor object. Possible media states
323  * are defined in libvlc_structures.c ( libvlc_NothingSpecial=0,
324  * libvlc_Opening, libvlc_Buffering, libvlc_Playing, libvlc_Paused,
325  * libvlc_Stopped, libvlc_Ended,
326  * libvlc_Error).
327  *
328  * @see libvlc_state_t
329  * \param p_meta_desc a media descriptor object
330  * \param p_e an initialized exception object
331  * \return state of media descriptor object
332  */
333 VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
334                                    libvlc_media_t *p_meta_desc,
335                                    libvlc_exception_t *p_e );
336
337 /**
338  * Get subitems of media descriptor object. This will increment
339  * the reference count of supplied media descriptor object. Use
340  * libvlc_media_list_release() to decrement the reference counting.
341  *
342  * \param p_md media descriptor object
343  * \param p_e initalized exception object
344  * \return list of media descriptor subitems or NULL
345  */
346 VLC_PUBLIC_API libvlc_media_list_t *
347     libvlc_media_subitems( libvlc_media_t *p_md,
348                                       libvlc_exception_t *p_e );
349 /**
350  * Get event manager from media descriptor object.
351  * NOTE: this function doesn't increment reference counting.
352  *
353  * \param p_md a media descriptor object
354  * \param p_e an initialized exception object
355  * \return event manager object
356  */
357 VLC_PUBLIC_API libvlc_event_manager_t *
358     libvlc_media_event_manager( libvlc_media_t * p_md,
359                                            libvlc_exception_t * p_e );
360
361 /**
362  * Get duration of media descriptor object item.
363  *
364  * \param p_md media descriptor object
365  * \param p_e an initialized exception object
366  * \return duration of media item
367  */
368 VLC_PUBLIC_API libvlc_time_t
369    libvlc_media_get_duration( libvlc_media_t * p_md,
370                                          libvlc_exception_t * p_e );
371
372 /**
373  * Get preparsed status for media descriptor object.
374  *
375  * \param p_md media descriptor object
376  * \param p_e an initialized exception object
377  * \return true if media object has been preparsed otherwise it returns false
378  */
379 VLC_PUBLIC_API int
380    libvlc_media_is_preparsed( libvlc_media_t * p_md,
381                                          libvlc_exception_t * p_e );
382
383 /**
384  * Sets media descriptor's user_data. user_data is specialized data
385  * accessed by the host application, VLC.framework uses it as a pointer to
386  * an native object that references a libvlc_media_t pointer
387  *
388  * \param p_md media descriptor object
389  * \param p_new_user_data pointer to user data
390  * \param p_e an initialized exception object
391  */
392 VLC_PUBLIC_API void
393     libvlc_media_set_user_data( libvlc_media_t * p_md,
394                                            void * p_new_user_data,
395                                            libvlc_exception_t * p_e);
396
397 /**
398  * Get media descriptor's user_data. user_data is specialized data
399  * accessed by the host application, VLC.framework uses it as a pointer to
400  * an native object that references a libvlc_media_t pointer
401  *
402  * \param p_md media descriptor object
403  * \param p_e an initialized exception object
404  */
405 VLC_PUBLIC_API void *
406     libvlc_media_get_user_data( libvlc_media_t * p_md,
407                                            libvlc_exception_t * p_e);
408
409 /** @}*/
410
411 /*****************************************************************************
412  * Media Player
413  *****************************************************************************/
414 /** \defgroup libvlc_media_player libvlc_media_player
415  * \ingroup libvlc
416  * LibVLC Media Player, object that let you play a media
417  * in a libvlc_drawable_t
418  * @{
419  */
420
421 /**
422  * Create an empty Media Player object
423  *
424  * \param p_libvlc_instance the libvlc instance in which the Media Player
425  *        should be created.
426  * \param p_e an initialized exception pointer
427  */
428 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );
429
430 /**
431  * Create a Media Player object from a Media
432  *
433  * \param p_md the media. Afterwards the p_md can be safely
434  *        destroyed.
435  * \param p_e an initialized exception pointer
436  */
437 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );
438
439 /**
440  * Release a media_player after use
441  * Decrement the reference count of a media player object. If the
442  * reference count is 0, then libvlc_media_player_release() will
443  * release the media player object. If the media player object
444  * has been released, then it should not be used again.
445  *
446  * \param p_mi the Media Player to free
447  */
448 VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );
449
450 /**
451  * Retain a reference to a media player object. Use
452  * libvlc_media_player_release() to decrement reference count.
453  *
454  * \param p_mi media player object
455  */
456 VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
457
458 /**
459  * Set the media that will be used by the media_player. If any,
460  * previous md will be released.
461  *
462  * \param p_mi the Media Player
463  * \param p_md the Media. Afterwards the p_md can be safely
464  *        destroyed.
465  * \param p_e an initialized exception pointer
466  */
467 VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t *, libvlc_exception_t * );
468
469 /**
470  * Get the media used by the media_player.
471  *
472  * \param p_mi the Media Player
473  * \param p_e an initialized exception pointer
474  * \return the media associated with p_mi, or NULL if no
475  *         media is associated
476  */
477 VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );
478
479 /**
480  * Get the Event Manager from which the media player send event.
481  *
482  * \param p_mi the Media Player
483  * \param p_e an initialized exception pointer
484  * \return the event manager associated with p_mi
485  */
486 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );
487
488 /**
489  * Play
490  *
491  * \param p_mi the Media Player
492  * \param p_e an initialized exception pointer
493  */
494 VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_exception_t * );
495
496 /**
497  * Pause
498  *
499  * \param p_mi the Media Player
500  * \param p_e an initialized exception pointer
501  */
502 VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_exception_t * );
503
504 /**
505  * Stop
506  *
507  * \param p_mi the Media Player
508  * \param p_e an initialized exception pointer
509  */
510 VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );
511
512 /**
513  * Set the drawable where the media player should render its video output
514  *
515  * \param p_mi the Media Player
516  * \param drawable the libvlc_drawable_t where the media player
517  *        should render its video
518  * \param p_e an initialized exception pointer
519  */
520 VLC_PUBLIC_API void libvlc_media_player_set_drawable ( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
521
522 /**
523  * Get the drawable where the media player should render its video output
524  *
525  * \param p_mi the Media Player
526  * \param p_e an initialized exception pointer
527  * \return the libvlc_drawable_t where the media player
528  *         should render its video
529  */
530 VLC_PUBLIC_API libvlc_drawable_t
531                     libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );
532
533 /** \bug This might go away ... to be replaced by a broader system */
534
535 /**
536  * Get the current movie length (in ms).
537  *
538  * \param p_mi the Media Player
539  * \param p_e an initialized exception pointer
540  * \return the movie length (in ms).
541  */
542 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);
543
544 /**
545  * Get the current movie time (in ms).
546  *
547  * \param p_mi the Media Player
548  * \param p_e an initialized exception pointer
549  * \return the movie time (in ms).
550  */
551 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);
552
553 /**
554  * Set the movie time (in ms).
555  *
556  * \param p_mi the Media Player
557  * \param the movie time (in ms).
558  * \param p_e an initialized exception pointer
559  */
560 VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
561
562 /**
563  * Get movie position.
564  *
565  * \param p_mi the Media Player
566  * \param p_e an initialized exception pointer
567  * \return movie position
568  */
569 VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);
570
571 /**
572  * Set movie position.
573  *
574  * \param p_mi the Media Player
575  * \param p_e an initialized exception pointer
576  * \return movie position
577  */
578 VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);
579
580 /**
581  * Set movie chapter
582  *
583  * \param p_mi the Media Player
584  * \param i_chapter chapter number to play
585  * \param p_e an initialized exception pointer
586  */
587 VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);
588
589 /**
590  * Get movie chapter
591  *
592  * \param p_mi the Media Player
593  * \param p_e an initialized exception pointer
594  * \return chapter number currently playing
595  */
596 VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );
597
598 /**
599  * Get movie chapter count
600  *
601  * \param p_mi the Media Player
602  * \param p_e an initialized exception pointer
603  * \return number of chapters in movie
604  */
605 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
606 VLC_PUBLIC_API int libvlc_media_player_will_play        ( libvlc_media_player_t *, libvlc_exception_t *);
607
608 /**
609  * Get title chapter count
610  *
611  * \param p_mi the Media Player
612  * \param i_title title
613  * \param p_e an initialized exception pointer
614  * \return number of chapters in title
615  */
616 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count_for_title(
617                        libvlc_media_player_t *, int, libvlc_exception_t *);
618
619 /**
620  * Set movie title
621  *
622  * \param p_mi the Media Player
623  * \param i_title title number to play
624  * \param p_e an initialized exception pointer
625  */
626 VLC_PUBLIC_API void libvlc_media_player_set_title( libvlc_media_player_t *, int, libvlc_exception_t *);
627
628 /**
629  * Get movie title
630  *
631  * \param p_mi the Media Player
632  * \param p_e an initialized exception pointer
633  * \return title number currently playing
634  */
635 VLC_PUBLIC_API int libvlc_media_player_get_title( libvlc_media_player_t *, libvlc_exception_t *);
636
637 /**
638  * Get movie title count
639  *
640  * \param p_mi the Media Player
641  * \param p_e an initialized exception pointer
642  * \return title number count
643  */
644 VLC_PUBLIC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *, libvlc_exception_t *);
645
646 /**
647  * Set previous chapter
648  *
649  * \param p_mi the Media Player
650  * \param p_e an initialized exception pointer
651  */
652 VLC_PUBLIC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *, libvlc_exception_t *);
653
654 /**
655  * Set next chapter
656  *
657  * \param p_mi the Media Player
658  * \param p_e an initialized exception pointer
659  */
660 VLC_PUBLIC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *, libvlc_exception_t *);
661
662 /**
663  * Get movie play rate
664  *
665  * \param p_mi the Media Player
666  * \param p_e an initialized exception pointer
667  * \return movie play rate
668  */
669 VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);
670
671 /**
672  * Set movie play rate
673  *
674  * \param p_mi the Media Player
675  * \param movie play rate to set
676  * \param p_e an initialized exception pointer
677  */
678 VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);
679
680 /**
681  * Get current movie state
682  *
683  * \param p_mi the Media Player
684  * \param p_e an initialized exception pointer
685  * \return current movie state as libvlc_state_t
686  */
687 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *, libvlc_exception_t *);
688
689 /**
690  * Get movie fps rate
691  *
692  * \param p_mi the Media Player
693  * \param p_e an initialized exception pointer
694  * \return frames per second (fps) for this playing movie
695  */
696 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
697
698 /** end bug */
699
700 /**
701  * Does this media player have a video output?
702  *
703  * \param p_md the media player
704  * \param p_e an initialized exception pointer
705  */
706 VLC_PUBLIC_API int  libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
707
708 /**
709  * Is this media player seekable?
710  *
711  * \param p_input the input
712  * \param p_e an initialized exception pointer
713  */
714 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
715
716 /**
717  * Can this media player be paused?
718  *
719  * \param p_input the input
720  * \param p_e an initialized exception pointer
721  */
722 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
723
724 /**
725  * Release (free) libvlc_track_description_t
726  *
727  * \param p_track_description the structure to release
728  */
729 VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
730
731 /** \defgroup libvlc_video libvlc_video
732  * \ingroup libvlc_media_player
733  * LibVLC Video handling
734  * @{
735  */
736
737 /**
738  * Toggle fullscreen status on video output.
739  *
740  * \param p_mediaplayer the media player
741  * \param p_e an initialized exception pointer
742  */
743 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
744
745 /**
746  * Enable or disable fullscreen on a video output.
747  *
748  * \param p_mediaplayer the media player
749  * \param b_fullscreen boolean for fullscreen status
750  * \param p_e an initialized exception pointer
751  */
752 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
753
754 /**
755  * Get current fullscreen status.
756  *
757  * \param p_mediaplayer the media player
758  * \param p_e an initialized exception pointer
759  * \return the fullscreen status (boolean)
760  */
761 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
762
763 /**
764  * Get current video height.
765  *
766  * \param p_mediaplayer the media player
767  * \param p_e an initialized exception pointer
768  * \return the video height
769  */
770 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
771
772 /**
773  * Get current video width.
774  *
775  * \param p_mediaplayer the media player
776  * \param p_e an initialized exception pointer
777  * \return the video width
778  */
779 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
780
781 /**
782  * Get current video aspect ratio.
783  *
784  * \param p_mediaplayer the media player
785  * \param p_e an initialized exception pointer
786  * \return the video aspect ratio
787  */
788 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
789
790 /**
791  * Set new video aspect ratio.
792  *
793  * \param p_mediaplayer the media player
794  * \param psz_aspect new video aspect-ratio
795  * \param p_e an initialized exception pointer
796  */
797 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, char *, libvlc_exception_t * );
798
799 /**
800  * Get current video subtitle.
801  *
802  * \param p_mediaplayer the media player
803  * \param p_e an initialized exception pointer
804  * \return the video subtitle selected
805  */
806 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
807
808 /**
809  * Get the number of available video subtitles.
810  *
811  * \param p_mediaplayer the media player
812  * \param p_e an initialized exception pointer
813  * \return the number of available video subtitles
814  */
815 VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );
816
817 /**
818  * Get the description of available video subtitles.
819  *
820  * \param p_mediaplayer the media player
821  * \param p_e an initialized exception pointer
822  * \return list containing description of available video subtitles
823  */
824 VLC_PUBLIC_API libvlc_track_description_t *
825         libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );
826
827 /**
828  * Set new video subtitle.
829  *
830  * \param p_mediaplayer the media player
831  * \param i_spu new video subtitle to select
832  * \param p_e an initialized exception pointer
833  */
834 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
835
836 /**
837  * Set new video subtitle file.
838  *
839  * \param p_mediaplayer the media player
840  * \param psz_subtitle new video subtitle file
841  * \param p_e an initialized exception pointer
842  * \return the success status (boolean)
843  */
844 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );
845
846 /**
847  * Get the description of available titles.
848  *
849  * \param p_mediaplayer the media player
850  * \param p_e an initialized exception pointer
851  * \return list containing description of available titles
852  */
853 VLC_PUBLIC_API libvlc_track_description_t *
854         libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );
855
856 /**
857  * Get the description of available chapters for specific title.
858  *
859  * \param p_mediaplayer the media player
860  * \param i_title selected title
861  * \param p_e an initialized exception pointer
862  * \return list containing description of available chapter for title i_title
863  */
864 VLC_PUBLIC_API libvlc_track_description_t *
865         libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );
866
867 /**
868  * Get current crop filter geometry.
869  *
870  * \param p_mediaplayer the media player
871  * \param p_e an initialized exception pointer
872  * \return the crop filter geometry
873  */
874 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
875
876 /**
877  * Set new crop filter geometry.
878  *
879  * \param p_mediaplayer the media player
880  * \param psz_geometry new crop filter geometry
881  * \param p_e an initialized exception pointer
882  */
883 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );
884
885 /**
886  * Toggle teletext transparent status on video output.
887  *
888  * \param p_mediaplayer the media player
889  * \param p_e an initialized exception pointer
890  */
891 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
892
893 /**
894  * Get current teletext page requested.
895  *
896  * \param p_mediaplayer the media player
897  * \param p_e an initialized exception pointer
898  * \return the current teletext page requested.
899  */
900 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
901
902 /**
903  * Set new teletext page to retrieve.
904  *
905  * \param p_mediaplayer the media player
906  * \param i_page teletex page number requested
907  * \param p_e an initialized exception pointer
908  */
909 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
910
911 /**
912  * Get number of available video tracks.
913  *
914  * \param p_mi media player
915  * \param p_e an initialized exception
916  * \return the number of available video tracks (int)
917  */
918 VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *,  libvlc_exception_t * );
919
920 /**
921  * Get the description of available video tracks.
922  *
923  * \param p_mi media player
924  * \param p_e an initialized exception
925  * \return list with description of available video tracks
926  */
927 VLC_PUBLIC_API libvlc_track_description_t *
928         libvlc_video_get_track_description( libvlc_media_player_t *,  libvlc_exception_t * );
929
930 /**
931  * Get current video track.
932  *
933  * \param p_mi media player
934  * \param p_e an initialized exception pointer
935  * \return the video track (int)
936  */
937 VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );
938
939 /**
940  * Set video track.
941  *
942  * \param p_mi media player
943  * \param i_track the track (int)
944  * \param p_e an initialized exception pointer
945  */
946 VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
947
948 /**
949  * Take a snapshot of the current video window.
950  *
951  * If i_width AND i_height is 0, original size is used.
952  * If i_width XOR i_height is 0, original aspect-ratio is preserved.
953  *
954  * \param p_mediaplayer the media player
955  * \param psz_filepath the path where to save the screenshot to
956  * \param i_width the snapshot's width
957  * \param i_height the snapshot's height
958  * \param p_e an initialized exception pointer
959  */
960 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * );
961
962 /**
963  * Resize the current video output window.
964  *
965  * \param p_instance libvlc instance
966  * \param width new width for video output window
967  * \param height new height for video output window
968  * \param p_e an initialized exception pointer
969  * \return the success status (boolean)
970  */
971 VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libvlc_exception_t *);
972
973 /**
974  * Change the parent for the current the video output.
975  *
976  * \param p_instance libvlc instance
977  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
978  * \param p_e an initialized exception pointer
979  * \return the success status (boolean)
980  */
981 VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
982
983 /**
984  * Tell windowless video output to redraw rectangular area (MacOS X only).
985  *
986  * \param p_instance libvlc instance
987  * \param area coordinates within video drawable
988  * \param p_e an initialized exception pointer
989  */
990 VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_player_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
991
992 /**
993  * Set the default video output size.
994  *
995  * This setting will be used as default for all video outputs.
996  *
997  * \param p_instance libvlc instance
998  * \param width new width for video drawable
999  * \param height new height for video drawable
1000  * \param p_e an initialized exception pointer
1001  */
1002 VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
1003
1004 /**
1005  * Set the default video output viewport for a windowless video output
1006  * (MacOS X only).
1007  *
1008  * This setting will be used as default for all video outputs.
1009  *
1010  * \param p_instance libvlc instance
1011  * \param view coordinates within video drawable
1012  * \param clip coordinates within video drawable
1013  * \param p_e an initialized exception pointer
1014  */
1015 VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
1016
1017 /** @} video */
1018
1019 /** \defgroup libvlc_audio libvlc_audio
1020  * \ingroup libvlc_media_player
1021  * LibVLC Audio handling
1022  * @{
1023  */
1024
1025 /**
1026  * Audio device types
1027  */
1028 typedef enum libvlc_audio_output_device_types_t {
1029     libvlc_AudioOutputDevice_Error  = -1,
1030     libvlc_AudioOutputDevice_Mono   =  1,
1031     libvlc_AudioOutputDevice_Stereo =  2,
1032     libvlc_AudioOutputDevice_2F2R   =  4,
1033     libvlc_AudioOutputDevice_3F2R   =  5,
1034     libvlc_AudioOutputDevice_5_1    =  6,
1035     libvlc_AudioOutputDevice_6_1    =  7,
1036     libvlc_AudioOutputDevice_7_1    =  8,
1037     libvlc_AudioOutputDevice_SPDIF  = 10
1038 } libvlc_audio_output_device_types_t;
1039
1040 /**
1041  * Audio channels
1042  */
1043 typedef enum libvlc_audio_output_channel_t {
1044     libvlc_AudioChannel_Error   = -1,
1045     libvlc_AudioChannel_Stereo  =  1,
1046     libvlc_AudioChannel_RStereo =  2,
1047     libvlc_AudioChannel_Left    =  3,
1048     libvlc_AudioChannel_Right   =  4,
1049     libvlc_AudioChannel_Dolbys  =  5
1050 } libvlc_audio_output_channel_t;
1051
1052
1053 /**
1054  * Get the list of available audio outputs
1055  *
1056  * \param p_instance libvlc instance
1057  * \param p_e an initialized exception pointer
1058  * \return list of available audio outputs, at the end free it with
1059 *          \see libvlc_audio_output_list_release \see libvlc_audio_output_t
1060  */
1061 VLC_PUBLIC_API libvlc_audio_output_t *
1062         libvlc_audio_output_list_get( libvlc_instance_t *,
1063                                       libvlc_exception_t * );
1064
1065 /**
1066  * Free the list of available audio outputs
1067  *
1068  * \param p_list list with audio outputs for release
1069  */
1070 VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );
1071
1072 /**
1073  * Set the audio output.
1074  * Change will be applied after stop and play.
1075  *
1076  * \param p_instance libvlc instance
1077  * \param psz_name name of audio output,
1078  *               use psz_name of \see libvlc_audio_output_t
1079  * \return true if function succeded
1080  */
1081 VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *,
1082                                             const char * );
1083
1084 /**
1085  * Get count of devices for audio output, these devices are hardware oriented
1086  * like analor or digital output of sound card
1087  *
1088  * \param p_instance libvlc instance
1089  * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1090  * \return number of devices
1091  */
1092 VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *,
1093                                                      const char * );
1094
1095 /**
1096  * Get long name of device, if not available short name given
1097  *
1098  * \param p_instance libvlc instance
1099  * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1100  * \param i_device device index
1101  * \return long name of device
1102  */
1103 VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *,
1104                                                            const char *,
1105                                                            int );
1106
1107 /**
1108  * Get id name of device
1109  *
1110  * \param p_instance libvlc instance
1111  * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1112  * \param i_device device index
1113  * \return id name of device, use for setting device, need to be free after use
1114  */
1115 VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *,
1116                                                      const char *,
1117                                                      int );
1118
1119 /**
1120  * Set device for using
1121  *
1122  * \param p_instance libvlc instance
1123  * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1124  * \param psz_device_id device
1125  */
1126 VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *,
1127                                                     const char *,
1128                                                     const char * );
1129
1130 /**
1131  * Get current audio device type. Device type describes something like
1132  * character of output sound - stereo sound, 2.1, 5.1 etc
1133  *
1134  * \param p_instance vlc instance
1135  * \param p_e an initialized exception pointer
1136  * \return the audio devices type \see libvlc_audio_output_device_types_t
1137  */
1138 VLC_PUBLIC_API int libvlc_audio_output_get_device_type(
1139         libvlc_instance_t *, libvlc_exception_t * );
1140
1141 /**
1142  * Set current audio device type.
1143  *
1144  * \param p_instance vlc instance
1145  * \param device_type the audio device type,
1146           according to \see libvlc_audio_output_device_types_t
1147  * \param p_e an initialized exception pointer
1148  */
1149 VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
1150                                                          int,
1151                                                          libvlc_exception_t * );
1152
1153
1154 /**
1155  * Toggle mute status.
1156  *
1157  * \param p_instance libvlc instance
1158  * \param p_e an initialized exception pointer
1159  */
1160 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
1161
1162 /**
1163  * Get current mute status.
1164  *
1165  * \param p_instance libvlc instance
1166  * \param p_e an initialized exception pointer
1167  * \return the mute status (boolean)
1168  */
1169 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
1170
1171 /**
1172  * Set mute status.
1173  *
1174  * \param p_instance libvlc instance
1175  * \param status If status is true then mute, otherwise unmute
1176  * \param p_e an initialized exception pointer
1177  */
1178 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
1179
1180 /**
1181  * Get current audio level.
1182  *
1183  * \param p_instance libvlc instance
1184  * \param p_e an initialized exception pointer
1185  * \return the audio level (int)
1186  */
1187 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
1188
1189 /**
1190  * Set current audio level.
1191  *
1192  * \param p_instance libvlc instance
1193  * \param i_volume the volume (int)
1194  * \param p_e an initialized exception pointer
1195  */
1196 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
1197
1198 /**
1199  * Get number of available audio tracks.
1200  *
1201  * \param p_mi media player
1202  * \param p_e an initialized exception
1203  * \return the number of available audio tracks (int)
1204  */
1205 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *,  libvlc_exception_t * );
1206
1207  /**
1208  * Get the description of available audio tracks.
1209  *
1210  * \param p_mi media player
1211  * \param p_e an initialized exception
1212  * \return list with description of available audio tracks
1213  */
1214 VLC_PUBLIC_API libvlc_track_description_t *
1215         libvlc_audio_get_track_description( libvlc_media_player_t *,  libvlc_exception_t * );
1216
1217 /**
1218  * Get current audio track.
1219  *
1220  * \param p_mi media player
1221  * \param p_e an initialized exception pointer
1222  * \return the audio track (int)
1223  */
1224 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
1225
1226 /**
1227  * Set current audio track.
1228  *
1229  * \param p_mi media player
1230  * \param i_track the track (int)
1231  * \param p_e an initialized exception pointer
1232  */
1233 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
1234
1235 /**
1236  * Get current audio channel.
1237  *
1238  * \param p_instance vlc instance
1239  * \param p_e an initialized exception pointer
1240  * \return the audio channel \see libvlc_audio_output_channel_t
1241  */
1242 VLC_PUBLIC_API int
1243     libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
1244
1245 /**
1246  * Set current audio channel.
1247  *
1248  * \param p_instance vlc instance
1249  * \param channel the audio channel, \see libvlc_audio_output_channel_t
1250  * \param p_e an initialized exception pointer
1251  */
1252 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *,
1253                                               int,
1254                                               libvlc_exception_t * );
1255
1256 /** @} audio */
1257
1258 /** @} media_player */
1259
1260 /*****************************************************************************
1261  * Event handling
1262  *****************************************************************************/
1263
1264 /** \defgroup libvlc_event libvlc_event
1265  * \ingroup libvlc_core
1266  * LibVLC Events
1267  * @{
1268  */
1269
1270 /**
1271  * Register for an event notification.
1272  *
1273  * \param p_event_manager the event manager to which you want to attach to.
1274  *        Generally it is obtained by vlc_my_object_event_manager() where
1275  *        my_object is the object you want to listen to.
1276  * \param i_event_type the desired event to which we want to listen
1277  * \param f_callback the function to call when i_event_type occurs
1278  * \param user_data user provided data to carry with the event
1279  * \param p_e an initialized exception pointer
1280  */
1281 VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
1282                                          libvlc_event_type_t i_event_type,
1283                                          libvlc_callback_t f_callback,
1284                                          void *user_data,
1285                                          libvlc_exception_t *p_e );
1286
1287 /**
1288  * Unregister an event notification.
1289  *
1290  * \param p_event_manager the event manager
1291  * \param i_event_type the desired event to which we want to unregister
1292  * \param f_callback the function to call when i_event_type occurs
1293  * \param p_user_data user provided data to carry with the event
1294  * \param p_e an initialized exception pointer
1295  */
1296 VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
1297                                          libvlc_event_type_t i_event_type,
1298                                          libvlc_callback_t f_callback,
1299                                          void *p_user_data,
1300                                          libvlc_exception_t *p_e );
1301
1302 /**
1303  * Get an event's type name.
1304  *
1305  * \param i_event_type the desired event
1306  */
1307 VLC_PUBLIC_API const char * libvlc_event_type_name( libvlc_event_type_t event_type );
1308
1309 /** @} */
1310
1311 /*****************************************************************************
1312  * Media Library
1313  *****************************************************************************/
1314 /** \defgroup libvlc_media_library libvlc_media_library
1315  * \ingroup libvlc
1316  * LibVLC Media Library
1317  * @{
1318  */
1319 VLC_PUBLIC_API libvlc_media_library_t *
1320     libvlc_media_library_new( libvlc_instance_t * p_inst,
1321                               libvlc_exception_t * p_e );
1322
1323 /**
1324  * Release media library object. This functions decrements the
1325  * reference count of the media library object. If it reaches 0,
1326  * then the object will be released.
1327  *
1328  * \param p_mlib media library object
1329  */
1330 VLC_PUBLIC_API void
1331     libvlc_media_library_release( libvlc_media_library_t * p_mlib );
1332
1333 /**
1334  * Retain a reference to a media library object. This function will
1335  * increment the reference counting for this object. Use
1336  * libvlc_media_library_release() to decrement the reference count.
1337  *
1338  * \param p_mlib media library object
1339  */
1340 VLC_PUBLIC_API void
1341     libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
1342
1343 /**
1344  * Load media library.
1345  *
1346  * \param p_mlib media library object
1347  * \param p_e an initialized exception object.
1348  */
1349 VLC_PUBLIC_API void
1350     libvlc_media_library_load( libvlc_media_library_t * p_mlib,
1351                                libvlc_exception_t * p_e );
1352
1353 /**
1354  * Save media library.
1355  *
1356  * \param p_mlib media library object
1357  * \param p_e an initialized exception object.
1358  */
1359 VLC_PUBLIC_API void
1360     libvlc_media_library_save( libvlc_media_library_t * p_mlib,
1361                                libvlc_exception_t * p_e );
1362
1363 /**
1364  * Get media library subitems.
1365  *
1366  * \param p_mlib media library object
1367  * \param p_e an initialized exception object.
1368  * \return media list subitems
1369  */
1370 VLC_PUBLIC_API libvlc_media_list_t *
1371     libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
1372                                      libvlc_exception_t * p_e );
1373
1374
1375 /** @} */
1376
1377
1378 /*****************************************************************************
1379  * Services/Media Discovery
1380  *****************************************************************************/
1381 /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
1382  * \ingroup libvlc
1383  * LibVLC Media Discoverer
1384  * @{
1385  */
1386
1387 /**
1388  * Discover media service by name.
1389  *
1390  * \param p_inst libvlc instance
1391  * \param psz_name service name
1392  * \param p_e an initialized exception object
1393  * \return media discover object
1394  */
1395 VLC_PUBLIC_API libvlc_media_discoverer_t *
1396 libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
1397                                        const char * psz_name,
1398                                        libvlc_exception_t * p_e );
1399
1400 /**
1401  * Release media discover object. If the reference count reaches 0, then
1402  * the object will be released.
1403  *
1404  * \param p_mdis media service discover object
1405  */
1406 VLC_PUBLIC_API void   libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
1407
1408 /**
1409  * Get media service discover object its localized name.
1410  *
1411  * \param media discover object
1412  * \return localized name
1413  */
1414 VLC_PUBLIC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
1415
1416 /**
1417  * Get media service discover media list.
1418  *
1419  * \param p_mdis media service discover object
1420  * \return list of media items
1421  */
1422 VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
1423
1424 /**
1425  * Get event manager from media service discover object.
1426  *
1427  * \param p_mdis media service discover object
1428  * \return event manager object.
1429  */
1430 VLC_PUBLIC_API libvlc_event_manager_t *
1431         libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
1432
1433 /**
1434  * Query if media service discover object is running.
1435  *
1436  * \param p_mdis media service discover object
1437  * \return true if running, false if not
1438  */
1439 VLC_PUBLIC_API int
1440         libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
1441
1442 /**@} */
1443
1444
1445 /*****************************************************************************
1446  * Message log handling
1447  *****************************************************************************/
1448
1449 /** \defgroup libvlc_log libvlc_log
1450  * \ingroup libvlc_core
1451  * LibVLC Message Logging
1452  * @{
1453  */
1454
1455 /**
1456  * Return the VLC messaging verbosity level.
1457  *
1458  * \param p_instance libvlc instance
1459  * \param p_e an initialized exception pointer
1460  * \return verbosity level for messages
1461  */
1462 VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
1463                                                   libvlc_exception_t *p_e );
1464
1465 /**
1466  * Set the VLC messaging verbosity level.
1467  *
1468  * \param p_instance libvlc log instance
1469  * \param level log level
1470  * \param p_e an initialized exception pointer
1471  */
1472 VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
1473                                               libvlc_exception_t *p_e );
1474
1475 /**
1476  * Open a VLC message log instance.
1477  *
1478  * \param p_instance libvlc instance
1479  * \param p_e an initialized exception pointer
1480  * \return log message instance
1481  */
1482 VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( libvlc_instance_t *, libvlc_exception_t *);
1483
1484 /**
1485  * Close a VLC message log instance.
1486  *
1487  * \param p_log libvlc log instance
1488  * \param p_e an initialized exception pointer
1489  */
1490 VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
1491
1492 /**
1493  * Returns the number of messages in a log instance.
1494  *
1495  * \param p_log libvlc log instance
1496  * \param p_e an initialized exception pointer
1497  * \return number of log messages
1498  */
1499 VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
1500
1501 /**
1502  * Clear a log instance.
1503  *
1504  * All messages in the log are removed. The log should be cleared on a
1505  * regular basis to avoid clogging.
1506  *
1507  * \param p_log libvlc log instance
1508  * \param p_e an initialized exception pointer
1509  */
1510 VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
1511
1512 /**
1513  * Allocate and returns a new iterator to messages in log.
1514  *
1515  * \param p_log libvlc log instance
1516  * \param p_e an initialized exception pointer
1517  * \return log iterator object
1518  */
1519 VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
1520
1521 /**
1522  * Release a previoulsy allocated iterator.
1523  *
1524  * \param p_iter libvlc log iterator
1525  * \param p_e an initialized exception pointer
1526  */
1527 VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1528
1529 /**
1530  * Return whether log iterator has more messages.
1531  *
1532  * \param p_iter libvlc log iterator
1533  * \param p_e an initialized exception pointer
1534  * \return true if iterator has more message objects, else false
1535  */
1536 VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
1537
1538 /**
1539  * Return the next log message.
1540  *
1541  * The message contents must not be freed
1542  *
1543  * \param p_iter libvlc log iterator
1544  * \param p_buffer log buffer
1545  * \param p_e an initialized exception pointer
1546  * \return log message object
1547  */
1548 VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
1549                                                                libvlc_log_message_t *p_buffer,
1550                                                                libvlc_exception_t *p_e );
1551
1552 /** @} */
1553
1554 # ifdef __cplusplus
1555 }
1556 # endif
1557
1558 #endif /* <vlc/libvlc.h> */