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 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
217 * \param p_e an initialized exception pointer
219 VLC_PUBLIC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable, libvlc_exception_t *p_e );
222 * Get the NSView handler previously set with libvlc_media_player_set_nsobject().
224 * \param p_mi the Media Player
225 * \return the NSView handler or 0 if none where set
227 VLC_PUBLIC_API void * libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
230 * Set the agl handler where the media player should render its video output.
232 * \param p_mi the Media Player
233 * \param drawable the agl handler
234 * \param p_e an initialized exception pointer
236 VLC_PUBLIC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
239 * Get the agl handler previously set with libvlc_media_player_set_agl().
241 * \param p_mi the Media Player
242 * \return the agl handler or 0 if none where set
244 VLC_PUBLIC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi );
247 * Set an X Window System drawable where the media player should render its
248 * video output. If LibVLC was built without X11 output support, then this has
251 * The specified identifier must correspond to an existing Input/Output class
252 * X11 window. Pixmaps are <b>not</b> supported. The caller shall ensure that
253 * the X11 server is the same as the one the VLC instance has been configured
255 * If XVideo is <b>not</b> used, it is assumed that the drawable has the
256 * following properties in common with the default X11 screen: depth, scan line
257 * pad, black pixel. This is a bug.
259 * \param p_mi the Media Player
260 * \param drawable the ID of the X window
261 * \param p_e an initialized exception pointer
263 VLC_PUBLIC_API void libvlc_media_player_set_xwindow ( libvlc_media_player_t *p_mi, uint32_t drawable, libvlc_exception_t *p_e );
266 * Get the X Window System window identifier previously set with
267 * libvlc_media_player_set_xwindow(). Note that this will return the identifier
268 * even if VLC is not currently using it (for instance if it is playing an
271 * \param p_mi the Media Player
272 * \return an X window ID, or 0 if none where set.
274 VLC_PUBLIC_API uint32_t libvlc_media_player_get_xwindow ( libvlc_media_player_t *p_mi );
277 * Set a Win32/Win64 API window handle (HWND) where the media player should
278 * render its video output. If LibVLC was built without Win32/Win64 API output
279 * support, then this has no effects.
281 * \param p_mi the Media Player
282 * \param drawable windows handle of the drawable
283 * \param p_e an initialized exception pointer
285 VLC_PUBLIC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable, libvlc_exception_t *p_e );
288 * Get the Windows API window handle (HWND) previously set with
289 * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
290 * is not currently outputting any video to it.
292 * \param p_mi the Media Player
293 * \return a window handle or NULL if there are none.
295 VLC_PUBLIC_API void *libvlc_media_player_get_hwnd ( libvlc_media_player_t *p_mi );
299 /** \bug This might go away ... to be replaced by a broader system */
302 * Get the current movie length (in ms).
304 * \param p_mi the Media Player
305 * \param p_e an initialized exception pointer
306 * \return the movie length (in ms).
308 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);
311 * Get the current movie time (in ms).
313 * \param p_mi the Media Player
314 * \param p_e an initialized exception pointer
315 * \return the movie time (in ms).
317 VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);
320 * Set the movie time (in ms).
322 * \param p_mi the Media Player
323 * \param the movie time (in ms).
324 * \param p_e an initialized exception pointer
326 VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
329 * Get movie position.
331 * \param p_mi the Media Player
332 * \param p_e an initialized exception pointer
333 * \return movie position
335 VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);
338 * Set movie position.
340 * \param p_mi the Media Player
341 * \param f_pos the position
342 * \param p_e an initialized exception pointer
344 VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);
349 * \param p_mi the Media Player
350 * \param i_chapter chapter number to play
351 * \param p_e an initialized exception pointer
353 VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);
358 * \param p_mi the Media Player
359 * \param p_e an initialized exception pointer
360 * \return chapter number currently playing
362 VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );
365 * Get movie chapter count
367 * \param p_mi the Media Player
368 * \param p_e an initialized exception pointer
369 * \return number of chapters in movie
371 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
374 * Will the player play
376 * \param p_mi the Media Player
377 * \param p_e an initialized exception pointer
380 VLC_PUBLIC_API int libvlc_media_player_will_play ( libvlc_media_player_t *, libvlc_exception_t *);
383 * Get title chapter count
385 * \param p_mi the Media Player
386 * \param i_title title
387 * \param p_e an initialized exception pointer
388 * \return number of chapters in title
390 VLC_PUBLIC_API int libvlc_media_player_get_chapter_count_for_title(
391 libvlc_media_player_t *, int, libvlc_exception_t *);
396 * \param p_mi the Media Player
397 * \param i_title title number to play
398 * \param p_e an initialized exception pointer
400 VLC_PUBLIC_API void libvlc_media_player_set_title( libvlc_media_player_t *, int, libvlc_exception_t *);
405 * \param p_mi the Media Player
406 * \param p_e an initialized exception pointer
407 * \return title number currently playing
409 VLC_PUBLIC_API int libvlc_media_player_get_title( libvlc_media_player_t *, libvlc_exception_t *);
412 * Get movie title count
414 * \param p_mi the Media Player
415 * \param p_e an initialized exception pointer
416 * \return title number count
418 VLC_PUBLIC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *, libvlc_exception_t *);
421 * Set previous chapter
423 * \param p_mi the Media Player
424 * \param p_e an initialized exception pointer
426 VLC_PUBLIC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *, libvlc_exception_t *);
431 * \param p_mi the Media Player
432 * \param p_e an initialized exception pointer
434 VLC_PUBLIC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *, libvlc_exception_t *);
437 * Get movie play rate
439 * \param p_mi the Media Player
440 * \param p_e an initialized exception pointer
441 * \return movie play rate
443 VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);
446 * Set movie play rate
448 * \param p_mi the Media Player
449 * \param movie play rate to set
450 * \param p_e an initialized exception pointer
452 VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);
455 * Get current movie state
457 * \param p_mi the Media Player
458 * \param p_e an initialized exception pointer
459 * \return current movie state as libvlc_state_t
461 VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *, libvlc_exception_t *);
466 * \param p_mi the Media Player
467 * \param p_e an initialized exception pointer
468 * \return frames per second (fps) for this playing movie
470 VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
475 * Does this media player have a video output?
477 * \param p_md the media player
478 * \param p_e an initialized exception pointer
480 VLC_PUBLIC_API int libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
483 * Is this media player seekable?
485 * \param p_input the input
486 * \param p_e an initialized exception pointer
488 VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
491 * Can this media player be paused?
493 * \param p_input the input
494 * \param p_e an initialized exception pointer
496 VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
500 * Display the next frame
502 * \param p_input the libvlc_media_player_t instance
503 * \param p_e an initialized exception pointer
505 VLC_PUBLIC_API void libvlc_media_player_next_frame( libvlc_media_player_t *p_input,
506 libvlc_exception_t *p_e );
511 * Release (free) libvlc_track_description_t
513 * \param p_track_description the structure to release
515 VLC_PUBLIC_API void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
517 /** \defgroup libvlc_video libvlc_video
518 * \ingroup libvlc_media_player
519 * LibVLC Video handling
524 * Toggle fullscreen status on a non-embedded video output.
526 * @warning The same limitations applies to this function
527 * as to libvlc_set_fullscreen().
529 * \param p_mediaplayer the media player
530 * \param p_e an initialized exception pointer
532 VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
535 * Enable or disable fullscreen on a non-embedded video output.
537 * @warning With most window managers, only a top-level windows can switch to
538 * full-screen mode. Hence, this function will not operate properly if
539 * libvlc_media_player_set_xid() or libvlc_media_player_set_hwnd() was
540 * used to embed the video in a non-LibVLC widget. If you want to to render an
541 * embedded LibVLC video full-screen, the parent embedding widget must expanded
542 * to full screen (LibVLC cannot take care of that).
543 * LibVLC will then automatically resize the video as appropriate.
545 * \param p_mediaplayer the media player
546 * \param b_fullscreen boolean for fullscreen status
547 * \param p_e an initialized exception pointer
549 VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
552 * Get current fullscreen status.
554 * \param p_mediaplayer the media player
555 * \param p_e an initialized exception pointer
556 * \return the fullscreen status (boolean)
558 VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
561 * Enable or disable key press events handling, according to the LibVLC hotkeys
562 * configuration. By default and for historical reasons, keyboard events are
563 * handled by the LibVLC video widget.
565 * \note On X11, there can be only one subscriber for key press and mouse
566 * click events per window. If your application has subscribed to those events
567 * for the X window ID of the video widget, then LibVLC will not be able to
568 * handle key presses and mouse clicks in any case.
570 * \warning This function is only implemented for X11 at the moment.
572 * \param mp the media player
573 * \param on true to handle key press events, false to ignore them.
576 void libvlc_video_set_key_input( libvlc_media_player_t *mp, unsigned on );
579 * Enable or disable mouse click events handling. By default, those events are
580 * handled. This is needed for DVD menus to work, as well as a few video
581 * filters such as "puzzle".
583 * \note See also \func libvlc_video_set_key_input().
585 * \warning This function is only implemented for X11 at the moment.
587 * \param mp the media player
588 * \param on true to handle mouse click events, false to ignore them.
591 void libvlc_video_set_mouse_input( libvlc_media_player_t *mp, unsigned on );
594 * Get current video height.
596 * \param p_mediaplayer the media player
597 * \param p_e an initialized exception pointer
598 * \return the video height
600 VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
603 * Get current video width.
605 * \param p_mediaplayer the media player
606 * \param p_e an initialized exception pointer
607 * \return the video width
609 VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
612 * Get the current video scaling factor.
613 * See also libvlc_video_set_scale().
615 * \param p_mediaplayer the media player
616 * \param p_e an initialized exception pointer
617 * \return the currently configured zoom factor, or 0. if the video is set
618 * to fit to the output window/drawable automatically.
620 VLC_PUBLIC_API float libvlc_video_get_scale( libvlc_media_player_t *,
621 libvlc_exception_t *p_e );
624 * Set the video scaling factor. That is the ratio of the number of pixels on
625 * screen to the number of pixels in the original decoded video in each
626 * dimension. Zero is a special value; it will adjust the video to the output
627 * window/drawable (in windowed mode) or the entire screen.
629 * Note that not all video outputs support scaling.
631 * \param p_mediaplayer the media player
632 * \param i_factor the scaling factor, or zero
633 * \param p_e an initialized exception pointer
635 VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *, float,
636 libvlc_exception_t *p_e );
639 * Get current video aspect ratio.
641 * \param p_mediaplayer the media player
642 * \param p_e an initialized exception pointer
643 * \return the video aspect ratio
645 VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
648 * Set new video aspect ratio.
650 * \param p_mediaplayer the media player
651 * \param psz_aspect new video aspect-ratio
652 * \param p_e an initialized exception pointer
654 VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, const char *, libvlc_exception_t * );
657 * Get current video subtitle.
659 * \param p_mediaplayer the media player
660 * \param p_e an initialized exception pointer
661 * \return the video subtitle selected
663 VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
666 * Get the number of available video subtitles.
668 * \param p_mediaplayer the media player
669 * \param p_e an initialized exception pointer
670 * \return the number of available video subtitles
672 VLC_PUBLIC_API int libvlc_video_get_spu_count( libvlc_media_player_t *, libvlc_exception_t * );
675 * Get the description of available video subtitles.
677 * \param p_mediaplayer the media player
678 * \param p_e an initialized exception pointer
679 * \return list containing description of available video subtitles
681 VLC_PUBLIC_API libvlc_track_description_t *
682 libvlc_video_get_spu_description( libvlc_media_player_t *, libvlc_exception_t * );
685 * Set new video subtitle.
687 * \param p_mediaplayer the media player
688 * \param i_spu new video subtitle to select
689 * \param p_e an initialized exception pointer
691 VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
694 * Set new video subtitle file.
696 * \param p_mediaplayer the media player
697 * \param psz_subtitle new video subtitle file
698 * \param p_e an initialized exception pointer
699 * \return the success status (boolean)
701 VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, const char *, libvlc_exception_t * );
704 * Get the description of available titles.
706 * \param p_mediaplayer the media player
707 * \param p_e an initialized exception pointer
708 * \return list containing description of available titles
710 VLC_PUBLIC_API libvlc_track_description_t *
711 libvlc_video_get_title_description( libvlc_media_player_t *, libvlc_exception_t * );
714 * Get the description of available chapters for specific title.
716 * \param p_mediaplayer the media player
717 * \param i_title selected title
718 * \param p_e an initialized exception pointer
719 * \return list containing description of available chapter for title i_title
721 VLC_PUBLIC_API libvlc_track_description_t *
722 libvlc_video_get_chapter_description( libvlc_media_player_t *, int, libvlc_exception_t * );
725 * Get current crop filter geometry.
727 * \param p_mediaplayer the media player
728 * \param p_e an initialized exception pointer
729 * \return the crop filter geometry
731 VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
734 * Set new crop filter geometry.
736 * \param p_mediaplayer the media player
737 * \param psz_geometry new crop filter geometry
738 * \param p_e an initialized exception pointer
740 VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, const char *, libvlc_exception_t * );
743 * Toggle teletext transparent status on video output.
745 * \param p_mediaplayer the media player
746 * \param p_e an initialized exception pointer
748 VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
751 * Get current teletext page requested.
753 * \param p_mediaplayer the media player
754 * \param p_e an initialized exception pointer
755 * \return the current teletext page requested.
757 VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
760 * Set new teletext page to retrieve.
762 * \param p_mediaplayer the media player
763 * \param i_page teletex page number requested
764 * \param p_e an initialized exception pointer
766 VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
769 * Get number of available video tracks.
771 * \param p_mi media player
772 * \param p_e an initialized exception
773 * \return the number of available video tracks (int)
775 VLC_PUBLIC_API int libvlc_video_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
778 * Get the description of available video tracks.
780 * \param p_mi media player
781 * \param p_e an initialized exception
782 * \return list with description of available video tracks
784 VLC_PUBLIC_API libvlc_track_description_t *
785 libvlc_video_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
788 * Get current video track.
790 * \param p_mi media player
791 * \param p_e an initialized exception pointer
792 * \return the video track (int)
794 VLC_PUBLIC_API int libvlc_video_get_track( libvlc_media_player_t *, libvlc_exception_t * );
799 * \param p_mi media player
800 * \param i_track the track (int)
801 * \param p_e an initialized exception pointer
803 VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
806 * Take a snapshot of the current video window.
808 * If i_width AND i_height is 0, original size is used.
809 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
811 * \param p_mi media player instance
812 * \param psz_filepath the path where to save the screenshot to
813 * \param i_width the snapshot's width
814 * \param i_height the snapshot's height
815 * \param p_e an initialized exception pointer
817 VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
820 * Enable or disable deinterlace filter
822 * \param p_mi libvlc media player
823 * \param b_enable boolean to enable or disable deinterlace filter
824 * \param psz_mode type of deinterlace filter to use
825 * \param p_e an initialized exception pointer
827 VLC_PUBLIC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *,
829 libvlc_exception_t *);
832 * Get an option value (option which return an int)
834 * \param p_mi libvlc media player
835 * \param option marq option to get
836 * \param p_e an initialized exception pointer
838 VLC_PUBLIC_API int libvlc_video_get_marquee_option_as_int( libvlc_media_player_t *,
839 libvlc_video_marquee_int_option_t,
840 libvlc_exception_t * );
843 * Get an option value (option which return a string)
845 * \param p_mi libvlc media player
846 * \param option marq option to get
847 * \param p_e an initialized exception pointer
849 VLC_PUBLIC_API char *libvlc_video_get_marquee_option_as_string( libvlc_media_player_t *,
850 libvlc_video_marquee_string_option_t,
851 libvlc_exception_t * );
854 * Enable, disable or set a marq option (only int)
856 * \param p_mi libvlc media player
857 * \param option marq option to set
858 * \param i_val marq option value
859 * \param p_e an initialized exception pointer
861 VLC_PUBLIC_API void libvlc_video_set_marquee_option_as_int( libvlc_media_player_t *,
862 libvlc_video_marquee_int_option_t,
863 int, libvlc_exception_t * );
866 * Set a marq option (only string)
868 * \param p_mi libvlc media player
869 * \param option marq option to set
870 * \param psz_text marq option value
871 * \param p_e an initialized exception pointer
873 VLC_PUBLIC_API void libvlc_video_set_marquee_option_as_string( libvlc_media_player_t *,
874 libvlc_video_marquee_string_option_t,
876 libvlc_exception_t * );
880 /** \defgroup libvlc_audio libvlc_audio
881 * \ingroup libvlc_media_player
882 * LibVLC Audio handling
889 typedef enum libvlc_audio_output_device_types_t {
890 libvlc_AudioOutputDevice_Error = -1,
891 libvlc_AudioOutputDevice_Mono = 1,
892 libvlc_AudioOutputDevice_Stereo = 2,
893 libvlc_AudioOutputDevice_2F2R = 4,
894 libvlc_AudioOutputDevice_3F2R = 5,
895 libvlc_AudioOutputDevice_5_1 = 6,
896 libvlc_AudioOutputDevice_6_1 = 7,
897 libvlc_AudioOutputDevice_7_1 = 8,
898 libvlc_AudioOutputDevice_SPDIF = 10
899 } libvlc_audio_output_device_types_t;
904 typedef enum libvlc_audio_output_channel_t {
905 libvlc_AudioChannel_Error = -1,
906 libvlc_AudioChannel_Stereo = 1,
907 libvlc_AudioChannel_RStereo = 2,
908 libvlc_AudioChannel_Left = 3,
909 libvlc_AudioChannel_Right = 4,
910 libvlc_AudioChannel_Dolbys = 5
911 } libvlc_audio_output_channel_t;
915 * Get the list of available audio outputs
917 * \param p_instance libvlc instance
918 * \param p_e an initialized exception pointer
919 * \return list of available audio outputs, at the end free it with
920 * \see libvlc_audio_output_list_release \see libvlc_audio_output_t
922 VLC_PUBLIC_API libvlc_audio_output_t *
923 libvlc_audio_output_list_get( libvlc_instance_t *,
924 libvlc_exception_t * );
927 * Free the list of available audio outputs
929 * \param p_list list with audio outputs for release
931 VLC_PUBLIC_API void libvlc_audio_output_list_release( libvlc_audio_output_t * );
934 * Set the audio output.
935 * Change will be applied after stop and play.
937 * \param p_instance libvlc instance
938 * \param psz_name name of audio output,
939 * use psz_name of \see libvlc_audio_output_t
940 * \return true if function succeded
942 VLC_PUBLIC_API int libvlc_audio_output_set( libvlc_instance_t *,
946 * Get count of devices for audio output, these devices are hardware oriented
947 * like analor or digital output of sound card
949 * \param p_instance libvlc instance
950 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
951 * \return number of devices
953 VLC_PUBLIC_API int libvlc_audio_output_device_count( libvlc_instance_t *,
957 * Get long name of device, if not available short name given
959 * \param p_instance libvlc instance
960 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
961 * \param i_device device index
962 * \return long name of device
964 VLC_PUBLIC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *,
969 * Get id name of device
971 * \param p_instance libvlc instance
972 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
973 * \param i_device device index
974 * \return id name of device, use for setting device, need to be free after use
976 VLC_PUBLIC_API char * libvlc_audio_output_device_id( libvlc_instance_t *,
981 * Set device for using
983 * \param p_instance libvlc instance
984 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
985 * \param psz_device_id device
987 VLC_PUBLIC_API void libvlc_audio_output_device_set( libvlc_instance_t *,
992 * Get current audio device type. Device type describes something like
993 * character of output sound - stereo sound, 2.1, 5.1 etc
995 * \param p_instance vlc instance
996 * \param p_e an initialized exception pointer
997 * \return the audio devices type \see libvlc_audio_output_device_types_t
999 VLC_PUBLIC_API int libvlc_audio_output_get_device_type(
1000 libvlc_instance_t *, libvlc_exception_t * );
1003 * Set current audio device type.
1005 * \param p_instance vlc instance
1006 * \param device_type the audio device type,
1007 according to \see libvlc_audio_output_device_types_t
1008 * \param p_e an initialized exception pointer
1010 VLC_PUBLIC_API void libvlc_audio_output_set_device_type( libvlc_instance_t *,
1012 libvlc_exception_t * );
1016 * Toggle mute status.
1018 * \param p_instance libvlc instance
1020 VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t * );
1023 * Get current mute status.
1025 * \param p_instance libvlc instance
1026 * \return the mute status (boolean)
1028 VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t * );
1033 * \param p_instance libvlc instance
1034 * \param status If status is true then mute, otherwise unmute
1036 VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int );
1039 * Get current audio level.
1041 * \param p_instance libvlc instance
1042 * \param p_e an initialized exception pointer
1043 * \return the audio level (int)
1045 VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t * );
1048 * Set current audio level.
1050 * \param p_instance libvlc instance
1051 * \param i_volume the volume (int)
1052 * \param p_e an initialized exception pointer
1054 VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
1057 * Get number of available audio tracks.
1059 * \param p_mi media player
1060 * \param p_e an initialized exception
1061 * \return the number of available audio tracks (int)
1063 VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *, libvlc_exception_t * );
1066 * Get the description of available audio tracks.
1068 * \param p_mi media player
1069 * \param p_e an initialized exception
1070 * \return list with description of available audio tracks
1072 VLC_PUBLIC_API libvlc_track_description_t *
1073 libvlc_audio_get_track_description( libvlc_media_player_t *, libvlc_exception_t * );
1076 * Get current audio track.
1078 * \param p_mi media player
1079 * \param p_e an initialized exception pointer
1080 * \return the audio track (int)
1082 VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
1085 * Set current audio track.
1087 * \param p_mi media player
1088 * \param i_track the track (int)
1089 * \param p_e an initialized exception pointer
1091 VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
1094 * Get current audio channel.
1096 * \param p_instance vlc instance
1097 * \param p_e an initialized exception pointer
1098 * \return the audio channel \see libvlc_audio_output_channel_t
1101 libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
1104 * Set current audio channel.
1106 * \param p_instance vlc instance
1107 * \param channel the audio channel, \see libvlc_audio_output_channel_t
1108 * \param p_e an initialized exception pointer
1110 VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *,
1112 libvlc_exception_t * );
1116 /** @} media_player */
1118 #endif /* VLC_LIBVLC_MEDIA_PLAYER_H */