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 * \param p_mi the Media Player
215 * \return the agl handler or 0 if none where set
217 VLC_PUBLIC_API void * libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
220 * Set the agl handler where the media player should render its video output.
222 * \param p_mi the Media Player
223 * \param drawable the agl handler
224 * \param p_e an initialized exception pointer
226 VLC_PUBLIC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
229 * Get the agl handler previously set with libvlc_media_player_set_agl().
231 * \param p_mi the Media Player
232 * \return the agl handler or 0 if none where set
234 VLC_PUBLIC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi );
237 * Set an X Window System drawable where the media player should render its
238 * video output. If LibVLC was built without X11 output support, then this has
241 * The specified identifier must correspond to an existing Input/Output class
242 * X11 window. Pixmaps are <b>not</b> supported. The caller shall ensure that
243 * the X11 server is the same as the one the VLC instance has been configured
245 * If XVideo is <b>not</b> used, it is assumed that the drawable has the
246 * following properties in common with the default X11 screen: depth, scan line
247 * pad, black pixel. This is a bug.
249 * \param p_mi the Media Player
250 * \param drawable the ID of the X window
251 * \param p_e an initialized exception pointer
253 VLC_PUBLIC_API void libvlc_media_player_set_xwindow ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
256 * Get the X Window System window identifier previously set with
257 * libvlc_media_player_set_xwindow(). Note that this will return the identifier
258 * even if VLC is not currently using it (for instance if it is playing an
261 * \param p_mi the Media Player
262 * \return an X window ID, or 0 if none where set.
264 VLC_PUBLIC_API uint32_t libvlc_media_player_get_xwindow ( libvlc_media_player_t *p_mi );
267 * Set a Win32/Win64 API window handle (HWND) where the media player should
268 * render its video output. If LibVLC was built without Win32/Win64 API output
269 * support, then this has no effects.
271 * \param p_mi the Media Player
272 * \param drawable windows handle of the drawable
273 * \param p_e an initialized exception pointer
275 VLC_PUBLIC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable, libvlc_exception_t *p_e );
278 * Get the Windows API window handle (HWND) previously set with
279 * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
280 * is not currently outputting any video to it.
282 * \param p_mi the Media Player
283 * \return a window handle or NULL if there are none.
285 VLC_PUBLIC_API void *libvlc_media_player_get_hwnd ( libvlc_media_player_t *p_mi );
289 /** \bug This might go away ... to be replaced by a broader system */
292 * Get the current movie length (in ms).
294 * \param p_mi the Media Player
295 * \param p_e an initialized exception pointer
296 * \return the movie length (in ms).
298 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);
301 * Get the current movie time (in ms).
303 * \param p_mi the Media Player
304 * \param p_e an initialized exception pointer
305 * \return the movie time (in ms).
307 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);
310 * Set the movie time (in ms).
312 * \param p_mi the Media Player
313 * \param the movie time (in ms).
314 * \param p_e an initialized exception pointer
316 VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
319 * Get movie position.
321 * \param p_mi the Media Player
322 * \param p_e an initialized exception pointer
323 * \return movie position
325 VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);
328 * Set movie position.
330 * \param p_mi the Media Player
331 * \param f_pos the position
332 * \param p_e an initialized exception pointer
334 VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);
339 * \param p_mi the Media Player
340 * \param i_chapter chapter number to play
341 * \param p_e an initialized exception pointer
343 VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);
348 * \param p_mi the Media Player
349 * \param p_e an initialized exception pointer
350 * \return chapter number currently playing
352 VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );
355 * Get movie chapter count
357 * \param p_mi the Media Player
358 * \param p_e an initialized exception pointer
359 * \return number of chapters in movie
361 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
364 * Will the player play
366 * \param p_mi the Media Player
367 * \param p_e an initialized exception pointer
370 VLC_PUBLIC_API int libvlc_media_player_will_play ( libvlc_media_player_t *, libvlc_exception_t *);
373 * Get title chapter count
375 * \param p_mi the Media Player
376 * \param i_title title
377 * \param p_e an initialized exception pointer
378 * \return number of chapters in title
380 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count_for_title(
381 libvlc_media_player_t *, int, libvlc_exception_t *);
386 * \param p_mi the Media Player
387 * \param i_title title number to play
388 * \param p_e an initialized exception pointer
390 VLC_PUBLIC_API void libvlc_media_player_set_title( libvlc_media_player_t *, int, libvlc_exception_t *);
395 * \param p_mi the Media Player
396 * \param p_e an initialized exception pointer
397 * \return title number currently playing
399 VLC_PUBLIC_API int libvlc_media_player_get_title( libvlc_media_player_t *, libvlc_exception_t *);
402 * Get movie title count
404 * \param p_mi the Media Player
405 * \param p_e an initialized exception pointer
406 * \return title number count
408 VLC_PUBLIC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *, libvlc_exception_t *);
411 * Set previous chapter
413 * \param p_mi the Media Player
414 * \param p_e an initialized exception pointer
416 VLC_PUBLIC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *, libvlc_exception_t *);
421 * \param p_mi the Media Player
422 * \param p_e an initialized exception pointer
424 VLC_PUBLIC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *, libvlc_exception_t *);
427 * Get movie play rate
429 * \param p_mi the Media Player
430 * \param p_e an initialized exception pointer
431 * \return movie play rate
433 VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);
436 * Set movie play rate
438 * \param p_mi the Media Player
439 * \param movie play rate to set
440 * \param p_e an initialized exception pointer
442 VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);
445 * Get current movie state
447 * \param p_mi the Media Player
448 * \param p_e an initialized exception pointer
449 * \return current movie state as libvlc_state_t
451 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *, libvlc_exception_t *);
456 * \param p_mi the Media Player
457 * \param p_e an initialized exception pointer
458 * \return frames per second (fps) for this playing movie
460 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
465 * Does this media player have a video output?
467 * \param p_md the media player
468 * \param p_e an initialized exception pointer
470 VLC_PUBLIC_API int libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
473 * Is this media player seekable?
475 * \param p_input the input
476 * \param p_e an initialized exception pointer
478 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
481 * Can this media player be paused?
483 * \param p_input the input
484 * \param p_e an initialized exception pointer
486 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
490 * Display the next frame
492 * \param p_input the libvlc_media_player_t instance
493 * \param p_e an initialized exception pointer
495 VLC_PUBLIC_API void libvlc_media_player_next_frame( libvlc_media_player_t *p_input,
496 libvlc_exception_t *p_e );
501 * Release (free) libvlc_track_description_t
503 * \param p_track_description the structure to release
505 VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
507 /** \defgroup libvlc_video libvlc_video
508 * \ingroup libvlc_media_player
509 * LibVLC Video handling
514 * Toggle fullscreen status on video output.
516 * \param p_mediaplayer the media player
517 * \param p_e an initialized exception pointer
519 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
522 * Enable or disable fullscreen on a video output.
524 * \param p_mediaplayer the media player
525 * \param b_fullscreen boolean for fullscreen status
526 * \param p_e an initialized exception pointer
528 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
531 * Get current fullscreen status.
533 * \param p_mediaplayer the media player
534 * \param p_e an initialized exception pointer
535 * \return the fullscreen status (boolean)
537 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
540 * Enable or disable key press events handling, according to the LibVLC hotkeys
541 * configuration. By default and for historical reasons, keyboard events are
542 * handled by the LibVLC video widget.
544 * \note On X11, there can be only one subscriber for key press and mouse
545 * click events per window. If your application has subscribed to those events
546 * for the X window ID of the video widget, then LibVLC will not be able to
547 * handle key presses and mouse clicks in any case.
549 * \warning This function is only implemented for X11 at the moment.
551 * \param mp the media player
552 * \param on true to handle key press events, false to ignore them.
555 void libvlc_video_set_key_input( libvlc_media_player_t *mp, unsigned on );
558 * Enable or disable mouse click events handling. By default, those events are
559 * handled. This is needed for DVD menus to work, as well as a few video
560 * filters such as "puzzle".
562 * \note See also \func libvlc_video_set_key_input().
564 * \warning This function is only implemented for X11 at the moment.
566 * \param mp the media player
567 * \param on true to handle mouse click events, false to ignore them.
570 void libvlc_video_set_mouse_input( libvlc_media_player_t *mp, unsigned on );
573 * Get current video height.
575 * \param p_mediaplayer the media player
576 * \param p_e an initialized exception pointer
577 * \return the video height
579 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
582 * Get current video width.
584 * \param p_mediaplayer the media player
585 * \param p_e an initialized exception pointer
586 * \return the video width
588 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
591 * Get the current video scaling factor.
592 * See also libvlc_video_set_scale().
594 * \param p_mediaplayer the media player
595 * \param p_e an initialized exception pointer
596 * \return the currently configured zoom factor, or 0. if the video is set
597 * to fit to the output window/drawable automatically.
599 VLC_PUBLIC_API float libvlc_video_get_scale( libvlc_media_player_t *,
600 libvlc_exception_t *p_e );
603 * Set the video scaling factor. That is the ratio of the number of pixels on
604 * screen to the number of pixels in the original decoded video in each
605 * dimension. Zero is a special value; it will adjust the video to the output
606 * window/drawable (in windowed mode) or the entire screen.
608 * Note that not all video outputs support scaling.
610 * \param p_mediaplayer the media player
611 * \param i_factor the scaling factor, or zero
612 * \param p_e an initialized exception pointer
614 VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *, float,
615 libvlc_exception_t *p_e );
618 * Get current video aspect ratio.
620 * \param p_mediaplayer the media player
621 * \param p_e an initialized exception pointer
622 * \return the video aspect ratio
624 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
627 * Set new video aspect ratio.
629 * \param p_mediaplayer the media player
630 * \param psz_aspect new video aspect-ratio
631 * \param p_e an initialized exception pointer
633 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, const char *, libvlc_exception_t * );
636 * Get current video subtitle.
638 * \param p_mediaplayer the media player
639 * \param p_e an initialized exception pointer
640 * \return the video subtitle selected
642 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
645 * Get the number of available video subtitles.
647 * \param p_mediaplayer the media player
648 * \param p_e an initialized exception pointer
649 * \return the number of available video subtitles
651 VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );
654 * Get the description of available video subtitles.
656 * \param p_mediaplayer the media player
657 * \param p_e an initialized exception pointer
658 * \return list containing description of available video subtitles
660 VLC_PUBLIC_API libvlc_track_description_t *
661 libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );
664 * Set new video subtitle.
666 * \param p_mediaplayer the media player
667 * \param i_spu new video subtitle to select
668 * \param p_e an initialized exception pointer
670 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
673 * Set new video subtitle file.
675 * \param p_mediaplayer the media player
676 * \param psz_subtitle new video subtitle file
677 * \param p_e an initialized exception pointer
678 * \return the success status (boolean)
680 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, const char *, libvlc_exception_t * );
683 * Get the description of available titles.
685 * \param p_mediaplayer the media player
686 * \param p_e an initialized exception pointer
687 * \return list containing description of available titles
689 VLC_PUBLIC_API libvlc_track_description_t *
690 libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );
693 * Get the description of available chapters for specific title.
695 * \param p_mediaplayer the media player
696 * \param i_title selected title
697 * \param p_e an initialized exception pointer
698 * \return list containing description of available chapter for title i_title
700 VLC_PUBLIC_API libvlc_track_description_t *
701 libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );
704 * Get current crop filter geometry.
706 * \param p_mediaplayer the media player
707 * \param p_e an initialized exception pointer
708 * \return the crop filter geometry
710 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
713 * Set new crop filter geometry.
715 * \param p_mediaplayer the media player
716 * \param psz_geometry new crop filter geometry
717 * \param p_e an initialized exception pointer
719 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, const char *, libvlc_exception_t * );
722 * Toggle teletext transparent status on video output.
724 * \param p_mediaplayer the media player
725 * \param p_e an initialized exception pointer
727 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
730 * Get current teletext page requested.
732 * \param p_mediaplayer the media player
733 * \param p_e an initialized exception pointer
734 * \return the current teletext page requested.
736 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
739 * Set new teletext page to retrieve.
741 * \param p_mediaplayer the media player
742 * \param i_page teletex page number requested
743 * \param p_e an initialized exception pointer
745 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
748 * Get number of available video tracks.
750 * \param p_mi media player
751 * \param p_e an initialized exception
752 * \return the number of available video tracks (int)
754 VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
757 * Get the description of available video tracks.
759 * \param p_mi media player
760 * \param p_e an initialized exception
761 * \return list with description of available video tracks
763 VLC_PUBLIC_API libvlc_track_description_t *
764 libvlc_video_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
767 * Get current video track.
769 * \param p_mi media player
770 * \param p_e an initialized exception pointer
771 * \return the video track (int)
773 VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );
778 * \param p_mi media player
779 * \param i_track the track (int)
780 * \param p_e an initialized exception pointer
782 VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
785 * Take a snapshot of the current video window.
787 * If i_width AND i_height is 0, original size is used.
788 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
790 * \param p_mi media player instance
791 * \param psz_filepath the path where to save the screenshot to
792 * \param i_width the snapshot's width
793 * \param i_height the snapshot's height
794 * \param p_e an initialized exception pointer
796 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
799 * Enable or disable deinterlace filter
801 * \param p_mi libvlc media player
802 * \param b_enable boolean to enable or disable deinterlace filter
803 * \param psz_mode type of deinterlace filter to use
804 * \param p_e an initialized exception pointer
806 VLC_PUBLIC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *,
808 libvlc_exception_t *);
811 * Get an option value (option which return an int)
813 * \param p_mi libvlc media player
814 * \param option marq option to get
815 * \param p_e an initialized exception pointer
817 VLC_PUBLIC_API int libvlc_video_get_marquee_option_as_int( libvlc_media_player_t *,
818 libvlc_video_marquee_int_option_t,
819 libvlc_exception_t * );
822 * Get an option value (option which return a string)
824 * \param p_mi libvlc media player
825 * \param option marq option to get
826 * \param p_e an initialized exception pointer
828 VLC_PUBLIC_API char *libvlc_video_get_marquee_option_as_string( libvlc_media_player_t *,
829 libvlc_video_marquee_string_option_t,
830 libvlc_exception_t * );
833 * Enable, disable or set a marq option (only int)
835 * \param p_mi libvlc media player
836 * \param option marq option to set
837 * \param i_val marq option value
838 * \param p_e an initialized exception pointer
840 VLC_PUBLIC_API void libvlc_video_set_marquee_option_as_int( libvlc_media_player_t *,
841 libvlc_video_marquee_int_option_t,
842 int, libvlc_exception_t * );
845 * Set a marq option (only string)
847 * \param p_mi libvlc media player
848 * \param option marq option to set
849 * \param psz_text marq option value
850 * \param p_e an initialized exception pointer
852 VLC_PUBLIC_API void libvlc_video_set_marquee_option_as_string( libvlc_media_player_t *,
853 libvlc_video_marquee_string_option_t,
855 libvlc_exception_t * );
859 /** \defgroup libvlc_audio libvlc_audio
860 * \ingroup libvlc_media_player
861 * LibVLC Audio handling
868 typedef enum libvlc_audio_output_device_types_t {
869 libvlc_AudioOutputDevice_Error = -1,
870 libvlc_AudioOutputDevice_Mono = 1,
871 libvlc_AudioOutputDevice_Stereo = 2,
872 libvlc_AudioOutputDevice_2F2R = 4,
873 libvlc_AudioOutputDevice_3F2R = 5,
874 libvlc_AudioOutputDevice_5_1 = 6,
875 libvlc_AudioOutputDevice_6_1 = 7,
876 libvlc_AudioOutputDevice_7_1 = 8,
877 libvlc_AudioOutputDevice_SPDIF = 10
878 } libvlc_audio_output_device_types_t;
883 typedef enum libvlc_audio_output_channel_t {
884 libvlc_AudioChannel_Error = -1,
885 libvlc_AudioChannel_Stereo = 1,
886 libvlc_AudioChannel_RStereo = 2,
887 libvlc_AudioChannel_Left = 3,
888 libvlc_AudioChannel_Right = 4,
889 libvlc_AudioChannel_Dolbys = 5
890 } libvlc_audio_output_channel_t;
894 * Get the list of available audio outputs
896 * \param p_instance libvlc instance
897 * \param p_e an initialized exception pointer
898 * \return list of available audio outputs, at the end free it with
899 * \see libvlc_audio_output_list_release \see libvlc_audio_output_t
901 VLC_PUBLIC_API libvlc_audio_output_t *
902 libvlc_audio_output_list_get( libvlc_instance_t *,
903 libvlc_exception_t * );
906 * Free the list of available audio outputs
908 * \param p_list list with audio outputs for release
910 VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );
913 * Set the audio output.
914 * Change will be applied after stop and play.
916 * \param p_instance libvlc instance
917 * \param psz_name name of audio output,
918 * use psz_name of \see libvlc_audio_output_t
919 * \return true if function succeded
921 VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *,
925 * Get count of devices for audio output, these devices are hardware oriented
926 * like analor or digital output of sound card
928 * \param p_instance libvlc instance
929 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
930 * \return number of devices
932 VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *,
936 * Get long name of device, if not available short name given
938 * \param p_instance libvlc instance
939 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
940 * \param i_device device index
941 * \return long name of device
943 VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *,
948 * Get id name of device
950 * \param p_instance libvlc instance
951 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
952 * \param i_device device index
953 * \return id name of device, use for setting device, need to be free after use
955 VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *,
960 * Set device for using
962 * \param p_instance libvlc instance
963 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
964 * \param psz_device_id device
966 VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *,
971 * Get current audio device type. Device type describes something like
972 * character of output sound - stereo sound, 2.1, 5.1 etc
974 * \param p_instance vlc instance
975 * \param p_e an initialized exception pointer
976 * \return the audio devices type \see libvlc_audio_output_device_types_t
978 VLC_PUBLIC_API int libvlc_audio_output_get_device_type(
979 libvlc_instance_t *, libvlc_exception_t * );
982 * Set current audio device type.
984 * \param p_instance vlc instance
985 * \param device_type the audio device type,
986 according to \see libvlc_audio_output_device_types_t
987 * \param p_e an initialized exception pointer
989 VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
991 libvlc_exception_t * );
995 * Toggle mute status.
997 * \param p_instance libvlc instance
999 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t * );
1002 * Get current mute status.
1004 * \param p_instance libvlc instance
1005 * \return the mute status (boolean)
1007 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t * );
1012 * \param p_instance libvlc instance
1013 * \param status If status is true then mute, otherwise unmute
1015 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int );
1018 * Get current audio level.
1020 * \param p_instance libvlc instance
1021 * \param p_e an initialized exception pointer
1022 * \return the audio level (int)
1024 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t * );
1027 * Set current audio level.
1029 * \param p_instance libvlc instance
1030 * \param i_volume the volume (int)
1031 * \param p_e an initialized exception pointer
1033 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
1036 * Get number of available audio tracks.
1038 * \param p_mi media player
1039 * \param p_e an initialized exception
1040 * \return the number of available audio tracks (int)
1042 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
1045 * Get the description of available audio tracks.
1047 * \param p_mi media player
1048 * \param p_e an initialized exception
1049 * \return list with description of available audio tracks
1051 VLC_PUBLIC_API libvlc_track_description_t *
1052 libvlc_audio_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
1055 * Get current audio track.
1057 * \param p_mi media player
1058 * \param p_e an initialized exception pointer
1059 * \return the audio track (int)
1061 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
1064 * Set current audio track.
1066 * \param p_mi media player
1067 * \param i_track the track (int)
1068 * \param p_e an initialized exception pointer
1070 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
1073 * Get current audio channel.
1075 * \param p_instance vlc instance
1076 * \param p_e an initialized exception pointer
1077 * \return the audio channel \see libvlc_audio_output_channel_t
1080 libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
1083 * Set current audio channel.
1085 * \param p_instance vlc instance
1086 * \param channel the audio channel, \see libvlc_audio_output_channel_t
1087 * \param p_e an initialized exception pointer
1089 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *,
1091 libvlc_exception_t * );
1095 /** @} media_player */
1097 #endif /* VLC_LIBVLC_MEDIA_PLAYER_H */