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
81 * Create an empty Media Player object
83 * \param p_libvlc_instance the libvlc instance in which the Media Player
85 * \param p_e an initialized exception pointer
87 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );
90 * Create a Media Player object from a Media
92 * \param p_md the media. Afterwards the p_md can be safely
94 * \param p_e an initialized exception pointer
96 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );
99 * Release a media_player after use
100 * Decrement the reference count of a media player object. If the
101 * reference count is 0, then libvlc_media_player_release() will
102 * release the media player object. If the media player object
103 * has been released, then it should not be used again.
105 * \param p_mi the Media Player to free
107 VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );
110 * Retain a reference to a media player object. Use
111 * libvlc_media_player_release() to decrement reference count.
113 * \param p_mi media player object
115 VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
118 * Set the media that will be used by the media_player. If any,
119 * previous md will be released.
121 * \param p_mi the Media Player
122 * \param p_md the Media. Afterwards the p_md can be safely
124 * \param p_e an initialized exception pointer
126 VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t *, libvlc_exception_t * );
129 * Get the media used by the media_player.
131 * \param p_mi the Media Player
132 * \param p_e an initialized exception pointer
133 * \return the media associated with p_mi, or NULL if no
134 * media is associated
136 VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );
139 * Get the Event Manager from which the media player send event.
141 * \param p_mi the Media Player
142 * \param p_e an initialized exception pointer
143 * \return the event manager associated with p_mi
145 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );
150 * \param p_mi the Media Player
151 * \param p_e an initialized exception pointer
152 * \return 1 if the media player is playing, 0 otherwise
154 VLC_PUBLIC_API int libvlc_media_player_is_playing ( libvlc_media_player_t *, libvlc_exception_t * );
159 * \param p_mi the Media Player
160 * \param p_e an initialized exception pointer
162 VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_exception_t * );
167 * \param p_mi the Media Player
168 * \param p_e an initialized exception pointer
170 VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_exception_t * );
175 * \param p_mi the Media Player
176 * \param p_e an initialized exception pointer
178 VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );
181 * Set the agl handler where the media player should render its video output.
183 * \param p_mi the Media Player
184 * \param drawable the agl handler
185 * \param p_e an initialized exception pointer
187 VLC_PUBLIC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable, libvlc_exception_t *p_e );
190 * Get the agl handler previously set with libvlc_media_player_set_agl().
192 * \return the agl handler or 0 if none where set
194 VLC_PUBLIC_API uint32_t libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
197 * Set the agl handler where the media player should render its video output.
199 * \param p_mi the Media Player
200 * \param drawable the agl handler
201 * \param p_e an initialized exception pointer
203 VLC_PUBLIC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
206 * Get the agl handler previously set with libvlc_media_player_set_agl().
208 * \return the agl handler or 0 if none where set
210 VLC_PUBLIC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi );
213 * Set an X Window System drawable where the media player should render its
214 * video output. If LibVLC was built without X11 output support, then this has
217 * The specified identifier must correspond to an existing Input/Output class
218 * X11 window. Pixmaps are <b>not</b> supported. The caller shall ensure that
219 * the X11 server is the same as the one the VLC instance has been configured
221 * If XVideo is <b>not</b> used, it is assumed that the drawable has the
222 * following properties in common with the default X11 screen: depth, scan line
223 * pad, black pixel. This is a bug.
225 * \param p_mi the Media Player
226 * \param drawable the ID of the X window
227 * \param p_e an initialized exception pointer
229 VLC_PUBLIC_API void libvlc_media_player_set_xwindow ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
232 * Get the X Window System window identifier previously set with
233 * libvlc_media_player_set_xwindow(). Note that this will return the identifier
234 * even if VLC is not currently using it (for instance if it is playing an
237 * \return an X window ID, or 0 if none where set.
239 VLC_PUBLIC_API uint32_t libvlc_media_player_get_xwindow ( libvlc_media_player_t *p_mi );
242 * Set a Win32/Win64 API window handle (HWND) where the media player should
243 * render its video output. If LibVLC was built without Win32/Win64 API output
244 * support, then this has no effects.
246 * \param p_mi the Media Player
247 * \param drawable windows handle of the drawable
248 * \param p_e an initialized exception pointer
250 VLC_PUBLIC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable, libvlc_exception_t *p_e );
253 * Get the Windows API window handle (HWND) previously set with
254 * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
255 * is not currently outputting any video to it.
257 * \return a window handle or NULL if there are none.
259 VLC_PUBLIC_API void *libvlc_media_player_get_hwnd ( libvlc_media_player_t *p_mi );
263 /** \bug This might go away ... to be replaced by a broader system */
266 * Get the current movie length (in ms).
268 * \param p_mi the Media Player
269 * \param p_e an initialized exception pointer
270 * \return the movie length (in ms).
272 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);
275 * Get the current movie time (in ms).
277 * \param p_mi the Media Player
278 * \param p_e an initialized exception pointer
279 * \return the movie time (in ms).
281 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);
284 * Set the movie time (in ms).
286 * \param p_mi the Media Player
287 * \param the movie time (in ms).
288 * \param p_e an initialized exception pointer
290 VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
293 * Get movie position.
295 * \param p_mi the Media Player
296 * \param p_e an initialized exception pointer
297 * \return movie position
299 VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);
302 * Set movie position.
304 * \param p_mi the Media Player
305 * \param p_e an initialized exception pointer
306 * \return movie position
308 VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);
313 * \param p_mi the Media Player
314 * \param i_chapter chapter number to play
315 * \param p_e an initialized exception pointer
317 VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);
322 * \param p_mi the Media Player
323 * \param p_e an initialized exception pointer
324 * \return chapter number currently playing
326 VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );
329 * Get movie chapter count
331 * \param p_mi the Media Player
332 * \param p_e an initialized exception pointer
333 * \return number of chapters in movie
335 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
336 VLC_PUBLIC_API int libvlc_media_player_will_play ( libvlc_media_player_t *, libvlc_exception_t *);
339 * Get title chapter count
341 * \param p_mi the Media Player
342 * \param i_title title
343 * \param p_e an initialized exception pointer
344 * \return number of chapters in title
346 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count_for_title(
347 libvlc_media_player_t *, int, libvlc_exception_t *);
352 * \param p_mi the Media Player
353 * \param i_title title number to play
354 * \param p_e an initialized exception pointer
356 VLC_PUBLIC_API void libvlc_media_player_set_title( libvlc_media_player_t *, int, libvlc_exception_t *);
361 * \param p_mi the Media Player
362 * \param p_e an initialized exception pointer
363 * \return title number currently playing
365 VLC_PUBLIC_API int libvlc_media_player_get_title( libvlc_media_player_t *, libvlc_exception_t *);
368 * Get movie title count
370 * \param p_mi the Media Player
371 * \param p_e an initialized exception pointer
372 * \return title number count
374 VLC_PUBLIC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *, libvlc_exception_t *);
377 * Set previous chapter
379 * \param p_mi the Media Player
380 * \param p_e an initialized exception pointer
382 VLC_PUBLIC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *, libvlc_exception_t *);
387 * \param p_mi the Media Player
388 * \param p_e an initialized exception pointer
390 VLC_PUBLIC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *, libvlc_exception_t *);
393 * Get movie play rate
395 * \param p_mi the Media Player
396 * \param p_e an initialized exception pointer
397 * \return movie play rate
399 VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);
402 * Set movie play rate
404 * \param p_mi the Media Player
405 * \param movie play rate to set
406 * \param p_e an initialized exception pointer
408 VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);
411 * Get current movie state
413 * \param p_mi the Media Player
414 * \param p_e an initialized exception pointer
415 * \return current movie state as libvlc_state_t
417 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *, libvlc_exception_t *);
422 * \param p_mi the Media Player
423 * \param p_e an initialized exception pointer
424 * \return frames per second (fps) for this playing movie
426 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
431 * Does this media player have a video output?
433 * \param p_md the media player
434 * \param p_e an initialized exception pointer
436 VLC_PUBLIC_API int libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
439 * Is this media player seekable?
441 * \param p_input the input
442 * \param p_e an initialized exception pointer
444 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
447 * Can this media player be paused?
449 * \param p_input the input
450 * \param p_e an initialized exception pointer
452 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
455 * Release (free) libvlc_track_description_t
457 * \param p_track_description the structure to release
459 VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
461 /** \defgroup libvlc_video libvlc_video
462 * \ingroup libvlc_media_player
463 * LibVLC Video handling
468 * Toggle fullscreen status on video output.
470 * \param p_mediaplayer the media player
471 * \param p_e an initialized exception pointer
473 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
476 * Enable or disable fullscreen on a video output.
478 * \param p_mediaplayer the media player
479 * \param b_fullscreen boolean for fullscreen status
480 * \param p_e an initialized exception pointer
482 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
485 * Get current fullscreen status.
487 * \param p_mediaplayer the media player
488 * \param p_e an initialized exception pointer
489 * \return the fullscreen status (boolean)
491 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
494 * Get current video height.
496 * \param p_mediaplayer the media player
497 * \param p_e an initialized exception pointer
498 * \return the video height
500 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
503 * Get current video width.
505 * \param p_mediaplayer the media player
506 * \param p_e an initialized exception pointer
507 * \return the video width
509 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
512 * Get the current video scaling factor.
513 * See also libvlc_video_set_scale().
515 * \param p_mediaplayer the media player
516 * \return the currently configured zoom factor, or 0. if the video is set
517 * to fit to the output window/drawable automatically.
519 VLC_PUBLIC_API float libvlc_video_get_scale( libvlc_media_player_t *,
520 libvlc_exception_t *p_e );
523 * Set the video scaling factor. That is the ratio of the number of pixels on
524 * screen to the number of pixels in the original decoded video in each
525 * dimension. Zero is a special value; it will adjust the video to the output
526 * window/drawable (in windowed mode) or the entire screen.
528 * Note that not all video outputs support scaling.
530 * \param p_mediaplayer the media player
531 * \param i_factor the scaling factor, or zero
533 VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *, float,
534 libvlc_exception_t *p_e );
537 * Get current video aspect ratio.
539 * \param p_mediaplayer the media player
540 * \param p_e an initialized exception pointer
541 * \return the video aspect ratio
543 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
546 * Set new video aspect ratio.
548 * \param p_mediaplayer the media player
549 * \param psz_aspect new video aspect-ratio
550 * \param p_e an initialized exception pointer
552 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, char *, libvlc_exception_t * );
555 * Get current video subtitle.
557 * \param p_mediaplayer the media player
558 * \param p_e an initialized exception pointer
559 * \return the video subtitle selected
561 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
564 * Get the number of available video subtitles.
566 * \param p_mediaplayer the media player
567 * \param p_e an initialized exception pointer
568 * \return the number of available video subtitles
570 VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );
573 * Get the description of available video subtitles.
575 * \param p_mediaplayer the media player
576 * \param p_e an initialized exception pointer
577 * \return list containing description of available video subtitles
579 VLC_PUBLIC_API libvlc_track_description_t *
580 libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );
583 * Set new video subtitle.
585 * \param p_mediaplayer the media player
586 * \param i_spu new video subtitle to select
587 * \param p_e an initialized exception pointer
589 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
592 * Set new video subtitle file.
594 * \param p_mediaplayer the media player
595 * \param psz_subtitle new video subtitle file
596 * \param p_e an initialized exception pointer
597 * \return the success status (boolean)
599 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );
602 * Get the description of available titles.
604 * \param p_mediaplayer the media player
605 * \param p_e an initialized exception pointer
606 * \return list containing description of available titles
608 VLC_PUBLIC_API libvlc_track_description_t *
609 libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );
612 * Get the description of available chapters for specific title.
614 * \param p_mediaplayer the media player
615 * \param i_title selected title
616 * \param p_e an initialized exception pointer
617 * \return list containing description of available chapter for title i_title
619 VLC_PUBLIC_API libvlc_track_description_t *
620 libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );
623 * Get current crop filter geometry.
625 * \param p_mediaplayer the media player
626 * \param p_e an initialized exception pointer
627 * \return the crop filter geometry
629 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
632 * Set new crop filter geometry.
634 * \param p_mediaplayer the media player
635 * \param psz_geometry new crop filter geometry
636 * \param p_e an initialized exception pointer
638 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );
641 * Toggle teletext transparent status on video output.
643 * \param p_mediaplayer the media player
644 * \param p_e an initialized exception pointer
646 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
649 * Get current teletext page requested.
651 * \param p_mediaplayer the media player
652 * \param p_e an initialized exception pointer
653 * \return the current teletext page requested.
655 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
658 * Set new teletext page to retrieve.
660 * \param p_mediaplayer the media player
661 * \param i_page teletex page number requested
662 * \param p_e an initialized exception pointer
664 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
667 * Get number of available video tracks.
669 * \param p_mi media player
670 * \param p_e an initialized exception
671 * \return the number of available video tracks (int)
673 VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
676 * Get the description of available video tracks.
678 * \param p_mi media player
679 * \param p_e an initialized exception
680 * \return list with description of available video tracks
682 VLC_PUBLIC_API libvlc_track_description_t *
683 libvlc_video_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
686 * Get current video track.
688 * \param p_mi media player
689 * \param p_e an initialized exception pointer
690 * \return the video track (int)
692 VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );
697 * \param p_mi media player
698 * \param i_track the track (int)
699 * \param p_e an initialized exception pointer
701 VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
704 * Take a snapshot of the current video window.
706 * If i_width AND i_height is 0, original size is used.
707 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
709 * \param p_mi media player instance
710 * \param psz_filepath the path where to save the screenshot to
711 * \param i_width the snapshot's width
712 * \param i_height the snapshot's height
713 * \param p_e an initialized exception pointer
715 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
719 /** \defgroup libvlc_audio libvlc_audio
720 * \ingroup libvlc_media_player
721 * LibVLC Audio handling
728 typedef enum libvlc_audio_output_device_types_t {
729 libvlc_AudioOutputDevice_Error = -1,
730 libvlc_AudioOutputDevice_Mono = 1,
731 libvlc_AudioOutputDevice_Stereo = 2,
732 libvlc_AudioOutputDevice_2F2R = 4,
733 libvlc_AudioOutputDevice_3F2R = 5,
734 libvlc_AudioOutputDevice_5_1 = 6,
735 libvlc_AudioOutputDevice_6_1 = 7,
736 libvlc_AudioOutputDevice_7_1 = 8,
737 libvlc_AudioOutputDevice_SPDIF = 10
738 } libvlc_audio_output_device_types_t;
743 typedef enum libvlc_audio_output_channel_t {
744 libvlc_AudioChannel_Error = -1,
745 libvlc_AudioChannel_Stereo = 1,
746 libvlc_AudioChannel_RStereo = 2,
747 libvlc_AudioChannel_Left = 3,
748 libvlc_AudioChannel_Right = 4,
749 libvlc_AudioChannel_Dolbys = 5
750 } libvlc_audio_output_channel_t;
754 * Get the list of available audio outputs
756 * \param p_instance libvlc instance
757 * \param p_e an initialized exception pointer
758 * \return list of available audio outputs, at the end free it with
759 * \see libvlc_audio_output_list_release \see libvlc_audio_output_t
761 VLC_PUBLIC_API libvlc_audio_output_t *
762 libvlc_audio_output_list_get( libvlc_instance_t *,
763 libvlc_exception_t * );
766 * Free the list of available audio outputs
768 * \param p_list list with audio outputs for release
770 VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );
773 * Set the audio output.
774 * Change will be applied after stop and play.
776 * \param p_instance libvlc instance
777 * \param psz_name name of audio output,
778 * use psz_name of \see libvlc_audio_output_t
779 * \return true if function succeded
781 VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *,
785 * Get count of devices for audio output, these devices are hardware oriented
786 * like analor or digital output of sound card
788 * \param p_instance libvlc instance
789 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
790 * \return number of devices
792 VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *,
796 * Get long name of device, if not available short name given
798 * \param p_instance libvlc instance
799 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
800 * \param i_device device index
801 * \return long name of device
803 VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *,
808 * Get id name of device
810 * \param p_instance libvlc instance
811 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
812 * \param i_device device index
813 * \return id name of device, use for setting device, need to be free after use
815 VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *,
820 * Set device for using
822 * \param p_instance libvlc instance
823 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
824 * \param psz_device_id device
826 VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *,
831 * Get current audio device type. Device type describes something like
832 * character of output sound - stereo sound, 2.1, 5.1 etc
834 * \param p_instance vlc instance
835 * \param p_e an initialized exception pointer
836 * \return the audio devices type \see libvlc_audio_output_device_types_t
838 VLC_PUBLIC_API int libvlc_audio_output_get_device_type(
839 libvlc_instance_t *, libvlc_exception_t * );
842 * Set current audio device type.
844 * \param p_instance vlc instance
845 * \param device_type the audio device type,
846 according to \see libvlc_audio_output_device_types_t
847 * \param p_e an initialized exception pointer
849 VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
851 libvlc_exception_t * );
855 * Toggle mute status.
857 * \param p_instance libvlc instance
858 * \param p_e an initialized exception pointer
860 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
863 * Get current mute status.
865 * \param p_instance libvlc instance
866 * \param p_e an initialized exception pointer
867 * \return the mute status (boolean)
869 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
874 * \param p_instance libvlc instance
875 * \param status If status is true then mute, otherwise unmute
876 * \param p_e an initialized exception pointer
878 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
881 * Get current audio level.
883 * \param p_instance libvlc instance
884 * \param p_e an initialized exception pointer
885 * \return the audio level (int)
887 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
890 * Set current audio level.
892 * \param p_instance libvlc instance
893 * \param i_volume the volume (int)
894 * \param p_e an initialized exception pointer
896 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
899 * Get number of available audio tracks.
901 * \param p_mi media player
902 * \param p_e an initialized exception
903 * \return the number of available audio tracks (int)
905 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
908 * Get the description of available audio tracks.
910 * \param p_mi media player
911 * \param p_e an initialized exception
912 * \return list with description of available audio tracks
914 VLC_PUBLIC_API libvlc_track_description_t *
915 libvlc_audio_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
918 * Get current audio track.
920 * \param p_mi media player
921 * \param p_e an initialized exception pointer
922 * \return the audio track (int)
924 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
927 * Set current audio track.
929 * \param p_mi media player
930 * \param i_track the track (int)
931 * \param p_e an initialized exception pointer
933 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
936 * Get current audio channel.
938 * \param p_instance vlc instance
939 * \param p_e an initialized exception pointer
940 * \return the audio channel \see libvlc_audio_output_channel_t
943 libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
946 * Set current audio channel.
948 * \param p_instance vlc instance
949 * \param channel the audio channel, \see libvlc_audio_output_channel_t
950 * \param p_e an initialized exception pointer
952 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *,
954 libvlc_exception_t * );
958 /** @} media_player */
960 #endif /* VLC_LIBVLC_MEDIA_PLAYER_H */