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
38 /*****************************************************************************
40 *****************************************************************************/
41 /** \defgroup libvlc_media_player libvlc_media_player
43 * LibVLC Media Player, object that let you play a media
44 * in a custom drawable
48 typedef struct libvlc_media_player_t libvlc_media_player_t;
51 * Description for video, audio tracks and subtitles. It contains
52 * id, name (description string) and pointer to next record.
54 typedef struct libvlc_track_description_t
58 struct libvlc_track_description_t *p_next;
60 } libvlc_track_description_t;
63 * Description for audio output. It contains
64 * name, description and pointer to next record.
66 typedef struct libvlc_audio_output_t
69 char *psz_description;
70 struct libvlc_audio_output_t *p_next;
72 } libvlc_audio_output_t;
75 * Rectangle type for video geometry
77 typedef struct libvlc_rectangle_t
84 * Marq int options definition
86 typedef enum libvlc_video_marquee_int_option_t {
87 libvlc_marquee_Enable = 0,
89 libvlc_marquee_Opacity,
90 libvlc_marquee_Position,
91 libvlc_marquee_Refresh,
93 libvlc_marquee_Timeout,
96 } libvlc_video_marquee_int_option_t;
99 * Marq string options definition
101 typedef enum libvlc_video_marquee_string_option_t {
102 libvlc_marquee_Text = 0
103 } libvlc_video_marquee_string_option_t;
107 * Create an empty Media Player object
109 * \param p_libvlc_instance the libvlc instance in which the Media Player
111 * \param p_e an initialized exception pointer
113 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );
116 * Create a Media Player object from a Media
118 * \param p_md the media. Afterwards the p_md can be safely
120 * \param p_e an initialized exception pointer
122 VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );
125 * Release a media_player after use
126 * Decrement the reference count of a media player object. If the
127 * reference count is 0, then libvlc_media_player_release() will
128 * release the media player object. If the media player object
129 * has been released, then it should not be used again.
131 * \param p_mi the Media Player to free
133 VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );
136 * Retain a reference to a media player object. Use
137 * libvlc_media_player_release() to decrement reference count.
139 * \param p_mi media player object
141 VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
144 * Set the media that will be used by the media_player. If any,
145 * previous md will be released.
147 * \param p_mi the Media Player
148 * \param p_md the Media. Afterwards the p_md can be safely
151 VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t * );
154 * Get the media used by the media_player.
156 * \param p_mi the Media Player
157 * \return the media associated with p_mi, or NULL if no
158 * media is associated
160 VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t * );
163 * Get the Event Manager from which the media player send event.
165 * \param p_mi the Media Player
166 * \return the event manager associated with p_mi
168 VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t * );
173 * \param p_mi the Media Player
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 * );
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 * );
203 * Set the NSView handler where the media player should render its video output.
205 * The object minimal_macosx expects is of kind NSObject and should
206 * respect the protocol:
208 * @protocol VLCOpenGLVideoViewEmbedding <NSObject>
209 * - (void)addVoutSubview:(NSView *)view;
210 * - (void)removeVoutSubview:(NSView *)view;
213 * You can find a live example in VLCVideoView in VLCKit.framework.
215 * \param p_mi the Media Player
216 * \param drawable the NSView handler
218 VLC_PUBLIC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable );
221 * Get the NSView handler previously set with libvlc_media_player_set_nsobject().
223 * \param p_mi the Media Player
224 * \return the NSView handler or 0 if none where set
226 VLC_PUBLIC_API void * libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
229 * Set the agl handler where the media player should render its video output.
231 * \param p_mi the Media Player
232 * \param drawable the agl handler
233 * \param p_e an initialized exception pointer
235 VLC_PUBLIC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable );
238 * Get the agl handler previously set with libvlc_media_player_set_agl().
240 * \param p_mi the Media Player
241 * \return the agl handler or 0 if none where set
243 VLC_PUBLIC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi );
246 * Set an X Window System drawable where the media player should render its
247 * video output. If LibVLC was built without X11 output support, then this has
250 * The specified identifier must correspond to an existing Input/Output class
251 * X11 window. Pixmaps are <b>not</b> supported. The caller shall ensure that
252 * the X11 server is the same as the one the VLC instance has been configured
254 * If XVideo is <b>not</b> used, it is assumed that the drawable has the
255 * following properties in common with the default X11 screen: depth, scan line
256 * pad, black pixel. This is a bug.
258 * \param p_mi the Media Player
259 * \param drawable the ID of the X window
261 VLC_PUBLIC_API void libvlc_media_player_set_xwindow ( libvlc_media_player_t *p_mi, uint32_t drawable );
264 * Get the X Window System window identifier previously set with
265 * libvlc_media_player_set_xwindow(). Note that this will return the identifier
266 * even if VLC is not currently using it (for instance if it is playing an
269 * \param p_mi the Media Player
270 * \return an X window ID, or 0 if none where set.
272 VLC_PUBLIC_API uint32_t libvlc_media_player_get_xwindow ( libvlc_media_player_t *p_mi );
275 * Set a Win32/Win64 API window handle (HWND) where the media player should
276 * render its video output. If LibVLC was built without Win32/Win64 API output
277 * support, then this has no effects.
279 * \param p_mi the Media Player
280 * \param drawable windows handle of the drawable
282 VLC_PUBLIC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable );
285 * Get the Windows API window handle (HWND) previously set with
286 * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
287 * is not currently outputting any video to it.
289 * \param p_mi the Media Player
290 * \return a window handle or NULL if there are none.
292 VLC_PUBLIC_API void *libvlc_media_player_get_hwnd ( libvlc_media_player_t *p_mi );
296 /** \bug This might go away ... to be replaced by a broader system */
299 * Get the current movie length (in ms).
301 * \param p_mi the Media Player
302 * \param p_e an initialized exception pointer
303 * \return the movie length (in ms).
305 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);
308 * Get the current movie time (in ms).
310 * \param p_mi the Media Player
311 * \param p_e an initialized exception pointer
312 * \return the movie time (in ms).
314 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);
317 * Set the movie time (in ms).
319 * \param p_mi the Media Player
320 * \param the movie time (in ms).
321 * \param p_e an initialized exception pointer
323 VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
326 * Get movie position.
328 * \param p_mi the Media Player
329 * \param p_e an initialized exception pointer
330 * \return movie position
332 VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);
335 * Set movie position.
337 * \param p_mi the Media Player
338 * \param f_pos the position
339 * \param p_e an initialized exception pointer
341 VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);
346 * \param p_mi the Media Player
347 * \param i_chapter chapter number to play
348 * \param p_e an initialized exception pointer
350 VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);
355 * \param p_mi the Media Player
356 * \param p_e an initialized exception pointer
357 * \return chapter number currently playing
359 VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );
362 * Get movie chapter count
364 * \param p_mi the Media Player
365 * \param p_e an initialized exception pointer
366 * \return number of chapters in movie
368 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
371 * Will the player play
373 * \param p_mi the Media Player
374 * \param p_e an initialized exception pointer
377 VLC_PUBLIC_API int libvlc_media_player_will_play ( libvlc_media_player_t *, libvlc_exception_t *);
380 * Get title chapter count
382 * \param p_mi the Media Player
383 * \param i_title title
384 * \param p_e an initialized exception pointer
385 * \return number of chapters in title
387 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count_for_title(
388 libvlc_media_player_t *, int, libvlc_exception_t *);
393 * \param p_mi the Media Player
394 * \param i_title title number to play
395 * \param p_e an initialized exception pointer
397 VLC_PUBLIC_API void libvlc_media_player_set_title( libvlc_media_player_t *, int, libvlc_exception_t *);
402 * \param p_mi the Media Player
403 * \param p_e an initialized exception pointer
404 * \return title number currently playing
406 VLC_PUBLIC_API int libvlc_media_player_get_title( libvlc_media_player_t *, libvlc_exception_t *);
409 * Get movie title count
411 * \param p_mi the Media Player
412 * \param p_e an initialized exception pointer
413 * \return title number count
415 VLC_PUBLIC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *, libvlc_exception_t *);
418 * Set previous chapter
420 * \param p_mi the Media Player
421 * \param p_e an initialized exception pointer
423 VLC_PUBLIC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *, libvlc_exception_t *);
428 * \param p_mi the Media Player
429 * \param p_e an initialized exception pointer
431 VLC_PUBLIC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *, libvlc_exception_t *);
434 * Get movie play rate
436 * \param p_mi the Media Player
437 * \param p_e an initialized exception pointer
438 * \return movie play rate
440 VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);
443 * Set movie play rate
445 * \param p_mi the Media Player
446 * \param movie play rate to set
447 * \param p_e an initialized exception pointer
449 VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);
452 * Get current movie state
454 * \param p_mi the Media Player
455 * \param p_e an initialized exception pointer
457 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *);
462 * \param p_mi the Media Player
463 * \param p_e an initialized exception pointer
464 * \return frames per second (fps) for this playing movie
466 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
471 * Does this media player have a video output?
473 * \param p_md the media player
474 * \param p_e an initialized exception pointer
476 VLC_PUBLIC_API int libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
479 * Is this media player seekable?
481 * \param p_input the input
482 * \param p_e an initialized exception pointer
484 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
487 * Can this media player be paused?
489 * \param p_input the input
490 * \param p_e an initialized exception pointer
492 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
496 * Display the next frame
498 * \param p_input the libvlc_media_player_t instance
499 * \param p_e an initialized exception pointer
501 VLC_PUBLIC_API void libvlc_media_player_next_frame( libvlc_media_player_t *p_input,
502 libvlc_exception_t *p_e );
506 * Access to libvlc core internal structure.
508 * This enables nasty hack. Use of this method is discouraged.
510 * \param player the libvlc_media_player_t instance
511 * \return a libvlccore input_thread_t or NULL. The actual behaviour is not specified.
513 VLC_PUBLIC_API struct input_thread_t *libvlc_media_player_get_input_thread( libvlc_media_player_t *player );
516 * Release (free) libvlc_track_description_t
518 * \param p_track_description the structure to release
520 VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
522 /** \defgroup libvlc_video libvlc_video
523 * \ingroup libvlc_media_player
524 * LibVLC Video handling
529 * Toggle fullscreen status on a non-embedded video output.
531 * @warning The same limitations applies to this function
532 * as to libvlc_set_fullscreen().
534 * \param p_mediaplayer the media player
535 * \param p_e an initialized exception pointer
537 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
540 * Enable or disable fullscreen on a non-embedded video output.
542 * @warning With most window managers, only a top-level windows can switch to
543 * full-screen mode. Hence, this function will not operate properly if
544 * libvlc_media_player_set_xid() or libvlc_media_player_set_hwnd() was
545 * used to embed the video in a non-LibVLC widget. If you want to to render an
546 * embedded LibVLC video full-screen, the parent embedding widget must expanded
547 * to full screen (LibVLC cannot take care of that).
548 * LibVLC will then automatically resize the video as appropriate.
550 * \param p_mediaplayer the media player
551 * \param b_fullscreen boolean for fullscreen status
552 * \param p_e an initialized exception pointer
554 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
557 * Get current fullscreen status.
559 * \param p_mediaplayer the media player
560 * \param p_e an initialized exception pointer
561 * \return the fullscreen status (boolean)
563 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
566 * Enable or disable key press events handling, according to the LibVLC hotkeys
567 * configuration. By default and for historical reasons, keyboard events are
568 * handled by the LibVLC video widget.
570 * \note On X11, there can be only one subscriber for key press and mouse
571 * click events per window. If your application has subscribed to those events
572 * for the X window ID of the video widget, then LibVLC will not be able to
573 * handle key presses and mouse clicks in any case.
575 * \warning This function is only implemented for X11 at the moment.
577 * \param mp the media player
578 * \param on true to handle key press events, false to ignore them.
581 void libvlc_video_set_key_input( libvlc_media_player_t *mp, unsigned on );
584 * Enable or disable mouse click events handling. By default, those events are
585 * handled. This is needed for DVD menus to work, as well as a few video
586 * filters such as "puzzle".
588 * \note See also \func libvlc_video_set_key_input().
590 * \warning This function is only implemented for X11 at the moment.
592 * \param mp the media player
593 * \param on true to handle mouse click events, false to ignore them.
596 void libvlc_video_set_mouse_input( libvlc_media_player_t *mp, unsigned on );
599 * Get current video height.
601 * \param p_mediaplayer the media player
602 * \param p_e an initialized exception pointer
603 * \return the video height
605 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
608 * Get current video width.
610 * \param p_mediaplayer the media player
611 * \param p_e an initialized exception pointer
612 * \return the video width
614 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
617 * Get the current video scaling factor.
618 * See also libvlc_video_set_scale().
620 * \param p_mediaplayer the media player
621 * \param p_e an initialized exception pointer
622 * \return the currently configured zoom factor, or 0. if the video is set
623 * to fit to the output window/drawable automatically.
625 VLC_PUBLIC_API float libvlc_video_get_scale( libvlc_media_player_t *,
626 libvlc_exception_t *p_e );
629 * Set the video scaling factor. That is the ratio of the number of pixels on
630 * screen to the number of pixels in the original decoded video in each
631 * dimension. Zero is a special value; it will adjust the video to the output
632 * window/drawable (in windowed mode) or the entire screen.
634 * Note that not all video outputs support scaling.
636 * \param p_mediaplayer the media player
637 * \param i_factor the scaling factor, or zero
638 * \param p_e an initialized exception pointer
640 VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *, float,
641 libvlc_exception_t *p_e );
644 * Get current video aspect ratio.
646 * \param p_mediaplayer the media player
647 * \param p_e an initialized exception pointer
648 * \return the video aspect ratio
650 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
653 * Set new video aspect ratio.
655 * \param p_mediaplayer the media player
656 * \param psz_aspect new video aspect-ratio
657 * \param p_e an initialized exception pointer
659 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, const char *, libvlc_exception_t * );
662 * Get current video subtitle.
664 * \param p_mediaplayer the media player
665 * \param p_e an initialized exception pointer
666 * \return the video subtitle selected
668 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
671 * Get the number of available video subtitles.
673 * \param p_mediaplayer the media player
674 * \param p_e an initialized exception pointer
675 * \return the number of available video subtitles
677 VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );
680 * Get the description of available video subtitles.
682 * \param p_mediaplayer the media player
683 * \param p_e an initialized exception pointer
684 * \return list containing description of available video subtitles
686 VLC_PUBLIC_API libvlc_track_description_t *
687 libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );
690 * Set new video subtitle.
692 * \param p_mediaplayer the media player
693 * \param i_spu new video subtitle to select
694 * \param p_e an initialized exception pointer
696 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
699 * Set new video subtitle file.
701 * \param p_mediaplayer the media player
702 * \param psz_subtitle new video subtitle file
703 * \param p_e an initialized exception pointer
704 * \return the success status (boolean)
706 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, const char *, libvlc_exception_t * );
709 * Get the description of available titles.
711 * \param p_mediaplayer the media player
712 * \param p_e an initialized exception pointer
713 * \return list containing description of available titles
715 VLC_PUBLIC_API libvlc_track_description_t *
716 libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );
719 * Get the description of available chapters for specific title.
721 * \param p_mediaplayer the media player
722 * \param i_title selected title
723 * \param p_e an initialized exception pointer
724 * \return list containing description of available chapter for title i_title
726 VLC_PUBLIC_API libvlc_track_description_t *
727 libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );
730 * Get current crop filter geometry.
732 * \param p_mediaplayer the media player
733 * \param p_e an initialized exception pointer
734 * \return the crop filter geometry
736 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
739 * Set new crop filter geometry.
741 * \param p_mediaplayer the media player
742 * \param psz_geometry new crop filter geometry
743 * \param p_e an initialized exception pointer
745 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, const char *, libvlc_exception_t * );
748 * Toggle teletext transparent status on video output.
750 * \param p_mediaplayer the media player
751 * \param p_e an initialized exception pointer
753 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
756 * Get number of available video tracks.
758 * \param p_mi media player
759 * \param p_e an initialized exception
760 * \return the number of available video tracks (int)
762 VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
765 * Get the description of available video tracks.
767 * \param p_mi media player
768 * \param p_e an initialized exception
769 * \return list with description of available video tracks
771 VLC_PUBLIC_API libvlc_track_description_t *
772 libvlc_video_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
775 * Get current video track.
777 * \param p_mi media player
778 * \param p_e an initialized exception pointer
779 * \return the video track (int)
781 VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );
786 * \param p_mi media player
787 * \param i_track the track (int)
788 * \param p_e an initialized exception pointer
790 VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
793 * Take a snapshot of the current video window.
795 * If i_width AND i_height is 0, original size is used.
796 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
798 * \param p_mi media player instance
799 * \param psz_filepath the path where to save the screenshot to
800 * \param i_width the snapshot's width
801 * \param i_height the snapshot's height
802 * \param p_e an initialized exception pointer
804 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
807 * Enable or disable deinterlace filter
809 * \param p_mi libvlc media player
810 * \param b_enable boolean to enable or disable deinterlace filter
811 * \param psz_mode type of deinterlace filter to use
812 * \param p_e an initialized exception pointer
814 VLC_PUBLIC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *,
816 libvlc_exception_t *);
819 * Get an integer option value
821 * \param p_mi libvlc media player
822 * \param option marq option to get \see libvlc_video_marquee_int_option_t
823 * \param p_e an initialized exception pointer
825 VLC_PUBLIC_API int libvlc_video_get_marquee_int( libvlc_media_player_t *,
826 unsigned, libvlc_exception_t * );
829 * Get a string option value
831 * \param p_mi libvlc media player
832 * \param option marq option to get \see libvlc_video_marquee_string_option_t
833 * \param p_e an initialized exception pointer
835 VLC_PUBLIC_API char *libvlc_video_get_marquee_string( libvlc_media_player_t *,
836 unsigned, libvlc_exception_t * );
839 * Enable, disable or set an integer marq option
841 * Setting libvlc_marquee_Enable has the side effect of enabling (arg !0)
842 * or disabling (arg 0) the marq filter.
844 * \param p_mi libvlc media player
845 * \param option marq option to set \see libvlc_video_marquee_int_option_t
846 * \param i_val marq option value
847 * \param p_e an initialized exception pointer
849 VLC_PUBLIC_API void libvlc_video_set_marquee_int( libvlc_media_player_t *,
850 unsigned, int, libvlc_exception_t * );
853 * Set a marq string option
855 * \param p_mi libvlc media player
856 * \param option marq option to set \see libvlc_video_marquee_string_option_t
857 * \param psz_text marq option value
858 * \param p_e an initialized exception pointer
860 VLC_PUBLIC_API void libvlc_video_set_marquee_string( libvlc_media_player_t *,
861 unsigned, const char *, libvlc_exception_t * );
863 enum libvlc_video_logo_option_t {
865 libvlc_logo_file, /**< string argument, "file,d,t;file,d,t;..." */
871 libvlc_logo_position,
875 * Get integer logo option.
877 * \param p_mi libvlc media player instance
878 * \param option logo option to get, values of libvlc_video_logo_option_t
879 * \param p_e an pointer to an initialized exception object
881 VLC_PUBLIC_API int libvlc_video_get_logo_int( libvlc_media_player_t *p_mi,
882 unsigned option, libvlc_exception_t *p_e );
885 * Set logo option as integer. Options that take a different type value
886 * cause an invalid argument exception.
887 * Passing libvlc_logo_enable as option value has the side effect of
888 * starting (arg !0) or stopping (arg 0) the logo filter.
890 * \param p_mi libvlc media player instance
891 * \param option logo option to set, values of libvlc_video_logo_option_t
892 * \param value logo option value
893 * \param p_e an pointer to an initialized exception object
895 VLC_PUBLIC_API void libvlc_video_set_logo_int( libvlc_media_player_t *p_mi,
896 unsigned option, int value, libvlc_exception_t *p_e );
899 * Set logo option as string. Options that take a different type value
900 * cause an invalid argument exception.
902 * \param p_mi libvlc media player instance
903 * \param option logo option to set, values of libvlc_video_logo_option_t
904 * \param psz_value logo option value
905 * \param p_e an pointer to an initialized exception object
907 VLC_PUBLIC_API void libvlc_video_set_logo_string( libvlc_media_player_t *p_mi,
908 unsigned option, const char *psz_value, libvlc_exception_t *p_e );
912 /** \defgroup libvlc_audio libvlc_audio
913 * \ingroup libvlc_media_player
914 * LibVLC Audio handling
921 typedef enum libvlc_audio_output_device_types_t {
922 libvlc_AudioOutputDevice_Error = -1,
923 libvlc_AudioOutputDevice_Mono = 1,
924 libvlc_AudioOutputDevice_Stereo = 2,
925 libvlc_AudioOutputDevice_2F2R = 4,
926 libvlc_AudioOutputDevice_3F2R = 5,
927 libvlc_AudioOutputDevice_5_1 = 6,
928 libvlc_AudioOutputDevice_6_1 = 7,
929 libvlc_AudioOutputDevice_7_1 = 8,
930 libvlc_AudioOutputDevice_SPDIF = 10
931 } libvlc_audio_output_device_types_t;
936 typedef enum libvlc_audio_output_channel_t {
937 libvlc_AudioChannel_Error = -1,
938 libvlc_AudioChannel_Stereo = 1,
939 libvlc_AudioChannel_RStereo = 2,
940 libvlc_AudioChannel_Left = 3,
941 libvlc_AudioChannel_Right = 4,
942 libvlc_AudioChannel_Dolbys = 5
943 } libvlc_audio_output_channel_t;
947 * Get the list of available audio outputs
949 * \param p_instance libvlc instance
950 * \param p_e an initialized exception pointer
951 * \return list of available audio outputs, at the end free it with
952 * \see libvlc_audio_output_list_release \see libvlc_audio_output_t
954 VLC_PUBLIC_API libvlc_audio_output_t *
955 libvlc_audio_output_list_get( libvlc_instance_t *,
956 libvlc_exception_t * );
959 * Free the list of available audio outputs
961 * \param p_list list with audio outputs for release
963 VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );
966 * Set the audio output.
967 * Change will be applied after stop and play.
969 * \param p_instance libvlc instance
970 * \param psz_name name of audio output,
971 * use psz_name of \see libvlc_audio_output_t
972 * \return true if function succeded
974 VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *,
978 * Get count of devices for audio output, these devices are hardware oriented
979 * like analor or digital output of sound card
981 * \param p_instance libvlc instance
982 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
983 * \return number of devices
985 VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *,
989 * Get long name of device, if not available short name given
991 * \param p_instance libvlc instance
992 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
993 * \param i_device device index
994 * \return long name of device
996 VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *,
1001 * Get id name of device
1003 * \param p_instance libvlc instance
1004 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1005 * \param i_device device index
1006 * \return id name of device, use for setting device, need to be free after use
1008 VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *,
1013 * Set device for using
1015 * \param p_instance libvlc instance
1016 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1017 * \param psz_device_id device
1019 VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *,
1024 * Get current audio device type. Device type describes something like
1025 * character of output sound - stereo sound, 2.1, 5.1 etc
1027 * \param p_instance vlc instance
1028 * \param p_e an initialized exception pointer
1029 * \return the audio devices type \see libvlc_audio_output_device_types_t
1031 VLC_PUBLIC_API int libvlc_audio_output_get_device_type(
1032 libvlc_instance_t *, libvlc_exception_t * );
1035 * Set current audio device type.
1037 * \param p_instance vlc instance
1038 * \param device_type the audio device type,
1039 according to \see libvlc_audio_output_device_types_t
1040 * \param p_e an initialized exception pointer
1042 VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
1044 libvlc_exception_t * );
1048 * Toggle mute status.
1050 * \param p_instance libvlc instance
1052 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t * );
1055 * Get current mute status.
1057 * \param p_instance libvlc instance
1058 * \return the mute status (boolean)
1060 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t * );
1065 * \param p_instance libvlc instance
1066 * \param status If status is true then mute, otherwise unmute
1068 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int );
1071 * Get current audio level.
1073 * \param p_instance libvlc instance
1074 * \param p_e an initialized exception pointer
1075 * \return the audio level (int)
1077 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t * );
1080 * Set current audio level.
1082 * \param p_instance libvlc instance
1083 * \param i_volume the volume (int)
1084 * \param p_e an initialized exception pointer
1086 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
1089 * Get number of available audio tracks.
1091 * \param p_mi media player
1092 * \param p_e an initialized exception
1093 * \return the number of available audio tracks (int)
1095 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
1098 * Get the description of available audio tracks.
1100 * \param p_mi media player
1101 * \param p_e an initialized exception
1102 * \return list with description of available audio tracks
1104 VLC_PUBLIC_API libvlc_track_description_t *
1105 libvlc_audio_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
1108 * Get current audio track.
1110 * \param p_mi media player
1111 * \param p_e an initialized exception pointer
1112 * \return the audio track (int)
1114 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
1117 * Set current audio track.
1119 * \param p_mi media player
1120 * \param i_track the track (int)
1121 * \param p_e an initialized exception pointer
1123 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
1126 * Get current audio channel.
1128 * \param p_instance vlc instance
1129 * \param p_e an initialized exception pointer
1130 * \return the audio channel \see libvlc_audio_output_channel_t
1133 libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
1136 * Set current audio channel.
1138 * \param p_instance vlc instance
1139 * \param channel the audio channel, \see libvlc_audio_output_channel_t
1140 * \param p_e an initialized exception pointer
1142 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *,
1144 libvlc_exception_t * );
1148 /** @} media_player */
1154 #endif /* VLC_LIBVLC_MEDIA_PLAYER_H */