1 /*****************************************************************************
2 * libvlc_media_player.h: libvlc_media_player external API
3 *****************************************************************************
4 * Copyright (C) 1998-2009 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
8 * Jean-Paul Saman <jpsaman@videolan.org>
9 * Pierre d'Herbemont <pdherbemont@videolan.org>
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.
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.
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 *****************************************************************************/
28 * This file defines libvlc_media_player external API
31 #ifndef VLC_LIBVLC_MEDIA_PLAYER_H
32 #define VLC_LIBVLC_MEDIA_PLAYER_H 1
34 /*****************************************************************************
36 *****************************************************************************/
37 /** \defgroup libvlc_media_player libvlc_media_player
39 * LibVLC Media Player, object that let you play a media
40 * in a custom drawable
44 typedef struct libvlc_media_player_t libvlc_media_player_t;
47 * Description for video, audio tracks and subtitles. It contains
48 * id, name (description string) and pointer to next record.
50 typedef struct libvlc_track_description_t
54 struct libvlc_track_description_t *p_next;
56 } libvlc_track_description_t;
59 * Description for audio output. It contains
60 * name, description and pointer to next record.
62 typedef struct libvlc_audio_output_t
65 char *psz_description;
66 struct libvlc_audio_output_t *p_next;
68 } libvlc_audio_output_t;
71 * Rectangle type for video geometry
73 typedef struct libvlc_rectangle_t
80 * Marq int options definition
82 typedef enum libvlc_video_marquee_int_option_t {
83 libvlc_marquee_Enabled = 0,
85 libvlc_marquee_Opacity,
86 libvlc_marquee_Position,
87 libvlc_marquee_Refresh,
89 libvlc_marquee_Timeout,
92 } libvlc_video_marquee_int_option_t;
95 * Marq string options definition
97 typedef enum libvlc_video_marquee_string_option_t {
98 libvlc_marquee_Text = 0
99 } libvlc_video_marquee_string_option_t;
103 * Create an empty Media Player object
105 * \param p_libvlc_instance the libvlc instance in which the Media Player
107 * \param p_e an initialized exception pointer
109 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );
112 * Create a Media Player object from a Media
114 * \param p_md the media. Afterwards the p_md can be safely
116 * \param p_e an initialized exception pointer
118 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );
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.
127 * \param p_mi the Media Player to free
129 VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );
132 * Retain a reference to a media player object. Use
133 * libvlc_media_player_release() to decrement reference count.
135 * \param p_mi media player object
137 VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
140 * Set the media that will be used by the media_player. If any,
141 * previous md will be released.
143 * \param p_mi the Media Player
144 * \param p_md the Media. Afterwards the p_md can be safely
146 * \param p_e an initialized exception pointer
148 VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t *, libvlc_exception_t * );
151 * Get the media used by the media_player.
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
158 VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );
161 * Get the Event Manager from which the media player send event.
163 * \param p_mi the Media Player
164 * \param p_e an initialized exception pointer
165 * \return the event manager associated with p_mi
167 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );
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
176 VLC_PUBLIC_API int libvlc_media_player_is_playing ( libvlc_media_player_t *, libvlc_exception_t * );
181 * \param p_mi the Media Player
182 * \param p_e an initialized exception pointer
184 VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_exception_t * );
189 * \param p_mi the Media Player
190 * \param p_e an initialized exception pointer
192 VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_exception_t * );
197 * \param p_mi the Media Player
198 * \param p_e an initialized exception pointer
200 VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );
203 * Set the agl handler where the media player should render its video output.
205 * \param p_mi the Media Player
206 * \param drawable the agl handler
207 * \param p_e an initialized exception pointer
209 VLC_PUBLIC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable, libvlc_exception_t *p_e );
212 * Get the agl handler previously set with libvlc_media_player_set_agl().
214 * \return the agl handler or 0 if none where set
216 VLC_PUBLIC_API void * libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
219 * Set the agl handler where the media player should render its video output.
221 * \param p_mi the Media Player
222 * \param drawable the agl handler
223 * \param p_e an initialized exception pointer
225 VLC_PUBLIC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
228 * Get the agl handler previously set with libvlc_media_player_set_agl().
230 * \param p_mi the Media Player
231 * \return the agl handler or 0 if none where set
233 VLC_PUBLIC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi );
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
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
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.
248 * \param p_mi the Media Player
249 * \param drawable the ID of the X window
250 * \param p_e an initialized exception pointer
252 VLC_PUBLIC_API void libvlc_media_player_set_xwindow ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
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
260 * \return an X window ID, or 0 if none where set.
262 VLC_PUBLIC_API uint32_t libvlc_media_player_get_xwindow ( libvlc_media_player_t *p_mi );
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.
269 * \param p_mi the Media Player
270 * \param drawable windows handle of the drawable
271 * \param p_e an initialized exception pointer
273 VLC_PUBLIC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable, libvlc_exception_t *p_e );
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.
280 * \return a window handle or NULL if there are none.
282 VLC_PUBLIC_API void *libvlc_media_player_get_hwnd ( libvlc_media_player_t *p_mi );
286 /** \bug This might go away ... to be replaced by a broader system */
289 * Get the current movie length (in ms).
291 * \param p_mi the Media Player
292 * \param p_e an initialized exception pointer
293 * \return the movie length (in ms).
295 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);
298 * Get the current movie time (in ms).
300 * \param p_mi the Media Player
301 * \param p_e an initialized exception pointer
302 * \return the movie time (in ms).
304 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);
307 * Set the movie time (in ms).
309 * \param p_mi the Media Player
310 * \param the movie time (in ms).
311 * \param p_e an initialized exception pointer
313 VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
316 * Get movie position.
318 * \param p_mi the Media Player
319 * \param p_e an initialized exception pointer
320 * \return movie position
322 VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);
325 * Set movie position.
327 * \param p_mi the Media Player
328 * \param f_pos the position
329 * \param p_e an initialized exception pointer
331 VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);
336 * \param p_mi the Media Player
337 * \param i_chapter chapter number to play
338 * \param p_e an initialized exception pointer
340 VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);
345 * \param p_mi the Media Player
346 * \param p_e an initialized exception pointer
347 * \return chapter number currently playing
349 VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );
352 * Get movie chapter count
354 * \param p_mi the Media Player
355 * \param p_e an initialized exception pointer
356 * \return number of chapters in movie
358 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
361 * Will the player play
363 * \param p_mi the Media Player
364 * \param p_e an initialized exception pointer
367 VLC_PUBLIC_API int libvlc_media_player_will_play ( libvlc_media_player_t *, libvlc_exception_t *);
370 * Get title chapter count
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
377 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count_for_title(
378 libvlc_media_player_t *, int, libvlc_exception_t *);
383 * \param p_mi the Media Player
384 * \param i_title title number to play
385 * \param p_e an initialized exception pointer
387 VLC_PUBLIC_API void libvlc_media_player_set_title( libvlc_media_player_t *, int, libvlc_exception_t *);
392 * \param p_mi the Media Player
393 * \param p_e an initialized exception pointer
394 * \return title number currently playing
396 VLC_PUBLIC_API int libvlc_media_player_get_title( libvlc_media_player_t *, libvlc_exception_t *);
399 * Get movie title count
401 * \param p_mi the Media Player
402 * \param p_e an initialized exception pointer
403 * \return title number count
405 VLC_PUBLIC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *, libvlc_exception_t *);
408 * Set previous chapter
410 * \param p_mi the Media Player
411 * \param p_e an initialized exception pointer
413 VLC_PUBLIC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *, libvlc_exception_t *);
418 * \param p_mi the Media Player
419 * \param p_e an initialized exception pointer
421 VLC_PUBLIC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *, libvlc_exception_t *);
424 * Get movie play rate
426 * \param p_mi the Media Player
427 * \param p_e an initialized exception pointer
428 * \return movie play rate
430 VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);
433 * Set movie play rate
435 * \param p_mi the Media Player
436 * \param movie play rate to set
437 * \param p_e an initialized exception pointer
439 VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);
442 * Get current movie state
444 * \param p_mi the Media Player
445 * \param p_e an initialized exception pointer
446 * \return current movie state as libvlc_state_t
448 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *, libvlc_exception_t *);
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
457 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
462 * Does this media player have a video output?
464 * \param p_md the media player
465 * \param p_e an initialized exception pointer
467 VLC_PUBLIC_API int libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
470 * Is this media player seekable?
472 * \param p_input the input
473 * \param p_e an initialized exception pointer
475 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
478 * Can this media player be paused?
480 * \param p_input the input
481 * \param p_e an initialized exception pointer
483 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
486 * Release (free) libvlc_track_description_t
488 * \param p_track_description the structure to release
490 VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
492 /** \defgroup libvlc_video libvlc_video
493 * \ingroup libvlc_media_player
494 * LibVLC Video handling
499 * Toggle fullscreen status on video output.
501 * \param p_mediaplayer the media player
502 * \param p_e an initialized exception pointer
504 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
507 * Enable or disable fullscreen on a video output.
509 * \param p_mediaplayer the media player
510 * \param b_fullscreen boolean for fullscreen status
511 * \param p_e an initialized exception pointer
513 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
516 * Get current fullscreen status.
518 * \param p_mediaplayer the media player
519 * \param p_e an initialized exception pointer
520 * \return the fullscreen status (boolean)
522 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
525 * Get current video height.
527 * \param p_mediaplayer the media player
528 * \param p_e an initialized exception pointer
529 * \return the video height
531 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
534 * Get current video width.
536 * \param p_mediaplayer the media player
537 * \param p_e an initialized exception pointer
538 * \return the video width
540 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
543 * Get the current video scaling factor.
544 * See also libvlc_video_set_scale().
546 * \param p_mediaplayer the media player
547 * \param p_e an initialized exception pointer
548 * \return the currently configured zoom factor, or 0. if the video is set
549 * to fit to the output window/drawable automatically.
551 VLC_PUBLIC_API float libvlc_video_get_scale( libvlc_media_player_t *,
552 libvlc_exception_t *p_e );
555 * Set the video scaling factor. That is the ratio of the number of pixels on
556 * screen to the number of pixels in the original decoded video in each
557 * dimension. Zero is a special value; it will adjust the video to the output
558 * window/drawable (in windowed mode) or the entire screen.
560 * Note that not all video outputs support scaling.
562 * \param p_mediaplayer the media player
563 * \param i_factor the scaling factor, or zero
564 * \param p_e an initialized exception pointer
566 VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *, float,
567 libvlc_exception_t *p_e );
570 * Get current video aspect ratio.
572 * \param p_mediaplayer the media player
573 * \param p_e an initialized exception pointer
574 * \return the video aspect ratio
576 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
579 * Set new video aspect ratio.
581 * \param p_mediaplayer the media player
582 * \param psz_aspect new video aspect-ratio
583 * \param p_e an initialized exception pointer
585 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, char *, libvlc_exception_t * );
588 * Get current video subtitle.
590 * \param p_mediaplayer the media player
591 * \param p_e an initialized exception pointer
592 * \return the video subtitle selected
594 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
597 * Get the number of available video subtitles.
599 * \param p_mediaplayer the media player
600 * \param p_e an initialized exception pointer
601 * \return the number of available video subtitles
603 VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );
606 * Get the description of available video subtitles.
608 * \param p_mediaplayer the media player
609 * \param p_e an initialized exception pointer
610 * \return list containing description of available video subtitles
612 VLC_PUBLIC_API libvlc_track_description_t *
613 libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );
616 * Set new video subtitle.
618 * \param p_mediaplayer the media player
619 * \param i_spu new video subtitle to select
620 * \param p_e an initialized exception pointer
622 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
625 * Set new video subtitle file.
627 * \param p_mediaplayer the media player
628 * \param psz_subtitle new video subtitle file
629 * \param p_e an initialized exception pointer
630 * \return the success status (boolean)
632 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );
635 * Get the description of available titles.
637 * \param p_mediaplayer the media player
638 * \param p_e an initialized exception pointer
639 * \return list containing description of available titles
641 VLC_PUBLIC_API libvlc_track_description_t *
642 libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );
645 * Get the description of available chapters for specific title.
647 * \param p_mediaplayer the media player
648 * \param i_title selected title
649 * \param p_e an initialized exception pointer
650 * \return list containing description of available chapter for title i_title
652 VLC_PUBLIC_API libvlc_track_description_t *
653 libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );
656 * Get current crop filter geometry.
658 * \param p_mediaplayer the media player
659 * \param p_e an initialized exception pointer
660 * \return the crop filter geometry
662 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
665 * Set new crop filter geometry.
667 * \param p_mediaplayer the media player
668 * \param psz_geometry new crop filter geometry
669 * \param p_e an initialized exception pointer
671 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );
674 * Toggle teletext transparent status on video output.
676 * \param p_mediaplayer the media player
677 * \param p_e an initialized exception pointer
679 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
682 * Get current teletext page requested.
684 * \param p_mediaplayer the media player
685 * \param p_e an initialized exception pointer
686 * \return the current teletext page requested.
688 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
691 * Set new teletext page to retrieve.
693 * \param p_mediaplayer the media player
694 * \param i_page teletex page number requested
695 * \param p_e an initialized exception pointer
697 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
700 * Get number of available video tracks.
702 * \param p_mi media player
703 * \param p_e an initialized exception
704 * \return the number of available video tracks (int)
706 VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
709 * Get the description of available video tracks.
711 * \param p_mi media player
712 * \param p_e an initialized exception
713 * \return list with description of available video tracks
715 VLC_PUBLIC_API libvlc_track_description_t *
716 libvlc_video_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
719 * Get current video track.
721 * \param p_mi media player
722 * \param p_e an initialized exception pointer
723 * \return the video track (int)
725 VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );
730 * \param p_mi media player
731 * \param i_track the track (int)
732 * \param p_e an initialized exception pointer
734 VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
737 * Take a snapshot of the current video window.
739 * If i_width AND i_height is 0, original size is used.
740 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
742 * \param p_mi media player instance
743 * \param psz_filepath the path where to save the screenshot to
744 * \param i_width the snapshot's width
745 * \param i_height the snapshot's height
746 * \param p_e an initialized exception pointer
748 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
751 * Enable or disable deinterlace filter
753 * \param p_mi libvlc media player
754 * \param b_enable boolean to enable or disable deinterlace filter
755 * \param psz_mode type of deinterlace filter to use
756 * \param p_e an initialized exception pointer
758 VLC_PUBLIC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *,
760 libvlc_exception_t *);
763 * Get an option value (option which return an int)
765 * \param p_mi libvlc media player
766 * \param option marq option to get
767 * \param p_e an initialized exception pointer
769 VLC_PUBLIC_API int libvlc_video_get_marquee_option_as_int( libvlc_media_player_t *,
770 libvlc_video_marquee_int_option_t,
771 libvlc_exception_t * );
774 * Get an option value (option which return a string)
776 * \param p_mi libvlc media player
777 * \param option marq option to get
778 * \param p_e an initialized exception pointer
780 VLC_PUBLIC_API char *libvlc_video_get_marquee_option_as_string( libvlc_media_player_t *,
781 libvlc_video_marquee_string_option_t,
782 libvlc_exception_t * );
785 * Enable, disable or set a marq option (only int)
787 * \param p_mi libvlc media player
788 * \param option marq option to set
789 * \param i_val marq option value
790 * \param p_e an initialized exception pointer
792 VLC_PUBLIC_API void libvlc_video_set_marquee_option_as_int( libvlc_media_player_t *,
793 libvlc_video_marquee_int_option_t,
794 int, libvlc_exception_t * );
797 * Set a marq option (only string)
799 * \param p_mi libvlc media player
800 * \param option marq option to set
801 * \param psz_text marq option value
802 * \param p_e an initialized exception pointer
804 VLC_PUBLIC_API void libvlc_video_set_marquee_option_as_string( libvlc_media_player_t *,
805 libvlc_video_marquee_string_option_t,
807 libvlc_exception_t * );
811 /** \defgroup libvlc_audio libvlc_audio
812 * \ingroup libvlc_media_player
813 * LibVLC Audio handling
820 typedef enum libvlc_audio_output_device_types_t {
821 libvlc_AudioOutputDevice_Error = -1,
822 libvlc_AudioOutputDevice_Mono = 1,
823 libvlc_AudioOutputDevice_Stereo = 2,
824 libvlc_AudioOutputDevice_2F2R = 4,
825 libvlc_AudioOutputDevice_3F2R = 5,
826 libvlc_AudioOutputDevice_5_1 = 6,
827 libvlc_AudioOutputDevice_6_1 = 7,
828 libvlc_AudioOutputDevice_7_1 = 8,
829 libvlc_AudioOutputDevice_SPDIF = 10
830 } libvlc_audio_output_device_types_t;
835 typedef enum libvlc_audio_output_channel_t {
836 libvlc_AudioChannel_Error = -1,
837 libvlc_AudioChannel_Stereo = 1,
838 libvlc_AudioChannel_RStereo = 2,
839 libvlc_AudioChannel_Left = 3,
840 libvlc_AudioChannel_Right = 4,
841 libvlc_AudioChannel_Dolbys = 5
842 } libvlc_audio_output_channel_t;
846 * Get the list of available audio outputs
848 * \param p_instance libvlc instance
849 * \param p_e an initialized exception pointer
850 * \return list of available audio outputs, at the end free it with
851 * \see libvlc_audio_output_list_release \see libvlc_audio_output_t
853 VLC_PUBLIC_API libvlc_audio_output_t *
854 libvlc_audio_output_list_get( libvlc_instance_t *,
855 libvlc_exception_t * );
858 * Free the list of available audio outputs
860 * \param p_list list with audio outputs for release
862 VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );
865 * Set the audio output.
866 * Change will be applied after stop and play.
868 * \param p_instance libvlc instance
869 * \param psz_name name of audio output,
870 * use psz_name of \see libvlc_audio_output_t
871 * \return true if function succeded
873 VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *,
877 * Get count of devices for audio output, these devices are hardware oriented
878 * like analor or digital output of sound card
880 * \param p_instance libvlc instance
881 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
882 * \return number of devices
884 VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *,
888 * Get long name of device, if not available short name given
890 * \param p_instance libvlc instance
891 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
892 * \param i_device device index
893 * \return long name of device
895 VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *,
900 * Get id name of device
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 id name of device, use for setting device, need to be free after use
907 VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *,
912 * Set device for using
914 * \param p_instance libvlc instance
915 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
916 * \param psz_device_id device
918 VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *,
923 * Get current audio device type. Device type describes something like
924 * character of output sound - stereo sound, 2.1, 5.1 etc
926 * \param p_instance vlc instance
927 * \param p_e an initialized exception pointer
928 * \return the audio devices type \see libvlc_audio_output_device_types_t
930 VLC_PUBLIC_API int libvlc_audio_output_get_device_type(
931 libvlc_instance_t *, libvlc_exception_t * );
934 * Set current audio device type.
936 * \param p_instance vlc instance
937 * \param device_type the audio device type,
938 according to \see libvlc_audio_output_device_types_t
939 * \param p_e an initialized exception pointer
941 VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
943 libvlc_exception_t * );
947 * Toggle mute status.
949 * \param p_instance libvlc instance
950 * \param p_e an initialized exception pointer
952 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
955 * Get current mute status.
957 * \param p_instance libvlc instance
958 * \param p_e an initialized exception pointer
959 * \return the mute status (boolean)
961 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
966 * \param p_instance libvlc instance
967 * \param status If status is true then mute, otherwise unmute
968 * \param p_e an initialized exception pointer
970 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
973 * Get current audio level.
975 * \param p_instance libvlc instance
976 * \param p_e an initialized exception pointer
977 * \return the audio level (int)
979 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
982 * Set current audio level.
984 * \param p_instance libvlc instance
985 * \param i_volume the volume (int)
986 * \param p_e an initialized exception pointer
988 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
991 * Get number of available audio tracks.
993 * \param p_mi media player
994 * \param p_e an initialized exception
995 * \return the number of available audio tracks (int)
997 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
1000 * Get the description of available audio tracks.
1002 * \param p_mi media player
1003 * \param p_e an initialized exception
1004 * \return list with description of available audio tracks
1006 VLC_PUBLIC_API libvlc_track_description_t *
1007 libvlc_audio_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
1010 * Get current audio track.
1012 * \param p_mi media player
1013 * \param p_e an initialized exception pointer
1014 * \return the audio track (int)
1016 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
1019 * Set current audio track.
1021 * \param p_mi media player
1022 * \param i_track the track (int)
1023 * \param p_e an initialized exception pointer
1025 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
1028 * Get current audio channel.
1030 * \param p_instance vlc instance
1031 * \param p_e an initialized exception pointer
1032 * \return the audio channel \see libvlc_audio_output_channel_t
1035 libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
1038 * Set current audio channel.
1040 * \param p_instance vlc instance
1041 * \param channel the audio channel, \see libvlc_audio_output_channel_t
1042 * \param p_e an initialized exception pointer
1044 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *,
1046 libvlc_exception_t * );
1050 /** @} media_player */
1052 #endif /* VLC_LIBVLC_MEDIA_PLAYER_H */