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