VLC 4.0.0-dev
libvlc_media_player.h
Go to the documentation of this file.
1/*****************************************************************************
2 * libvlc_media_player.h: libvlc_media_player external API
3 *****************************************************************************
4 * Copyright (C) 1998-2015 VLC authors and VideoLAN
5 *
6 * Authors: Clément Stenac <zorglub@videolan.org>
7 * Jean-Paul Saman <jpsaman@videolan.org>
8 * Pierre d'Herbemont <pdherbemont@videolan.org>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
24
25#ifndef VLC_LIBVLC_MEDIA_PLAYER_H
26#define VLC_LIBVLC_MEDIA_PLAYER_H 1
27
28# ifdef __cplusplus
29extern "C" {
30# else
31# include <stdbool.h>
32# endif
33
34/** \defgroup libvlc_media_player LibVLC media player
35 * \ingroup libvlc
36 * A LibVLC media player plays one media (usually in a custom drawable).
37 * @{
38 * \file
39 * LibVLC simple media player external API
40 */
41
43
44/**
45 * Description for titles
46 */
47enum
48{
51};
52
54{
55 int64_t i_duration; /**< duration in milliseconds */
56 char *psz_name; /**< title name */
57 unsigned i_flags; /**< info if item was recognized as a menu, interactive or plain content by the demuxer */
59
60/**
61 * Description for chapters
62 */
64{
65 int64_t i_time_offset; /**< time-offset of the chapter in milliseconds */
66 int64_t i_duration; /**< duration of the chapter in milliseconds */
67 char *psz_name; /**< chapter name */
69
70/**
71 * Description for audio output. It contains
72 * name, description and pointer to next record.
73 */
75{
76 char *psz_name;
79
81
82/**
83 * Description for audio output device.
84 */
86{
87 struct libvlc_audio_output_device_t *p_next; /**< Next entry in list */
88 char *psz_device; /**< Device identifier string */
89 char *psz_description; /**< User-friendly device description */
90 /* More fields may be added here in later versions */
92
93/**
94 * Marq options definition
95 */
98 libvlc_marquee_Text, /** string argument */
108
109/**
110 * Navigation mode
111 */
113{
121
122/**
123 * Enumeration of values used to set position (e.g. of video title).
124 */
125typedef enum libvlc_position_t {
137
138/**
139 * Enumeration of teletext keys than can be passed via
140 * libvlc_video_set_teletext()
141 */
149
150/**
151 * Opaque equalizer handle.
152 *
153 * Equalizer settings can be applied to a media player.
154 */
156
157/**
158 * Create an empty Media Player object
159 *
160 * \param p_libvlc_instance the libvlc instance in which the Media Player
161 * should be created.
162 * \return a new media player object, or NULL on error.
163 * It must be released by libvlc_media_player_release().
164 */
166
167/**
168 * Create a Media Player object from a Media
169 *
170 * \param inst LibVLC instance to create a media player with
171 * \param p_md the media. Afterwards the p_md can be safely
172 * destroyed.
173 * \return a new media player object, or NULL on error.
174 * It must be released by libvlc_media_player_release().
175 */
177
178/**
179 * Release a media_player after use
180 * Decrement the reference count of a media player object. If the
181 * reference count is 0, then libvlc_media_player_release() will
182 * release the media player object. If the media player object
183 * has been released, then it should not be used again.
184 *
185 * \param p_mi the Media Player to free
186 */
188
189/**
190 * Retain a reference to a media player object. Use
191 * libvlc_media_player_release() to decrement reference count.
192 *
193 * \param p_mi media player object
194 * \return the same object
195 */
197
198/**
199 * Set the media that will be used by the media_player. If any,
200 * previous md will be released.
201 *
202 * \note The user should listen to the libvlc_MediaPlayerMediaChanged event, to
203 * know when the new media is actually used by the player (or to known that the
204 * older media is no longer used).
205 *
206 * \param p_mi the Media Player
207 * \param p_md the Media. Afterwards the p_md can be safely
208 * destroyed.
209 */
211 libvlc_media_t *p_md );
212
213/**
214 * Get the media used by the media_player.
215 *
216 * \warning Calling this function just after libvlc_media_player_set_media()
217 * will return the media that was just set, but this media might not be
218 * currently used internally by the player. To detect such case, the user
219 * should listen to the libvlc_MediaPlayerMediaChanged event.
220 *
221 * \param p_mi the Media Player
222 * \return the media associated with p_mi, or NULL if no
223 * media is associated
224 */
226
227/**
228 * Get the Event Manager from which the media player send event.
229 *
230 * \param p_mi the Media Player
231 * \return the event manager associated with p_mi
232 */
234
235/**
236 * is_playing
237 *
238 * \param p_mi the Media Player
239 * \retval true media player is playing
240 * \retval false media player is not playing
241 */
243
244/**
245 * Play
246 *
247 * \param p_mi the Media Player
248 * \return 0 if playback started (and was already started), or -1 on error.
249 */
251
252/**
253 * Pause or resume (no effect if there is no media)
254 *
255 * \param mp the Media Player
256 * \param do_pause play/resume if zero, pause if non-zero
257 * \version LibVLC 1.1.1 or later
258 */
260 int do_pause );
261
262/**
263 * Toggle pause (no effect if there is no media)
264 *
265 * \param p_mi the Media Player
266 */
268
269/**
270 * Stop asynchronously
271 *
272 * \note This function is asynchronous. In case of success, the user should
273 * wait for the libvlc_MediaPlayerStopped event to know when the stop is
274 * finished.
275 *
276 * \param p_mi the Media Player
277 * \return 0 if the player is being stopped, -1 otherwise (no-op)
278 * \version LibVLC 4.0.0 or later
279 */
281
282/**
283 * Set a renderer to the media player
284 *
285 * \note must be called before the first call of libvlc_media_player_play() to
286 * take effect.
287 *
288 * \see libvlc_renderer_discoverer_new
289 *
290 * \param p_mi the Media Player
291 * \param p_item an item discovered by libvlc_renderer_discoverer_start()
292 * \return 0 on success, -1 on error.
293 * \version LibVLC 3.0.0 or later
294 */
296 libvlc_renderer_item_t *p_item );
297
298/**
299 * Enumeration of the Video color primaries.
300 */
309
310/**
311 * Enumeration of the Video color spaces.
312 */
318
319/**
320 * Enumeration of the Video transfer functions.
321 */
332
333
334/**
335 * Callback prototype to allocate and lock a picture buffer.
336 *
337 * Whenever a new video frame needs to be decoded, the lock callback is
338 * invoked. Depending on the video chroma, one or three pixel planes of
339 * adequate dimensions must be returned via the second parameter. Those
340 * planes must be aligned on 32-bytes boundaries.
341 *
342 * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
343 * \param[out] planes start address of the pixel planes (LibVLC allocates the array
344 * of void pointers, this callback must initialize the array)
345 * \return a private pointer for the display and unlock callbacks to identify
346 * the picture buffers
347 */
348typedef void *(*libvlc_video_lock_cb)(void *opaque, void **planes);
349
350/**
351 * Callback prototype to unlock a picture buffer.
352 *
353 * When the video frame decoding is complete, the unlock callback is invoked.
354 * This callback might not be needed at all. It is only an indication that the
355 * application can now read the pixel values if it needs to.
356 *
357 * \note A picture buffer is unlocked after the picture is decoded,
358 * but before the picture is displayed.
359 *
360 * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
361 * \param[in] picture private pointer returned from the @ref libvlc_video_lock_cb
362 * callback
363 * \param[in] planes pixel planes as defined by the @ref libvlc_video_lock_cb
364 * callback (this parameter is only for convenience)
365 */
366typedef void (*libvlc_video_unlock_cb)(void *opaque, void *picture,
367 void *const *planes);
368
369/**
370 * Callback prototype to display a picture.
371 *
372 * When the video frame needs to be shown, as determined by the media playback
373 * clock, the display callback is invoked.
374 *
375 * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
376 * \param[in] picture private pointer returned from the @ref libvlc_video_lock_cb
377 * callback
378 */
379typedef void (*libvlc_video_display_cb)(void *opaque, void *picture);
380
381/**
382 * Callback prototype to configure picture buffers format.
383 * This callback gets the format of the video as output by the video decoder
384 * and the chain of video filters (if any). It can opt to change any parameter
385 * as it needs. In that case, LibVLC will attempt to convert the video format
386 * (rescaling and chroma conversion) but these operations can be CPU intensive.
387 *
388 * \param[in,out] opaque pointer to the private pointer passed to
389 * libvlc_video_set_callbacks()
390 * \param[in,out] chroma pointer to the 4 bytes video format identifier
391 * \param[in,out] width pointer to the buffer width in pixels
392 * \param[in,out] height pointer to the buffer height in pixels
393 * \param[out] pitches table of scanline pitches in bytes for each pixel plane
394 * (the table is allocated by LibVLC)
395 * \param[out] lines table of scanlines count for each plane
396 * \return the number of picture buffers allocated, 0 indicates failure
397 *
398 * \version LibVLC 4.0.0 and later.
399 * \param[in] (width+1) - pointer to display width in pixels
400 * \param[in] (height+1) - pointer to display height in pixels
401 *
402 * \note
403 * For each pixels plane, the scanline pitch must be bigger than or equal to
404 * the number of bytes per pixel multiplied by the pixel width.
405 * Similarly, the number of scanlines must be bigger than of equal to
406 * the pixel height.
407 * Furthermore, we recommend that pitches and lines be multiple of 32
408 * to not break assumptions that might be held by optimized code
409 * in the video decoders, video filters and/or video converters.
410 */
411typedef unsigned (*libvlc_video_format_cb)(void **opaque, char *chroma,
412 unsigned *width, unsigned *height,
413 unsigned *pitches,
414 unsigned *lines);
415
416/**
417 * Callback prototype to configure picture buffers format.
418 *
419 * \param[in] opaque private pointer as passed to libvlc_video_set_format_callbacks()
420 * (and possibly modified by @ref libvlc_video_format_cb)
421 */
422typedef void (*libvlc_video_cleanup_cb)(void *opaque);
423
424
425/**
426 * Set callbacks and private data to render decoded video to a custom area
427 * in memory.
428 * Use libvlc_video_set_format() or libvlc_video_set_format_callbacks()
429 * to configure the decoded format.
430 *
431 * \warning Rendering video into custom memory buffers is considerably less
432 * efficient than rendering in a custom window as normal.
433 *
434 * For optimal perfomances, VLC media player renders into a custom window, and
435 * does not use this function and associated callbacks. It is <b>highly
436 * recommended</b> that other LibVLC-based application do likewise.
437 * To embed video in a window, use libvlc_media_player_set_xwindow() or
438 * equivalent depending on the operating system.
439 *
440 * If window embedding does not fit the application use case, then a custom
441 * LibVLC video output display plugin is required to maintain optimal video
442 * rendering performances.
443 *
444 * The following limitations affect performance:
445 * - Hardware video decoding acceleration will either be disabled completely,
446 * or require (relatively slow) copy from video/DSP memory to main memory.
447 * - Sub-pictures (subtitles, on-screen display, etc.) must be blent into the
448 * main picture by the CPU instead of the GPU.
449 * - Depending on the video format, pixel format conversion, picture scaling,
450 * cropping and/or picture re-orientation, must be performed by the CPU
451 * instead of the GPU.
452 * - Memory copying is required between LibVLC reference picture buffers and
453 * application buffers (between lock and unlock callbacks).
454 *
455 * \param mp the media player
456 * \param lock callback to lock video memory (must not be NULL)
457 * \param unlock callback to unlock video memory (or NULL if not needed)
458 * \param display callback to display video (or NULL if not needed)
459 * \param opaque private pointer for the three callbacks (as first parameter)
460 * \version LibVLC 1.1.1 or later
461 */
467 void *opaque );
468
469/**
470 * Set decoded video chroma and dimensions.
471 * This only works in combination with libvlc_video_set_callbacks(),
472 * and is mutually exclusive with libvlc_video_set_format_callbacks().
473 *
474 * \param mp the media player
475 * \param chroma a four-characters string identifying the chroma
476 * (e.g. "RV32" or "YUYV")
477 * \param width pixel width
478 * \param height pixel height
479 * \param pitch line pitch (in bytes)
480 * \version LibVLC 1.1.1 or later
481 * \bug All pixel planes are expected to have the same pitch.
482 * To use the YCbCr color space with chrominance subsampling,
483 * consider using libvlc_video_set_format_callbacks() instead.
484 */
486void libvlc_video_set_format( libvlc_media_player_t *mp, const char *chroma,
487 unsigned width, unsigned height,
488 unsigned pitch );
489
490/**
491 * Set decoded video chroma and dimensions. This only works in combination with
492 * libvlc_video_set_callbacks().
493 *
494 * \param mp the media player
495 * \param setup callback to select the video format (cannot be NULL)
496 * \param cleanup callback to release any allocated resources (or NULL)
497 * \version LibVLC 2.0.0 or later
498 */
502 libvlc_video_cleanup_cb cleanup );
503
504
506{
507 bool hardware_decoding; /** set if D3D11_CREATE_DEVICE_VIDEO_SUPPORT is needed for D3D11 */
509
511{
512 union {
513 struct {
514 void *device_context; /** ID3D11DeviceContext* */
515 void *context_mutex; /** Windows Mutex HANDLE to protect ID3D11DeviceContext usage */
517 struct {
518 void *device; /** IDirect3D9* */
519 int adapter; /** Adapter to use with the IDirect3D9* */
521 };
523
524/**
525 * Callback prototype called to initialize user data.
526 * Setup the rendering environment.
527 *
528 * \param[in,out] opaque private pointer passed to the @a libvlc_video_set_output_callbacks()
529 * on input. The callback can change this value on output to be
530 * passed to all the other callbacks set on @a libvlc_video_set_output_callbacks().
531 * \param[in] cfg requested configuration of the video device
532 * \param[out] out libvlc_video_setup_device_info_t* to fill
533 * \return true on success
534 * \version LibVLC 4.0.0 or later
535 *
536 * For \ref libvlc_video_engine_d3d9 the output must be a IDirect3D9*.
537 * A reference to this object is held until the \ref libvlc_video_output_cleanup_cb is called.
538 * the device must be created with D3DPRESENT_PARAMETERS.hDeviceWindow set to 0.
539 *
540 * For \ref libvlc_video_engine_d3d11 the output must be a ID3D11DeviceContext*.
541 * A reference to this object is held until the \ref libvlc_video_output_cleanup_cb is called.
542 * The ID3D11Device used to create ID3D11DeviceContext must have multithreading enabled.
543 *
544 * If the ID3D11DeviceContext is used outside of the callbacks called by libvlc, the host
545 * MUST use a mutex to protect the access to the ID3D11DeviceContext of libvlc. This mutex
546 * value is set on d3d11.context_mutex. If the ID3D11DeviceContext is not used outside of
547 * the callbacks, the mutex d3d11.context_mutex may be NULL.
548 */
549typedef bool (*libvlc_video_output_setup_cb)(void **opaque,
552
553
554/**
555 * Callback prototype called to release user data
556 *
557 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
558 * \version LibVLC 4.0.0 or later
559 */
560typedef void (*libvlc_video_output_cleanup_cb)(void* opaque);
561
563{
564 /** rendering video width in pixel */
565 unsigned width;
566 /** rendering video height in pixel */
567 unsigned height;
568 /** rendering video bit depth in bits per channel */
569 unsigned bitdepth;
570 /** video is full range or studio/limited range */
572 /** video color space */
574 /** video color primaries */
576 /** video transfer function */
578 /** device used for rendering, IDirect3DDevice9* for D3D9 */
579 void *device;
581
583{
584 union {
585 /** The rendering DXGI_FORMAT for \ref libvlc_video_engine_d3d11. */
587 /** The rendering D3DFORMAT for \ref libvlc_video_engine_d3d9. */
588 uint32_t d3d9_format;
589 /** The rendering GLint GL_RGBA or GL_RGB for
590 * \ref libvlc_video_engine_opengl and for
591 * \ref libvlc_video_engine_gles2. */
593 /** currently unused */
595 };
596 /** Video is full range or studio/limited range. */
598 /** video color space */
600 /** video color primaries */
602 /** video transfer function */
604 /** video surface orientation */
607
608/**
609 * Callback prototype called on video size changes.
610 * Update the rendering output setup.
611 *
612 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
613 * \param[in] cfg configuration of the video that will be rendered
614 * \param[out] output configuration describing with how the rendering is setup
615 * \version LibVLC 4.0.0 or later
616 *
617 * \note the configuration device for Direct3D9 is the IDirect3DDevice9 that VLC
618 * uses to render. The host must set a Render target and call Present()
619 * when it needs the drawing from VLC to be done. This object is not valid
620 * anymore after Cleanup is called.
621 *
622 * Tone mapping, range and color conversion will be done depending on the values
623 * set in the output structure.
624 */
625typedef bool (*libvlc_video_update_output_cb)(void* opaque, const libvlc_video_render_cfg_t *cfg,
627
628
629/**
630 * Callback prototype called after performing drawing calls.
631 *
632 * This callback is called outside of libvlc_video_makeCurrent_cb current/not-current
633 * calls.
634 *
635 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
636 * \version LibVLC 4.0.0 or later
637 */
638typedef void (*libvlc_video_swap_cb)(void* opaque);
639
640/**
641 * Callback prototype to set up the OpenGL context for rendering.
642 * Tell the host the rendering is about to start/has finished.
643 *
644 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
645 * \param[in] enter true to set the context as current, false to unset it
646 * \return true on success
647 * \version LibVLC 4.0.0 or later
648 *
649 * On Direct3D11 the following may change on the provided ID3D11DeviceContext*
650 * between \p enter being true and \p enter being false:
651 * - IASetPrimitiveTopology()
652 * - IASetInputLayout()
653 * - IASetVertexBuffers()
654 * - IASetIndexBuffer()
655 * - VSSetConstantBuffers()
656 * - VSSetShader()
657 * - PSSetSamplers()
658 * - PSSetConstantBuffers()
659 * - PSSetShaderResources()
660 * - PSSetShader()
661 * - RSSetViewports()
662 * - DrawIndexed()
663 */
664typedef bool (*libvlc_video_makeCurrent_cb)(void* opaque, bool enter);
665
666/**
667 * Callback prototype to load opengl functions
668 *
669 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
670 * \param fct_name name of the opengl function to load
671 * \return a pointer to the named OpenGL function the NULL otherwise
672 * \version LibVLC 4.0.0 or later
673 */
674typedef void* (*libvlc_video_getProcAddress_cb)(void* opaque, const char* fct_name);
675
677{
678 /* similar to SMPTE ST 2086 mastering display color volume */
679 uint16_t RedPrimary[2];
680 uint16_t GreenPrimary[2];
681 uint16_t BluePrimary[2];
682 uint16_t WhitePoint[2];
688
690 libvlc_video_metadata_frame_hdr10, /**< libvlc_video_frame_hdr10_metadata_t */
692
693/**
694 * Callback prototype to receive metadata before rendering.
695 *
696 * \param[in] opaque private pointer passed to the @a libvlc_video_set_output_callbacks()
697 * \param[in] type type of data passed in metadata
698 * \param[in] metadata the type of metadata
699 * \version LibVLC 4.0.0 or later
700 */
701typedef void (*libvlc_video_frameMetadata_cb)(void* opaque, libvlc_video_metadata_type_t type, const void *metadata);
702
703/**
704 * Enumeration of the Video engine to be used on output.
705 * can be passed to @a libvlc_video_set_output_callbacks
706 */
708 /** Disable rendering engine */
712 /** Direct3D11 rendering engine */
714 /** Direct3D9 rendering engine */
717
718
719/** Callback type that can be called to request a render size changes.
720 *
721 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_resize_cb.
722 *
723 * \param report_opaque parameter passed to \ref libvlc_video_output_set_resize_cb. [IN]
724 * \param width new rendering width requested. [IN]
725 * \param height new rendering height requested. [IN]
726 */
727typedef void( *libvlc_video_output_resize_cb )( void *report_opaque, unsigned width, unsigned height );
728
729
730/** Set the callback to call when the host app resizes the rendering area.
731 *
732 * This allows text rendering and aspect ratio to be handled properly when the host
733 * rendering size changes.
734 *
735 * It may be called before the \ref libvlc_video_output_setup_cb callback.
736 *
737 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
738 * \param[in] report_size_change callback which must be called when the host size changes.
739 * The callback is valid until another call to \ref libvlc_video_output_set_resize_cb
740 * is done. This may be called from any thread.
741 * \param[in] report_opaque private pointer to pass to the \ref report_size_change callback.
742 */
743typedef void( *libvlc_video_output_set_resize_cb )( void *opaque,
744 libvlc_video_output_resize_cb report_size_change,
745 void *report_opaque );
746
747/** Tell the host the rendering for the given plane is about to start
748 *
749 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
750 * \param plane number of the rendering plane to select
751 * \param output handle of the rendering output for the given plane
752 * \return true on success
753 * \version LibVLC 4.0.0 or later
754 *
755 * \note This is only used with \ref libvlc_video_engine_d3d11.
756 *
757 * The output parameter receives the ID3D11RenderTargetView* to use for rendering
758 * the plane.
759 *
760 * If this callback is not used (set to NULL in @a libvlc_video_set_output_callbacks())
761 * OMSetRenderTargets has to be set during the @a libvlc_video_makeCurrent_cb()
762 * entering call.
763 *
764 * The number of planes depend on the DXGI_FORMAT returned during the
765 * @a libvlc_video_update_output_cb() call. It's usually one plane except for
766 * semi-planar formats like DXGI_FORMAT_NV12 or DXGI_FORMAT_P010.
767 *
768 * This callback is called between libvlc_video_makeCurrent_cb current/not-current
769 * calls.
770 */
771typedef bool( *libvlc_video_output_select_plane_cb )( void *opaque, size_t plane, void *output );
772
773/**
774 * Set callbacks and data to render decoded video to a custom texture
775 *
776 * \warning VLC will perform video rendering in its own thread and at its own rate,
777 * You need to provide your own synchronisation mechanism.
778 *
779 * \param mp the media player
780 * \param engine the GPU engine to use
781 * \param setup_cb callback called to initialize user data
782 * \param cleanup_cb callback called to clean up user data
783 * \param resize_cb callback to set the resize callback
784 * \param update_output_cb callback to get the rendering format of the host (cannot be NULL)
785 * \param swap_cb callback called after rendering a video frame (cannot be NULL)
786 * \param makeCurrent_cb callback called to enter/leave the rendering context (cannot be NULL)
787 * \param getProcAddress_cb opengl function loading callback (cannot be NULL for \ref libvlc_video_engine_opengl and for \ref libvlc_video_engine_gles2)
788 * \param metadata_cb callback to provide frame metadata (D3D11 only)
789 * \param select_plane_cb callback to select different D3D11 rendering targets
790 * \param opaque private pointer passed to callbacks
791 *
792 * \note the \p setup_cb and \p cleanup_cb may be called more than once per
793 * playback.
794 *
795 * \retval true engine selected and callbacks set
796 * \retval false engine type unknown, callbacks not set
797 * \version LibVLC 4.0.0 or later
798 */
805 libvlc_video_update_output_cb update_output_cb,
806 libvlc_video_swap_cb swap_cb,
807 libvlc_video_makeCurrent_cb makeCurrent_cb,
808 libvlc_video_getProcAddress_cb getProcAddress_cb,
811 void* opaque );
812
813/**
814 * Set the NSView handler where the media player should render its video output.
815 *
816 * Use the vout called "macosx".
817 *
818 * The drawable is an NSObject that follow the VLCVideoViewEmbedding
819 * protocol:
820 *
821 * @code{.m}
822 * @protocol VLCVideoViewEmbedding <NSObject>
823 * - (void)addVoutSubview:(NSView *)view;
824 * - (void)removeVoutSubview:(NSView *)view;
825 * @end
826 * @endcode
827 *
828 * Or it can be an NSView object.
829 *
830 * If you want to use it along with Qt see the QMacCocoaViewContainer. Then
831 * the following code should work:
832 * @code{.mm}
833 * {
834 * NSView *video = [[NSView alloc] init];
835 * QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent);
836 * libvlc_media_player_set_nsobject(mp, video);
837 * [video release];
838 * }
839 * @endcode
840 *
841 * You can find a live example in VLCVideoView in VLCKit.framework.
842 *
843 * \param p_mi the Media Player
844 * \param drawable the drawable that is either an NSView or an object following
845 * the VLCVideoViewEmbedding protocol.
846 */
848
849/**
850 * Get the NSView handler previously set with libvlc_media_player_set_nsobject().
851 *
852 * \param p_mi the Media Player
853 * \return the NSView handler or 0 if none where set
854 */
856
857/**
858 * Set an X Window System drawable where the media player should render its
859 * video output. The call takes effect when the playback starts. If it is
860 * already started, it might need to be stopped before changes apply.
861 * If LibVLC was built without X11 output support, then this function has no
862 * effects.
863 *
864 * By default, LibVLC will capture input events on the video rendering area.
865 * Use libvlc_video_set_mouse_input() and libvlc_video_set_key_input() to
866 * disable that and deliver events to the parent window / to the application
867 * instead. By design, the X11 protocol delivers input events to only one
868 * recipient.
869 *
870 * \warning
871 * The application must call the XInitThreads() function from Xlib before
872 * libvlc_new(), and before any call to XOpenDisplay() directly or via any
873 * other library. Failure to call XInitThreads() will seriously impede LibVLC
874 * performance. Calling XOpenDisplay() before XInitThreads() will eventually
875 * crash the process. That is a limitation of Xlib.
876 *
877 * \param p_mi media player
878 * \param drawable X11 window ID
879 *
880 * \note
881 * The specified identifier must correspond to an existing Input/Output class
882 * X11 window. Pixmaps are <b>not</b> currently supported. The default X11
883 * server is assumed, i.e. that specified in the DISPLAY environment variable.
884 *
885 * \warning
886 * LibVLC can deal with invalid X11 handle errors, however some display drivers
887 * (EGL, GLX, VA and/or VDPAU) can unfortunately not. Thus the window handle
888 * must remain valid until playback is stopped, otherwise the process may
889 * abort or crash.
890 *
891 * \bug
892 * No more than one window handle per media player instance can be specified.
893 * If the media has multiple simultaneously active video tracks, extra tracks
894 * will be rendered into external windows beyond the control of the
895 * application.
896 */
898 uint32_t drawable);
899
900/**
901 * Get the X Window System window identifier previously set with
902 * libvlc_media_player_set_xwindow(). Note that this will return the identifier
903 * even if VLC is not currently using it (for instance if it is playing an
904 * audio-only input).
905 *
906 * \param p_mi the Media Player
907 * \return an X window ID, or 0 if none where set.
908 */
910
911/**
912 * Set a Win32/Win64 API window handle (HWND) where the media player should
913 * render its video output. If LibVLC was built without Win32/Win64 API output
914 * support, then this has no effects.
915 *
916 * \param p_mi the Media Player
917 * \param drawable windows handle of the drawable
918 */
920
921/**
922 * Get the Windows API window handle (HWND) previously set with
923 * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
924 * is not currently outputting any video to it.
925 *
926 * \param p_mi the Media Player
927 * \return a window handle or NULL if there are none.
928 */
930
931/**
932 * Set the android context.
933 *
934 * \version LibVLC 3.0.0 and later.
935 *
936 * \param p_mi the media player
937 * \param p_awindow_handler org.videolan.libvlc.AWindow jobject owned by the
938 * org.videolan.libvlc.MediaPlayer class from the libvlc-android project.
939 */
941 void *p_awindow_handler );
942
943/**
944 * Callback prototype for audio playback.
945 *
946 * The LibVLC media player decodes and post-processes the audio signal
947 * asynchronously (in an internal thread). Whenever audio samples are ready
948 * to be queued to the output, this callback is invoked.
949 *
950 * The number of samples provided per invocation may depend on the file format,
951 * the audio coding algorithm, the decoder plug-in, the post-processing
952 * filters and timing. Application must not assume a certain number of samples.
953 *
954 * The exact format of audio samples is determined by libvlc_audio_set_format()
955 * or libvlc_audio_set_format_callbacks() as is the channels layout.
956 *
957 * Note that the number of samples is per channel. For instance, if the audio
958 * track sampling rate is 48000 Hz, then 1200 samples represent 25 milliseconds
959 * of audio signal - regardless of the number of audio channels.
960 *
961 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
962 * \param[in] samples pointer to a table of audio samples to play back
963 * \param count number of audio samples to play back
964 * \param pts expected play time stamp (see libvlc_delay())
965 */
966typedef void (*libvlc_audio_play_cb)(void *data, const void *samples,
967 unsigned count, int64_t pts);
968
969/**
970 * Callback prototype for audio pause.
971 *
972 * LibVLC invokes this callback to pause audio playback.
973 *
974 * \note The pause callback is never called if the audio is already paused.
975 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
976 * \param pts time stamp of the pause request (should be elapsed already)
977 */
978typedef void (*libvlc_audio_pause_cb)(void *data, int64_t pts);
979
980/**
981 * Callback prototype for audio resumption.
982 *
983 * LibVLC invokes this callback to resume audio playback after it was
984 * previously paused.
985 *
986 * \note The resume callback is never called if the audio is not paused.
987 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
988 * \param pts time stamp of the resumption request (should be elapsed already)
989 */
990typedef void (*libvlc_audio_resume_cb)(void *data, int64_t pts);
991
992/**
993 * Callback prototype for audio buffer flush.
994 *
995 * LibVLC invokes this callback if it needs to discard all pending buffers and
996 * stop playback as soon as possible. This typically occurs when the media is
997 * stopped.
998 *
999 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1000 */
1001typedef void (*libvlc_audio_flush_cb)(void *data, int64_t pts);
1002
1003/**
1004 * Callback prototype for audio buffer drain.
1005 *
1006 * LibVLC may invoke this callback when the decoded audio track is ending.
1007 * There will be no further decoded samples for the track, but playback should
1008 * nevertheless continue until all already pending buffers are rendered.
1009 *
1010 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1011 */
1012typedef void (*libvlc_audio_drain_cb)(void *data);
1013
1014/**
1015 * Callback prototype for audio volume change.
1016 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1017 * \param volume software volume (1. = nominal, 0. = mute)
1018 * \param mute muted flag
1019 */
1020typedef void (*libvlc_audio_set_volume_cb)(void *data,
1021 float volume, bool mute);
1022
1023/**
1024 * Sets callbacks and private data for decoded audio.
1025 *
1026 * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
1027 * to configure the decoded audio format.
1028 *
1029 * \note The audio callbacks override any other audio output mechanism.
1030 * If the callbacks are set, LibVLC will <b>not</b> output audio in any way.
1031 *
1032 * \param mp the media player
1033 * \param play callback to play audio samples (must not be NULL)
1034 * \param pause callback to pause playback (or NULL to ignore)
1035 * \param resume callback to resume playback (or NULL to ignore)
1036 * \param flush callback to flush audio buffers (or NULL to ignore)
1037 * \param drain callback to drain audio buffers (or NULL to ignore)
1038 * \param opaque private pointer for the audio callbacks (as first parameter)
1039 * \version LibVLC 2.0.0 or later
1040 */
1048 void *opaque );
1049
1050/**
1051 * Set callbacks and private data for decoded audio. This only works in
1052 * combination with libvlc_audio_set_callbacks().
1053 * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
1054 * to configure the decoded audio format.
1055 *
1056 * \param mp the media player
1057 * \param set_volume callback to apply audio volume,
1058 * or NULL to apply volume in software
1059 * \version LibVLC 2.0.0 or later
1060 */
1063 libvlc_audio_set_volume_cb set_volume );
1064
1065/**
1066 * Callback prototype to setup the audio playback.
1067 *
1068 * This is called when the media player needs to create a new audio output.
1069 * \param[in,out] opaque pointer to the data pointer passed to
1070 * libvlc_audio_set_callbacks()
1071 * \param[in,out] format 4 bytes sample format
1072 * \param[in,out] rate sample rate
1073 * \param[in,out] channels channels count
1074 * \return 0 on success, anything else to skip audio playback
1075 */
1076typedef int (*libvlc_audio_setup_cb)(void **opaque, char *format, unsigned *rate,
1077 unsigned *channels);
1078
1079/**
1080 * Callback prototype for audio playback cleanup.
1081 *
1082 * This is called when the media player no longer needs an audio output.
1083 * \param[in] opaque data pointer as passed to libvlc_audio_set_callbacks()
1084 */
1085typedef void (*libvlc_audio_cleanup_cb)(void *opaque);
1086
1087/**
1088 * Sets decoded audio format via callbacks.
1089 *
1090 * This only works in combination with libvlc_audio_set_callbacks().
1091 *
1092 * \param mp the media player
1093 * \param setup callback to select the audio format (cannot be NULL)
1094 * \param cleanup callback to release any allocated resources (or NULL)
1095 * \version LibVLC 2.0.0 or later
1096 */
1100 libvlc_audio_cleanup_cb cleanup );
1101
1102/**
1103 * Sets a fixed decoded audio format.
1104 *
1105 * This only works in combination with libvlc_audio_set_callbacks(),
1106 * and is mutually exclusive with libvlc_audio_set_format_callbacks().
1107 *
1108 * The supported formats are:
1109 * - "S16N" for signed 16-bit PCM
1110 * - "S32N" for signed 32-bit PCM
1111 * - "FL32" for single precision IEEE 754
1112 *
1113 * All supported formats use the native endianess.
1114 * If there are more than one channel, samples are interleaved.
1115 *
1116 * \param mp the media player
1117 * \param format a four-characters string identifying the sample format
1118 * \param rate sample rate (expressed in Hz)
1119 * \param channels channels count
1120 * \version LibVLC 2.0.0 or later
1121 */
1124 unsigned rate, unsigned channels );
1125
1126/** \bug This might go away ... to be replaced by a broader system */
1127
1128/**
1129 * Get the current movie length (in ms).
1130 *
1131 * \param p_mi the Media Player
1132 * \return the movie length (in ms), or -1 if there is no media.
1133 */
1135
1136/**
1137 * Get the current movie time (in ms).
1138 *
1139 * \param p_mi the Media Player
1140 * \return the movie time (in ms), or -1 if there is no media.
1141 */
1143
1144/**
1145 * Set the movie time (in ms). This has no effect if no media is being played.
1146 * Not all formats and protocols support this.
1147 *
1148 * \param p_mi the Media Player
1149 * \param b_fast prefer fast seeking or precise seeking
1150 * \param i_time the movie time (in ms).
1151 * \return 0 on success, -1 on error
1152 */
1154 libvlc_time_t i_time, bool b_fast );
1155
1156/**
1157 * Get movie position as percentage between 0.0 and 1.0.
1158 *
1159 * \param p_mi the Media Player
1160 * \return movie position, or -1. in case of error
1161 */
1163
1164/**
1165 * Set movie position as percentage between 0.0 and 1.0.
1166 * This has no effect if playback is not enabled.
1167 * This might not work depending on the underlying input format and protocol.
1168 *
1169 * \param p_mi the Media Player
1170 * \param b_fast prefer fast seeking or precise seeking
1171 * \param f_pos the position
1172 * \return 0 on success, -1 on error
1173 */
1175 double f_pos, bool b_fast );
1176
1177/**
1178 * Set movie chapter (if applicable).
1179 *
1180 * \param p_mi the Media Player
1181 * \param i_chapter chapter number to play
1182 */
1184
1185/**
1186 * Get movie chapter.
1187 *
1188 * \param p_mi the Media Player
1189 * \return chapter number currently playing, or -1 if there is no media.
1190 */
1192
1193/**
1194 * Get movie chapter count
1195 *
1196 * \param p_mi the Media Player
1197 * \return number of chapters in movie, or -1.
1198 */
1200
1201/**
1202 * Get title chapter count
1203 *
1204 * \param p_mi the Media Player
1205 * \param i_title title
1206 * \return number of chapters in title, or -1
1207 */
1209 libvlc_media_player_t *p_mi, int i_title );
1210
1211/**
1212 * Set movie title
1213 *
1214 * \param p_mi the Media Player
1215 * \param i_title title number to play
1216 */
1218
1219/**
1220 * Get movie title
1221 *
1222 * \param p_mi the Media Player
1223 * \return title number currently playing, or -1
1224 */
1226
1227/**
1228 * Get movie title count
1229 *
1230 * \param p_mi the Media Player
1231 * \return title number count, or -1
1232 */
1234
1235/**
1236 * Set previous chapter (if applicable)
1237 *
1238 * \param p_mi the Media Player
1239 */
1241
1242/**
1243 * Set next chapter (if applicable)
1244 *
1245 * \param p_mi the Media Player
1246 */
1248
1249/**
1250 * Get the requested movie play rate.
1251 * @warning Depending on the underlying media, the requested rate may be
1252 * different from the real playback rate.
1253 *
1254 * \param p_mi the Media Player
1255 * \return movie play rate
1256 */
1258
1259/**
1260 * Set movie play rate
1261 *
1262 * \param p_mi the Media Player
1263 * \param rate movie play rate to set
1264 * \return -1 if an error was detected, 0 otherwise (but even then, it might
1265 * not actually work depending on the underlying media protocol)
1266 */
1268
1269/**
1270 * Get current movie state
1271 *
1272 * \param p_mi the Media Player
1273 * \return the current state of the media player (playing, paused, ...) \see libvlc_state_t
1274 */
1276
1277/**
1278 * How many video outputs does this media player have?
1279 *
1280 * \param p_mi the media player
1281 * \return the number of video outputs
1282 */
1284
1285/**
1286 * Is this media player seekable?
1287 *
1288 * \param p_mi the media player
1289 * \retval true media player can seek
1290 * \retval false media player cannot seek
1291 */
1293
1294/**
1295 * Can this media player be paused?
1296 *
1297 * \param p_mi the media player
1298 * \retval true media player can be paused
1299 * \retval false media player cannot be paused
1300 */
1302
1303/**
1304 * Check if the current program is scrambled
1305 *
1306 * \param p_mi the media player
1307 * \retval true current program is scrambled
1308 * \retval false current program is not scrambled
1309 *
1310 * \version LibVLC 2.2.0 or later
1311 */
1313
1314/**
1315 * Display the next frame (if supported)
1316 *
1317 * \param p_mi the media player
1318 */
1320
1321/**
1322 * Navigate through DVD Menu
1323 *
1324 * \param p_mi the Media Player
1325 * \param navigate the Navigation mode
1326 * \version libVLC 2.0.0 or later
1327 */
1329 unsigned navigate );
1330
1331/**
1332 * Set if, and how, the video title will be shown when media is played.
1333 *
1334 * \param p_mi the media player
1335 * \param position position at which to display the title, or libvlc_position_disable to prevent the title from being displayed
1336 * \param timeout title display timeout in milliseconds (ignored if libvlc_position_disable)
1337 * \version libVLC 2.1.0 or later
1338 */
1340
1341/**
1342 * Get the track list for one type
1343 *
1344 * \version LibVLC 4.0.0 and later.
1345 *
1346 * \note You need to call libvlc_media_parse_request() or play the media
1347 * at least once before calling this function. Not doing this will result in
1348 * an empty list.
1349 *
1350 * \note This track list is a snapshot of the current tracks when this function
1351 * is called. If a track is updated after this call, the user will need to call
1352 * this function again to get the updated track.
1353 *
1354 *
1355 * The track list can be used to get track information and to select specific
1356 * tracks.
1357 *
1358 * \param p_mi the media player
1359 * \param type type of the track list to request
1360 * \param selected filter only selected tracks if true (return all tracks, even
1361 * selected ones if false)
1362 *
1363 * \return a valid libvlc_media_tracklist_t or NULL in case of error, if there
1364 * is no track for a category, the returned list will have a size of 0, delete
1365 * with libvlc_media_tracklist_delete()
1366 */
1369 libvlc_track_type_t type, bool selected );
1370
1371/**
1372 * Get the selected track for one type
1373 *
1374 * \version LibVLC 4.0.0 and later.
1375 *
1376 * \warning More than one tracks can be selected for one type. In that case,
1377 * libvlc_media_player_get_tracklist() should be used.
1378 *
1379 * \param p_mi the media player
1380 * \param type type of the selected track
1381 *
1382 * \return a valid track or NULL if there is no selected tracks for this type,
1383 * release it with libvlc_media_track_release().
1384 */
1387 libvlc_track_type_t type );
1388
1389/*
1390 * Get a track from a track id
1391 *
1392 * \version LibVLC 4.0.0 and later.
1393 *
1394 * This function can be used to get the last updated information of a track.
1395 *
1396 * \param p_mi the media player
1397 * \param psz_id valid string representing a track id (cf. psz_id from \ref
1398 * libvlc_media_track_t)
1399 *
1400 * \return a valid track or NULL if there is currently no tracks identified by
1401 * the string id, release it with libvlc_media_track_release().
1402 */
1405 const char *psz_id );
1406
1407
1408/**
1409 * Select a track
1410 *
1411 * This will unselected the current track.
1412 *
1413 * \version LibVLC 4.0.0 and later.
1414 *
1415 * \note Use libvlc_media_player_select_tracks() for multiple selection
1416 *
1417 * \warning Only use a \ref libvlc_media_track_t retrieved with \ref libvlc_media_player_get_tracklist
1418 *
1419 * \param p_mi the media player
1420 * \param track track to select, can't be NULL
1421 */
1422LIBVLC_API void
1424 const libvlc_media_track_t *track );
1425
1426/**
1427 * Unselect all tracks for a given type
1428 *
1429 * \version LibVLC 4.0.0 and later.
1430 *
1431 * \param p_mi the media player
1432 * \param type type to unselect
1433 */
1434LIBVLC_API void
1436 libvlc_track_type_t type );
1437
1438/**
1439 * Select multiple tracks for one type
1440 *
1441 * \version LibVLC 4.0.0 and later.
1442 *
1443 * \note The internal track list can change between the calls of
1444 * libvlc_media_player_get_tracklist() and
1445 * libvlc_media_player_set_tracks(). If a track selection change but the
1446 * track is not present anymore, the player will just ignore it.
1447 *
1448 * \note selecting multiple audio tracks is currently not supported.
1449 *
1450 * \warning Only use a \ref libvlc_media_track_t retrieved with \ref libvlc_media_player_get_tracklist
1451 *
1452 * \param p_mi the media player
1453 * \param type type of the selected track
1454 * \param tracks pointer to the track array, or NULL if track_count is 0
1455 * \param track_count number of tracks in the track array
1456 */
1457LIBVLC_API void
1460 const libvlc_media_track_t **tracks,
1461 size_t track_count );
1462
1463/**
1464 * Select tracks by their string identifier
1465 *
1466 * \version LibVLC 4.0.0 and later.
1467 *
1468 * This function can be used pre-select a list of tracks before starting the
1469 * player. It has only effect for the current media. It can also be used when
1470 * the player is already started.
1471 *
1472 * 'str_ids' can contain more than one track id, delimited with ','. "" or any
1473 * invalid track id will cause the player to unselect all tracks of that
1474 * category. NULL will disable the preference for newer tracks without
1475 * unselecting any current tracks.
1476 *
1477 * Example:
1478 * - (libvlc_track_video, "video/1,video/2") will select these 2 video tracks.
1479 * If there is only one video track with the id "video/0", no tracks will be
1480 * selected.
1481 * - (libvlc_track_type_t, "${slave_url_md5sum}/spu/0) will select one spu
1482 * added by an input slave with the corresponding url.
1483 *
1484 * \note The string identifier of a track can be found via psz_id from \ref
1485 * libvlc_media_track_t
1486 *
1487 * \note selecting multiple audio tracks is currently not supported.
1488 *
1489 * \warning Only use a \ref libvlc_media_track_t id retrieved with \ref libvlc_media_player_get_tracklist
1490 *
1491 * \param p_mi the media player
1492 * \param type type to select
1493 * \param psz_ids list of string identifier or NULL
1494 */
1495LIBVLC_API void
1498 const char *psz_ids );
1499
1500/**
1501 * Add a slave to the current media player.
1502 *
1503 * \note If the player is playing, the slave will be added directly. This call
1504 * will also update the slave list of the attached libvlc_media_t.
1505 *
1506 * \version LibVLC 3.0.0 and later.
1507 *
1508 * \see libvlc_media_slaves_add
1509 *
1510 * \param p_mi the media player
1511 * \param i_type subtitle or audio
1512 * \param psz_uri Uri of the slave (should contain a valid scheme).
1513 * \param b_select True if this slave should be selected when it's loaded
1514 *
1515 * \return 0 on success, -1 on error.
1516 */
1520 const char *psz_uri, bool b_select );
1521
1523{
1524 /** Id used for libvlc_media_player_select_program() */
1526 /** Program name, always valid */
1528 /** True if the program is selected */
1530 /** True if the program is scrambled */
1533
1534/**
1535 * Opaque struct containing a list of program
1536 */
1538
1539/**
1540 * Delete a program struct
1541 *
1542 * \version LibVLC 4.0.0 and later.
1543 *
1544 * \param program returned by libvlc_media_player_get_selected_program() or
1545 * libvlc_media_player_get_program_from_id()
1546 *
1547 */
1548LIBVLC_API void
1550
1551/**
1552 * Get the number of programs in a programlist
1553 *
1554 * \version LibVLC 4.0.0 and later.
1555 *
1556 * \param list valid programlist
1557 *
1558 * \return number of programs, or 0 if the list is empty
1559 */
1560LIBVLC_API size_t
1562
1563/**
1564 * Get a program at a specific index
1565 *
1566 * \warning The behaviour is undefined if the index is not valid.
1567 *
1568 * \version LibVLC 4.0.0 and later.
1569 *
1570 * \param list valid programlist
1571 * \param index valid index in the range [0; count[
1572 *
1573 * \return a valid program (can't be NULL if libvlc_player_programlist_count()
1574 * returned a valid count)
1575 */
1578
1579/**
1580 * Release a programlist
1581 *
1582 * \note program structs from the list are also deleted.
1583 *
1584 * \version LibVLC 4.0.0 and later.
1585 *
1586 * \see libvlc_media_player_get_programlist
1587 *
1588 * \param list valid programlist
1589 */
1590LIBVLC_API void
1592
1593/**
1594 * Select program with a given program id.
1595 *
1596 * \note program ids are sent via the libvlc_MediaPlayerProgramAdded event or
1597 * can be fetch via libvlc_media_player_get_programlist()
1598 *
1599 * \version LibVLC 4.0.0 or later
1600 *
1601 * \param p_mi opaque media player handle
1602 * \param i_group_id program id
1603 */
1605
1606/**
1607 * Get the selected program
1608 *
1609 * \version LibVLC 4.0.0 or later
1610 *
1611 * \param p_mi opaque media player handle
1612 *
1613 * \return a valid program struct or NULL if no programs are selected. The
1614 * program need to be freed with libvlc_player_program_delete().
1615 */
1618
1619/**
1620 * Get a program struct from a program id
1621 *
1622 * \version LibVLC 4.0.0 or later
1623 *
1624 * \param p_mi opaque media player handle
1625 * \param i_group_id program id
1626 *
1627 * \return a valid program struct or NULL if the i_group_id is not found. The
1628 * program need to be freed with libvlc_player_program_delete().
1629 */
1632
1633/**
1634 * Get the program list
1635 *
1636 * \version LibVLC 4.0.0 and later.
1637 * \note This program list is a snapshot of the current programs when this
1638 * function is called. If a program is updated after this call, the user will
1639 * need to call this function again to get the updated program.
1640 *
1641 * The program list can be used to get program information and to select
1642 * specific programs.
1643 *
1644 * \param p_mi the media player
1645 *
1646 * \return a valid libvlc_media_programlist_t or NULL in case of error or empty
1647 * list, delete with libvlc_media_programlist_delete()
1648 */
1651
1652
1653/** \defgroup libvlc_video LibVLC video controls
1654 * @{
1655 */
1656
1657/**
1658 * Toggle fullscreen status on non-embedded video outputs.
1659 *
1660 * @warning The same limitations applies to this function
1661 * as to libvlc_set_fullscreen().
1662 *
1663 * \param p_mi the media player
1664 */
1666
1667/**
1668 * Enable or disable fullscreen.
1669 *
1670 * @warning With most window managers, only a top-level windows can be in
1671 * full-screen mode. Hence, this function will not operate properly if
1672 * libvlc_media_player_set_xwindow() was used to embed the video in a
1673 * non-top-level window. In that case, the embedding window must be reparented
1674 * to the root window <b>before</b> fullscreen mode is enabled. You will want
1675 * to reparent it back to its normal parent when disabling fullscreen.
1676 *
1677 * \note This setting applies to any and all current or future active video
1678 * tracks and windows for the given media player. The choice of fullscreen
1679 * output for each window is left to the operating system.
1680 *
1681 * \param p_mi the media player
1682 * \param b_fullscreen boolean for fullscreen status
1683 */
1685
1686/**
1687 * Get current fullscreen status.
1688 *
1689 * \param p_mi the media player
1690 * \return the fullscreen status (boolean)
1691 *
1692 * \retval false media player is windowed
1693 * \retval true media player is in fullscreen mode
1694 */
1696
1697/**
1698 * Enable or disable key press events handling, according to the LibVLC hotkeys
1699 * configuration. By default and for historical reasons, keyboard events are
1700 * handled by the LibVLC video widget.
1701 *
1702 * \note On X11, there can be only one subscriber for key press and mouse
1703 * click events per window. If your application has subscribed to those events
1704 * for the X window ID of the video widget, then LibVLC will not be able to
1705 * handle key presses and mouse clicks in any case.
1706 *
1707 * \warning This function is only implemented for X11 and Win32 at the moment.
1708 *
1709 * \param p_mi the media player
1710 * \param on true to handle key press events, false to ignore them.
1711 */
1714
1715/**
1716 * Enable or disable mouse click events handling. By default, those events are
1717 * handled. This is needed for DVD menus to work, as well as a few video
1718 * filters such as "puzzle".
1719 *
1720 * \see libvlc_video_set_key_input().
1721 *
1722 * \warning This function is only implemented for X11 and Win32 at the moment.
1723 *
1724 * \param p_mi the media player
1725 * \param on true to handle mouse click events, false to ignore them.
1726 */
1729
1730/**
1731 * Get the pixel dimensions of a video.
1732 *
1733 * \param p_mi media player
1734 * \param num number of the video (starting from, and most commonly 0)
1735 * \param[out] px pointer to get the pixel width
1736 * \param[out] py pointer to get the pixel height
1737 * \return 0 on success, -1 if the specified video does not exist
1738 */
1741 unsigned *px, unsigned *py );
1742
1743/**
1744 * Get the mouse pointer coordinates over a video.
1745 * Coordinates are expressed in terms of the decoded video resolution,
1746 * <b>not</b> in terms of pixels on the screen/viewport (to get the latter,
1747 * you can query your windowing system directly).
1748 *
1749 * Either of the coordinates may be negative or larger than the corresponding
1750 * dimension of the video, if the cursor is outside the rendering area.
1751 *
1752 * @warning The coordinates may be out-of-date if the pointer is not located
1753 * on the video rendering area. LibVLC does not track the pointer if it is
1754 * outside of the video widget.
1755 *
1756 * @note LibVLC does not support multiple pointers (it does of course support
1757 * multiple input devices sharing the same pointer) at the moment.
1758 *
1759 * \param p_mi media player
1760 * \param num number of the video (starting from, and most commonly 0)
1761 * \param[out] px pointer to get the abscissa
1762 * \param[out] py pointer to get the ordinate
1763 * \return 0 on success, -1 if the specified video does not exist
1764 */
1767 int *px, int *py );
1768
1769/**
1770 * Get the current video scaling factor.
1771 * See also libvlc_video_set_scale().
1772 *
1773 * \param p_mi the media player
1774 * \return the currently configured zoom factor, or 0. if the video is set
1775 * to fit to the output window/drawable automatically.
1776 */
1778
1779/**
1780 * Set the video scaling factor. That is the ratio of the number of pixels on
1781 * screen to the number of pixels in the original decoded video in each
1782 * dimension. Zero is a special value; it will adjust the video to the output
1783 * window/drawable (in windowed mode) or the entire screen.
1784 *
1785 * Note that not all video outputs support scaling.
1786 *
1787 * \param p_mi the media player
1788 * \param f_factor the scaling factor, or zero
1789 */
1791
1792/**
1793 * Get current video aspect ratio.
1794 *
1795 * \param p_mi the media player
1796 * \return the video aspect ratio or NULL if unspecified
1797 * (the result must be released with free() or libvlc_free()).
1798 */
1800
1801/**
1802 * Set new video aspect ratio.
1803 *
1804 * \param p_mi the media player
1805 * \param psz_aspect new video aspect-ratio or NULL to reset to default
1806 * \note Invalid aspect ratios are ignored.
1807 */
1809
1810/**
1811 * Create a video viewpoint structure.
1812 *
1813 * \version LibVLC 3.0.0 and later
1814 *
1815 * \return video viewpoint or NULL
1816 * (the result must be released with free()).
1817 */
1819
1820/**
1821 * Update the video viewpoint information.
1822 *
1823 * \note It is safe to call this function before the media player is started.
1824 *
1825 * \version LibVLC 3.0.0 and later
1826 *
1827 * \param p_mi the media player
1828 * \param p_viewpoint video viewpoint allocated via libvlc_video_new_viewpoint()
1829 * \param b_absolute if true replace the old viewpoint with the new one. If
1830 * false, increase/decrease it.
1831 * \return -1 in case of error, 0 otherwise
1832 *
1833 * \note the values are set asynchronously, it will be used by the next frame displayed.
1834 */
1836 const libvlc_video_viewpoint_t *p_viewpoint,
1837 bool b_absolute);
1838
1839/**
1840 * Get the current subtitle delay. Positive values means subtitles are being
1841 * displayed later, negative values earlier.
1842 *
1843 * \param p_mi media player
1844 * \return time (in microseconds) the display of subtitles is being delayed
1845 * \version LibVLC 2.0.0 or later
1846 */
1848
1849/**
1850 * Get the current subtitle text scale
1851 *
1852 * The scale factor is expressed as a percentage of the default size, where
1853 * 1.0 represents 100 percent.
1854 *
1855 * \param p_mi media player
1856 * \version LibVLC 4.0.0 or later
1857 */
1859
1860/**
1861 * Set the subtitle text scale.
1862 *
1863 * The scale factor is expressed as a percentage of the default size, where
1864 * 1.0 represents 100 percent.
1865 *
1866 * A value of 0.5 would result in text half the normal size, and a value of 2.0
1867 * would result in text twice the normal size.
1868 *
1869 * The minimum acceptable value for the scale factor is 0.1.
1870 *
1871 * The maximum is 5.0 (five times normal size).
1872 *
1873 * \param p_mi media player
1874 * \param f_scale scale factor in the range [0.1;5.0] (default: 1.0)
1875 * \version LibVLC 4.0.0 or later
1876 */
1878
1879/**
1880 * Set the subtitle delay. This affects the timing of when the subtitle will
1881 * be displayed. Positive values result in subtitles being displayed later,
1882 * while negative values will result in subtitles being displayed earlier.
1883 *
1884 * The subtitle delay will be reset to zero each time the media changes.
1885 *
1886 * \param p_mi media player
1887 * \param i_delay time (in microseconds) the display of subtitles should be delayed
1888 * \return 0 on success, -1 on error
1889 * \version LibVLC 2.0.0 or later
1890 */
1892
1893/**
1894 * Get the full description of available titles
1895 *
1896 * \version LibVLC 3.0.0 and later.
1897 *
1898 * \param p_mi the media player
1899 * \param[out] titles address to store an allocated array of title descriptions
1900 * descriptions (must be freed with libvlc_title_descriptions_release()
1901 * by the caller)
1902 *
1903 * \return the number of titles (-1 on error)
1904 */
1906 libvlc_title_description_t ***titles );
1907
1908/**
1909 * Release a title description
1910 *
1911 * \version LibVLC 3.0.0 and later
1912 *
1913 * \param p_titles title description array to release
1914 * \param i_count number of title descriptions to release
1915 */
1918 unsigned i_count );
1919
1920/**
1921 * Get the full description of available chapters
1922 *
1923 * \version LibVLC 3.0.0 and later.
1924 *
1925 * \param p_mi the media player
1926 * \param i_chapters_of_title index of the title to query for chapters (uses current title if set to -1)
1927 * \param[out] pp_chapters address to store an allocated array of chapter descriptions
1928 * descriptions (must be freed with libvlc_chapter_descriptions_release()
1929 * by the caller)
1930 *
1931 * \return the number of chapters (-1 on error)
1932 */
1934 int i_chapters_of_title,
1935 libvlc_chapter_description_t *** pp_chapters );
1936
1937/**
1938 * Release a chapter description
1939 *
1940 * \version LibVLC 3.0.0 and later
1941 *
1942 * \param p_chapters chapter description array to release
1943 * \param i_count number of chapter descriptions to release
1944 */
1947 unsigned i_count );
1948
1949/**
1950 * Set/unset the video crop ratio.
1951 *
1952 * This function forces a crop ratio on any and all video tracks rendered by
1953 * the media player. If the display aspect ratio of a video does not match the
1954 * crop ratio, either the top and bottom, or the left and right of the video
1955 * will be cut out to fit the crop ratio.
1956 *
1957 * For instance, a ratio of 1:1 will force the video to a square shape.
1958 *
1959 * To disable video crop, set a crop ratio with zero as denominator.
1960 *
1961 * A call to this function overrides any previous call to any of
1962 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
1963 * libvlc_video_set_crop_window().
1964 *
1965 * \see libvlc_video_set_aspect_ratio()
1966 *
1967 * \param mp the media player
1968 * \param num crop ratio numerator (ignored if denominator is 0)
1969 * \param den crop ratio denominator (or 0 to unset the crop ratio)
1970 *
1971 * \version LibVLC 4.0.0 and later
1972 */
1975 unsigned num, unsigned den);
1976
1977/**
1978 * Set the video crop window.
1979 *
1980 * This function selects a sub-rectangle of video to show. Any pixels outside
1981 * the rectangle will not be shown.
1982 *
1983 * To unset the video crop window, use libvlc_video_set_crop_ratio() or
1984 * libvlc_video_set_crop_border().
1985 *
1986 * A call to this function overrides any previous call to any of
1987 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
1988 * libvlc_video_set_crop_window().
1989 *
1990 * \param mp the media player
1991 * \param x abscissa (i.e. leftmost sample column offset) of the crop window
1992 * \param y ordinate (i.e. topmost sample row offset) of the crop window
1993 * \param width sample width of the crop window (cannot be zero)
1994 * \param height sample height of the crop window (cannot be zero)
1995 *
1996 * \version LibVLC 4.0.0 and later
1997 */
2000 unsigned x, unsigned y,
2001 unsigned width, unsigned height);
2002
2003/**
2004 * Set the video crop borders.
2005 *
2006 * This function selects the size of video edges to be cropped out.
2007 *
2008 * To unset the video crop borders, set all borders to zero.
2009 *
2010 * A call to this function overrides any previous call to any of
2011 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
2012 * libvlc_video_set_crop_window().
2013 *
2014 * \param mp the media player
2015 * \param left number of sample columns to crop on the left
2016 * \param right number of sample columns to crop on the right
2017 * \param top number of sample rows to crop on the top
2018 * \param bottom number of sample rows to corp on the bottom
2019 *
2020 * \version LibVLC 4.0.0 and later
2021 */
2024 unsigned left, unsigned right,
2025 unsigned top, unsigned bottom);
2026
2027/**
2028 * Get current teletext page requested or 0 if it's disabled.
2029 *
2030 * Teletext is disabled by default, call libvlc_video_set_teletext() to enable
2031 * it.
2032 *
2033 * \param p_mi the media player
2034 * \return the current teletext page requested.
2035 */
2037
2038/**
2039 * Set new teletext page to retrieve.
2040 *
2041 * This function can also be used to send a teletext key.
2042 *
2043 * \param p_mi the media player
2044 * \param i_page teletex page number requested. This value can be 0 to disable
2045 * teletext, a number in the range ]0;1000[ to show the requested page, or a
2046 * \ref libvlc_teletext_key_t. 100 is the default teletext page.
2047 */
2049
2050/**
2051 * Take a snapshot of the current video window.
2052 *
2053 * If i_width AND i_height is 0, original size is used.
2054 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
2055 *
2056 * \param p_mi media player instance
2057 * \param num number of video output (typically 0 for the first/only one)
2058 * \param psz_filepath the path of a file or a folder to save the screenshot into
2059 * \param i_width the snapshot's width
2060 * \param i_height the snapshot's height
2061 * \return 0 on success, -1 if the video was not found
2062 */
2065 const char *psz_filepath, unsigned int i_width,
2066 unsigned int i_height );
2067
2068/**
2069 * Enable or disable deinterlace filter
2070 *
2071 * \param p_mi libvlc media player
2072 * \param deinterlace state -1: auto (default), 0: disabled, 1: enabled
2073 * \param psz_mode type of deinterlace filter, NULL for current/default filter
2074 * \version LibVLC 4.0.0 and later
2075 */
2077 int deinterlace,
2078 const char *psz_mode );
2079
2080/**
2081 * Get an integer marquee option value
2082 *
2083 * \param p_mi libvlc media player
2084 * \param option marq option to get \see libvlc_video_marquee_option_t
2085 */
2087 unsigned option );
2088
2089/**
2090 * Enable, disable or set an integer marquee option
2091 *
2092 * Setting libvlc_marquee_Enable has the side effect of enabling (arg !0)
2093 * or disabling (arg 0) the marq filter.
2094 *
2095 * \param p_mi libvlc media player
2096 * \param option marq option to set \see libvlc_video_marquee_option_t
2097 * \param i_val marq option value
2098 */
2100 unsigned option, int i_val );
2101
2102/**
2103 * Set a marquee string option
2104 *
2105 * \param p_mi libvlc media player
2106 * \param option marq option to set \see libvlc_video_marquee_option_t
2107 * \param psz_text marq option value
2108 */
2110 unsigned option, const char *psz_text );
2111
2112/** option values for libvlc_video_{get,set}_logo_{int,string} */
2115 libvlc_logo_file, /**< string argument, "file,d,t;file,d,t;..." */
2123
2124/**
2125 * Get integer logo option.
2126 *
2127 * \param p_mi libvlc media player instance
2128 * \param option logo option to get, values of libvlc_video_logo_option_t
2129 */
2131 unsigned option );
2132
2133/**
2134 * Set logo option as integer. Options that take a different type value
2135 * are ignored.
2136 * Passing libvlc_logo_enable as option value has the side effect of
2137 * starting (arg !0) or stopping (arg 0) the logo filter.
2138 *
2139 * \param p_mi libvlc media player instance
2140 * \param option logo option to set, values of libvlc_video_logo_option_t
2141 * \param value logo option value
2142 */
2144 unsigned option, int value );
2145
2146/**
2147 * Set logo option as string. Options that take a different type value
2148 * are ignored.
2149 *
2150 * \param p_mi libvlc media player instance
2151 * \param option logo option to set, values of libvlc_video_logo_option_t
2152 * \param psz_value logo option value
2153 */
2155 unsigned option, const char *psz_value );
2156
2157
2158/** option values for libvlc_video_{get,set}_adjust_{int,float,bool} */
2167
2168/**
2169 * Get integer adjust option.
2170 *
2171 * \param p_mi libvlc media player instance
2172 * \param option adjust option to get, values of libvlc_video_adjust_option_t
2173 * \version LibVLC 1.1.1 and later.
2174 */
2176 unsigned option );
2177
2178/**
2179 * Set adjust option as integer. Options that take a different type value
2180 * are ignored.
2181 * Passing libvlc_adjust_enable as option value has the side effect of
2182 * starting (arg !0) or stopping (arg 0) the adjust filter.
2183 *
2184 * \param p_mi libvlc media player instance
2185 * \param option adust option to set, values of libvlc_video_adjust_option_t
2186 * \param value adjust option value
2187 * \version LibVLC 1.1.1 and later.
2188 */
2190 unsigned option, int value );
2191
2192/**
2193 * Get float adjust option.
2194 *
2195 * \param p_mi libvlc media player instance
2196 * \param option adjust option to get, values of libvlc_video_adjust_option_t
2197 * \version LibVLC 1.1.1 and later.
2198 */
2200 unsigned option );
2201
2202/**
2203 * Set adjust option as float. Options that take a different type value
2204 * are ignored.
2205 *
2206 * \param p_mi libvlc media player instance
2207 * \param option adust option to set, values of libvlc_video_adjust_option_t
2208 * \param value adjust option value
2209 * \version LibVLC 1.1.1 and later.
2210 */
2212 unsigned option, float value );
2213
2214/** @} video */
2215
2216/** \defgroup libvlc_audio LibVLC audio controls
2217 * @{
2218 */
2219
2220/**
2221 * Audio stereo modes
2222 */
2232
2233/**
2234 * Audio mix modes
2235 */
2244
2245/**
2246 * Gets the list of available audio output modules.
2247 *
2248 * \param p_instance libvlc instance
2249 * \return list of available audio outputs. It must be freed with
2250* \see libvlc_audio_output_list_release \see libvlc_audio_output_t .
2251 * In case of error, NULL is returned.
2252 */
2255
2256/**
2257 * Frees the list of available audio output modules.
2258 *
2259 * \param p_list list with audio outputs for release
2260 */
2263
2264/**
2265 * Selects an audio output module.
2266 * \note Any change will take be effect only after playback is stopped and
2267 * restarted. Audio output cannot be changed while playing.
2268 *
2269 * \param p_mi media player
2270 * \param psz_name name of audio output,
2271 * use psz_name of \see libvlc_audio_output_t
2272 * \return 0 if function succeeded, -1 on error
2273 */
2275 const char *psz_name );
2276
2277/**
2278 * Gets a list of potential audio output devices.
2279 *
2280 * See also libvlc_audio_output_device_set().
2281 *
2282 * \note Not all audio outputs support enumerating devices.
2283 * The audio output may be functional even if the list is empty (NULL).
2284 *
2285 * \note The list may not be exhaustive.
2286 *
2287 * \warning Some audio output devices in the list might not actually work in
2288 * some circumstances. By default, it is recommended to not specify any
2289 * explicit audio device.
2290 *
2291 * \param mp media player
2292 * \return A NULL-terminated linked list of potential audio output devices.
2293 * It must be freed with libvlc_audio_output_device_list_release()
2294 * \version LibVLC 2.2.0 or later.
2295 */
2298
2299#if defined (__GNUC__) && !defined (__clang__)
2300__attribute__((unused))
2301__attribute__((noinline))
2302__attribute__((error("Use libvlc_audio_output_device_enum() instead")))
2304libvlc_audio_output_device_list_get( libvlc_instance_t *p_instance,
2305 const char *aout )
2306{
2307 (void) p_instance; (void) aout;
2308 return NULL;
2309}
2310#endif
2311
2312/**
2313 * Frees a list of available audio output devices.
2314 *
2315 * \param p_list list with audio outputs for release
2316 * \version LibVLC 2.1.0 or later.
2317 */
2320
2321/**
2322 * Configures an explicit audio output device.
2323 *
2324 * A list of adequate potential device strings can be obtained with
2325 * libvlc_audio_output_device_enum().
2326 *
2327 * \note This function does not select the specified audio output plugin.
2328 * libvlc_audio_output_set() is used for that purpose.
2329 *
2330 * \warning The syntax for the device parameter depends on the audio output.
2331 *
2332 * Some audio output modules require further parameters (e.g. a channels map
2333 * in the case of ALSA).
2334 *
2335 * \version This function originally expected three parameters.
2336 * The middle parameter was removed from LibVLC 4.0 onward.
2337 *
2338 * \param mp media player
2339 * \param device_id device identifier string
2340 * (see \ref libvlc_audio_output_device_t::psz_device)
2341 *
2342 * \return If the change of device was requested succesfully, zero is returned
2343 * (the actual change is asynchronous and not guaranteed to succeed).
2344 * On error, a non-zero value is returned.
2345 */
2347 const char *device_id );
2348
2349/**
2350 * Get the current audio output device identifier.
2351 *
2352 * This complements libvlc_audio_output_device_set().
2353 *
2354 * \warning The initial value for the current audio output device identifier
2355 * may not be set or may be some unknown value. A LibVLC application should
2356 * compare this value against the known device identifiers (e.g. those that
2357 * were previously retrieved by a call to libvlc_audio_output_device_enum) to
2358 * find the current audio output device.
2359 *
2360 * It is possible that the selected audio output device changes (an external
2361 * change) without a call to libvlc_audio_output_device_set. That may make this
2362 * method unsuitable to use if a LibVLC application is attempting to track
2363 * dynamic audio device changes as they happen.
2364 *
2365 * \param mp media player
2366 * \return the current audio output device identifier
2367 * NULL if no device is selected or in case of error
2368 * (the result must be released with free()).
2369 * \version LibVLC 3.0.0 or later.
2370 */
2372
2373/**
2374 * Toggle mute status.
2375 *
2376 * \param p_mi media player
2377 * \warning Toggling mute atomically is not always possible: On some platforms,
2378 * other processes can mute the VLC audio playback stream asynchronously. Thus,
2379 * there is a small race condition where toggling will not work.
2380 * See also the limitations of libvlc_audio_set_mute().
2381 */
2383
2384/**
2385 * Get current mute status.
2386 *
2387 * \param p_mi media player
2388 * \return the mute status (boolean) if defined, -1 if undefined/unapplicable
2389 */
2391
2392/**
2393 * Set mute status.
2394 *
2395 * \param p_mi media player
2396 * \param status If status is true then mute, otherwise unmute
2397 * \warning This function does not always work. If there are no active audio
2398 * playback stream, the mute status might not be available. If digital
2399 * pass-through (S/PDIF, HDMI...) is in use, muting may be unapplicable. Also
2400 * some audio output plugins do not support muting at all.
2401 * \note To force silent playback, disable all audio tracks. This is more
2402 * efficient and reliable than mute.
2403 */
2405
2406/**
2407 * Get current software audio volume.
2408 *
2409 * \param p_mi media player
2410 * \return the software volume in percents
2411 * (0 = mute, 100 = nominal / 0dB)
2412 */
2414
2415/**
2416 * Set current software audio volume.
2417 *
2418 * \param p_mi media player
2419 * \param i_volume the volume in percents (0 = mute, 100 = 0dB)
2420 * \return 0 if the volume was set, -1 if it was out of range
2421 */
2423
2424/**
2425 * Get current audio stereo-mode.
2426 *
2427 * \param p_mi media player
2428 * \return the audio stereo-mode, \see libvlc_audio_output_stereomode_t
2429 * \version LibVLC 4.0.0 or later
2430 */
2432
2433/**
2434 * Set current audio stereo-mode.
2435 *
2436 * \param p_mi media player
2437 * \param channel the audio stereo-mode, \see libvlc_audio_output_stereomode_t
2438 * \return 0 on success, -1 on error
2439 * \version LibVLC 4.0.0 or later
2440 */
2443
2444/**
2445 * Get current audio mix-mode.
2446 *
2447 * \param p_mi media player
2448 * \return the audio mix-mode, \see libvlc_audio_output_mixmode_t
2449 * \version LibVLC 4.0.0 or later
2450 */
2452
2453/**
2454 * Set current audio mix-mode.
2455 *
2456 * By default (libvlc_AudioMixMode_Unset), the audio output will keep its
2457 * original channel configuration (play stereo as stereo, or 5.1 as 5.1). Yet,
2458 * the OS and Audio API might refuse a channel configuration and asks VLC to
2459 * adapt (Stereo played as 5.1 or vice-versa).
2460 *
2461 * This function allows to force a channel configuration, it will only work if
2462 * the OS and Audio API accept this configuration (otherwise, it won't have any
2463 * effects). Here are some examples:
2464 * - Play multi-channels (5.1, 7.1...) as stereo (libvlc_AudioMixMode_Stereo)
2465 * - Play Stereo or 5.1 as 7.1 (libvlc_AudioMixMode_7_1)
2466 * - Play multi-channels as stereo with a binaural effect
2467 * (libvlc_AudioMixMode_Binaural). It might be selected automatically if the
2468 * OS and Audio API can detect if a headphone is plugged.
2469 *
2470 * \param p_mi media player
2471 * \param channel the audio mix-mode, \see libvlc_audio_output_mixmode_t
2472 * \return 0 on success, -1 on error
2473 * \version LibVLC 4.0.0 or later
2474 */
2477
2478
2479/**
2480 * Get current audio delay.
2481 *
2482 * \param p_mi media player
2483 * \return the audio delay (microseconds)
2484 * \version LibVLC 1.1.1 or later
2485 */
2487
2488/**
2489 * Set current audio delay. The audio delay will be reset to zero each time the media changes.
2490 *
2491 * \param p_mi media player
2492 * \param i_delay the audio delay (microseconds)
2493 * \return 0 on success, -1 on error
2494 * \version LibVLC 1.1.1 or later
2495 */
2497
2498/**
2499 * Get the number of equalizer presets.
2500 *
2501 * \return number of presets
2502 * \version LibVLC 2.2.0 or later
2503 */
2505
2506/**
2507 * Get the name of a particular equalizer preset.
2508 *
2509 * This name can be used, for example, to prepare a preset label or menu in a user
2510 * interface.
2511 *
2512 * \param u_index index of the preset, counting from zero
2513 * \return preset name, or NULL if there is no such preset
2514 * \version LibVLC 2.2.0 or later
2515 */
2517
2518/**
2519 * Get the number of distinct frequency bands for an equalizer.
2520 *
2521 * \return number of frequency bands
2522 * \version LibVLC 2.2.0 or later
2523 */
2525
2526/**
2527 * Get a particular equalizer band frequency.
2528 *
2529 * This value can be used, for example, to create a label for an equalizer band control
2530 * in a user interface.
2531 *
2532 * \param u_index index of the band, counting from zero
2533 * \return equalizer band frequency (Hz), or -1 if there is no such band
2534 * \version LibVLC 2.2.0 or later
2535 */
2537
2538/**
2539 * Create a new default equalizer, with all frequency values zeroed.
2540 *
2541 * The new equalizer can subsequently be applied to a media player by invoking
2542 * libvlc_media_player_set_equalizer().
2543 *
2544 * The returned handle should be freed via libvlc_audio_equalizer_release() when
2545 * it is no longer needed.
2546 *
2547 * \return opaque equalizer handle, or NULL on error
2548 * \version LibVLC 2.2.0 or later
2549 */
2551
2552/**
2553 * Create a new equalizer, with initial frequency values copied from an existing
2554 * preset.
2555 *
2556 * The new equalizer can subsequently be applied to a media player by invoking
2557 * libvlc_media_player_set_equalizer().
2558 *
2559 * The returned handle should be freed via libvlc_audio_equalizer_release() when
2560 * it is no longer needed.
2561 *
2562 * \param u_index index of the preset, counting from zero
2563 * \return opaque equalizer handle, or NULL on error
2564 * (it must be released with libvlc_audio_equalizer_release())
2565 * \version LibVLC 2.2.0 or later
2566 */
2568
2569/**
2570 * Release a previously created equalizer instance.
2571 *
2572 * The equalizer was previously created by using libvlc_audio_equalizer_new() or
2573 * libvlc_audio_equalizer_new_from_preset().
2574 *
2575 * It is safe to invoke this method with a NULL p_equalizer parameter for no effect.
2576 *
2577 * \param p_equalizer opaque equalizer handle, or NULL
2578 * \version LibVLC 2.2.0 or later
2579 */
2581
2582/**
2583 * Set a new pre-amplification value for an equalizer.
2584 *
2585 * The new equalizer settings are subsequently applied to a media player by invoking
2586 * libvlc_media_player_set_equalizer().
2587 *
2588 * The supplied amplification value will be clamped to the -20.0 to +20.0 range.
2589 *
2590 * \param p_equalizer valid equalizer handle, must not be NULL
2591 * \param f_preamp preamp value (-20.0 to 20.0 Hz)
2592 * \return zero on success, -1 on error
2593 * \version LibVLC 2.2.0 or later
2594 */
2596
2597/**
2598 * Get the current pre-amplification value from an equalizer.
2599 *
2600 * \param p_equalizer valid equalizer handle, must not be NULL
2601 * \return preamp value (Hz)
2602 * \version LibVLC 2.2.0 or later
2603 */
2605
2606/**
2607 * Set a new amplification value for a particular equalizer frequency band.
2608 *
2609 * The new equalizer settings are subsequently applied to a media player by invoking
2610 * libvlc_media_player_set_equalizer().
2611 *
2612 * The supplied amplification value will be clamped to the -20.0 to +20.0 range.
2613 *
2614 * \param p_equalizer valid equalizer handle, must not be NULL
2615 * \param f_amp amplification value (-20.0 to 20.0 Hz)
2616 * \param u_band index, counting from zero, of the frequency band to set
2617 * \return zero on success, -1 on error
2618 * \version LibVLC 2.2.0 or later
2619 */
2620LIBVLC_API int libvlc_audio_equalizer_set_amp_at_index( libvlc_equalizer_t *p_equalizer, float f_amp, unsigned u_band );
2621
2622/**
2623 * Get the amplification value for a particular equalizer frequency band.
2624 *
2625 * \param p_equalizer valid equalizer handle, must not be NULL
2626 * \param u_band index, counting from zero, of the frequency band to get
2627 * \return amplification value (Hz); NaN if there is no such frequency band
2628 * \version LibVLC 2.2.0 or later
2629 */
2631
2632/**
2633 * Apply new equalizer settings to a media player.
2634 *
2635 * The equalizer is first created by invoking libvlc_audio_equalizer_new() or
2636 * libvlc_audio_equalizer_new_from_preset().
2637 *
2638 * It is possible to apply new equalizer settings to a media player whether the media
2639 * player is currently playing media or not.
2640 *
2641 * Invoking this method will immediately apply the new equalizer settings to the audio
2642 * output of the currently playing media if there is any.
2643 *
2644 * If there is no currently playing media, the new equalizer settings will be applied
2645 * later if and when new media is played.
2646 *
2647 * Equalizer settings will automatically be applied to subsequently played media.
2648 *
2649 * To disable the equalizer for a media player invoke this method passing NULL for the
2650 * p_equalizer parameter.
2651 *
2652 * The media player does not keep a reference to the supplied equalizer so it is safe
2653 * for an application to release the equalizer reference any time after this method
2654 * returns.
2655 *
2656 * \param p_mi opaque media player handle
2657 * \param p_equalizer opaque equalizer handle, or NULL to disable the equalizer for this media player
2658 * \return zero on success, -1 on error
2659 * \version LibVLC 2.2.0 or later
2660 */
2662
2663/**
2664 * Media player roles.
2665 *
2666 * \version LibVLC 3.0.0 and later.
2667 *
2668 * See \ref libvlc_media_player_set_role()
2669 */
2671 libvlc_role_None = 0, /**< Don't use a media player role */
2672 libvlc_role_Music, /**< Music (or radio) playback */
2673 libvlc_role_Video, /**< Video playback */
2674 libvlc_role_Communication, /**< Speech, real-time communication */
2675 libvlc_role_Game, /**< Video game */
2676 libvlc_role_Notification, /**< User interaction feedback */
2677 libvlc_role_Animation, /**< Embedded animation (e.g. in web page) */
2678 libvlc_role_Production, /**< Audio editing/production */
2679 libvlc_role_Accessibility, /**< Accessibility */
2680 libvlc_role_Test /** Testing */
2681#define libvlc_role_Last libvlc_role_Test
2683
2684/**
2685 * Gets the media role.
2686 *
2687 * \version LibVLC 3.0.0 and later.
2688 *
2689 * \param p_mi media player
2690 * \return the media player role (\ref libvlc_media_player_role_t)
2691 */
2693
2694/**
2695 * Sets the media role.
2696 *
2697 * \param p_mi media player
2698 * \param role the media player role (\ref libvlc_media_player_role_t)
2699 * \return 0 on success, -1 on error
2700 */
2702 unsigned role);
2703
2704/**
2705 * Start/stop recording
2706 *
2707 * \note The user should listen to the libvlc_MediaPlayerRecordChanged event,
2708 * to monitor the recording state.
2709 *
2710 * \version LibVLC 4.0.0 and later.
2711 *
2712 * \param p_mi media player
2713 * \param enable true to start recording, false to stop
2714 * \param dir_path path of the recording directory or NULL (use default path),
2715 * has only an effect when first enabling recording.
2716 */
2718 bool enable, const char *dir_path);
2719
2720/** @} audio */
2721
2722/** \defgroup libvlc_media_player_watch_time LibVLC media player time watch API
2723 * @{
2724 */
2725
2726/**
2727 * Media Player timer point
2728 *
2729 * \note ts and system_date values should not be used directly by the user.
2730 * libvlc_media_player_time_point_interpolate() will read these values and
2731 * return an interpolated ts.
2732 *
2733 * @see libvlc_media_player_watch_time_on_update
2734 */
2736{
2737 /** Position in the range [0.0f;1.0] */
2738 double position;
2739 /** Rate of the player */
2740 double rate;
2741 /** Valid time, in us >= 0 or -1 */
2742 int64_t ts_us;
2743 /** Valid length, in us >= 1 or 0 */
2744 int64_t length_us;
2745 /**
2746 * System date, in us, of this record (always valid).
2747 * Based on libvlc_clock(). This date can be in the future or in the past.
2748 * The special value of INT64_MAX mean that the clock was paused when this
2749 * point was updated. In that case,
2750 * libvlc_media_player_time_point_interpolate() will return the current
2751 * ts/pos of this point (there is nothing to interpolate).
2752 * */
2755
2756/**
2757 * Callback prototype that notify when the player state or time changed.
2758 *
2759 * Get notified when the time is updated by the input or output source. The
2760 * input source is the 'demux' or the 'access_demux'. The output source are
2761 * audio and video outputs: an update is received each time a video frame is
2762 * displayed or an audio sample is written. The delay between each updates may
2763 * depend on the input and source type (it can be every 5ms, 30ms, 1s or
2764 * 10s...). Users of this timer may need to update the position at a higher
2765 * frequency from their own mainloop via
2766 * libvlc_media_player_time_point_interpolate().
2767 *
2768 * \warning It is forbidden to call any Media Player functions from here.
2769 *
2770 * \param value always valid, the time corresponding to the state
2771 * \param data opaque pointer set by libvlc_media_player_watch_time()
2772 */
2774 const libvlc_media_player_time_point_t *value, void *data);
2775
2776/**
2777 * Callback prototype that notify when the player is paused or a discontinuity
2778 * occurred.
2779 *
2780 * Likely caused by seek from the user or because the playback is stopped. The
2781 * player user should stop its "interpolate" timer.
2782 *
2783 * \warning It is forbidden to call any Media Player functions from here.
2784 *
2785 * \param system_date_us system date, in us, of this event, only valid (> 0)
2786 * when paused. It can be used to interpolate the last updated point to this
2787 * date in order to get the last paused ts/position.
2788 * \param data opaque pointer set by libvlc_media_player_watch_time()
2789 */
2791 int64_t system_date_us, void *data);
2792
2793/**
2794 * Watch for times updates
2795 *
2796 * \warning Only one watcher can be registered at a time. Calling this function
2797 * a second time (if libvlc_media_player_unwatch_time() was not called
2798 * in-between) will fail.
2799 *
2800 * \param p_mi the media player
2801 * \param min_period_us corresponds to the minimum period, in us, between each
2802 * updates, use it to avoid flood from too many source updates, set it to 0 to
2803 * receive all updates.
2804 * \param on_update callback to listen to update events (must not be NULL)
2805 * \param on_discontinuity callback to listen to discontinuity events (can be
2806 * be NULL)
2807 * \param cbs_data opaque pointer used by the callbacks
2808 * \return 0 on success, -1 on error (allocation error, or if already watching)
2809 * \version LibVLC 4.0.0 or later
2810 */
2811LIBVLC_API int
2813 int64_t min_period_us,
2816 void *cbs_data);
2817
2818/**
2819 * Unwatch time updates
2820 *
2821 * \param p_mi the media player
2822 * \version LibVLC 4.0.0 or later
2823 */
2824LIBVLC_API void
2826
2827/**
2828 * Interpolate a timer value to now
2829
2830 * \param point time update obtained via the
2831 * libvlc_media_player_watch_time_on_update() callback
2832 * \param system_now_us current system date, in us, returned by libvlc_clock()
2833 * \param out_ts_us pointer where to set the interpolated ts, in us
2834 * \param out_pos pointer where to set the interpolated position
2835 * \return 0 in case of success, -1 if the interpolated ts is negative (could
2836 * happen during the buffering step)
2837 * \version LibVLC 4.0.0 or later
2838 */
2839LIBVLC_API int
2841 int64_t system_now_us,
2842 int64_t *out_ts_us, double *out_pos);
2843
2844/**
2845 * Get the date of the next interval
2846 *
2847 * Can be used to setup an UI timer in order to update some widgets at specific
2848 * interval. A next_interval of VLC_TICK_FROM_SEC(1) can be used to update a
2849 * time widget when the media reaches a new second.
2850 *
2851 * \note The media time doesn't necessarily correspond to the system time, that
2852 * is why this function is needed and uses the rate of the current point.
2853 *
2854 * \param point time update obtained via the
2855 * libvlc_media_player_watch_time_on_update()
2856 * \param system_now_us same system date used by
2857 * libvlc_media_player_time_point_interpolate()
2858 * \param interpolated_ts_us ts returned by
2859 * libvlc_media_player_time_point_interpolate()
2860 * \param next_interval_us next interval, in us
2861 * \return the absolute system date, in us, of the next interval,
2862 * use libvlc_delay() to get a relative delay.
2863 * \version LibVLC 4.0.0 or later
2864 */
2865LIBVLC_API int64_t
2867 int64_t system_now_us,
2868 int64_t interpolated_ts_us,
2869 int64_t next_interval_us);
2870
2871/** @} libvlc_media_player_watch_time */
2872
2873/** @} media_player */
2874
2875# ifdef __cplusplus
2876}
2877# endif
2878
2879#endif /* VLC_LIBVLC_MEDIA_PLAYER_H */
struct vlc_param ** list
Definition: core.c:402
size_t count
Definition: core.c:403
libvlc_audio_output_mixmode_t
Audio mix modes.
Definition: libvlc_media_player.h:2236
LIBVLC_API int libvlc_media_player_set_equalizer(libvlc_media_player_t *p_mi, libvlc_equalizer_t *p_equalizer)
Apply new equalizer settings to a media player.
LIBVLC_API int libvlc_audio_set_mixmode(libvlc_media_player_t *p_mi, libvlc_audio_output_mixmode_t mode)
Set current audio mix-mode.
libvlc_media_player_role
Media player roles.
Definition: libvlc_media_player.h:2670
LIBVLC_API int libvlc_audio_output_set(libvlc_media_player_t *p_mi, const char *psz_name)
Selects an audio output module.
LIBVLC_API const char * libvlc_audio_equalizer_get_preset_name(unsigned u_index)
Get the name of a particular equalizer preset.
LIBVLC_API unsigned libvlc_audio_equalizer_get_band_count(void)
Get the number of distinct frequency bands for an equalizer.
libvlc_audio_output_stereomode_t
Audio stereo modes.
Definition: libvlc_media_player.h:2223
LIBVLC_API int libvlc_media_player_set_role(libvlc_media_player_t *p_mi, unsigned role)
Sets the media role.
LIBVLC_API void libvlc_audio_toggle_mute(libvlc_media_player_t *p_mi)
Toggle mute status.
LIBVLC_API int libvlc_audio_equalizer_set_preamp(libvlc_equalizer_t *p_equalizer, float f_preamp)
Set a new pre-amplification value for an equalizer.
LIBVLC_API void libvlc_audio_set_mute(libvlc_media_player_t *p_mi, int status)
Set mute status.
LIBVLC_API float libvlc_audio_equalizer_get_band_frequency(unsigned u_index)
Get a particular equalizer band frequency.
LIBVLC_API float libvlc_audio_equalizer_get_preamp(libvlc_equalizer_t *p_equalizer)
Get the current pre-amplification value from an equalizer.
LIBVLC_API libvlc_audio_output_t * libvlc_audio_output_list_get(libvlc_instance_t *p_instance)
Gets the list of available audio output modules.
LIBVLC_API int libvlc_audio_set_volume(libvlc_media_player_t *p_mi, int i_volume)
Set current software audio volume.
LIBVLC_API int libvlc_media_player_get_role(libvlc_media_player_t *p_mi)
Gets the media role.
LIBVLC_API int libvlc_audio_equalizer_set_amp_at_index(libvlc_equalizer_t *p_equalizer, float f_amp, unsigned u_band)
Set a new amplification value for a particular equalizer frequency band.
LIBVLC_API int libvlc_audio_get_mute(libvlc_media_player_t *p_mi)
Get current mute status.
LIBVLC_API int libvlc_audio_get_volume(libvlc_media_player_t *p_mi)
Get current software audio volume.
LIBVLC_API int libvlc_audio_output_device_set(libvlc_media_player_t *mp, const char *device_id)
Configures an explicit audio output device.
LIBVLC_API libvlc_audio_output_mixmode_t libvlc_audio_get_mixmode(libvlc_media_player_t *p_mi)
Get current audio mix-mode.
enum libvlc_media_player_role libvlc_media_player_role_t
Media player roles.
LIBVLC_API libvlc_equalizer_t * libvlc_audio_equalizer_new(void)
Create a new default equalizer, with all frequency values zeroed.
LIBVLC_API int libvlc_audio_set_delay(libvlc_media_player_t *p_mi, int64_t i_delay)
Set current audio delay.
LIBVLC_API int libvlc_audio_set_stereomode(libvlc_media_player_t *p_mi, libvlc_audio_output_stereomode_t mode)
Set current audio stereo-mode.
LIBVLC_API void libvlc_audio_output_list_release(libvlc_audio_output_t *p_list)
Frees the list of available audio output modules.
LIBVLC_API float libvlc_audio_equalizer_get_amp_at_index(libvlc_equalizer_t *p_equalizer, unsigned u_band)
Get the amplification value for a particular equalizer frequency band.
LIBVLC_API libvlc_equalizer_t * libvlc_audio_equalizer_new_from_preset(unsigned u_index)
Create a new equalizer, with initial frequency values copied from an existing preset.
LIBVLC_API int64_t libvlc_audio_get_delay(libvlc_media_player_t *p_mi)
Get current audio delay.
LIBVLC_API void libvlc_media_player_record(libvlc_media_player_t *p_mi, bool enable, const char *dir_path)
Start/stop recording.
LIBVLC_API libvlc_audio_output_device_t * libvlc_audio_output_device_enum(libvlc_media_player_t *mp)
Gets a list of potential audio output devices.
LIBVLC_API unsigned libvlc_audio_equalizer_get_preset_count(void)
Get the number of equalizer presets.
LIBVLC_API char * libvlc_audio_output_device_get(libvlc_media_player_t *mp)
Get the current audio output device identifier.
LIBVLC_API libvlc_audio_output_stereomode_t libvlc_audio_get_stereomode(libvlc_media_player_t *p_mi)
Get current audio stereo-mode.
LIBVLC_API void libvlc_audio_equalizer_release(libvlc_equalizer_t *p_equalizer)
Release a previously created equalizer instance.
LIBVLC_API void libvlc_audio_output_device_list_release(libvlc_audio_output_device_t *p_list)
Frees a list of available audio output devices.
@ libvlc_AudioMixMode_4_0
Definition: libvlc_media_player.h:2240
@ libvlc_AudioMixMode_Unset
Definition: libvlc_media_player.h:2237
@ libvlc_AudioMixMode_5_1
Definition: libvlc_media_player.h:2241
@ libvlc_AudioMixMode_Stereo
Definition: libvlc_media_player.h:2238
@ libvlc_AudioMixMode_7_1
Definition: libvlc_media_player.h:2242
@ libvlc_AudioMixMode_Binaural
Definition: libvlc_media_player.h:2239
@ libvlc_role_Game
Video game.
Definition: libvlc_media_player.h:2675
@ libvlc_role_None
Don't use a media player role.
Definition: libvlc_media_player.h:2671
@ libvlc_role_Notification
User interaction feedback.
Definition: libvlc_media_player.h:2676
@ libvlc_role_Production
Audio editing/production.
Definition: libvlc_media_player.h:2678
@ libvlc_role_Communication
Speech, real-time communication.
Definition: libvlc_media_player.h:2674
@ libvlc_role_Music
Music (or radio) playback.
Definition: libvlc_media_player.h:2672
@ libvlc_role_Accessibility
Accessibility.
Definition: libvlc_media_player.h:2679
@ libvlc_role_Video
Video playback.
Definition: libvlc_media_player.h:2673
@ libvlc_role_Animation
Embedded animation (e.g.
Definition: libvlc_media_player.h:2677
@ libvlc_AudioStereoMode_Stereo
Definition: libvlc_media_player.h:2225
@ libvlc_AudioStereoMode_Right
Definition: libvlc_media_player.h:2228
@ libvlc_AudioStereoMode_Unset
Definition: libvlc_media_player.h:2224
@ libvlc_AudioStereoMode_Mono
Definition: libvlc_media_player.h:2230
@ libvlc_AudioStereoMode_Dolbys
Definition: libvlc_media_player.h:2229
@ libvlc_AudioStereoMode_Left
Definition: libvlc_media_player.h:2227
@ libvlc_AudioStereoMode_RStereo
Definition: libvlc_media_player.h:2226
struct libvlc_instance_t libvlc_instance_t
This structure is opaque.
Definition: libvlc.h:76
int64_t libvlc_time_t
Definition: libvlc.h:78
struct libvlc_event_manager_t libvlc_event_manager_t
Event manager that belongs to a libvlc object, and from whom events can be received.
Definition: libvlc.h:313
LIBVLC_API int64_t libvlc_media_player_time_point_get_next_date(const libvlc_media_player_time_point_t *point, int64_t system_now_us, int64_t interpolated_ts_us, int64_t next_interval_us)
Get the date of the next interval.
void(* libvlc_media_player_watch_time_on_discontinuity)(int64_t system_date_us, void *data)
Callback prototype that notify when the player is paused or a discontinuity occurred.
Definition: libvlc_media_player.h:2790
void(* libvlc_media_player_watch_time_on_update)(const libvlc_media_player_time_point_t *value, void *data)
Callback prototype that notify when the player state or time changed.
Definition: libvlc_media_player.h:2773
LIBVLC_API int libvlc_media_player_watch_time(libvlc_media_player_t *p_mi, int64_t min_period_us, libvlc_media_player_watch_time_on_update on_update, libvlc_media_player_watch_time_on_discontinuity on_discontinuity, void *cbs_data)
Watch for times updates.
struct libvlc_media_player_time_point_t libvlc_media_player_time_point_t
Media Player timer point.
LIBVLC_API void libvlc_media_player_unwatch_time(libvlc_media_player_t *p_mi)
Unwatch time updates.
LIBVLC_API int libvlc_media_player_time_point_interpolate(const libvlc_media_player_time_point_t *point, int64_t system_now_us, int64_t *out_ts_us, double *out_pos)
Interpolate a timer value to now.
bool(* libvlc_video_output_select_plane_cb)(void *opaque, size_t plane, void *output)
Tell the host the rendering for the given plane is about to start.
Definition: libvlc_media_player.h:771
void(* libvlc_video_unlock_cb)(void *opaque, void *picture, void *const *planes)
Callback prototype to unlock a picture buffer.
Definition: libvlc_media_player.h:366
LIBVLC_API libvlc_time_t libvlc_media_player_get_length(libvlc_media_player_t *p_mi)
Get the current movie length (in ms).
LIBVLC_API libvlc_media_tracklist_t * libvlc_media_player_get_tracklist(libvlc_media_player_t *p_mi, libvlc_track_type_t type, bool selected)
Get the track list for one type.
LIBVLC_API void libvlc_media_player_set_hwnd(libvlc_media_player_t *p_mi, void *drawable)
Set a Win32/Win64 API window handle (HWND) where the media player should render its video output.
LIBVLC_API libvlc_player_program_t * libvlc_player_programlist_at(libvlc_player_programlist_t *list, size_t index)
Get a program at a specific index.
LIBVLC_API void libvlc_player_program_delete(libvlc_player_program_t *program)
Delete a program struct.
LIBVLC_API libvlc_time_t libvlc_media_player_get_time(libvlc_media_player_t *p_mi)
Get the current movie time (in ms).
LIBVLC_API float libvlc_media_player_get_rate(libvlc_media_player_t *p_mi)
Get the requested movie play rate.
LIBVLC_API int libvlc_media_player_set_time(libvlc_media_player_t *p_mi, libvlc_time_t i_time, bool b_fast)
Set the movie time (in ms).
struct libvlc_equalizer_t libvlc_equalizer_t
Opaque equalizer handle.
Definition: libvlc_media_player.h:155
void(* libvlc_audio_set_volume_cb)(void *data, float volume, bool mute)
Callback prototype for audio volume change.
Definition: libvlc_media_player.h:1020
libvlc_teletext_key_t
Enumeration of teletext keys than can be passed via libvlc_video_set_teletext()
Definition: libvlc_media_player.h:142
void(* libvlc_video_display_cb)(void *opaque, void *picture)
Callback prototype to display a picture.
Definition: libvlc_media_player.h:379
LIBVLC_API bool libvlc_media_player_is_playing(libvlc_media_player_t *p_mi)
is_playing
LIBVLC_API unsigned libvlc_media_player_has_vout(libvlc_media_player_t *p_mi)
How many video outputs does this media player have?
struct libvlc_video_setup_device_cfg_t libvlc_video_setup_device_cfg_t
LIBVLC_API int libvlc_media_player_set_position(libvlc_media_player_t *p_mi, double f_pos, bool b_fast)
Set movie position as percentage between 0.0 and 1.0.
LIBVLC_API void libvlc_media_player_set_android_context(libvlc_media_player_t *p_mi, void *p_awindow_handler)
Set the android context.
LIBVLC_API void libvlc_media_player_previous_chapter(libvlc_media_player_t *p_mi)
Set previous chapter (if applicable)
void(* libvlc_video_frameMetadata_cb)(void *opaque, libvlc_video_metadata_type_t type, const void *metadata)
Callback prototype to receive metadata before rendering.
Definition: libvlc_media_player.h:701
LIBVLC_API libvlc_media_player_t * libvlc_media_player_retain(libvlc_media_player_t *p_mi)
Retain a reference to a media player object.
LIBVLC_API void libvlc_media_player_set_xwindow(libvlc_media_player_t *p_mi, uint32_t drawable)
Set an X Window System drawable where the media player should render its video output.
void(* libvlc_audio_cleanup_cb)(void *opaque)
Callback prototype for audio playback cleanup.
Definition: libvlc_media_player.h:1085
LIBVLC_API libvlc_media_track_t * libvlc_media_player_get_track_from_id(libvlc_media_player_t *p_mi, const char *psz_id)
LIBVLC_API void libvlc_media_player_set_title(libvlc_media_player_t *p_mi, int i_title)
Set movie title.
libvlc_video_marquee_option_t
Marq options definition.
Definition: libvlc_media_player.h:96
LIBVLC_API void libvlc_media_player_set_nsobject(libvlc_media_player_t *p_mi, void *drawable)
Set the NSView handler where the media player should render its video output.
LIBVLC_API libvlc_player_program_t * libvlc_media_player_get_program_from_id(libvlc_media_player_t *p_mi, int i_group_id)
Get a program struct from a program id.
void(* libvlc_video_cleanup_cb)(void *opaque)
Callback prototype to configure picture buffers format.
Definition: libvlc_media_player.h:422
struct libvlc_audio_output_t libvlc_audio_output_t
Description for audio output.
void(* libvlc_audio_resume_cb)(void *data, int64_t pts)
Callback prototype for audio resumption.
Definition: libvlc_media_player.h:990
struct libvlc_video_output_cfg_t libvlc_video_output_cfg_t
LIBVLC_API void * libvlc_media_player_get_hwnd(libvlc_media_player_t *p_mi)
Get the Windows API window handle (HWND) previously set with libvlc_media_player_set_hwnd().
LIBVLC_API libvlc_media_player_t * libvlc_media_player_new(libvlc_instance_t *p_libvlc_instance)
Create an empty Media Player object.
LIBVLC_API void libvlc_player_programlist_delete(libvlc_player_programlist_t *list)
Release a programlist.
void(* libvlc_video_output_resize_cb)(void *report_opaque, unsigned width, unsigned height)
Callback type that can be called to request a render size changes.
Definition: libvlc_media_player.h:727
LIBVLC_API void libvlc_media_player_unselect_track_type(libvlc_media_player_t *p_mi, libvlc_track_type_t type)
Unselect all tracks for a given type.
LIBVLC_API void libvlc_media_player_select_program_id(libvlc_media_player_t *p_mi, int i_group_id)
Select program with a given program id.
libvlc_video_color_space_t
Enumeration of the Video color spaces.
Definition: libvlc_media_player.h:313
LIBVLC_API void libvlc_video_set_callbacks(libvlc_media_player_t *mp, libvlc_video_lock_cb lock, libvlc_video_unlock_cb unlock, libvlc_video_display_cb display, void *opaque)
Set callbacks and private data to render decoded video to a custom area in memory.
LIBVLC_API void libvlc_media_player_pause(libvlc_media_player_t *p_mi)
Toggle pause (no effect if there is no media)
void *(* libvlc_video_lock_cb)(void *opaque, void **planes)
Callback prototype to allocate and lock a picture buffer.
Definition: libvlc_media_player.h:348
LIBVLC_API int libvlc_media_player_get_chapter_count_for_title(libvlc_media_player_t *p_mi, int i_title)
Get title chapter count.
LIBVLC_API void libvlc_video_set_format(libvlc_media_player_t *mp, const char *chroma, unsigned width, unsigned height, unsigned pitch)
Set decoded video chroma and dimensions.
libvlc_video_metadata_type_t
Definition: libvlc_media_player.h:689
LIBVLC_API void libvlc_media_player_next_chapter(libvlc_media_player_t *p_mi)
Set next chapter (if applicable)
LIBVLC_API void libvlc_media_player_set_pause(libvlc_media_player_t *mp, int do_pause)
Pause or resume (no effect if there is no media)
libvlc_navigate_mode_t
Navigation mode.
Definition: libvlc_media_player.h:113
LIBVLC_API libvlc_event_manager_t * libvlc_media_player_event_manager(libvlc_media_player_t *p_mi)
Get the Event Manager from which the media player send event.
struct libvlc_title_description_t libvlc_title_description_t
void(* libvlc_audio_flush_cb)(void *data, int64_t pts)
Callback prototype for audio buffer flush.
Definition: libvlc_media_player.h:1001
LIBVLC_API libvlc_player_programlist_t * libvlc_media_player_get_programlist(libvlc_media_player_t *p_mi)
Get the program list.
LIBVLC_API libvlc_player_program_t * libvlc_media_player_get_selected_program(libvlc_media_player_t *p_mi)
Get the selected program.
struct libvlc_player_programlist_t libvlc_player_programlist_t
Opaque struct containing a list of program.
Definition: libvlc_media_player.h:1537
LIBVLC_API void libvlc_media_player_navigate(libvlc_media_player_t *p_mi, unsigned navigate)
Navigate through DVD Menu.
void(* libvlc_video_output_cleanup_cb)(void *opaque)
Callback prototype called to release user data.
Definition: libvlc_media_player.h:560
libvlc_position_t
Enumeration of values used to set position (e.g.
Definition: libvlc_media_player.h:125
struct libvlc_video_render_cfg_t libvlc_video_render_cfg_t
void(* libvlc_audio_play_cb)(void *data, const void *samples, unsigned count, int64_t pts)
Callback prototype for audio playback.
Definition: libvlc_media_player.h:966
LIBVLC_API libvlc_media_t * libvlc_media_player_get_media(libvlc_media_player_t *p_mi)
Get the media used by the media_player.
LIBVLC_API bool libvlc_media_player_can_pause(libvlc_media_player_t *p_mi)
Can this media player be paused?
LIBVLC_API double libvlc_media_player_get_position(libvlc_media_player_t *p_mi)
Get movie position as percentage between 0.0 and 1.0.
bool(* libvlc_video_makeCurrent_cb)(void *opaque, bool enter)
Callback prototype to set up the OpenGL context for rendering.
Definition: libvlc_media_player.h:664
bool(* libvlc_video_update_output_cb)(void *opaque, const libvlc_video_render_cfg_t *cfg, libvlc_video_output_cfg_t *output)
Callback prototype called on video size changes.
Definition: libvlc_media_player.h:625
LIBVLC_API void libvlc_media_player_select_track(libvlc_media_player_t *p_mi, const libvlc_media_track_t *track)
Select a track.
LIBVLC_API int libvlc_media_player_set_rate(libvlc_media_player_t *p_mi, float rate)
Set movie play rate.
LIBVLC_API int libvlc_media_player_get_title_count(libvlc_media_player_t *p_mi)
Get movie title count.
libvlc_video_engine_t
Enumeration of the Video engine to be used on output.
Definition: libvlc_media_player.h:707
LIBVLC_API void * libvlc_media_player_get_nsobject(libvlc_media_player_t *p_mi)
Get the NSView handler previously set with libvlc_media_player_set_nsobject().
LIBVLC_API void libvlc_audio_set_volume_callback(libvlc_media_player_t *mp, libvlc_audio_set_volume_cb set_volume)
Set callbacks and private data for decoded audio.
void(* libvlc_audio_pause_cb)(void *data, int64_t pts)
Callback prototype for audio pause.
Definition: libvlc_media_player.h:978
LIBVLC_API void libvlc_audio_set_callbacks(libvlc_media_player_t *mp, libvlc_audio_play_cb play, libvlc_audio_pause_cb pause, libvlc_audio_resume_cb resume, libvlc_audio_flush_cb flush, libvlc_audio_drain_cb drain, void *opaque)
Sets callbacks and private data for decoded audio.
LIBVLC_API void libvlc_media_player_select_tracks_by_ids(libvlc_media_player_t *p_mi, libvlc_track_type_t type, const char *psz_ids)
Select tracks by their string identifier.
struct libvlc_player_program_t libvlc_player_program_t
LIBVLC_API libvlc_media_player_t * libvlc_media_player_new_from_media(libvlc_instance_t *inst, libvlc_media_t *p_md)
Create a Media Player object from a Media.
struct libvlc_media_player_t libvlc_media_player_t
Definition: libvlc_media_player.h:42
int(* libvlc_audio_setup_cb)(void **opaque, char *format, unsigned *rate, unsigned *channels)
Callback prototype to setup the audio playback.
Definition: libvlc_media_player.h:1076
struct libvlc_video_frame_hdr10_metadata_t libvlc_video_frame_hdr10_metadata_t
LIBVLC_API int libvlc_media_player_set_renderer(libvlc_media_player_t *p_mi, libvlc_renderer_item_t *p_item)
Set a renderer to the media player.
struct libvlc_chapter_description_t libvlc_chapter_description_t
Description for chapters.
LIBVLC_API int libvlc_media_player_get_chapter(libvlc_media_player_t *p_mi)
Get movie chapter.
LIBVLC_API uint32_t libvlc_media_player_get_xwindow(libvlc_media_player_t *p_mi)
Get the X Window System window identifier previously set with libvlc_media_player_set_xwindow().
libvlc_video_color_primaries_t
Enumeration of the Video color primaries.
Definition: libvlc_media_player.h:301
LIBVLC_API int libvlc_media_player_play(libvlc_media_player_t *p_mi)
Play.
LIBVLC_API libvlc_state_t libvlc_media_player_get_state(libvlc_media_player_t *p_mi)
Get current movie state.
bool(* libvlc_video_output_setup_cb)(void **opaque, const libvlc_video_setup_device_cfg_t *cfg, libvlc_video_setup_device_info_t *out)
Callback prototype called to initialize user data.
Definition: libvlc_media_player.h:549
LIBVLC_API int libvlc_media_player_stop_async(libvlc_media_player_t *p_mi)
Stop asynchronously.
LIBVLC_API void libvlc_media_player_release(libvlc_media_player_t *p_mi)
Release a media_player after use Decrement the reference count of a media player object.
LIBVLC_API int libvlc_media_player_get_chapter_count(libvlc_media_player_t *p_mi)
Get movie chapter count.
LIBVLC_API void libvlc_media_player_set_video_title_display(libvlc_media_player_t *p_mi, libvlc_position_t position, unsigned int timeout)
Set if, and how, the video title will be shown when media is played.
LIBVLC_API libvlc_media_track_t * libvlc_media_player_get_selected_track(libvlc_media_player_t *p_mi, libvlc_track_type_t type)
Get the selected track for one type.
LIBVLC_API int libvlc_media_player_add_slave(libvlc_media_player_t *p_mi, libvlc_media_slave_type_t i_type, const char *psz_uri, bool b_select)
Add a slave to the current media player.
LIBVLC_API void libvlc_media_player_next_frame(libvlc_media_player_t *p_mi)
Display the next frame (if supported)
void(* libvlc_video_output_set_resize_cb)(void *opaque, libvlc_video_output_resize_cb report_size_change, void *report_opaque)
Set the callback to call when the host app resizes the rendering area.
Definition: libvlc_media_player.h:743
struct libvlc_audio_output_device_t libvlc_audio_output_device_t
Description for audio output device.
LIBVLC_API void libvlc_media_player_set_media(libvlc_media_player_t *p_mi, libvlc_media_t *p_md)
Set the media that will be used by the media_player.
LIBVLC_API bool libvlc_media_player_is_seekable(libvlc_media_player_t *p_mi)
Is this media player seekable?
LIBVLC_API void libvlc_audio_set_format_callbacks(libvlc_media_player_t *mp, libvlc_audio_setup_cb setup, libvlc_audio_cleanup_cb cleanup)
Sets decoded audio format via callbacks.
unsigned(* libvlc_video_format_cb)(void **opaque, char *chroma, unsigned *width, unsigned *height, unsigned *pitches, unsigned *lines)
Callback prototype to configure picture buffers format.
Definition: libvlc_media_player.h:411
void(* libvlc_video_swap_cb)(void *opaque)
Callback prototype called after performing drawing calls.
Definition: libvlc_media_player.h:638
struct libvlc_video_setup_device_info_t libvlc_video_setup_device_info_t
LIBVLC_API size_t libvlc_player_programlist_count(const libvlc_player_programlist_t *list)
Get the number of programs in a programlist.
LIBVLC_API void libvlc_media_player_set_chapter(libvlc_media_player_t *p_mi, int i_chapter)
Set movie chapter (if applicable).
LIBVLC_API bool libvlc_media_player_program_scrambled(libvlc_media_player_t *p_mi)
Check if the current program is scrambled.
LIBVLC_API void libvlc_media_player_select_tracks(libvlc_media_player_t *p_mi, libvlc_track_type_t type, const libvlc_media_track_t **tracks, size_t track_count)
Select multiple tracks for one type.
libvlc_video_transfer_func_t
Enumeration of the Video transfer functions.
Definition: libvlc_media_player.h:322
void(* libvlc_audio_drain_cb)(void *data)
Callback prototype for audio buffer drain.
Definition: libvlc_media_player.h:1012
void *(* libvlc_video_getProcAddress_cb)(void *opaque, const char *fct_name)
Callback prototype to load opengl functions.
Definition: libvlc_media_player.h:674
LIBVLC_API void libvlc_audio_set_format(libvlc_media_player_t *mp, const char *format, unsigned rate, unsigned channels)
Sets a fixed decoded audio format.
LIBVLC_API bool libvlc_video_set_output_callbacks(libvlc_media_player_t *mp, libvlc_video_engine_t engine, libvlc_video_output_setup_cb setup_cb, libvlc_video_output_cleanup_cb cleanup_cb, libvlc_video_output_set_resize_cb resize_cb, libvlc_video_update_output_cb update_output_cb, libvlc_video_swap_cb swap_cb, libvlc_video_makeCurrent_cb makeCurrent_cb, libvlc_video_getProcAddress_cb getProcAddress_cb, libvlc_video_frameMetadata_cb metadata_cb, libvlc_video_output_select_plane_cb select_plane_cb, void *opaque)
Set callbacks and data to render decoded video to a custom texture.
LIBVLC_API void libvlc_video_set_format_callbacks(libvlc_media_player_t *mp, libvlc_video_format_cb setup, libvlc_video_cleanup_cb cleanup)
Set decoded video chroma and dimensions.
LIBVLC_API int libvlc_media_player_get_title(libvlc_media_player_t *p_mi)
Get movie title.
@ libvlc_teletext_key_index
Definition: libvlc_media_player.h:147
@ libvlc_teletext_key_green
Definition: libvlc_media_player.h:144
@ libvlc_teletext_key_blue
Definition: libvlc_media_player.h:146
@ libvlc_teletext_key_red
Definition: libvlc_media_player.h:143
@ libvlc_teletext_key_yellow
Definition: libvlc_media_player.h:145
@ libvlc_marquee_Color
string argument
Definition: libvlc_media_player.h:99
@ libvlc_marquee_Position
Definition: libvlc_media_player.h:101
@ libvlc_marquee_Y
Definition: libvlc_media_player.h:106
@ libvlc_marquee_Timeout
Definition: libvlc_media_player.h:104
@ libvlc_marquee_Enable
Definition: libvlc_media_player.h:97
@ libvlc_marquee_Opacity
Definition: libvlc_media_player.h:100
@ libvlc_marquee_X
Definition: libvlc_media_player.h:105
@ libvlc_marquee_Size
Definition: libvlc_media_player.h:103
@ libvlc_marquee_Refresh
Definition: libvlc_media_player.h:102
@ libvlc_marquee_Text
Definition: libvlc_media_player.h:98
@ libvlc_video_colorspace_BT2020
Definition: libvlc_media_player.h:316
@ libvlc_video_colorspace_BT709
Definition: libvlc_media_player.h:315
@ libvlc_video_colorspace_BT601
Definition: libvlc_media_player.h:314
@ libvlc_video_metadata_frame_hdr10
libvlc_video_frame_hdr10_metadata_t
Definition: libvlc_media_player.h:690
@ libvlc_navigate_right
Definition: libvlc_media_player.h:118
@ libvlc_navigate_left
Definition: libvlc_media_player.h:117
@ libvlc_navigate_activate
Definition: libvlc_media_player.h:114
@ libvlc_navigate_popup
Definition: libvlc_media_player.h:119
@ libvlc_navigate_up
Definition: libvlc_media_player.h:115
@ libvlc_navigate_down
Definition: libvlc_media_player.h:116
@ libvlc_position_bottom_right
Definition: libvlc_media_player.h:135
@ libvlc_position_top
Definition: libvlc_media_player.h:130
@ libvlc_position_left
Definition: libvlc_media_player.h:128
@ libvlc_position_top_left
Definition: libvlc_media_player.h:131
@ libvlc_position_bottom_left
Definition: libvlc_media_player.h:134
@ libvlc_position_right
Definition: libvlc_media_player.h:129
@ libvlc_position_disable
Definition: libvlc_media_player.h:126
@ libvlc_position_bottom
Definition: libvlc_media_player.h:133
@ libvlc_position_center
Definition: libvlc_media_player.h:127
@ libvlc_position_top_right
Definition: libvlc_media_player.h:132
@ libvlc_video_engine_opengl
Definition: libvlc_media_player.h:710
@ libvlc_video_engine_gles2
Definition: libvlc_media_player.h:711
@ libvlc_video_engine_d3d9
Direct3D9 rendering engine.
Definition: libvlc_media_player.h:715
@ libvlc_video_engine_disable
Disable rendering engine.
Definition: libvlc_media_player.h:709
@ libvlc_video_engine_d3d11
Direct3D11 rendering engine.
Definition: libvlc_media_player.h:713
@ libvlc_video_primaries_BT709
Definition: libvlc_media_player.h:304
@ libvlc_video_primaries_BT601_525
Definition: libvlc_media_player.h:302
@ libvlc_video_primaries_BT2020
Definition: libvlc_media_player.h:305
@ libvlc_video_primaries_BT601_625
Definition: libvlc_media_player.h:303
@ libvlc_video_primaries_BT470_M
Definition: libvlc_media_player.h:307
@ libvlc_video_primaries_DCI_P3
Definition: libvlc_media_player.h:306
@ libvlc_title_interactive
Definition: libvlc_media_player.h:50
@ libvlc_title_menu
Definition: libvlc_media_player.h:49
@ libvlc_video_transfer_func_HLG
Definition: libvlc_media_player.h:330
@ libvlc_video_transfer_func_BT470_M
Definition: libvlc_media_player.h:326
@ libvlc_video_transfer_func_BT709
Definition: libvlc_media_player.h:327
@ libvlc_video_transfer_func_PQ
Definition: libvlc_media_player.h:328
@ libvlc_video_transfer_func_SMPTE_240
Definition: libvlc_media_player.h:329
@ libvlc_video_transfer_func_SRGB
Definition: libvlc_media_player.h:324
@ libvlc_video_transfer_func_BT470_BG
Definition: libvlc_media_player.h:325
@ libvlc_video_transfer_func_LINEAR
Definition: libvlc_media_player.h:323
libvlc_video_orient_t
Definition: libvlc_media_track.h:57
libvlc_track_type_t
Definition: libvlc_media_track.h:43
struct libvlc_media_tracklist_t libvlc_media_tracklist_t
Opaque struct containing a list of tracks.
Definition: libvlc_media_track.h:162
libvlc_media_slave_type_t
Type of a media slave: subtitle or audio.
Definition: libvlc_media.h:193
libvlc_state_t
libvlc media or media_player state
Definition: libvlc_media.h:83
struct libvlc_media_t libvlc_media_t
Definition: libvlc_media.h:46
LIBVLC_API void libvlc_video_set_aspect_ratio(libvlc_media_player_t *p_mi, const char *psz_aspect)
Set new video aspect ratio.
LIBVLC_API void libvlc_video_set_marquee_int(libvlc_media_player_t *p_mi, unsigned option, int i_val)
Enable, disable or set an integer marquee option.
libvlc_video_adjust_option_t
option values for libvlc_video_{get,set}_adjust_{int,float,bool}
Definition: libvlc_media_player.h:2159
LIBVLC_API bool libvlc_get_fullscreen(libvlc_media_player_t *p_mi)
Get current fullscreen status.
LIBVLC_API void libvlc_video_set_crop_border(libvlc_media_player_t *mp, unsigned left, unsigned right, unsigned top, unsigned bottom)
Set the video crop borders.
LIBVLC_API void libvlc_video_set_deinterlace(libvlc_media_player_t *p_mi, int deinterlace, const char *psz_mode)
Enable or disable deinterlace filter.
LIBVLC_API void libvlc_video_set_crop_ratio(libvlc_media_player_t *mp, unsigned num, unsigned den)
Set/unset the video crop ratio.
LIBVLC_API int libvlc_media_player_get_full_title_descriptions(libvlc_media_player_t *p_mi, libvlc_title_description_t ***titles)
Get the full description of available titles.
LIBVLC_API void libvlc_video_set_scale(libvlc_media_player_t *p_mi, float f_factor)
Set the video scaling factor.
LIBVLC_API int libvlc_video_get_size(libvlc_media_player_t *p_mi, unsigned num, unsigned *px, unsigned *py)
Get the pixel dimensions of a video.
LIBVLC_API int64_t libvlc_video_get_spu_delay(libvlc_media_player_t *p_mi)
Get the current subtitle delay.
LIBVLC_API void libvlc_video_set_marquee_string(libvlc_media_player_t *p_mi, unsigned option, const char *psz_text)
Set a marquee string option.
LIBVLC_API void libvlc_video_set_logo_string(libvlc_media_player_t *p_mi, unsigned option, const char *psz_value)
Set logo option as string.
LIBVLC_API void libvlc_toggle_fullscreen(libvlc_media_player_t *p_mi)
Toggle fullscreen status on non-embedded video outputs.
LIBVLC_API float libvlc_video_get_adjust_float(libvlc_media_player_t *p_mi, unsigned option)
Get float adjust option.
LIBVLC_API libvlc_video_viewpoint_t * libvlc_video_new_viewpoint(void)
Create a video viewpoint structure.
LIBVLC_API void libvlc_video_set_adjust_int(libvlc_media_player_t *p_mi, unsigned option, int value)
Set adjust option as integer.
LIBVLC_API int libvlc_video_get_teletext(libvlc_media_player_t *p_mi)
Get current teletext page requested or 0 if it's disabled.
LIBVLC_API void libvlc_video_set_key_input(libvlc_media_player_t *p_mi, unsigned on)
Enable or disable key press events handling, according to the LibVLC hotkeys configuration.
LIBVLC_API int libvlc_media_player_get_full_chapter_descriptions(libvlc_media_player_t *p_mi, int i_chapters_of_title, libvlc_chapter_description_t ***pp_chapters)
Get the full description of available chapters.
LIBVLC_API float libvlc_video_get_spu_text_scale(libvlc_media_player_t *p_mi)
Get the current subtitle text scale.
LIBVLC_API void libvlc_chapter_descriptions_release(libvlc_chapter_description_t **p_chapters, unsigned i_count)
Release a chapter description.
LIBVLC_API void libvlc_video_set_spu_text_scale(libvlc_media_player_t *p_mi, float f_scale)
Set the subtitle text scale.
LIBVLC_API int libvlc_video_set_spu_delay(libvlc_media_player_t *p_mi, int64_t i_delay)
Set the subtitle delay.
LIBVLC_API int libvlc_video_get_logo_int(libvlc_media_player_t *p_mi, unsigned option)
Get integer logo option.
LIBVLC_API int libvlc_video_take_snapshot(libvlc_media_player_t *p_mi, unsigned num, const char *psz_filepath, unsigned int i_width, unsigned int i_height)
Take a snapshot of the current video window.
LIBVLC_API void libvlc_title_descriptions_release(libvlc_title_description_t **p_titles, unsigned i_count)
Release a title description.
LIBVLC_API void libvlc_video_set_crop_window(libvlc_media_player_t *mp, unsigned x, unsigned y, unsigned width, unsigned height)
Set the video crop window.
LIBVLC_API float libvlc_video_get_scale(libvlc_media_player_t *p_mi)
Get the current video scaling factor.
libvlc_video_logo_option_t
option values for libvlc_video_{get,set}_logo_{int,string}
Definition: libvlc_media_player.h:2113
LIBVLC_API int libvlc_video_update_viewpoint(libvlc_media_player_t *p_mi, const libvlc_video_viewpoint_t *p_viewpoint, bool b_absolute)
Update the video viewpoint information.
LIBVLC_API char * libvlc_video_get_aspect_ratio(libvlc_media_player_t *p_mi)
Get current video aspect ratio.
LIBVLC_API void libvlc_set_fullscreen(libvlc_media_player_t *p_mi, bool b_fullscreen)
Enable or disable fullscreen.
LIBVLC_API int libvlc_video_get_adjust_int(libvlc_media_player_t *p_mi, unsigned option)
Get integer adjust option.
LIBVLC_API void libvlc_video_set_teletext(libvlc_media_player_t *p_mi, int i_page)
Set new teletext page to retrieve.
LIBVLC_API int libvlc_video_get_marquee_int(libvlc_media_player_t *p_mi, unsigned option)
Get an integer marquee option value.
LIBVLC_API void libvlc_video_set_mouse_input(libvlc_media_player_t *p_mi, unsigned on)
Enable or disable mouse click events handling.
LIBVLC_API void libvlc_video_set_adjust_float(libvlc_media_player_t *p_mi, unsigned option, float value)
Set adjust option as float.
LIBVLC_API int libvlc_video_get_cursor(libvlc_media_player_t *p_mi, unsigned num, int *px, int *py)
Get the mouse pointer coordinates over a video.
LIBVLC_API void libvlc_video_set_logo_int(libvlc_media_player_t *p_mi, unsigned option, int value)
Set logo option as integer.
@ libvlc_adjust_Gamma
Definition: libvlc_media_player.h:2165
@ libvlc_adjust_Hue
Definition: libvlc_media_player.h:2163
@ libvlc_adjust_Enable
Definition: libvlc_media_player.h:2160
@ libvlc_adjust_Brightness
Definition: libvlc_media_player.h:2162
@ libvlc_adjust_Saturation
Definition: libvlc_media_player.h:2164
@ libvlc_adjust_Contrast
Definition: libvlc_media_player.h:2161
@ libvlc_logo_position
Definition: libvlc_media_player.h:2121
@ libvlc_logo_repeat
Definition: libvlc_media_player.h:2119
@ libvlc_logo_delay
Definition: libvlc_media_player.h:2118
@ libvlc_logo_opacity
Definition: libvlc_media_player.h:2120
@ libvlc_logo_y
Definition: libvlc_media_player.h:2117
@ libvlc_logo_file
string argument, "file,d,t;file,d,t;..."
Definition: libvlc_media_player.h:2115
@ libvlc_logo_x
Definition: libvlc_media_player.h:2116
@ libvlc_logo_enable
Definition: libvlc_media_player.h:2114
#define LIBVLC_API
Definition: libvlc.h:42
int i_type
Definition: httpd.c:1282
struct libvlc_renderer_item_t libvlc_renderer_item_t
Definition: libvlc_events.h:38
vlc_mutex_t lock
Definition: rand.c:33
Description for audio output device.
Definition: libvlc_media_player.h:86
char * psz_device
Device identifier string.
Definition: libvlc_media_player.h:88
struct libvlc_audio_output_device_t * p_next
Next entry in list.
Definition: libvlc_media_player.h:87
char * psz_description
User-friendly device description.
Definition: libvlc_media_player.h:89
Description for audio output.
Definition: libvlc_media_player.h:75
char * psz_name
Definition: libvlc_media_player.h:76
struct libvlc_audio_output_t * p_next
Definition: libvlc_media_player.h:78
char * psz_description
Definition: libvlc_media_player.h:77
Description for chapters.
Definition: libvlc_media_player.h:64
char * psz_name
chapter name
Definition: libvlc_media_player.h:67
int64_t i_time_offset
time-offset of the chapter in milliseconds
Definition: libvlc_media_player.h:65
int64_t i_duration
duration of the chapter in milliseconds
Definition: libvlc_media_player.h:66
Media Player timer point.
Definition: libvlc_media_player.h:2736
int64_t system_date_us
System date, in us, of this record (always valid).
Definition: libvlc_media_player.h:2753
int64_t ts_us
Valid time, in us >= 0 or -1.
Definition: libvlc_media_player.h:2742
double position
Position in the range [0.0f;1.0].
Definition: libvlc_media_player.h:2738
int64_t length_us
Valid length, in us >= 1 or 0.
Definition: libvlc_media_player.h:2744
double rate
Rate of the player.
Definition: libvlc_media_player.h:2740
Definition: libvlc_media_track.h:121
Definition: libvlc_media_player.h:1523
bool b_scrambled
True if the program is scrambled.
Definition: libvlc_media_player.h:1531
int i_group_id
Id used for libvlc_media_player_select_program()
Definition: libvlc_media_player.h:1525
char * psz_name
Program name, always valid.
Definition: libvlc_media_player.h:1527
bool b_selected
True if the program is selected.
Definition: libvlc_media_player.h:1529
Definition: libvlc_media_player.h:54
char * psz_name
title name
Definition: libvlc_media_player.h:56
unsigned i_flags
info if item was recognized as a menu, interactive or plain content by the demuxer
Definition: libvlc_media_player.h:57
int64_t i_duration
duration in milliseconds
Definition: libvlc_media_player.h:55
Definition: libvlc_media_player.h:677
uint16_t BluePrimary[2]
Definition: libvlc_media_player.h:681
unsigned int MinMasteringLuminance
Definition: libvlc_media_player.h:684
uint16_t RedPrimary[2]
Definition: libvlc_media_player.h:679
uint16_t WhitePoint[2]
Definition: libvlc_media_player.h:682
uint16_t MaxFrameAverageLightLevel
Definition: libvlc_media_player.h:686
uint16_t GreenPrimary[2]
Definition: libvlc_media_player.h:680
uint16_t MaxContentLightLevel
Definition: libvlc_media_player.h:685
unsigned int MaxMasteringLuminance
Definition: libvlc_media_player.h:683
Definition: libvlc_media_player.h:583
libvlc_video_color_space_t colorspace
video color space
Definition: libvlc_media_player.h:599
bool full_range
Video is full range or studio/limited range.
Definition: libvlc_media_player.h:597
libvlc_video_color_primaries_t primaries
video color primaries
Definition: libvlc_media_player.h:601
void * p_surface
currently unused
Definition: libvlc_media_player.h:594
libvlc_video_transfer_func_t transfer
video transfer function
Definition: libvlc_media_player.h:603
int dxgi_format
The rendering DXGI_FORMAT for libvlc_video_engine_d3d11.
Definition: libvlc_media_player.h:586
uint32_t d3d9_format
The rendering D3DFORMAT for libvlc_video_engine_d3d9.
Definition: libvlc_media_player.h:588
int opengl_format
The rendering GLint GL_RGBA or GL_RGB for libvlc_video_engine_opengl and for libvlc_video_engine_gles...
Definition: libvlc_media_player.h:592
libvlc_video_orient_t orientation
video surface orientation
Definition: libvlc_media_player.h:605
Definition: libvlc_media_player.h:563
libvlc_video_transfer_func_t transfer
video transfer function
Definition: libvlc_media_player.h:577
libvlc_video_color_primaries_t primaries
video color primaries
Definition: libvlc_media_player.h:575
bool full_range
video is full range or studio/limited range
Definition: libvlc_media_player.h:571
libvlc_video_color_space_t colorspace
video color space
Definition: libvlc_media_player.h:573
void * device
device used for rendering, IDirect3DDevice9* for D3D9
Definition: libvlc_media_player.h:579
unsigned height
rendering video height in pixel
Definition: libvlc_media_player.h:567
unsigned bitdepth
rendering video bit depth in bits per channel
Definition: libvlc_media_player.h:569
unsigned width
rendering video width in pixel
Definition: libvlc_media_player.h:565
Definition: libvlc_media_player.h:506
bool hardware_decoding
Definition: libvlc_media_player.h:507
Definition: libvlc_media_player.h:511
void * device
Definition: libvlc_media_player.h:518
void * device_context
Definition: libvlc_media_player.h:514
struct libvlc_video_setup_device_info_t::@177::@180 d3d9
struct libvlc_video_setup_device_info_t::@177::@179 d3d11
void * context_mutex
ID3D11DeviceContext*.
Definition: libvlc_media_player.h:515
int adapter
IDirect3D9*.
Definition: libvlc_media_player.h:519
Viewpoint.
Definition: libvlc_media_track.h:82
const char * psz_name
Definition: text_style.c:33
char psz_value[8]
Definition: vout_intf.c:99