Fix typo in http interface
[vlc.git] / include / vlc / libvlc_media_player.h
blob529e0fde481572907dd445cc61f60972910dd7d6
1 /*****************************************************************************
2 * libvlc_media_player.h: libvlc_media_player external API
3 *****************************************************************************
4 * Copyright (C) 1998-2010 the VideoLAN team
5 * $Id$
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 *****************************************************************************/
26 /**
27 * \file
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 # ifdef __cplusplus
35 extern "C" {
36 # else
37 # include <stdbool.h>
38 # endif
40 /*****************************************************************************
41 * Media Player
42 *****************************************************************************/
43 /** \defgroup libvlc_media_player LibVLC media player
44 * \ingroup libvlc
45 * A LibVLC media player plays one media (usually in a custom drawable).
46 * @{
49 typedef struct libvlc_media_player_t libvlc_media_player_t;
51 /**
52 * Description for video, audio tracks and subtitles. It contains
53 * id, name (description string) and pointer to next record.
55 typedef struct libvlc_track_description_t
57 int i_id;
58 char *psz_name;
59 struct libvlc_track_description_t *p_next;
61 } libvlc_track_description_t;
63 /**
64 * Description for audio output. It contains
65 * name, description and pointer to next record.
67 typedef struct libvlc_audio_output_t
69 char *psz_name;
70 char *psz_description;
71 struct libvlc_audio_output_t *p_next;
73 } libvlc_audio_output_t;
75 /**
76 * Rectangle type for video geometry
78 typedef struct libvlc_rectangle_t
80 int top, left;
81 int bottom, right;
82 } libvlc_rectangle_t;
84 /**
85 * Marq options definition
87 typedef enum libvlc_video_marquee_option_t {
88 libvlc_marquee_Enable = 0,
89 libvlc_marquee_Text, /** string argument */
90 libvlc_marquee_Color,
91 libvlc_marquee_Opacity,
92 libvlc_marquee_Position,
93 libvlc_marquee_Refresh,
94 libvlc_marquee_Size,
95 libvlc_marquee_Timeout,
96 libvlc_marquee_X,
97 libvlc_marquee_Y
98 } libvlc_video_marquee_option_t;
101 * Navigation mode
103 typedef enum libvlc_navigate_mode_t
105 libvlc_navigate_activate = 0,
106 libvlc_navigate_up,
107 libvlc_navigate_down,
108 libvlc_navigate_left,
109 libvlc_navigate_right
110 } libvlc_navigate_mode_t;
113 * Create an empty Media Player object
115 * \param p_libvlc_instance the libvlc instance in which the Media Player
116 * should be created.
117 * \return a new media player object, or NULL on error.
119 LIBVLC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *p_libvlc_instance );
122 * Create a Media Player object from a Media
124 * \param p_md the media. Afterwards the p_md can be safely
125 * destroyed.
126 * \return a new media player object, or NULL on error.
128 LIBVLC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *p_md );
131 * Release a media_player after use
132 * Decrement the reference count of a media player object. If the
133 * reference count is 0, then libvlc_media_player_release() will
134 * release the media player object. If the media player object
135 * has been released, then it should not be used again.
137 * \param p_mi the Media Player to free
139 LIBVLC_API void libvlc_media_player_release( libvlc_media_player_t *p_mi );
142 * Retain a reference to a media player object. Use
143 * libvlc_media_player_release() to decrement reference count.
145 * \param p_mi media player object
147 LIBVLC_API void libvlc_media_player_retain( libvlc_media_player_t *p_mi );
150 * Set the media that will be used by the media_player. If any,
151 * previous md will be released.
153 * \param p_mi the Media Player
154 * \param p_md the Media. Afterwards the p_md can be safely
155 * destroyed.
157 LIBVLC_API void libvlc_media_player_set_media( libvlc_media_player_t *p_mi,
158 libvlc_media_t *p_md );
161 * Get the media used by the media_player.
163 * \param p_mi the Media Player
164 * \return the media associated with p_mi, or NULL if no
165 * media is associated
167 LIBVLC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *p_mi );
170 * Get the Event Manager from which the media player send event.
172 * \param p_mi the Media Player
173 * \return the event manager associated with p_mi
175 LIBVLC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *p_mi );
178 * is_playing
180 * \param p_mi the Media Player
181 * \return 1 if the media player is playing, 0 otherwise
183 * \libvlc_return_bool
185 LIBVLC_API int libvlc_media_player_is_playing ( libvlc_media_player_t *p_mi );
188 * Play
190 * \param p_mi the Media Player
191 * \return 0 if playback started (and was already started), or -1 on error.
193 LIBVLC_API int libvlc_media_player_play ( libvlc_media_player_t *p_mi );
196 * Pause or resume (no effect if there is no media)
198 * \param mp the Media Player
199 * \param do_pause play/resume if zero, pause if non-zero
200 * \version LibVLC 1.1.1 or later
202 LIBVLC_API void libvlc_media_player_set_pause ( libvlc_media_player_t *mp,
203 int do_pause );
206 * Toggle pause (no effect if there is no media)
208 * \param p_mi the Media Player
210 LIBVLC_API void libvlc_media_player_pause ( libvlc_media_player_t *p_mi );
213 * Stop (no effect if there is no media)
215 * \param p_mi the Media Player
217 LIBVLC_API void libvlc_media_player_stop ( libvlc_media_player_t *p_mi );
220 * Callback prototype to allocate and lock a picture buffer.
222 * Whenever a new video frame needs to be decoded, the lock callback is
223 * invoked. Depending on the video chroma, one or three pixel planes of
224 * adequate dimensions must be returned via the second parameter. Those
225 * planes must be aligned on 32-bytes boundaries.
227 * \param opaque private pointer as passed to libvlc_video_set_callbacks() [IN]
228 * \param planes start address of the pixel planes (LibVLC allocates the array
229 * of void pointers, this callback must initialize the array) [OUT]
230 * \return a private pointer for the display and unlock callbacks to identify
231 * the picture buffers
233 typedef void *(*libvlc_video_lock_cb)(void *opaque, void **planes);
236 * Callback prototype to unlock a picture buffer.
238 * When the video frame decoding is complete, the unlock callback is invoked.
239 * This callback might not be needed at all. It is only an indication that the
240 * application can now read the pixel values if it needs to.
242 * \warning A picture buffer is unlocked after the picture is decoded,
243 * but before the picture is displayed.
245 * \param opaque private pointer as passed to libvlc_video_set_callbacks() [IN]
246 * \param picture private pointer returned from the @ref libvlc_video_lock_cb
247 * callback [IN]
248 * \param planes pixel planes as defined by the @ref libvlc_video_lock_cb
249 * callback (this parameter is only for convenience) [IN]
251 typedef void (*libvlc_video_unlock_cb)(void *opaque, void *picture,
252 void *const *planes);
255 * Callback prototype to display a picture.
257 * When the video frame needs to be shown, as determined by the media playback
258 * clock, the display callback is invoked.
260 * \param opaque private pointer as passed to libvlc_video_set_callbacks() [IN]
261 * \param picture private pointer returned from the @ref libvlc_video_lock_cb
262 * callback [IN]
264 typedef void (*libvlc_video_display_cb)(void *opaque, void *picture);
267 * Callback prototype to configure picture buffers format.
268 * This callback gets the format of the video as output by the video decoder
269 * and the chain of video filters (if any). It can opt to change any parameter
270 * as it needs. In that case, LibVLC will attempt to convert the video format
271 * (rescaling and chroma conversion) but these operations can be CPU intensive.
273 * \param opaque pointer to the private pointer passed to
274 * libvlc_video_set_callbacks() [IN/OUT]
275 * \param chroma pointer to the 4 bytes video format identifier [IN/OUT]
276 * \param width pointer to the pixel width [IN/OUT]
277 * \param height pointer to the pixel height [IN/OUT]
278 * \param pitches table of scanline pitches in bytes for each pixel plane
279 * (the table is allocated by LibVLC) [OUT]
280 * \param lines table of scanlines count for each plane [OUT]
281 * \return the number of picture buffers allocated, 0 indicates failure
283 * \note
284 * For each pixels plane, the scanline pitch must be bigger than or equal to
285 * the number of bytes per pixel multiplied by the pixel width.
286 * Similarly, the number of scanlines must be bigger than of equal to
287 * the pixel height.
288 * Furthermore, we recommend that pitches and lines be multiple of 32
289 * to not break assumption that might be made by various optimizations
290 * in the video decoders, video filters and/or video converters.
292 typedef unsigned (*libvlc_video_format_cb)(void **opaque, char *chroma,
293 unsigned *width, unsigned *height,
294 unsigned *pitches,
295 unsigned *lines);
298 * Callback prototype to configure picture buffers format.
300 * \param opaque private pointer as passed to libvlc_video_set_callbacks()
301 * (and possibly modified by @ref libvlc_video_format_cb) [IN]
303 typedef void (*libvlc_video_cleanup_cb)(void *opaque);
307 * Set callbacks and private data to render decoded video to a custom area
308 * in memory.
309 * Use libvlc_video_set_format() or libvlc_video_set_format_callbacks()
310 * to configure the decoded format.
312 * \param mp the media player
313 * \param lock callback to lock video memory (must not be NULL)
314 * \param unlock callback to unlock video memory (or NULL if not needed)
315 * \param display callback to display video (or NULL if not needed)
316 * \param opaque private pointer for the three callbacks (as first parameter)
317 * \version LibVLC 1.1.1 or later
319 LIBVLC_API
320 void libvlc_video_set_callbacks( libvlc_media_player_t *mp,
321 libvlc_video_lock_cb lock,
322 libvlc_video_unlock_cb unlock,
323 libvlc_video_display_cb display,
324 void *opaque );
327 * Set decoded video chroma and dimensions.
328 * This only works in combination with libvlc_video_set_callbacks(),
329 * and is mutually exclusive with libvlc_video_set_format_callbacks().
331 * \param mp the media player
332 * \param chroma a four-characters string identifying the chroma
333 * (e.g. "RV32" or "YUYV")
334 * \param width pixel width
335 * \param height pixel height
336 * \param pitch line pitch (in bytes)
337 * \version LibVLC 1.1.1 or later
338 * \bug All pixel planes are expected to have the same pitch.
339 * To use the YCbCr color space with chrominance subsampling,
340 * consider using libvlc_video_set_format_callbacks() instead.
342 LIBVLC_API
343 void libvlc_video_set_format( libvlc_media_player_t *mp, const char *chroma,
344 unsigned width, unsigned height,
345 unsigned pitch );
348 * Set decoded video chroma and dimensions. This only works in combination with
349 * libvlc_video_set_callbacks().
351 * \param mp the media player
352 * \param setup callback to select the video format (cannot be NULL)
353 * \param cleanup callback to release any allocated resources (or NULL)
354 * \version LibVLC 1.2.0 or later
356 LIBVLC_API
357 void libvlc_video_set_format_callbacks( libvlc_media_player_t *mp,
358 libvlc_video_format_cb setup,
359 libvlc_video_cleanup_cb cleanup );
362 * Set the NSView handler where the media player should render its video output.
364 * Use the vout called "macosx".
366 * The drawable is an NSObject that follow the VLCOpenGLVideoViewEmbedding
367 * protocol:
369 * @begincode
370 * \@protocol VLCOpenGLVideoViewEmbedding <NSObject>
371 * - (void)addVoutSubview:(NSView *)view;
372 * - (void)removeVoutSubview:(NSView *)view;
373 * \@end
374 * @endcode
376 * Or it can be an NSView object.
378 * If you want to use it along with Qt4 see the QMacCocoaViewContainer. Then
379 * the following code should work:
380 * @begincode
382 * NSView *video = [[NSView alloc] init];
383 * QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent);
384 * libvlc_media_player_set_nsobject(mp, video);
385 * [video release];
387 * @endcode
389 * You can find a live example in VLCVideoView in VLCKit.framework.
391 * \param p_mi the Media Player
392 * \param drawable the drawable that is either an NSView or an object following
393 * the VLCOpenGLVideoViewEmbedding protocol.
395 LIBVLC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable );
398 * Get the NSView handler previously set with libvlc_media_player_set_nsobject().
400 * \param p_mi the Media Player
401 * \return the NSView handler or 0 if none where set
403 LIBVLC_API void * libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
406 * Set the agl handler where the media player should render its video output.
408 * \param p_mi the Media Player
409 * \param drawable the agl handler
411 LIBVLC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable );
414 * Get the agl handler previously set with libvlc_media_player_set_agl().
416 * \param p_mi the Media Player
417 * \return the agl handler or 0 if none where set
419 LIBVLC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi );
422 * Set an X Window System drawable where the media player should render its
423 * video output. If LibVLC was built without X11 output support, then this has
424 * no effects.
426 * The specified identifier must correspond to an existing Input/Output class
427 * X11 window. Pixmaps are <b>not</b> supported. The caller shall ensure that
428 * the X11 server is the same as the one the VLC instance has been configured
429 * with. This function must be called before video playback is started;
430 * otherwise it will only take effect after playback stop and restart.
432 * \param p_mi the Media Player
433 * \param drawable the ID of the X window
435 LIBVLC_API void libvlc_media_player_set_xwindow ( libvlc_media_player_t *p_mi, uint32_t drawable );
438 * Get the X Window System window identifier previously set with
439 * libvlc_media_player_set_xwindow(). Note that this will return the identifier
440 * even if VLC is not currently using it (for instance if it is playing an
441 * audio-only input).
443 * \param p_mi the Media Player
444 * \return an X window ID, or 0 if none where set.
446 LIBVLC_API uint32_t libvlc_media_player_get_xwindow ( libvlc_media_player_t *p_mi );
449 * Set a Win32/Win64 API window handle (HWND) where the media player should
450 * render its video output. If LibVLC was built without Win32/Win64 API output
451 * support, then this has no effects.
453 * \param p_mi the Media Player
454 * \param drawable windows handle of the drawable
456 LIBVLC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable );
459 * Get the Windows API window handle (HWND) previously set with
460 * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
461 * is not currently outputting any video to it.
463 * \param p_mi the Media Player
464 * \return a window handle or NULL if there are none.
466 LIBVLC_API void *libvlc_media_player_get_hwnd ( libvlc_media_player_t *p_mi );
469 * Callback prototype for audio playback.
470 * \param data data pointer as passed to libvlc_audio_set_callbacks() [IN]
471 * \param samples pointer to the first audio sample to play back [IN]
472 * \param count number of audio samples to play back
473 * \param pts expected play time stamp (see libvlc_delay())
475 typedef void (*libvlc_audio_play_cb)(void *data, const void *samples,
476 unsigned count, int64_t pts);
479 * Callback prototype for audio pause.
480 * \note The pause callback is never called if the audio is already paused.
481 * \param data data pointer as passed to libvlc_audio_set_callbacks() [IN]
482 * \param pts time stamp of the pause request (should be elapsed already)
484 typedef void (*libvlc_audio_pause_cb)(void *data, int64_t pts);
487 * Callback prototype for audio resumption (i.e. restart from pause).
488 * \note The resume callback is never called if the audio is not paused.
489 * \param data data pointer as passed to libvlc_audio_set_callbacks() [IN]
490 * \param pts time stamp of the resumption request (should be elapsed already)
492 typedef void (*libvlc_audio_resume_cb)(void *data, int64_t pts);
495 * Callback prototype for audio buffer flush
496 * (i.e. discard all pending buffers and stop playback as soon as possible).
497 * \param data data pointer as passed to libvlc_audio_set_callbacks() [IN]
499 typedef void (*libvlc_audio_flush_cb)(void *data, int64_t pts);
502 * Callback prototype for audio buffer drain
503 * (i.e. wait for pending buffers to be played).
504 * \param data data pointer as passed to libvlc_audio_set_callbacks() [IN]
506 typedef void (*libvlc_audio_drain_cb)(void *data);
509 * Callback prototype for audio volume change.
510 * \param data data pointer as passed to libvlc_audio_set_callbacks() [IN]
511 * \param volume software volume (1. = nominal, 0. = mute)
512 * \param mute muted flag
514 typedef void (*libvlc_audio_set_volume_cb)(void *data,
515 float volume, bool mute);
518 * Set callbacks and private data for decoded audio.
519 * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
520 * to configure the decoded audio format.
522 * \param mp the media player
523 * \param play callback to play audio samples (must not be NULL)
524 * \param pause callback to pause playback (or NULL to ignore)
525 * \param resume callback to resume playback (or NULL to ignore)
526 * \param flush callback to flush audio buffers (or NULL to ignore)
527 * \param drain callback to drain audio buffers (or NULL to ignore)
528 * \param opaque private pointer for the audio callbacks (as first parameter)
529 * \version LibVLC 1.2.0 or later
531 LIBVLC_API
532 void libvlc_audio_set_callbacks( libvlc_media_player_t *mp,
533 libvlc_audio_play_cb play,
534 libvlc_audio_pause_cb pause,
535 libvlc_audio_resume_cb resume,
536 libvlc_audio_flush_cb flush,
537 libvlc_audio_drain_cb drain,
538 void *opaque );
541 * Set callbacks and private data for decoded audio.
542 * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
543 * to configure the decoded audio format.
545 * \param mp the media player
546 * \param set_volume callback to apply audio volume,
547 * or NULL to apply volume in software
548 * \version LibVLC 1.2.0 or later
550 LIBVLC_API
551 void libvlc_audio_set_volume_callback( libvlc_media_player_t *mp,
552 libvlc_audio_set_volume_cb set_volume );
555 * Callback prototype to setup the audio playback.
556 * This is called when the media player needs to create a new audio output.
557 * \param opaque pointer to the data pointer passed to
558 * libvlc_audio_set_callbacks() [IN/OUT]
559 * \param format 4 bytes sample format [IN/OUT]
560 * \param rate sample rate [IN/OUT]
561 * \param channels channels count [IN/OUT]
562 * \return 0 on success, anything else to skip audio playback
564 typedef int (*libvlc_audio_setup_cb)(void **data, char *format, unsigned *rate,
565 unsigned *channels);
568 * Callback prototype for audio playback cleanup.
569 * This is called when the media player no longer needs an audio output.
570 * \param opaque data pointer as passed to libvlc_audio_set_callbacks() [IN]
572 typedef void (*libvlc_audio_cleanup_cb)(void *data);
575 * Set decoded audio format. This only works in combination with
576 * libvlc_audio_set_callbacks().
578 * \param mp the media player
579 * \param setup callback to select the audio format (cannot be NULL)
580 * \param cleanup callback to release any allocated resources (or NULL)
581 * \version LibVLC 1.2.0 or later
583 LIBVLC_API
584 void libvlc_audio_set_format_callbacks( libvlc_media_player_t *mp,
585 libvlc_audio_setup_cb setup,
586 libvlc_audio_cleanup_cb cleanup );
589 * Set decoded audio format.
590 * This only works in combination with libvlc_audio_set_callbacks(),
591 * and is mutually exclusive with libvlc_audio_set_format_callbacks().
593 * \param mp the media player
594 * \param format a four-characters string identifying the sample format
595 * (e.g. "S16N" or "FL32")
596 * \param rate sample rate (expressed in Hz)
597 * \param channels channels count
598 * \version LibVLC 1.2.0 or later
600 LIBVLC_API
601 void libvlc_audio_set_format( libvlc_media_player_t *mp, const char *format,
602 unsigned rate, unsigned channels );
604 /** \bug This might go away ... to be replaced by a broader system */
607 * Get the current movie length (in ms).
609 * \param p_mi the Media Player
610 * \return the movie length (in ms), or -1 if there is no media.
612 LIBVLC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *p_mi );
615 * Get the current movie time (in ms).
617 * \param p_mi the Media Player
618 * \return the movie time (in ms), or -1 if there is no media.
620 LIBVLC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *p_mi );
623 * Set the movie time (in ms). This has no effect if no media is being played.
624 * Not all formats and protocols support this.
626 * \param p_mi the Media Player
627 * \param i_time the movie time (in ms).
629 LIBVLC_API void libvlc_media_player_set_time( libvlc_media_player_t *p_mi, libvlc_time_t i_time );
632 * Get movie position.
634 * \param p_mi the Media Player
635 * \return movie position, or -1. in case of error
637 LIBVLC_API float libvlc_media_player_get_position( libvlc_media_player_t *p_mi );
640 * Set movie position. This has no effect if playback is not enabled.
641 * This might not work depending on the underlying input format and protocol.
643 * \param p_mi the Media Player
644 * \param f_pos the position
646 LIBVLC_API void libvlc_media_player_set_position( libvlc_media_player_t *p_mi, float f_pos );
649 * Set movie chapter (if applicable).
651 * \param p_mi the Media Player
652 * \param i_chapter chapter number to play
654 LIBVLC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *p_mi, int i_chapter );
657 * Get movie chapter.
659 * \param p_mi the Media Player
660 * \return chapter number currently playing, or -1 if there is no media.
662 LIBVLC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *p_mi );
665 * Get movie chapter count
667 * \param p_mi the Media Player
668 * \return number of chapters in movie, or -1.
670 LIBVLC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *p_mi );
673 * Is the player able to play
675 * \param p_mi the Media Player
676 * \return boolean
678 * \libvlc_return_bool
680 LIBVLC_API int libvlc_media_player_will_play( libvlc_media_player_t *p_mi );
683 * Get title chapter count
685 * \param p_mi the Media Player
686 * \param i_title title
687 * \return number of chapters in title, or -1
689 LIBVLC_API int libvlc_media_player_get_chapter_count_for_title(
690 libvlc_media_player_t *p_mi, int i_title );
693 * Set movie title
695 * \param p_mi the Media Player
696 * \param i_title title number to play
698 LIBVLC_API void libvlc_media_player_set_title( libvlc_media_player_t *p_mi, int i_title );
701 * Get movie title
703 * \param p_mi the Media Player
704 * \return title number currently playing, or -1
706 LIBVLC_API int libvlc_media_player_get_title( libvlc_media_player_t *p_mi );
709 * Get movie title count
711 * \param p_mi the Media Player
712 * \return title number count, or -1
714 LIBVLC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *p_mi );
717 * Set previous chapter (if applicable)
719 * \param p_mi the Media Player
721 LIBVLC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *p_mi );
724 * Set next chapter (if applicable)
726 * \param p_mi the Media Player
728 LIBVLC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *p_mi );
731 * Get the requested movie play rate.
732 * @warning Depending on the underlying media, the requested rate may be
733 * different from the real playback rate.
735 * \param p_mi the Media Player
736 * \return movie play rate
738 LIBVLC_API float libvlc_media_player_get_rate( libvlc_media_player_t *p_mi );
741 * Set movie play rate
743 * \param p_mi the Media Player
744 * \param rate movie play rate to set
745 * \return -1 if an error was detected, 0 otherwise (but even then, it might
746 * not actually work depending on the underlying media protocol)
748 LIBVLC_API int libvlc_media_player_set_rate( libvlc_media_player_t *p_mi, float rate );
751 * Get current movie state
753 * \param p_mi the Media Player
754 * \return the current state of the media player (playing, paused, ...) \see libvlc_state_t
756 LIBVLC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *p_mi );
759 * Get movie fps rate
761 * \param p_mi the Media Player
762 * \return frames per second (fps) for this playing movie, or 0 if unspecified
764 LIBVLC_API float libvlc_media_player_get_fps( libvlc_media_player_t *p_mi );
766 /** end bug */
769 * How many video outputs does this media player have?
771 * \param p_mi the media player
772 * \return the number of video outputs
774 LIBVLC_API unsigned libvlc_media_player_has_vout( libvlc_media_player_t *p_mi );
777 * Is this media player seekable?
779 * \param p_mi the media player
780 * \return true if the media player can seek
782 * \libvlc_return_bool
784 LIBVLC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi );
787 * Can this media player be paused?
789 * \param p_mi the media player
790 * \return true if the media player can pause
792 * \libvlc_return_bool
794 LIBVLC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi );
798 * Display the next frame (if supported)
800 * \param p_mi the media player
802 LIBVLC_API void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi );
805 * Navigate through DVD Menu
807 * \param p_mi the Media Player
808 * \param navigate the Navigation mode
809 * \version libVLC 1.2.0 or later
811 LIBVLC_API void libvlc_media_player_navigate( libvlc_media_player_t* p_mi,
812 unsigned navigate );
815 * Release (free) libvlc_track_description_t
817 * \param p_track_description the structure to release
819 LIBVLC_API void libvlc_track_description_list_release( libvlc_track_description_t *p_track_description );
822 * \deprecated Use libvlc_track_description_list_release instead
824 LIBVLC_DEPRECATED void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
826 /** \defgroup libvlc_video LibVLC video controls
827 * @{
831 * Toggle fullscreen status on non-embedded video outputs.
833 * @warning The same limitations applies to this function
834 * as to libvlc_set_fullscreen().
836 * \param p_mi the media player
838 LIBVLC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *p_mi );
841 * Enable or disable fullscreen.
843 * @warning With most window managers, only a top-level windows can be in
844 * full-screen mode. Hence, this function will not operate properly if
845 * libvlc_media_player_set_xwindow() was used to embed the video in a
846 * non-top-level window. In that case, the embedding window must be reparented
847 * to the root window <b>before</b> fullscreen mode is enabled. You will want
848 * to reparent it back to its normal parent when disabling fullscreen.
850 * \param p_mi the media player
851 * \param b_fullscreen boolean for fullscreen status
853 LIBVLC_API void libvlc_set_fullscreen( libvlc_media_player_t *p_mi, int b_fullscreen );
856 * Get current fullscreen status.
858 * \param p_mi the media player
859 * \return the fullscreen status (boolean)
861 * \libvlc_return_bool
863 LIBVLC_API int libvlc_get_fullscreen( libvlc_media_player_t *p_mi );
866 * Enable or disable key press events handling, according to the LibVLC hotkeys
867 * configuration. By default and for historical reasons, keyboard events are
868 * handled by the LibVLC video widget.
870 * \note On X11, there can be only one subscriber for key press and mouse
871 * click events per window. If your application has subscribed to those events
872 * for the X window ID of the video widget, then LibVLC will not be able to
873 * handle key presses and mouse clicks in any case.
875 * \warning This function is only implemented for X11 and Win32 at the moment.
877 * \param p_mi the media player
878 * \param on true to handle key press events, false to ignore them.
880 LIBVLC_API
881 void libvlc_video_set_key_input( libvlc_media_player_t *p_mi, unsigned on );
884 * Enable or disable mouse click events handling. By default, those events are
885 * handled. This is needed for DVD menus to work, as well as a few video
886 * filters such as "puzzle".
888 * \see libvlc_video_set_key_input().
890 * \warning This function is only implemented for X11 and Win32 at the moment.
892 * \param p_mi the media player
893 * \param on true to handle mouse click events, false to ignore them.
895 LIBVLC_API
896 void libvlc_video_set_mouse_input( libvlc_media_player_t *p_mi, unsigned on );
899 * Get the pixel dimensions of a video.
901 * \param p_mi media player
902 * \param num number of the video (starting from, and most commonly 0)
903 * \param px pointer to get the pixel width [OUT]
904 * \param py pointer to get the pixel height [OUT]
905 * \return 0 on success, -1 if the specified video does not exist
907 LIBVLC_API
908 int libvlc_video_get_size( libvlc_media_player_t *p_mi, unsigned num,
909 unsigned *px, unsigned *py );
912 * Get current video height.
913 * \deprecated Use libvlc_video_get_size() instead.
915 * \param p_mi the media player
916 * \return the video pixel height or 0 if not applicable
918 LIBVLC_DEPRECATED
919 int libvlc_video_get_height( libvlc_media_player_t *p_mi );
922 * Get current video width.
923 * \deprecated Use libvlc_video_get_size() instead.
925 * \param p_mi the media player
926 * \return the video pixel width or 0 if not applicable
928 LIBVLC_DEPRECATED
929 int libvlc_video_get_width( libvlc_media_player_t *p_mi );
932 * Get the mouse pointer coordinates over a video.
933 * Coordinates are expressed in terms of the decoded video resolution,
934 * <b>not</b> in terms of pixels on the screen/viewport (to get the latter,
935 * you can query your windowing system directly).
937 * Either of the coordinates may be negative or larger than the corresponding
938 * dimension of the video, if the cursor is outside the rendering area.
940 * @warning The coordinates may be out-of-date if the pointer is not located
941 * on the video rendering area. LibVLC does not track the pointer if it is
942 * outside of the video widget.
944 * @note LibVLC does not support multiple pointers (it does of course support
945 * multiple input devices sharing the same pointer) at the moment.
947 * \param p_mi media player
948 * \param num number of the video (starting from, and most commonly 0)
949 * \param px pointer to get the abscissa [OUT]
950 * \param py pointer to get the ordinate [OUT]
951 * \return 0 on success, -1 if the specified video does not exist
953 LIBVLC_API
954 int libvlc_video_get_cursor( libvlc_media_player_t *p_mi, unsigned num,
955 int *px, int *py );
958 * Get the current video scaling factor.
959 * See also libvlc_video_set_scale().
961 * \param p_mi the media player
962 * \return the currently configured zoom factor, or 0. if the video is set
963 * to fit to the output window/drawable automatically.
965 LIBVLC_API float libvlc_video_get_scale( libvlc_media_player_t *p_mi );
968 * Set the video scaling factor. That is the ratio of the number of pixels on
969 * screen to the number of pixels in the original decoded video in each
970 * dimension. Zero is a special value; it will adjust the video to the output
971 * window/drawable (in windowed mode) or the entire screen.
973 * Note that not all video outputs support scaling.
975 * \param p_mi the media player
976 * \param f_factor the scaling factor, or zero
978 LIBVLC_API void libvlc_video_set_scale( libvlc_media_player_t *p_mi, float f_factor );
981 * Get current video aspect ratio.
983 * \param p_mi the media player
984 * \return the video aspect ratio or NULL if unspecified
985 * (the result must be released with free() or libvlc_free()).
987 LIBVLC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *p_mi );
990 * Set new video aspect ratio.
992 * \param p_mi the media player
993 * \param psz_aspect new video aspect-ratio or NULL to reset to default
994 * \note Invalid aspect ratios are ignored.
996 LIBVLC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *p_mi, const char *psz_aspect );
999 * Get current video subtitle.
1001 * \param p_mi the media player
1002 * \return the video subtitle selected, or -1 if none
1004 LIBVLC_API int libvlc_video_get_spu( libvlc_media_player_t *p_mi );
1007 * Get the number of available video subtitles.
1009 * \param p_mi the media player
1010 * \return the number of available video subtitles
1012 LIBVLC_API int libvlc_video_get_spu_count( libvlc_media_player_t *p_mi );
1015 * Get the description of available video subtitles.
1017 * \param p_mi the media player
1018 * \return list containing description of available video subtitles
1020 LIBVLC_API libvlc_track_description_t *
1021 libvlc_video_get_spu_description( libvlc_media_player_t *p_mi );
1024 * Set new video subtitle.
1026 * \param p_mi the media player
1027 * \param i_spu new video subtitle to select
1028 * \return 0 on success, -1 if out of range
1030 LIBVLC_API int libvlc_video_set_spu( libvlc_media_player_t *p_mi, unsigned i_spu );
1033 * Set new video subtitle file.
1035 * \param p_mi the media player
1036 * \param psz_subtitle new video subtitle file
1037 * \return the success status (boolean)
1039 LIBVLC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *p_mi, const char *psz_subtitle );
1042 * Get the description of available titles.
1044 * \param p_mi the media player
1045 * \return list containing description of available titles
1047 LIBVLC_API libvlc_track_description_t *
1048 libvlc_video_get_title_description( libvlc_media_player_t *p_mi );
1051 * Get the description of available chapters for specific title.
1053 * \param p_mi the media player
1054 * \param i_title selected title
1055 * \return list containing description of available chapter for title i_title
1057 LIBVLC_API libvlc_track_description_t *
1058 libvlc_video_get_chapter_description( libvlc_media_player_t *p_mi, int i_title );
1061 * Get current crop filter geometry.
1063 * \param p_mi the media player
1064 * \return the crop filter geometry or NULL if unset
1066 LIBVLC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *p_mi );
1069 * Set new crop filter geometry.
1071 * \param p_mi the media player
1072 * \param psz_geometry new crop filter geometry (NULL to unset)
1074 LIBVLC_API
1075 void libvlc_video_set_crop_geometry( libvlc_media_player_t *p_mi, const char *psz_geometry );
1078 * Get current teletext page requested.
1080 * \param p_mi the media player
1081 * \return the current teletext page requested.
1083 LIBVLC_API int libvlc_video_get_teletext( libvlc_media_player_t *p_mi );
1086 * Set new teletext page to retrieve.
1088 * \param p_mi the media player
1089 * \param i_page teletex page number requested
1091 LIBVLC_API void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page );
1094 * Toggle teletext transparent status on video output.
1096 * \param p_mi the media player
1098 LIBVLC_API void libvlc_toggle_teletext( libvlc_media_player_t *p_mi );
1101 * Get number of available video tracks.
1103 * \param p_mi media player
1104 * \return the number of available video tracks (int)
1106 LIBVLC_API int libvlc_video_get_track_count( libvlc_media_player_t *p_mi );
1109 * Get the description of available video tracks.
1111 * \param p_mi media player
1112 * \return list with description of available video tracks, or NULL on error
1114 LIBVLC_API libvlc_track_description_t *
1115 libvlc_video_get_track_description( libvlc_media_player_t *p_mi );
1118 * Get current video track.
1120 * \param p_mi media player
1121 * \return the video track (int) or -1 if none
1123 LIBVLC_API int libvlc_video_get_track( libvlc_media_player_t *p_mi );
1126 * Set video track.
1128 * \param p_mi media player
1129 * \param i_track the track (int)
1130 * \return 0 on success, -1 if out of range
1132 LIBVLC_API
1133 int libvlc_video_set_track( libvlc_media_player_t *p_mi, int i_track );
1136 * Take a snapshot of the current video window.
1138 * If i_width AND i_height is 0, original size is used.
1139 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
1141 * \param p_mi media player instance
1142 * \param num number of video output (typically 0 for the first/only one)
1143 * \param psz_filepath the path where to save the screenshot to
1144 * \param i_width the snapshot's width
1145 * \param i_height the snapshot's height
1146 * \return 0 on success, -1 if the video was not found
1148 LIBVLC_API
1149 int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,
1150 const char *psz_filepath, unsigned int i_width,
1151 unsigned int i_height );
1154 * Enable or disable deinterlace filter
1156 * \param p_mi libvlc media player
1157 * \param psz_mode type of deinterlace filter, NULL to disable
1159 LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
1160 const char *psz_mode );
1163 * Get an integer marquee option value
1165 * \param p_mi libvlc media player
1166 * \param option marq option to get \see libvlc_video_marquee_int_option_t
1168 LIBVLC_API int libvlc_video_get_marquee_int( libvlc_media_player_t *p_mi,
1169 unsigned option );
1172 * Get a string marquee option value
1174 * \param p_mi libvlc media player
1175 * \param option marq option to get \see libvlc_video_marquee_string_option_t
1177 LIBVLC_API char *libvlc_video_get_marquee_string( libvlc_media_player_t *p_mi,
1178 unsigned option );
1181 * Enable, disable or set an integer marquee option
1183 * Setting libvlc_marquee_Enable has the side effect of enabling (arg !0)
1184 * or disabling (arg 0) the marq filter.
1186 * \param p_mi libvlc media player
1187 * \param option marq option to set \see libvlc_video_marquee_int_option_t
1188 * \param i_val marq option value
1190 LIBVLC_API void libvlc_video_set_marquee_int( libvlc_media_player_t *p_mi,
1191 unsigned option, int i_val );
1194 * Set a marquee string option
1196 * \param p_mi libvlc media player
1197 * \param option marq option to set \see libvlc_video_marquee_string_option_t
1198 * \param psz_text marq option value
1200 LIBVLC_API void libvlc_video_set_marquee_string( libvlc_media_player_t *p_mi,
1201 unsigned option, const char *psz_text );
1203 /** option values for libvlc_video_{get,set}_logo_{int,string} */
1204 enum libvlc_video_logo_option_t {
1205 libvlc_logo_enable,
1206 libvlc_logo_file, /**< string argument, "file,d,t;file,d,t;..." */
1207 libvlc_logo_x,
1208 libvlc_logo_y,
1209 libvlc_logo_delay,
1210 libvlc_logo_repeat,
1211 libvlc_logo_opacity,
1212 libvlc_logo_position
1216 * Get integer logo option.
1218 * \param p_mi libvlc media player instance
1219 * \param option logo option to get, values of libvlc_video_logo_option_t
1221 LIBVLC_API int libvlc_video_get_logo_int( libvlc_media_player_t *p_mi,
1222 unsigned option );
1225 * Set logo option as integer. Options that take a different type value
1226 * are ignored.
1227 * Passing libvlc_logo_enable as option value has the side effect of
1228 * starting (arg !0) or stopping (arg 0) the logo filter.
1230 * \param p_mi libvlc media player instance
1231 * \param option logo option to set, values of libvlc_video_logo_option_t
1232 * \param value logo option value
1234 LIBVLC_API void libvlc_video_set_logo_int( libvlc_media_player_t *p_mi,
1235 unsigned option, int value );
1238 * Set logo option as string. Options that take a different type value
1239 * are ignored.
1241 * \param p_mi libvlc media player instance
1242 * \param option logo option to set, values of libvlc_video_logo_option_t
1243 * \param psz_value logo option value
1245 LIBVLC_API void libvlc_video_set_logo_string( libvlc_media_player_t *p_mi,
1246 unsigned option, const char *psz_value );
1249 /** option values for libvlc_video_{get,set}_adjust_{int,float,bool} */
1250 enum libvlc_video_adjust_option_t {
1251 libvlc_adjust_Enable = 0,
1252 libvlc_adjust_Contrast,
1253 libvlc_adjust_Brightness,
1254 libvlc_adjust_Hue,
1255 libvlc_adjust_Saturation,
1256 libvlc_adjust_Gamma
1260 * Get integer adjust option.
1262 * \param p_mi libvlc media player instance
1263 * \param option adjust option to get, values of libvlc_video_adjust_option_t
1264 * \version LibVLC 1.1.1 and later.
1266 LIBVLC_API int libvlc_video_get_adjust_int( libvlc_media_player_t *p_mi,
1267 unsigned option );
1270 * Set adjust option as integer. Options that take a different type value
1271 * are ignored.
1272 * Passing libvlc_adjust_enable as option value has the side effect of
1273 * starting (arg !0) or stopping (arg 0) the adjust filter.
1275 * \param p_mi libvlc media player instance
1276 * \param option adust option to set, values of libvlc_video_adjust_option_t
1277 * \param value adjust option value
1278 * \version LibVLC 1.1.1 and later.
1280 LIBVLC_API void libvlc_video_set_adjust_int( libvlc_media_player_t *p_mi,
1281 unsigned option, int value );
1284 * Get float adjust option.
1286 * \param p_mi libvlc media player instance
1287 * \param option adjust option to get, values of libvlc_video_adjust_option_t
1288 * \version LibVLC 1.1.1 and later.
1290 LIBVLC_API float libvlc_video_get_adjust_float( libvlc_media_player_t *p_mi,
1291 unsigned option );
1294 * Set adjust option as float. Options that take a different type value
1295 * are ignored.
1297 * \param p_mi libvlc media player instance
1298 * \param option adust option to set, values of libvlc_video_adjust_option_t
1299 * \param value adjust option value
1300 * \version LibVLC 1.1.1 and later.
1302 LIBVLC_API void libvlc_video_set_adjust_float( libvlc_media_player_t *p_mi,
1303 unsigned option, float value );
1305 /** @} video */
1307 /** \defgroup libvlc_audio LibVLC audio controls
1308 * @{
1312 * Audio device types
1314 typedef enum libvlc_audio_output_device_types_t {
1315 libvlc_AudioOutputDevice_Error = -1,
1316 libvlc_AudioOutputDevice_Mono = 1,
1317 libvlc_AudioOutputDevice_Stereo = 2,
1318 libvlc_AudioOutputDevice_2F2R = 4,
1319 libvlc_AudioOutputDevice_3F2R = 5,
1320 libvlc_AudioOutputDevice_5_1 = 6,
1321 libvlc_AudioOutputDevice_6_1 = 7,
1322 libvlc_AudioOutputDevice_7_1 = 8,
1323 libvlc_AudioOutputDevice_SPDIF = 10
1324 } libvlc_audio_output_device_types_t;
1327 * Audio channels
1329 typedef enum libvlc_audio_output_channel_t {
1330 libvlc_AudioChannel_Error = -1,
1331 libvlc_AudioChannel_Stereo = 1,
1332 libvlc_AudioChannel_RStereo = 2,
1333 libvlc_AudioChannel_Left = 3,
1334 libvlc_AudioChannel_Right = 4,
1335 libvlc_AudioChannel_Dolbys = 5
1336 } libvlc_audio_output_channel_t;
1340 * Get the list of available audio outputs
1342 * \param p_instance libvlc instance
1343 * \return list of available audio outputs. It must be freed it with
1344 * \see libvlc_audio_output_list_release \see libvlc_audio_output_t .
1345 * In case of error, NULL is returned.
1347 LIBVLC_API libvlc_audio_output_t *
1348 libvlc_audio_output_list_get( libvlc_instance_t *p_instance );
1351 * Free the list of available audio outputs
1353 * \param p_list list with audio outputs for release
1355 LIBVLC_API void libvlc_audio_output_list_release( libvlc_audio_output_t *p_list );
1358 * Set the audio output.
1359 * Change will be applied after stop and play.
1361 * \param p_mi media player
1362 * \param psz_name name of audio output,
1363 * use psz_name of \see libvlc_audio_output_t
1364 * \return 0 if function succeded, -1 on error
1366 LIBVLC_API int libvlc_audio_output_set( libvlc_media_player_t *p_mi,
1367 const char *psz_name );
1370 * Get count of devices for audio output, these devices are hardware oriented
1371 * like analor or digital output of sound card
1373 * \param p_instance libvlc instance
1374 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1375 * \return number of devices
1377 LIBVLC_API int libvlc_audio_output_device_count( libvlc_instance_t *p_instance,
1378 const char *psz_audio_output );
1381 * Get long name of device, if not available short name given
1383 * \param p_instance libvlc instance
1384 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1385 * \param i_device device index
1386 * \return long name of device
1388 LIBVLC_API char * libvlc_audio_output_device_longname( libvlc_instance_t *p_instance,
1389 const char *psz_audio_output,
1390 int i_device );
1393 * Get id name of device
1395 * \param p_instance libvlc instance
1396 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1397 * \param i_device device index
1398 * \return id name of device, use for setting device, need to be free after use
1400 LIBVLC_API char * libvlc_audio_output_device_id( libvlc_instance_t *p_instance,
1401 const char *psz_audio_output,
1402 int i_device );
1405 * Set audio output device. Changes are only effective after stop and play.
1407 * \param p_mi media player
1408 * \param psz_audio_output - name of audio output, \see libvlc_audio_output_t
1409 * \param psz_device_id device
1411 LIBVLC_API void libvlc_audio_output_device_set( libvlc_media_player_t *p_mi,
1412 const char *psz_audio_output,
1413 const char *psz_device_id );
1416 * Get current audio device type. Device type describes something like
1417 * character of output sound - stereo sound, 2.1, 5.1 etc
1419 * \param p_mi media player
1420 * \return the audio devices type \see libvlc_audio_output_device_types_t
1422 LIBVLC_API int libvlc_audio_output_get_device_type( libvlc_media_player_t *p_mi );
1425 * Set current audio device type.
1427 * \param p_mi vlc instance
1428 * \param device_type the audio device type,
1429 according to \see libvlc_audio_output_device_types_t
1431 LIBVLC_API void libvlc_audio_output_set_device_type( libvlc_media_player_t *p_mi,
1432 int device_type );
1436 * Toggle mute status.
1438 * \param p_mi media player
1440 LIBVLC_API void libvlc_audio_toggle_mute( libvlc_media_player_t *p_mi );
1443 * Get current mute status.
1445 * \param p_mi media player
1446 * \return the mute status (boolean)
1448 * \libvlc_return_bool
1450 LIBVLC_API int libvlc_audio_get_mute( libvlc_media_player_t *p_mi );
1453 * Set mute status.
1455 * \param p_mi media player
1456 * \param status If status is true then mute, otherwise unmute
1458 LIBVLC_API void libvlc_audio_set_mute( libvlc_media_player_t *p_mi, int status );
1461 * Get current software audio volume.
1463 * \param p_mi media player
1464 * \return the software volume in percents
1465 * (0 = mute, 100 = nominal / 0dB)
1467 LIBVLC_API int libvlc_audio_get_volume( libvlc_media_player_t *p_mi );
1470 * Set current software audio volume.
1472 * \param p_mi media player
1473 * \param i_volume the volume in percents (0 = mute, 100 = 0dB)
1474 * \return 0 if the volume was set, -1 if it was out of range
1476 LIBVLC_API int libvlc_audio_set_volume( libvlc_media_player_t *p_mi, int i_volume );
1479 * Get number of available audio tracks.
1481 * \param p_mi media player
1482 * \return the number of available audio tracks (int), or -1 if unavailable
1484 LIBVLC_API int libvlc_audio_get_track_count( libvlc_media_player_t *p_mi );
1487 * Get the description of available audio tracks.
1489 * \param p_mi media player
1490 * \return list with description of available audio tracks, or NULL
1492 LIBVLC_API libvlc_track_description_t *
1493 libvlc_audio_get_track_description( libvlc_media_player_t *p_mi );
1496 * Get current audio track.
1498 * \param p_mi media player
1499 * \return the audio track (int), or -1 if none.
1501 LIBVLC_API int libvlc_audio_get_track( libvlc_media_player_t *p_mi );
1504 * Set current audio track.
1506 * \param p_mi media player
1507 * \param i_track the track (int)
1508 * \return 0 on success, -1 on error
1510 LIBVLC_API int libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track );
1513 * Get current audio channel.
1515 * \param p_mi media player
1516 * \return the audio channel \see libvlc_audio_output_channel_t
1518 LIBVLC_API int libvlc_audio_get_channel( libvlc_media_player_t *p_mi );
1521 * Set current audio channel.
1523 * \param p_mi media player
1524 * \param channel the audio channel, \see libvlc_audio_output_channel_t
1525 * \return 0 on success, -1 on error
1527 LIBVLC_API int libvlc_audio_set_channel( libvlc_media_player_t *p_mi, int channel );
1530 * Get current audio delay.
1532 * \param p_mi media player
1533 * \return the audio delay (microseconds)
1534 * \version LibVLC 1.1.1 or later
1536 LIBVLC_API int64_t libvlc_audio_get_delay( libvlc_media_player_t *p_mi );
1539 * Set current audio delay. The audio delay will be reset to zero each time the media changes.
1541 * \param p_mi media player
1542 * \param i_delay the audio delay (microseconds)
1543 * \return 0 on success, -1 on error
1544 * \version LibVLC 1.1.1 or later
1546 LIBVLC_API int libvlc_audio_set_delay( libvlc_media_player_t *p_mi, int64_t i_delay );
1548 /** @} audio */
1550 /** @} media_player */
1552 # ifdef __cplusplus
1554 # endif
1556 #endif /* VLC_LIBVLC_MEDIA_PLAYER_H */