]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_media_player.h
Fix comments in include files
[vlc] / include / vlc / libvlc_media_player.h
1 /*****************************************************************************
2  * libvlc_media_player.h:  libvlc_media_player external API
3  *****************************************************************************
4  * Copyright (C) 1998-2009 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_media_player external API
29  */
30
31 #ifndef VLC_LIBVLC_MEDIA_PLAYER_H
32 #define VLC_LIBVLC_MEDIA_PLAYER_H 1
33
34 /*****************************************************************************
35  * Media Player
36  *****************************************************************************/
37 /** \defgroup libvlc_media_player libvlc_media_player
38  * \ingroup libvlc
39  * LibVLC Media Player, object that let you play a media
40  * in a custom drawable
41  * @{
42  */
43
44 typedef struct libvlc_media_player_t libvlc_media_player_t;
45
46 /**
47  * Description for video, audio tracks and subtitles. It contains
48  * id, name (description string) and pointer to next record.
49  */
50 typedef struct libvlc_track_description_t
51 {
52     int   i_id;
53     char *psz_name;
54     struct libvlc_track_description_t *p_next;
55     
56 } libvlc_track_description_t;
57
58 /**
59  * Description for audio output. It contains
60  * name, description and pointer to next record.
61  */
62 typedef struct libvlc_audio_output_t
63 {
64     char *psz_name;
65     char *psz_description;
66     struct libvlc_audio_output_t *p_next;
67     
68 } libvlc_audio_output_t;
69
70 /**
71  * Rectangle type for video geometry
72  */
73 typedef struct libvlc_rectangle_t
74 {
75     int top, left;
76     int bottom, right;
77 } libvlc_rectangle_t;
78
79 /**
80  * Marq int options definition
81  */
82 typedef enum libvlc_video_marquee_int_option_t {
83     libvlc_marquee_Enabled = 0,
84     libvlc_marquee_Color,
85     libvlc_marquee_Opacity,
86     libvlc_marquee_Position,
87     libvlc_marquee_Refresh,
88     libvlc_marquee_Size,
89     libvlc_marquee_Timeout,
90     libvlc_marquee_X,
91     libvlc_marquee_Y
92 } libvlc_video_marquee_int_option_t;
93
94 /**
95  * Marq string options definition
96  */
97 typedef enum libvlc_video_marquee_string_option_t {
98     libvlc_marquee_Text = 0
99 } libvlc_video_marquee_string_option_t;
100
101
102 /**
103  * Create an empty Media Player object
104  *
105  * \param p_libvlc_instance the libvlc instance in which the Media Player
106  *        should be created.
107  * \param p_e an initialized exception pointer
108  */
109 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );
110
111 /**
112  * Create a Media Player object from a Media
113  *
114  * \param p_md the media. Afterwards the p_md can be safely
115  *        destroyed.
116  * \param p_e an initialized exception pointer
117  */
118 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );
119
120 /**
121  * Release a media_player after use
122  * Decrement the reference count of a media player object. If the
123  * reference count is 0, then libvlc_media_player_release() will
124  * release the media player object. If the media player object
125  * has been released, then it should not be used again.
126  *
127  * \param p_mi the Media Player to free
128  */
129 VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );
130
131 /**
132  * Retain a reference to a media player object. Use
133  * libvlc_media_player_release() to decrement reference count.
134  *
135  * \param p_mi media player object
136  */
137 VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
138
139 /**
140  * Set the media that will be used by the media_player. If any,
141  * previous md will be released.
142  *
143  * \param p_mi the Media Player
144  * \param p_md the Media. Afterwards the p_md can be safely
145  *        destroyed.
146  * \param p_e an initialized exception pointer
147  */
148 VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t *, libvlc_exception_t * );
149
150 /**
151  * Get the media used by the media_player.
152  *
153  * \param p_mi the Media Player
154  * \param p_e an initialized exception pointer
155  * \return the media associated with p_mi, or NULL if no
156  *         media is associated
157  */
158 VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );
159
160 /**
161  * Get the Event Manager from which the media player send event.
162  *
163  * \param p_mi the Media Player
164  * \param p_e an initialized exception pointer
165  * \return the event manager associated with p_mi
166  */
167 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );
168
169 /**
170  * is_playing
171  *
172  * \param p_mi the Media Player
173  * \param p_e an initialized exception pointer
174  * \return 1 if the media player is playing, 0 otherwise
175  */
176 VLC_PUBLIC_API int libvlc_media_player_is_playing ( libvlc_media_player_t *, libvlc_exception_t * );
177
178 /**
179  * Play
180  *
181  * \param p_mi the Media Player
182  * \param p_e an initialized exception pointer
183  */
184 VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_exception_t * );
185
186 /**
187  * Pause
188  *
189  * \param p_mi the Media Player
190  * \param p_e an initialized exception pointer
191  */
192 VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_exception_t * );
193
194 /**
195  * Stop
196  *
197  * \param p_mi the Media Player
198  * \param p_e an initialized exception pointer
199  */
200 VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );
201
202 /**
203  * Set the agl handler where the media player should render its video output.
204  *
205  * \param p_mi the Media Player
206  * \param drawable the agl handler
207  * \param p_e an initialized exception pointer
208  */
209 VLC_PUBLIC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable, libvlc_exception_t *p_e );
210
211 /**
212  * Get the agl handler previously set with libvlc_media_player_set_agl().
213  *
214  * \return the agl handler or 0 if none where set
215  */
216 VLC_PUBLIC_API void * libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
217         
218 /**
219  * Set the agl handler where the media player should render its video output.
220  *
221  * \param p_mi the Media Player
222  * \param drawable the agl handler
223  * \param p_e an initialized exception pointer
224  */
225 VLC_PUBLIC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
226
227 /**
228  * Get the agl handler previously set with libvlc_media_player_set_agl().
229  *
230  * \return the agl handler or 0 if none where set
231  */
232 VLC_PUBLIC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi );
233
234 /**
235  * Set an X Window System drawable where the media player should render its
236  * video output. If LibVLC was built without X11 output support, then this has
237  * no effects.
238  *
239  * The specified identifier must correspond to an existing Input/Output class
240  * X11 window. Pixmaps are <b>not</b> supported. The caller shall ensure that
241  * the X11 server is the same as the one the VLC instance has been configured
242  * with.
243  * If XVideo is <b>not</b> used, it is assumed that the drawable has the
244  * following properties in common with the default X11 screen: depth, scan line
245  * pad, black pixel. This is a bug.
246  *
247  * \param p_mi the Media Player
248  * \param drawable the ID of the X window
249  * \param p_e an initialized exception pointer
250  */
251 VLC_PUBLIC_API void libvlc_media_player_set_xwindow ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
252
253 /**
254  * Get the X Window System window identifier previously set with
255  * libvlc_media_player_set_xwindow(). Note that this will return the identifier
256  * even if VLC is not currently using it (for instance if it is playing an
257  * audio-only input).
258  *
259  * \return an X window ID, or 0 if none where set.
260  */
261 VLC_PUBLIC_API uint32_t libvlc_media_player_get_xwindow ( libvlc_media_player_t *p_mi );
262
263 /**
264  * Set a Win32/Win64 API window handle (HWND) where the media player should
265  * render its video output. If LibVLC was built without Win32/Win64 API output
266  * support, then this has no effects.
267  *
268  * \param p_mi the Media Player
269  * \param drawable windows handle of the drawable
270  * \param p_e an initialized exception pointer
271  */
272 VLC_PUBLIC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable, libvlc_exception_t *p_e );
273
274 /**
275  * Get the Windows API window handle (HWND) previously set with
276  * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
277  * is not currently outputting any video to it.
278  *
279  * \return a window handle or NULL if there are none.
280  */
281 VLC_PUBLIC_API void *libvlc_media_player_get_hwnd ( libvlc_media_player_t *p_mi );
282
283
284
285 /** \bug This might go away ... to be replaced by a broader system */
286
287 /**
288  * Get the current movie length (in ms).
289  *
290  * \param p_mi the Media Player
291  * \param p_e an initialized exception pointer
292  * \return the movie length (in ms).
293  */
294 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);
295
296 /**
297  * Get the current movie time (in ms).
298  *
299  * \param p_mi the Media Player
300  * \param p_e an initialized exception pointer
301  * \return the movie time (in ms).
302  */
303 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);
304
305 /**
306  * Set the movie time (in ms).
307  *
308  * \param p_mi the Media Player
309  * \param the movie time (in ms).
310  * \param p_e an initialized exception pointer
311  */
312 VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
313
314 /**
315  * Get movie position.
316  *
317  * \param p_mi the Media Player
318  * \param p_e an initialized exception pointer
319  * \return movie position
320  */
321 VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);
322
323 /**
324  * Set movie position.
325  *
326  * \param p_mi the Media Player
327  * \param f_pos the position
328  * \param p_e an initialized exception pointer
329  */
330 VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);
331
332 /**
333  * Set movie chapter
334  *
335  * \param p_mi the Media Player
336  * \param i_chapter chapter number to play
337  * \param p_e an initialized exception pointer
338  */
339 VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);
340
341 /**
342  * Get movie chapter
343  *
344  * \param p_mi the Media Player
345  * \param p_e an initialized exception pointer
346  * \return chapter number currently playing
347  */
348 VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );
349
350 /**
351  * Get movie chapter count
352  *
353  * \param p_mi the Media Player
354  * \param p_e an initialized exception pointer
355  * \return number of chapters in movie
356  */
357 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
358 VLC_PUBLIC_API int libvlc_media_player_will_play        ( libvlc_media_player_t *, libvlc_exception_t *);
359
360 /**
361  * Get title chapter count
362  *
363  * \param p_mi the Media Player
364  * \param i_title title
365  * \param p_e an initialized exception pointer
366  * \return number of chapters in title
367  */
368 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count_for_title(
369                        libvlc_media_player_t *, int, libvlc_exception_t *);
370
371 /**
372  * Set movie title
373  *
374  * \param p_mi the Media Player
375  * \param i_title title number to play
376  * \param p_e an initialized exception pointer
377  */
378 VLC_PUBLIC_API void libvlc_media_player_set_title( libvlc_media_player_t *, int, libvlc_exception_t *);
379
380 /**
381  * Get movie title
382  *
383  * \param p_mi the Media Player
384  * \param p_e an initialized exception pointer
385  * \return title number currently playing
386  */
387 VLC_PUBLIC_API int libvlc_media_player_get_title( libvlc_media_player_t *, libvlc_exception_t *);
388
389 /**
390  * Get movie title count
391  *
392  * \param p_mi the Media Player
393  * \param p_e an initialized exception pointer
394  * \return title number count
395  */
396 VLC_PUBLIC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *, libvlc_exception_t *);
397
398 /**
399  * Set previous chapter
400  *
401  * \param p_mi the Media Player
402  * \param p_e an initialized exception pointer
403  */
404 VLC_PUBLIC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *, libvlc_exception_t *);
405
406 /**
407  * Set next chapter
408  *
409  * \param p_mi the Media Player
410  * \param p_e an initialized exception pointer
411  */
412 VLC_PUBLIC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *, libvlc_exception_t *);
413
414 /**
415  * Get movie play rate
416  *
417  * \param p_mi the Media Player
418  * \param p_e an initialized exception pointer
419  * \return movie play rate
420  */
421 VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);
422
423 /**
424  * Set movie play rate
425  *
426  * \param p_mi the Media Player
427  * \param movie play rate to set
428  * \param p_e an initialized exception pointer
429  */
430 VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);
431
432 /**
433  * Get current movie state
434  *
435  * \param p_mi the Media Player
436  * \param p_e an initialized exception pointer
437  * \return current movie state as libvlc_state_t
438  */
439 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *, libvlc_exception_t *);
440
441 /**
442  * Get movie fps rate
443  *
444  * \param p_mi the Media Player
445  * \param p_e an initialized exception pointer
446  * \return frames per second (fps) for this playing movie
447  */
448 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
449
450 /** end bug */
451
452 /**
453  * Does this media player have a video output?
454  *
455  * \param p_md the media player
456  * \param p_e an initialized exception pointer
457  */
458 VLC_PUBLIC_API int  libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
459
460 /**
461  * Is this media player seekable?
462  *
463  * \param p_input the input
464  * \param p_e an initialized exception pointer
465  */
466 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
467
468 /**
469  * Can this media player be paused?
470  *
471  * \param p_input the input
472  * \param p_e an initialized exception pointer
473  */
474 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
475
476 /**
477  * Release (free) libvlc_track_description_t
478  *
479  * \param p_track_description the structure to release
480  */
481 VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
482
483 /** \defgroup libvlc_video libvlc_video
484  * \ingroup libvlc_media_player
485  * LibVLC Video handling
486  * @{
487  */
488
489 /**
490  * Toggle fullscreen status on video output.
491  *
492  * \param p_mediaplayer the media player
493  * \param p_e an initialized exception pointer
494  */
495 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
496
497 /**
498  * Enable or disable fullscreen on a video output.
499  *
500  * \param p_mediaplayer the media player
501  * \param b_fullscreen boolean for fullscreen status
502  * \param p_e an initialized exception pointer
503  */
504 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
505
506 /**
507  * Get current fullscreen status.
508  *
509  * \param p_mediaplayer the media player
510  * \param p_e an initialized exception pointer
511  * \return the fullscreen status (boolean)
512  */
513 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
514
515 /**
516  * Get current video height.
517  *
518  * \param p_mediaplayer the media player
519  * \param p_e an initialized exception pointer
520  * \return the video height
521  */
522 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
523
524 /**
525  * Get current video width.
526  *
527  * \param p_mediaplayer the media player
528  * \param p_e an initialized exception pointer
529  * \return the video width
530  */
531 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
532
533 /**
534  * Get the current video scaling factor.
535  * See also libvlc_video_set_scale().
536  *
537  * \param p_mediaplayer the media player
538  * \param p_e an initialized exception pointer
539  * \return the currently configured zoom factor, or 0. if the video is set
540  * to fit to the output window/drawable automatically.
541  */
542 VLC_PUBLIC_API float libvlc_video_get_scale( libvlc_media_player_t *,
543                                              libvlc_exception_t *p_e );
544
545 /**
546  * Set the video scaling factor. That is the ratio of the number of pixels on
547  * screen to the number of pixels in the original decoded video in each
548  * dimension. Zero is a special value; it will adjust the video to the output
549  * window/drawable (in windowed mode) or the entire screen.
550  *
551  * Note that not all video outputs support scaling.
552  *
553  * \param p_mediaplayer the media player
554  * \param i_factor the scaling factor, or zero
555  * \param p_e an initialized exception pointer
556  */
557 VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *, float,
558                                             libvlc_exception_t *p_e );
559
560 /**
561  * Get current video aspect ratio.
562  *
563  * \param p_mediaplayer the media player
564  * \param p_e an initialized exception pointer
565  * \return the video aspect ratio
566  */
567 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
568
569 /**
570  * Set new video aspect ratio.
571  *
572  * \param p_mediaplayer the media player
573  * \param psz_aspect new video aspect-ratio
574  * \param p_e an initialized exception pointer
575  */
576 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, char *, libvlc_exception_t * );
577
578 /**
579  * Get current video subtitle.
580  *
581  * \param p_mediaplayer the media player
582  * \param p_e an initialized exception pointer
583  * \return the video subtitle selected
584  */
585 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
586
587 /**
588  * Get the number of available video subtitles.
589  *
590  * \param p_mediaplayer the media player
591  * \param p_e an initialized exception pointer
592  * \return the number of available video subtitles
593  */
594 VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );
595
596 /**
597  * Get the description of available video subtitles.
598  *
599  * \param p_mediaplayer the media player
600  * \param p_e an initialized exception pointer
601  * \return list containing description of available video subtitles
602  */
603 VLC_PUBLIC_API libvlc_track_description_t *
604         libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );
605
606 /**
607  * Set new video subtitle.
608  *
609  * \param p_mediaplayer the media player
610  * \param i_spu new video subtitle to select
611  * \param p_e an initialized exception pointer
612  */
613 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
614
615 /**
616  * Set new video subtitle file.
617  *
618  * \param p_mediaplayer the media player
619  * \param psz_subtitle new video subtitle file
620  * \param p_e an initialized exception pointer
621  * \return the success status (boolean)
622  */
623 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );
624
625 /**
626  * Get the description of available titles.
627  *
628  * \param p_mediaplayer the media player
629  * \param p_e an initialized exception pointer
630  * \return list containing description of available titles
631  */
632 VLC_PUBLIC_API libvlc_track_description_t *
633         libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );
634
635 /**
636  * Get the description of available chapters for specific title.
637  *
638  * \param p_mediaplayer the media player
639  * \param i_title selected title
640  * \param p_e an initialized exception pointer
641  * \return list containing description of available chapter for title i_title
642  */
643 VLC_PUBLIC_API libvlc_track_description_t *
644         libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );
645
646 /**
647  * Get current crop filter geometry.
648  *
649  * \param p_mediaplayer the media player
650  * \param p_e an initialized exception pointer
651  * \return the crop filter geometry
652  */
653 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
654
655 /**
656  * Set new crop filter geometry.
657  *
658  * \param p_mediaplayer the media player
659  * \param psz_geometry new crop filter geometry
660  * \param p_e an initialized exception pointer
661  */
662 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );
663
664 /**
665  * Toggle teletext transparent status on video output.
666  *
667  * \param p_mediaplayer the media player
668  * \param p_e an initialized exception pointer
669  */
670 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
671
672 /**
673  * Get current teletext page requested.
674  *
675  * \param p_mediaplayer the media player
676  * \param p_e an initialized exception pointer
677  * \return the current teletext page requested.
678  */
679 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
680
681 /**
682  * Set new teletext page to retrieve.
683  *
684  * \param p_mediaplayer the media player
685  * \param i_page teletex page number requested
686  * \param p_e an initialized exception pointer
687  */
688 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
689
690 /**
691  * Get number of available video tracks.
692  *
693  * \param p_mi media player
694  * \param p_e an initialized exception
695  * \return the number of available video tracks (int)
696  */
697 VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *,  libvlc_exception_t * );
698
699 /**
700  * Get the description of available video tracks.
701  *
702  * \param p_mi media player
703  * \param p_e an initialized exception
704  * \return list with description of available video tracks
705  */
706 VLC_PUBLIC_API libvlc_track_description_t *
707         libvlc_video_get_track_description( libvlc_media_player_t *,  libvlc_exception_t * );
708
709 /**
710  * Get current video track.
711  *
712  * \param p_mi media player
713  * \param p_e an initialized exception pointer
714  * \return the video track (int)
715  */
716 VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );
717
718 /**
719  * Set video track.
720  *
721  * \param p_mi media player
722  * \param i_track the track (int)
723  * \param p_e an initialized exception pointer
724  */
725 VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
726
727 /**
728  * Take a snapshot of the current video window.
729  *
730  * If i_width AND i_height is 0, original size is used.
731  * If i_width XOR i_height is 0, original aspect-ratio is preserved.
732  *
733  * \param p_mi media player instance
734  * \param psz_filepath the path where to save the screenshot to
735  * \param i_width the snapshot's width
736  * \param i_height the snapshot's height
737  * \param p_e an initialized exception pointer
738  */
739 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
740
741 /**
742  * Enable or disable deinterlace filter
743  *
744  * \param p_mi libvlc media player
745  * \param b_enable boolean to enable or disable deinterlace filter
746  * \param psz_mode type of deinterlace filter to use
747  * \param p_e an initialized exception pointer
748  */
749 VLC_PUBLIC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *,
750                                                   int , const char *,
751                                                   libvlc_exception_t *);
752
753 /**
754  * Get an option value (option which return an int)
755  *
756  * \param p_mi libvlc media player
757  * \param option marq option to get
758  * \param p_e an initialized exception pointer
759  */
760 VLC_PUBLIC_API int libvlc_video_get_marquee_option_as_int( libvlc_media_player_t *,
761                                                         libvlc_video_marquee_int_option_t,
762                                                         libvlc_exception_t * );
763
764 /**
765  * Get an option value (option which return a string)
766  *
767  * \param p_mi libvlc media player
768  * \param option marq option to get
769  * \param p_e an initialized exception pointer
770  */
771 VLC_PUBLIC_API char *libvlc_video_get_marquee_option_as_string( libvlc_media_player_t *,
772                                                              libvlc_video_marquee_string_option_t,
773                                                              libvlc_exception_t * );
774
775 /**
776  * Enable, disable or set a marq option (only int)
777  *
778  * \param p_mi libvlc media player
779  * \param option marq option to set
780  * \param i_val marq option value
781  * \param p_e an initialized exception pointer
782  */
783 VLC_PUBLIC_API void libvlc_video_set_marquee_option_as_int( libvlc_media_player_t *,
784                                                          libvlc_video_marquee_int_option_t,
785                                                          int, libvlc_exception_t * );
786
787 /**
788  * Set a marq option (only string)
789  *
790  * \param p_mi libvlc media player
791  * \param option marq option to set
792  * \param psz_text marq option value
793  * \param p_e an initialized exception pointer
794  */
795 VLC_PUBLIC_API void libvlc_video_set_marquee_option_as_string( libvlc_media_player_t *,
796                                                             libvlc_video_marquee_string_option_t,
797                                                             const char *,
798                                                             libvlc_exception_t * );
799
800 /** @} video */
801
802 /** \defgroup libvlc_audio libvlc_audio
803  * \ingroup libvlc_media_player
804  * LibVLC Audio handling
805  * @{
806  */
807
808 /**
809  * Audio device types
810  */
811 typedef enum libvlc_audio_output_device_types_t {
812     libvlc_AudioOutputDevice_Error  = -1,
813     libvlc_AudioOutputDevice_Mono   =  1,
814     libvlc_AudioOutputDevice_Stereo =  2,
815     libvlc_AudioOutputDevice_2F2R   =  4,
816     libvlc_AudioOutputDevice_3F2R   =  5,
817     libvlc_AudioOutputDevice_5_1    =  6,
818     libvlc_AudioOutputDevice_6_1    =  7,
819     libvlc_AudioOutputDevice_7_1    =  8,
820     libvlc_AudioOutputDevice_SPDIF  = 10
821 } libvlc_audio_output_device_types_t;
822
823 /**
824  * Audio channels
825  */
826 typedef enum libvlc_audio_output_channel_t {
827     libvlc_AudioChannel_Error   = -1,
828     libvlc_AudioChannel_Stereo  =  1,
829     libvlc_AudioChannel_RStereo =  2,
830     libvlc_AudioChannel_Left    =  3,
831     libvlc_AudioChannel_Right   =  4,
832     libvlc_AudioChannel_Dolbys  =  5
833 } libvlc_audio_output_channel_t;
834
835
836 /**
837  * Get the list of available audio outputs
838  *
839  * \param p_instance libvlc instance
840  * \param p_e an initialized exception pointer
841  * \return list of available audio outputs, at the end free it with
842 *          \see libvlc_audio_output_list_release \see libvlc_audio_output_t
843  */
844 VLC_PUBLIC_API libvlc_audio_output_t *
845         libvlc_audio_output_list_get( libvlc_instance_t *,
846                                       libvlc_exception_t * );
847
848 /**
849  * Free the list of available audio outputs
850  *
851  * \param p_list list with audio outputs for release
852  */
853 VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );
854
855 /**
856  * Set the audio output.
857  * Change will be applied after stop and play.
858  *
859  * \param p_instance libvlc instance
860  * \param psz_name name of audio output,
861  *               use psz_name of \see libvlc_audio_output_t
862  * \return true if function succeded
863  */
864 VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *,
865                                             const char * );
866
867 /**
868  * Get count of devices for audio output, these devices are hardware oriented
869  * like analor or digital output of sound card
870  *
871  * \param p_instance libvlc instance
872  * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
873  * \return number of devices
874  */
875 VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *,
876                                                      const char * );
877
878 /**
879  * Get long name of device, if not available short name given
880  *
881  * \param p_instance libvlc instance
882  * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
883  * \param i_device device index
884  * \return long name of device
885  */
886 VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *,
887                                                            const char *,
888                                                            int );
889
890 /**
891  * Get id name of device
892  *
893  * \param p_instance libvlc instance
894  * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
895  * \param i_device device index
896  * \return id name of device, use for setting device, need to be free after use
897  */
898 VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *,
899                                                      const char *,
900                                                      int );
901
902 /**
903  * Set device for using
904  *
905  * \param p_instance libvlc instance
906  * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
907  * \param psz_device_id device
908  */
909 VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *,
910                                                     const char *,
911                                                     const char * );
912
913 /**
914  * Get current audio device type. Device type describes something like
915  * character of output sound - stereo sound, 2.1, 5.1 etc
916  *
917  * \param p_instance vlc instance
918  * \param p_e an initialized exception pointer
919  * \return the audio devices type \see libvlc_audio_output_device_types_t
920  */
921 VLC_PUBLIC_API int libvlc_audio_output_get_device_type(
922         libvlc_instance_t *, libvlc_exception_t * );
923
924 /**
925  * Set current audio device type.
926  *
927  * \param p_instance vlc instance
928  * \param device_type the audio device type,
929           according to \see libvlc_audio_output_device_types_t
930  * \param p_e an initialized exception pointer
931  */
932 VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
933                                                          int,
934                                                          libvlc_exception_t * );
935
936
937 /**
938  * Toggle mute status.
939  *
940  * \param p_instance libvlc instance
941  * \param p_e an initialized exception pointer
942  */
943 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
944
945 /**
946  * Get current mute status.
947  *
948  * \param p_instance libvlc instance
949  * \param p_e an initialized exception pointer
950  * \return the mute status (boolean)
951  */
952 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
953
954 /**
955  * Set mute status.
956  *
957  * \param p_instance libvlc instance
958  * \param status If status is true then mute, otherwise unmute
959  * \param p_e an initialized exception pointer
960  */
961 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
962
963 /**
964  * Get current audio level.
965  *
966  * \param p_instance libvlc instance
967  * \param p_e an initialized exception pointer
968  * \return the audio level (int)
969  */
970 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
971
972 /**
973  * Set current audio level.
974  *
975  * \param p_instance libvlc instance
976  * \param i_volume the volume (int)
977  * \param p_e an initialized exception pointer
978  */
979 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
980
981 /**
982  * Get number of available audio tracks.
983  *
984  * \param p_mi media player
985  * \param p_e an initialized exception
986  * \return the number of available audio tracks (int)
987  */
988 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *,  libvlc_exception_t * );
989
990 /**
991  * Get the description of available audio tracks.
992  *
993  * \param p_mi media player
994  * \param p_e an initialized exception
995  * \return list with description of available audio tracks
996  */
997 VLC_PUBLIC_API libvlc_track_description_t *
998         libvlc_audio_get_track_description( libvlc_media_player_t *,  libvlc_exception_t * );
999
1000 /**
1001  * Get current audio track.
1002  *
1003  * \param p_mi media player
1004  * \param p_e an initialized exception pointer
1005  * \return the audio track (int)
1006  */
1007 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
1008
1009 /**
1010  * Set current audio track.
1011  *
1012  * \param p_mi media player
1013  * \param i_track the track (int)
1014  * \param p_e an initialized exception pointer
1015  */
1016 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
1017
1018 /**
1019  * Get current audio channel.
1020  *
1021  * \param p_instance vlc instance
1022  * \param p_e an initialized exception pointer
1023  * \return the audio channel \see libvlc_audio_output_channel_t
1024  */
1025 VLC_PUBLIC_API int
1026     libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
1027
1028 /**
1029  * Set current audio channel.
1030  *
1031  * \param p_instance vlc instance
1032  * \param channel the audio channel, \see libvlc_audio_output_channel_t
1033  * \param p_e an initialized exception pointer
1034  */
1035 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *,
1036                                               int,
1037                                               libvlc_exception_t * );
1038
1039 /** @} audio */
1040
1041 /** @} media_player */
1042
1043 #endif /* VLC_LIBVLC_MEDIA_PLAYER_H */