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 );
507 * Release (free) libvlc_track_description_t
509 * \param p_track_description the structure to release
511 VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
513 /** \defgroup libvlc_video libvlc_video
514 * \ingroup libvlc_media_player
515 * LibVLC Video handling
520 * Toggle fullscreen status on a non-embedded video output.
522 * @warning The same limitations applies to this function
523 * as to libvlc_set_fullscreen().
525 * \param p_mediaplayer the media player
526 * \param p_e an initialized exception pointer
528 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
531 * Enable or disable fullscreen on a non-embedded video output.
533 * @warning With most window managers, only a top-level windows can switch to
534 * full-screen mode. Hence, this function will not operate properly if
535 * libvlc_media_player_set_xid() or libvlc_media_player_set_hwnd() was
536 * used to embed the video in a non-LibVLC widget. If you want to to render an
537 * embedded LibVLC video full-screen, the parent embedding widget must expanded
538 * to full screen (LibVLC cannot take care of that).
539 * LibVLC will then automatically resize the video as appropriate.
541 * \param p_mediaplayer the media player
542 * \param b_fullscreen boolean for fullscreen status
543 * \param p_e an initialized exception pointer
545 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
548 * Get current fullscreen status.
550 * \param p_mediaplayer the media player
551 * \param p_e an initialized exception pointer
552 * \return the fullscreen status (boolean)
554 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
557 * Enable or disable key press events handling, according to the LibVLC hotkeys
558 * configuration. By default and for historical reasons, keyboard events are
559 * handled by the LibVLC video widget.
561 * \note On X11, there can be only one subscriber for key press and mouse
562 * click events per window. If your application has subscribed to those events
563 * for the X window ID of the video widget, then LibVLC will not be able to
564 * handle key presses and mouse clicks in any case.
566 * \warning This function is only implemented for X11 at the moment.
568 * \param mp the media player
569 * \param on true to handle key press events, false to ignore them.
572 void libvlc_video_set_key_input( libvlc_media_player_t *mp, unsigned on );
575 * Enable or disable mouse click events handling. By default, those events are
576 * handled. This is needed for DVD menus to work, as well as a few video
577 * filters such as "puzzle".
579 * \note See also \func libvlc_video_set_key_input().
581 * \warning This function is only implemented for X11 at the moment.
583 * \param mp the media player
584 * \param on true to handle mouse click events, false to ignore them.
587 void libvlc_video_set_mouse_input( libvlc_media_player_t *mp, unsigned on );
590 * Get current video height.
592 * \param p_mediaplayer the media player
593 * \param p_e an initialized exception pointer
594 * \return the video height
596 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
599 * Get current video width.
601 * \param p_mediaplayer the media player
602 * \param p_e an initialized exception pointer
603 * \return the video width
605 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
608 * Get the current video scaling factor.
609 * See also libvlc_video_set_scale().
611 * \param p_mediaplayer the media player
612 * \param p_e an initialized exception pointer
613 * \return the currently configured zoom factor, or 0. if the video is set
614 * to fit to the output window/drawable automatically.
616 VLC_PUBLIC_API float libvlc_video_get_scale( libvlc_media_player_t *,
617 libvlc_exception_t *p_e );
620 * Set the video scaling factor. That is the ratio of the number of pixels on
621 * screen to the number of pixels in the original decoded video in each
622 * dimension. Zero is a special value; it will adjust the video to the output
623 * window/drawable (in windowed mode) or the entire screen.
625 * Note that not all video outputs support scaling.
627 * \param p_mediaplayer the media player
628 * \param i_factor the scaling factor, or zero
629 * \param p_e an initialized exception pointer
631 VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *, float,
632 libvlc_exception_t *p_e );
635 * Get current video aspect ratio.
637 * \param p_mediaplayer the media player
638 * \param p_e an initialized exception pointer
639 * \return the video aspect ratio
641 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
644 * Set new video aspect ratio.
646 * \param p_mediaplayer the media player
647 * \param psz_aspect new video aspect-ratio
648 * \param p_e an initialized exception pointer
650 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, const char *, libvlc_exception_t * );
653 * Get current video subtitle.
655 * \param p_mediaplayer the media player
656 * \param p_e an initialized exception pointer
657 * \return the video subtitle selected
659 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
662 * Get the number of available video subtitles.
664 * \param p_mediaplayer the media player
665 * \param p_e an initialized exception pointer
666 * \return the number of available video subtitles
668 VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );
671 * Get the description of available video subtitles.
673 * \param p_mediaplayer the media player
674 * \param p_e an initialized exception pointer
675 * \return list containing description of available video subtitles
677 VLC_PUBLIC_API libvlc_track_description_t *
678 libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );
681 * Set new video subtitle.
683 * \param p_mediaplayer the media player
684 * \param i_spu new video subtitle to select
685 * \param p_e an initialized exception pointer
687 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
690 * Set new video subtitle file.
692 * \param p_mediaplayer the media player
693 * \param psz_subtitle new video subtitle file
694 * \param p_e an initialized exception pointer
695 * \return the success status (boolean)
697 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, const char *, libvlc_exception_t * );
700 * Get the description of available titles.
702 * \param p_mediaplayer the media player
703 * \param p_e an initialized exception pointer
704 * \return list containing description of available titles
706 VLC_PUBLIC_API libvlc_track_description_t *
707 libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );
710 * Get the description of available chapters for specific title.
712 * \param p_mediaplayer the media player
713 * \param i_title selected title
714 * \param p_e an initialized exception pointer
715 * \return list containing description of available chapter for title i_title
717 VLC_PUBLIC_API libvlc_track_description_t *
718 libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );
721 * Get current crop filter geometry.
723 * \param p_mediaplayer the media player
724 * \param p_e an initialized exception pointer
725 * \return the crop filter geometry
727 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
730 * Set new crop filter geometry.
732 * \param p_mediaplayer the media player
733 * \param psz_geometry new crop filter geometry
734 * \param p_e an initialized exception pointer
736 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, const char *, libvlc_exception_t * );
739 * Toggle teletext transparent status on video output.
741 * \param p_mediaplayer the media player
742 * \param p_e an initialized exception pointer
744 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
747 * Get number of available video tracks.
749 * \param p_mi media player
750 * \param p_e an initialized exception
751 * \return the number of available video tracks (int)
753 VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
756 * Get the description of available video tracks.
758 * \param p_mi media player
759 * \param p_e an initialized exception
760 * \return list with description of available video tracks
762 VLC_PUBLIC_API libvlc_track_description_t *
763 libvlc_video_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
766 * Get current video track.
768 * \param p_mi media player
769 * \param p_e an initialized exception pointer
770 * \return the video track (int)
772 VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );
777 * \param p_mi media player
778 * \param i_track the track (int)
779 * \param p_e an initialized exception pointer
781 VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
784 * Take a snapshot of the current video window.
786 * If i_width AND i_height is 0, original size is used.
787 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
789 * \param p_mi media player instance
790 * \param psz_filepath the path where to save the screenshot to
791 * \param i_width the snapshot's width
792 * \param i_height the snapshot's height
793 * \param p_e an initialized exception pointer
795 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
798 * Enable or disable deinterlace filter
800 * \param p_mi libvlc media player
801 * \param b_enable boolean to enable or disable deinterlace filter
802 * \param psz_mode type of deinterlace filter to use
803 * \param p_e an initialized exception pointer
805 VLC_PUBLIC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *,
807 libvlc_exception_t *);
810 * Get an integer option value
812 * \param p_mi libvlc media player
813 * \param option marq option to get \see libvlc_video_marquee_int_option_t
814 * \param p_e an initialized exception pointer
816 VLC_PUBLIC_API int libvlc_video_get_marquee_int( libvlc_media_player_t *,
817 unsigned, libvlc_exception_t * );
820 * Get a string option value
822 * \param p_mi libvlc media player
823 * \param option marq option to get \see libvlc_video_marquee_string_option_t
824 * \param p_e an initialized exception pointer
826 VLC_PUBLIC_API char *libvlc_video_get_marquee_string( libvlc_media_player_t *,
827 unsigned, libvlc_exception_t * );
830 * Enable, disable or set an integer marq option
832 * Setting libvlc_marquee_Enable has the side effect of enabling (arg !0)
833 * or disabling (arg 0) the marq filter.
835 * \param p_mi libvlc media player
836 * \param option marq option to set \see libvlc_video_marquee_int_option_t
837 * \param i_val marq option value
838 * \param p_e an initialized exception pointer
840 VLC_PUBLIC_API void libvlc_video_set_marquee_int( libvlc_media_player_t *,
841 unsigned, int, libvlc_exception_t * );
844 * Set a marq string option
846 * \param p_mi libvlc media player
847 * \param option marq option to set \see libvlc_video_marquee_string_option_t
848 * \param psz_text marq option value
849 * \param p_e an initialized exception pointer
851 VLC_PUBLIC_API void libvlc_video_set_marquee_string( libvlc_media_player_t *,
852 unsigned, const char *, libvlc_exception_t * );
854 enum libvlc_video_logo_option_t {
856 libvlc_logo_file, /**< string argument, "file,d,t;file,d,t;..." */
862 libvlc_logo_position,
866 * Get integer logo option.
868 * \param p_mi libvlc media player instance
869 * \param option logo option to get, values of libvlc_video_logo_option_t
870 * \param p_e an pointer to an initialized exception object
872 VLC_PUBLIC_API int libvlc_video_get_logo_int( libvlc_media_player_t *p_mi,
873 unsigned option, libvlc_exception_t *p_e );
876 * Set logo option as integer. Options that take a different type value
877 * cause an invalid argument exception.
878 * Passing libvlc_logo_enable as option value has the side effect of
879 * starting (arg !0) or stopping (arg 0) the logo filter.
881 * \param p_mi libvlc media player instance
882 * \param option logo option to set, values of libvlc_video_logo_option_t
883 * \param value logo option value
884 * \param p_e an pointer to an initialized exception object
886 VLC_PUBLIC_API void libvlc_video_set_logo_int( libvlc_media_player_t *p_mi,
887 unsigned option, int value, libvlc_exception_t *p_e );
890 * Set logo option as string. Options that take a different type value
891 * cause an invalid argument exception.
893 * \param p_mi libvlc media player instance
894 * \param option logo option to set, values of libvlc_video_logo_option_t
895 * \param psz_value logo option value
896 * \param p_e an pointer to an initialized exception object
898 VLC_PUBLIC_API void libvlc_video_set_logo_string( libvlc_media_player_t *p_mi,
899 unsigned option, const char *psz_value, libvlc_exception_t *p_e );
903 /** \defgroup libvlc_audio libvlc_audio
904 * \ingroup libvlc_media_player
905 * LibVLC Audio handling
912 typedef enum libvlc_audio_output_device_types_t {
913 libvlc_AudioOutputDevice_Error = -1,
914 libvlc_AudioOutputDevice_Mono = 1,
915 libvlc_AudioOutputDevice_Stereo = 2,
916 libvlc_AudioOutputDevice_2F2R = 4,
917 libvlc_AudioOutputDevice_3F2R = 5,
918 libvlc_AudioOutputDevice_5_1 = 6,
919 libvlc_AudioOutputDevice_6_1 = 7,
920 libvlc_AudioOutputDevice_7_1 = 8,
921 libvlc_AudioOutputDevice_SPDIF = 10
922 } libvlc_audio_output_device_types_t;
927 typedef enum libvlc_audio_output_channel_t {
928 libvlc_AudioChannel_Error = -1,
929 libvlc_AudioChannel_Stereo = 1,
930 libvlc_AudioChannel_RStereo = 2,
931 libvlc_AudioChannel_Left = 3,
932 libvlc_AudioChannel_Right = 4,
933 libvlc_AudioChannel_Dolbys = 5
934 } libvlc_audio_output_channel_t;
938 * Get the list of available audio outputs
940 * \param p_instance libvlc instance
941 * \param p_e an initialized exception pointer
942 * \return list of available audio outputs, at the end free it with
943 * \see libvlc_audio_output_list_release \see libvlc_audio_output_t
945 VLC_PUBLIC_API libvlc_audio_output_t *
946 libvlc_audio_output_list_get( libvlc_instance_t *,
947 libvlc_exception_t * );
950 * Free the list of available audio outputs
952 * \param p_list list with audio outputs for release
954 VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );
957 * Set the audio output.
958 * Change will be applied after stop and play.
960 * \param p_instance libvlc instance
961 * \param psz_name name of audio output,
962 * use psz_name of \see libvlc_audio_output_t
963 * \return true if function succeded
965 VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *,
969 * Get count of devices for audio output, these devices are hardware oriented
970 * like analor or digital output of sound card
972 * \param p_instance libvlc instance
973 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
974 * \return number of devices
976 VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *,
980 * Get long name of device, if not available short name given
982 * \param p_instance libvlc instance
983 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
984 * \param i_device device index
985 * \return long name of device
987 VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *,
992 * Get id name of device
994 * \param p_instance libvlc instance
995 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
996 * \param i_device device index
997 * \return id name of device, use for setting device, need to be free after use
999 VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *,
1004 * Set device for using
1006 * \param p_instance libvlc instance
1007 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1008 * \param psz_device_id device
1010 VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *,
1015 * Get current audio device type. Device type describes something like
1016 * character of output sound - stereo sound, 2.1, 5.1 etc
1018 * \param p_instance vlc instance
1019 * \param p_e an initialized exception pointer
1020 * \return the audio devices type \see libvlc_audio_output_device_types_t
1022 VLC_PUBLIC_API int libvlc_audio_output_get_device_type(
1023 libvlc_instance_t *, libvlc_exception_t * );
1026 * Set current audio device type.
1028 * \param p_instance vlc instance
1029 * \param device_type the audio device type,
1030 according to \see libvlc_audio_output_device_types_t
1031 * \param p_e an initialized exception pointer
1033 VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
1035 libvlc_exception_t * );
1039 * Toggle mute status.
1041 * \param p_instance libvlc instance
1043 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t * );
1046 * Get current mute status.
1048 * \param p_instance libvlc instance
1049 * \return the mute status (boolean)
1051 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t * );
1056 * \param p_instance libvlc instance
1057 * \param status If status is true then mute, otherwise unmute
1059 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int );
1062 * Get current audio level.
1064 * \param p_instance libvlc instance
1065 * \param p_e an initialized exception pointer
1066 * \return the audio level (int)
1068 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t * );
1071 * Set current audio level.
1073 * \param p_instance libvlc instance
1074 * \param i_volume the volume (int)
1075 * \param p_e an initialized exception pointer
1077 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
1080 * Get number of available audio tracks.
1082 * \param p_mi media player
1083 * \param p_e an initialized exception
1084 * \return the number of available audio tracks (int)
1086 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
1089 * Get the description of available audio tracks.
1091 * \param p_mi media player
1092 * \param p_e an initialized exception
1093 * \return list with description of available audio tracks
1095 VLC_PUBLIC_API libvlc_track_description_t *
1096 libvlc_audio_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
1099 * Get current audio track.
1101 * \param p_mi media player
1102 * \param p_e an initialized exception pointer
1103 * \return the audio track (int)
1105 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
1108 * Set current audio track.
1110 * \param p_mi media player
1111 * \param i_track the track (int)
1112 * \param p_e an initialized exception pointer
1114 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
1117 * Get current audio channel.
1119 * \param p_instance vlc instance
1120 * \param p_e an initialized exception pointer
1121 * \return the audio channel \see libvlc_audio_output_channel_t
1124 libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
1127 * Set current audio channel.
1129 * \param p_instance vlc instance
1130 * \param channel the audio channel, \see libvlc_audio_output_channel_t
1131 * \param p_e an initialized exception pointer
1133 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *,
1135 libvlc_exception_t * );
1139 /** @} media_player */
1145 #endif /* VLC_LIBVLC_MEDIA_PLAYER_H */