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