VLC 4.0.0-dev
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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-2024 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 * Maxime Chapelet <umxprime at videolabs dot io>
10 * Alexandre Janniaux <ajanni@videolabs.io>
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU Lesser General Public License as published by
14 * the Free Software Foundation; either version 2.1 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public License
23 * along with this program; if not, write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
26
27#ifndef VLC_LIBVLC_MEDIA_PLAYER_H
28#define VLC_LIBVLC_MEDIA_PLAYER_H 1
29
30/* Definitions of enum properties for video */
31#include "libvlc_video.h"
32
33# ifdef __cplusplus
34extern "C" {
35# else
36# include <stdbool.h>
37# endif
38
47
48/** \defgroup libvlc_media_player LibVLC media player
49 * \ingroup libvlc
50 * A LibVLC media player plays one media (usually in a custom drawable).
51 * @{
52 * \file
53 * LibVLC simple media player external API
54 */
55
57
58/**
59 * Description for titles
60 */
61enum
62{
65};
66
68{
69 int64_t i_duration; /**< duration in milliseconds */
70 char *psz_name; /**< title name */
71 unsigned i_flags; /**< info if item was recognized as a menu, interactive or plain content by the demuxer */
73
74/**
75 * Description for chapters
76 */
78{
79 int64_t i_time_offset; /**< time-offset of the chapter in milliseconds */
80 int64_t i_duration; /**< duration of the chapter in milliseconds */
81 char *psz_name; /**< chapter name */
83
84/**
85 * Description for audio output. It contains
86 * name, description and pointer to next record.
87 */
95
96/**
97 * Description for audio output device.
98 */
100{
101 struct libvlc_audio_output_device_t *p_next; /**< Next entry in list */
102 char *psz_device; /**< Device identifier string */
103 char *psz_description; /**< User-friendly device description */
104 /* More fields may be added here in later versions */
106
107/**
108 * Marq options definition
109 */
122
123/**
124 * Navigation mode
125 */
135
136/**
137 * Enumeration of values used to set position (e.g. of video title).
138 */
151
152/**
153 * Enumeration of values used to set the video fitting inside the display area.
154 */
156 libvlc_video_fit_none = 0, /**< Explicit zoom set by \ref libvlc_video_set_scale */
157 libvlc_video_fit_smaller, /**< Fit inside / to smallest display dimension */
158 libvlc_video_fit_larger, /**< Fit outside / to largest display dimension */
159 libvlc_video_fit_width, /**< Fit to display width */
160 libvlc_video_fit_height, /**< Fit to display height */
162
163/**
164 * Enumeration of teletext keys than can be passed via
165 * libvlc_video_set_teletext()
166 */
174
175/**
176 * A to B loop state
177 */
183
184/**
185 * Opaque equalizer handle.
186 *
187 * Equalizer settings can be applied to a media player.
188 */
190
191/**
192 * Create an empty Media Player object
193 *
194 * \param p_libvlc_instance the libvlc instance in which the Media Player
195 * should be created.
196 * \return a new media player object, or NULL on error.
197 * It must be released by libvlc_media_player_release().
198 */
200
201/**
202 * Create a Media Player object from a Media
203 *
204 * \param inst LibVLC instance to create a media player with
205 * \param p_md the media. Afterwards the p_md can be safely
206 * destroyed.
207 * \return a new media player object, or NULL on error.
208 * It must be released by libvlc_media_player_release().
209 */
211
212/**
213 * Release a media_player after use
214 * Decrement the reference count of a media player object. If the
215 * reference count is 0, then libvlc_media_player_release() will
216 * release the media player object. If the media player object
217 * has been released, then it should not be used again.
218 *
219 * \param p_mi the Media Player to free
220 */
222
223/**
224 * Retain a reference to a media player object. Use
225 * libvlc_media_player_release() to decrement reference count.
226 *
227 * \param p_mi media player object
228 * \return the same object
229 */
231
232/**
233 * Set the media that will be used by the media_player. If any,
234 * previous md will be released.
235 *
236 * \note The user should listen to the libvlc_MediaPlayerMediaChanged event, to
237 * know when the new media is actually used by the player (or to known that the
238 * older media is no longer used).
239 *
240 * \param p_mi the Media Player
241 * \param p_md the Media. Afterwards the p_md can be safely
242 * destroyed.
243 */
245 libvlc_media_t *p_md );
246
247/**
248 * Get the media used by the media_player.
249 *
250 * \warning Calling this function just after libvlc_media_player_set_media()
251 * will return the media that was just set, but this media might not be
252 * currently used internally by the player. To detect such case, the user
253 * should listen to the libvlc_MediaPlayerMediaChanged event.
254 *
255 * \param p_mi the Media Player
256 * \return the media associated with p_mi, or NULL if no
257 * media is associated
258 */
260
261/**
262 * Get the Event Manager from which the media player send event.
263 *
264 * \param p_mi the Media Player
265 * \return the event manager associated with p_mi
266 */
268
269/**
270 * is_playing
271 *
272 * \param p_mi the Media Player
273 * \retval true media player is playing
274 * \retval false media player is not playing
275 */
277
278/**
279 * Play
280 *
281 * \param p_mi the Media Player
282 * \return 0 if playback started (and was already started), or -1 on error.
283 */
285
286/**
287 * Pause or resume (no effect if there is no media)
288 *
289 * \param mp the Media Player
290 * \param do_pause play/resume if zero, pause if non-zero
291 * \version LibVLC 1.1.1 or later
292 */
294 int do_pause );
295
296/**
297 * Toggle pause (no effect if there is no media)
298 *
299 * \param p_mi the Media Player
300 */
302
303/**
304 * Stop asynchronously
305 *
306 * \note This function is asynchronous. In case of success, the user should
307 * wait for the libvlc_MediaPlayerStopped event to know when the stop is
308 * finished.
309 *
310 * \param p_mi the Media Player
311 * \return 0 if the player is being stopped, -1 otherwise (no-op)
312 * \version LibVLC 4.0.0 or later
313 */
315
316/**
317 * Set a renderer to the media player
318 *
319 * \note must be called before the first call of libvlc_media_player_play() to
320 * take effect.
321 *
322 * \see libvlc_renderer_discoverer_new
323 *
324 * \param p_mi the Media Player
325 * \param p_item an item discovered by libvlc_renderer_discoverer_start()
326 * \return 0 on success, -1 on error.
327 * \version LibVLC 3.0.0 or later
328 */
330 libvlc_renderer_item_t *p_item );
331
332/**
333 * Enumeration of the Video color primaries.
334 */
343
344/**
345 * Enumeration of the Video color spaces.
346 */
352
353/**
354 * Enumeration of the Video transfer functions.
355 */
366
367
368/**
369 * Callback prototype to allocate and lock a picture buffer.
370 *
371 * Whenever a new video frame needs to be decoded, the lock callback is
372 * invoked. Depending on the video chroma, one or three pixel planes of
373 * adequate dimensions must be returned via the second parameter. Those
374 * planes must be aligned on 32-bytes boundaries.
375 *
376 * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
377 * \param[out] planes start address of the pixel planes (LibVLC allocates the array
378 * of void pointers, this callback must initialize the array)
379 * \return a private pointer for the display and unlock callbacks to identify
380 * the picture buffers
381 */
382typedef void *(*libvlc_video_lock_cb)(void *opaque, void **planes);
383
384/**
385 * Callback prototype to unlock a picture buffer.
386 *
387 * When the video frame decoding is complete, the unlock callback is invoked.
388 * This callback might not be needed at all. It is only an indication that the
389 * application can now read the pixel values if it needs to.
390 *
391 * \note A picture buffer is unlocked after the picture is decoded,
392 * but before the picture is displayed.
393 *
394 * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
395 * \param[in] picture private pointer returned from the @ref libvlc_video_lock_cb
396 * callback
397 * \param[in] planes pixel planes as defined by the @ref libvlc_video_lock_cb
398 * callback (this parameter is only for convenience)
399 */
400typedef void (*libvlc_video_unlock_cb)(void *opaque, void *picture,
401 void *const *planes);
402
403/**
404 * Callback prototype to display a picture.
405 *
406 * When the video frame needs to be shown, as determined by the media playback
407 * clock, the display callback is invoked.
408 *
409 * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
410 * \param[in] picture private pointer returned from the @ref libvlc_video_lock_cb
411 * callback
412 */
413typedef void (*libvlc_video_display_cb)(void *opaque, void *picture);
414
415/**
416 * Callback prototype to configure picture buffers format.
417 * This callback gets the format of the video as output by the video decoder
418 * and the chain of video filters (if any). It can opt to change any parameter
419 * as it needs. In that case, LibVLC will attempt to convert the video format
420 * (rescaling and chroma conversion) but these operations can be CPU intensive.
421 *
422 * \param[in,out] opaque pointer to the private pointer passed to
423 * libvlc_video_set_callbacks()
424 * \param[in,out] chroma pointer to the 4 bytes video format identifier
425 * \param[in,out] width pointer to the buffer width in pixels
426 * \param[in,out] height pointer to the buffer height in pixels
427 * \param[out] pitches table of scanline pitches in bytes for each pixel plane
428 * (the table is allocated by LibVLC)
429 * \param[out] lines table of scanlines count for each plane
430 * \return the number of picture buffers allocated, 0 indicates failure
431 *
432 * \version LibVLC 4.0.0 and later.
433 * \param[in] width pointer to display width - 1 in pixels
434 * \param[in] height pointer to display height - 1 in pixels
435 *
436 * \note
437 * For each pixels plane, the scanline pitch must be bigger than or equal to
438 * the number of bytes per pixel multiplied by the pixel width.
439 * Similarly, the number of scanlines must be bigger than of equal to
440 * the pixel height.
441 * Furthermore, we recommend that pitches and lines be multiple of 32
442 * to not break assumptions that might be held by optimized code
443 * in the video decoders, video filters and/or video converters.
444 */
445typedef unsigned (*libvlc_video_format_cb)(void **opaque, char *chroma,
446 unsigned *width, unsigned *height,
447 unsigned *pitches,
448 unsigned *lines);
449
450/**
451 * Callback prototype to configure picture buffers format.
452 *
453 * \param[in] opaque private pointer as passed to libvlc_video_set_format_callbacks()
454 * (and possibly modified by @ref libvlc_video_format_cb)
455 */
456typedef void (*libvlc_video_cleanup_cb)(void *opaque);
457
458
459/**
460 * Set callbacks and private data to render decoded video to a custom area
461 * in memory.
462 * Use libvlc_video_set_format() or libvlc_video_set_format_callbacks()
463 * to configure the decoded format.
464 *
465 * \warning Rendering video into custom memory buffers is considerably less
466 * efficient than rendering in a custom window as normal.
467 *
468 * For optimal performances, VLC media player renders into a custom window, and
469 * does not use this function and associated callbacks. It is <b>highly
470 * recommended</b> that other LibVLC-based application do likewise.
471 * To embed video in a window, use libvlc_media_player_set_xwindow() or
472 * equivalent depending on the operating system.
473 *
474 * If window embedding does not fit the application use case, then a custom
475 * LibVLC video output display plugin is required to maintain optimal video
476 * rendering performances.
477 *
478 * The following limitations affect performance:
479 * - Hardware video decoding acceleration will either be disabled completely,
480 * or require (relatively slow) copy from video/DSP memory to main memory.
481 * - Sub-pictures (subtitles, on-screen display, etc.) must be blent into the
482 * main picture by the CPU instead of the GPU.
483 * - Depending on the video format, pixel format conversion, picture scaling,
484 * cropping and/or picture re-orientation, must be performed by the CPU
485 * instead of the GPU.
486 * - Memory copying is required between LibVLC reference picture buffers and
487 * application buffers (between lock and unlock callbacks).
488 *
489 * \param mp the media player
490 * \param lock callback to lock video memory (must not be NULL)
491 * \param unlock callback to unlock video memory (or NULL if not needed)
492 * \param display callback to display video (or NULL if not needed)
493 * \param opaque private pointer for the three callbacks (as first parameter)
494 * \version LibVLC 1.1.1 or later
495 */
501 void *opaque );
502
503/**
504 * Set decoded video chroma and dimensions.
505 * This only works in combination with libvlc_video_set_callbacks(),
506 * and is mutually exclusive with libvlc_video_set_format_callbacks().
507 *
508 * \param mp the media player
509 * \param chroma a four-characters string identifying the chroma
510 * (e.g. "RV32" or "YUYV")
511 * \param width pixel width
512 * \param height pixel height
513 * \param pitch line pitch (in bytes)
514 * \version LibVLC 1.1.1 or later
515 * \bug All pixel planes are expected to have the same pitch.
516 * To use the YCbCr color space with chrominance subsampling,
517 * consider using libvlc_video_set_format_callbacks() instead.
518 */
520void libvlc_video_set_format( libvlc_media_player_t *mp, const char *chroma,
521 unsigned width, unsigned height,
522 unsigned pitch );
523
524/**
525 * Set decoded video chroma and dimensions. This only works in combination with
526 * libvlc_video_set_callbacks().
527 *
528 * \param mp the media player
529 * \param setup callback to select the video format (cannot be NULL)
530 * \param cleanup callback to release any allocated resources (or NULL)
531 * \version LibVLC 2.0.0 or later
532 */
536 libvlc_video_cleanup_cb cleanup );
537
538
540{
541 bool hardware_decoding; /** set if D3D11_CREATE_DEVICE_VIDEO_SUPPORT is needed for D3D11 */
543
545{
546 union {
547 struct {
548 void *device_context; /** ID3D11DeviceContext* */
549 void *context_mutex; /** Windows Mutex HANDLE to protect ID3D11DeviceContext usage */
551 struct {
552 void *device; /** IDirect3D9* */
553 int adapter; /** Adapter to use with the IDirect3D9* */
555 };
557
558/**
559 * Callback prototype called to initialize user data.
560 * Setup the rendering environment.
561 *
562 * \param[in,out] opaque private pointer passed to the @a libvlc_video_set_output_callbacks()
563 * on input. The callback can change this value on output to be
564 * passed to all the other callbacks set on @a libvlc_video_set_output_callbacks().
565 * \param[in] cfg requested configuration of the video device
566 * \param[out] out libvlc_video_setup_device_info_t* to fill
567 * \return true on success
568 * \version LibVLC 4.0.0 or later
569 *
570 * For \ref libvlc_video_engine_d3d9 the output must be a IDirect3D9*.
571 * A reference to this object is held until the \ref libvlc_video_output_cleanup_cb is called.
572 * the device must be created with D3DPRESENT_PARAMETERS.hDeviceWindow set to 0.
573 *
574 * For \ref libvlc_video_engine_d3d11 the output must be a ID3D11DeviceContext*.
575 * A reference to this object is held until the \ref libvlc_video_output_cleanup_cb is called.
576 * The ID3D11Device used to create ID3D11DeviceContext must have multithreading enabled.
577 *
578 * If the ID3D11DeviceContext is used outside of the callbacks called by libvlc, the host
579 * MUST use a mutex to protect the access to the ID3D11DeviceContext of libvlc. This mutex
580 * value is set on d3d11.context_mutex. If the ID3D11DeviceContext is not used outside of
581 * the callbacks, the mutex d3d11.context_mutex may be NULL.
582 */
583typedef bool (*libvlc_video_output_setup_cb)(void **opaque,
586
587
588/**
589 * Callback prototype called to release user data
590 *
591 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
592 * \version LibVLC 4.0.0 or later
593 */
594typedef void (*libvlc_video_output_cleanup_cb)(void* opaque);
595
597{
598 /** rendering video width in pixel */
599 unsigned width;
600 /** rendering video height in pixel */
601 unsigned height;
602 /** rendering video bit depth in bits per channel */
603 unsigned bitdepth;
604 /** video is full range or studio/limited range */
606 /** video color space */
608 /** video color primaries */
610 /** video transfer function */
612 /** device used for rendering, IDirect3DDevice9* for D3D9 */
613 void *device;
615
617{
618 union {
619 /** The rendering DXGI_FORMAT for \ref libvlc_video_engine_d3d11. */
621 /** The rendering D3DFORMAT for \ref libvlc_video_engine_d3d9. */
622 uint32_t d3d9_format;
623 /** The rendering GLint GL_RGBA or GL_RGB for
624 * \ref libvlc_video_engine_opengl and for
625 * \ref libvlc_video_engine_gles2. */
627 /** currently unused */
629 struct {
630 /** Pointer to an ANativeWindow, used for video rendering */
631 void *video;
632 /** Pointer to an ANativeWindow, used for subtitles rendering, if
633 * blending subtitles into the video surface is not possible (when
634 * using MediaCodec with direct hw rendering) */
635 void *subtitle;
637 };
638 /** Video is full range or studio/limited range. */
640 /** video color space */
642 /** video color primaries */
644 /** video transfer function */
646 /** video surface orientation */
649
650/**
651 * Callback prototype called on video size changes.
652 * Update the rendering output setup.
653 *
654 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
655 * \param[in] cfg configuration of the video that will be rendered
656 * \param[out] output configuration describing with how the rendering is setup
657 * \version LibVLC 4.0.0 or later
658 *
659 * \note the configuration device for Direct3D9 is the IDirect3DDevice9 that VLC
660 * uses to render. The host must set a Render target and call Present()
661 * when it needs the drawing from VLC to be done. This object is not valid
662 * anymore after Cleanup is called.
663 * Tone mapping, range and color conversion will be done depending on the
664 * values set in the output structure. It can be ignored in the \ref
665 * libvlc_video_engine_anw case.
666 */
667typedef bool (*libvlc_video_update_output_cb)(void* opaque, const libvlc_video_render_cfg_t *cfg,
669
670
671/**
672 * Callback prototype called after performing drawing calls.
673 *
674 * This callback is called outside of libvlc_video_makeCurrent_cb current/not-current
675 * calls.
676 *
677 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
678 * \version LibVLC 4.0.0 or later
679 */
680typedef void (*libvlc_video_swap_cb)(void* opaque);
681
682/**
683 * Callback prototype to set up the OpenGL context for rendering.
684 * Tell the host the rendering is about to start/has finished.
685 *
686 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
687 * \param[in] enter true to set the context as current, false to unset it
688 * \return true on success
689 * \version LibVLC 4.0.0 or later
690 *
691 * On Direct3D11 the following may change on the provided ID3D11DeviceContext*
692 * between \p enter being true and \p enter being false:
693 * - IASetPrimitiveTopology()
694 * - IASetInputLayout()
695 * - IASetVertexBuffers()
696 * - IASetIndexBuffer()
697 * - VSSetConstantBuffers()
698 * - VSSetShader()
699 * - PSSetSamplers()
700 * - PSSetConstantBuffers()
701 * - PSSetShaderResources()
702 * - PSSetShader()
703 * - RSSetViewports()
704 * - DrawIndexed()
705 */
706typedef bool (*libvlc_video_makeCurrent_cb)(void* opaque, bool enter);
707
708/**
709 * Callback prototype to load opengl functions
710 *
711 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
712 * \param fct_name name of the opengl function to load
713 * \return a pointer to the named OpenGL function the NULL otherwise
714 * \version LibVLC 4.0.0 or later
715 */
716typedef void* (*libvlc_video_getProcAddress_cb)(void* opaque, const char* fct_name);
717
719{
720 /* similar to SMPTE ST 2086 mastering display color volume */
721 uint16_t RedPrimary[2];
722 uint16_t GreenPrimary[2];
723 uint16_t BluePrimary[2];
724 uint16_t WhitePoint[2];
730
734
735/**
736 * Callback prototype to receive metadata before rendering.
737 *
738 * \param[in] opaque private pointer passed to the @a libvlc_video_set_output_callbacks()
739 * \param[in] type type of data passed in metadata
740 * \param[in] metadata the type of metadata
741 * \version LibVLC 4.0.0 or later
742 */
743typedef void (*libvlc_video_frameMetadata_cb)(void* opaque, libvlc_video_metadata_type_t type, const void *metadata);
744
745/**
746 * Enumeration of the Video engine to be used on output.
747 * can be passed to @a libvlc_video_set_output_callbacks
748 */
750 /** Disable rendering engine */
754 /** Direct3D11 rendering engine */
756 /** Direct3D9 rendering engine */
758
759 /**
760 * Android ANativeWindow. It can be set in \ref libvlc_video_output_cfg_t
761 * from the \ref libvlc_video_update_output_cb callback. The ANativeWindow
762 * can be created via:
763 * - 'ANativeWindow_fromSurface': from a JAVA SurfaceView
764 * - 'AImageReader_getWindow()': from an 'AImageReader' created with the
765 * following arguments: \verbatim
766 AImageReader_newWithUsage(1, 1 AIMAGE_FORMAT_PRIVATE,
767 AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE,
768 maxImages, &reader);
769 \endverbatim
770 * The width and height from \ref libvlc_video_render_cfg_t should be
771 * ignored as the video size is overridden by the producer (MediaCodec or
772 * EGL vout).
773 */
776
777
778/** Callback type that can be called to request a render size changes.
779 *
780 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
781 *
782 * \param report_opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
783 * \param width new rendering width requested. [IN]
784 * \param height new rendering height requested. [IN]
785 */
786typedef void( *libvlc_video_output_resize_cb )( void *report_opaque, unsigned width, unsigned height );
787
788
789/**
790 * Enumeration of the different mouse buttons that can be reported for user interaction
791 * can be passed to \ref libvlc_video_output_mouse_press_cb and \ref libvlc_video_output_mouse_release_cb.
792 */
798
799
800/** Callback type that can be called to notify the mouse position when hovering the render surface.
801 *
802 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
803 *
804 * The position (0,0) denotes the top left corner, bottom right corner position
805 * is (width,height) as reported by \ref libvlc_video_output_resize_cb.
806 *
807 * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
808 * \param x horizontal mouse position in \ref libvlc_video_output_resize_cb coordinates. [IN]
809 * \param y vertical mouse position in \ref libvlc_video_output_resize_cb coordinates. [IN]
810 */
811typedef void (*libvlc_video_output_mouse_move_cb)(void *opaque, int x, int y);
812
813/** Callback type that can be called to notify when a mouse button is pressed in the rendering surface.
814 *
815 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
816 *
817 * The button event will be reported at the last position provided by \ref libvlc_video_output_mouse_move_cb
818 *
819 * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
820 * \param button represent the button pressed, see \ref libvlc_video_output_mouse_button_t for available buttons. [IN]
821 */
823
824/** Callback type that can be called to notify when a mouse button is released in the rendering surface.
825 *
826 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
827 *
828 * The button event will be reported at the last position provided by \ref libvlc_video_output_mouse_move_cb.
829 *
830 * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
831 * \param button represent the button released, see \ref libvlc_video_output_mouse_button_t for available buttons. [IN]
832 */
834
835/** Set the callback to call when the host app resizes the rendering area.
836 *
837 * This allows text rendering and aspect ratio to be handled properly when the host
838 * rendering size changes and to provide mouse.
839 *
840 * It may be called before the \ref libvlc_video_output_setup_cb callback.
841 *
842 * \warning These callbacks cannot be called concurrently, the caller is responsible for serialization
843 *
844 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
845 * \param[in] report_size_change callback which must be called when the host size changes.
846 * The callback is valid until another call to \ref libvlc_video_output_set_window_cb
847 * is done. This may be called from any thread.
848 * \param[in] report_mouse_move callback which must be called when the mouse position change on the video surface.
849 * The coordinates are relative to the size reported through the \p report_size_change.
850 * This may be called from any thread.
851 * \param[in] report_mouse_pressed callback which must be called when a mouse button is pressed on the video surface,
852 * The position of the event is the last position reported by the report_mouse_move callback. This may be
853 * called from any thread.
854 * \param[in] report_mouse_released callback which must be called when a mouse button is released on the video surface,
855 * The position of the event is the last position reported by the report_mouse_move callback. This may be
856 * called from any thread.
857 * \param[in] report_opaque private pointer to pass to the \p report_size_change callback.
858 */
859typedef void( *libvlc_video_output_set_window_cb )( void *opaque,
860 libvlc_video_output_resize_cb report_size_change,
861 libvlc_video_output_mouse_move_cb report_mouse_move,
862 libvlc_video_output_mouse_press_cb report_mouse_pressed,
863 libvlc_video_output_mouse_release_cb report_mouse_released,
864 void *report_opaque );
865
866/** Tell the host the rendering for the given plane is about to start
867 *
868 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
869 * \param plane number of the rendering plane to select
870 * \param output handle of the rendering output for the given plane
871 * \return true on success
872 * \version LibVLC 4.0.0 or later
873 *
874 * \note This is only used with \ref libvlc_video_engine_d3d11.
875 *
876 * The output parameter receives the ID3D11RenderTargetView* to use for rendering
877 * the plane.
878 *
879 * If this callback is not used (set to NULL in @a libvlc_video_set_output_callbacks())
880 * OMSetRenderTargets has to be set during the @a libvlc_video_makeCurrent_cb()
881 * entering call.
882 *
883 * The number of planes depend on the DXGI_FORMAT returned during the
884 * @a libvlc_video_update_output_cb() call. It's usually one plane except for
885 * semi-planar formats like DXGI_FORMAT_NV12 or DXGI_FORMAT_P010.
886 *
887 * This callback is called between libvlc_video_makeCurrent_cb current/not-current
888 * calls.
889 */
890typedef bool( *libvlc_video_output_select_plane_cb )( void *opaque, size_t plane, void *output );
891
892/**
893 * Set callbacks and data to render decoded video to a custom texture
894 *
895 * \warning VLC will perform video rendering in its own thread and at its own rate,
896 * You need to provide your own synchronisation mechanism.
897 *
898 * \param mp the media player
899 * \param engine the GPU engine to use
900 * \param setup_cb callback called to initialize user data
901 * \param cleanup_cb callback called to clean up user data
902 * \param window_cb callback called to setup the window
903 * \param update_output_cb callback to get the rendering format of the host (cannot be NULL)
904 * \param swap_cb callback called after rendering a video frame (can only be
905 * NULL when using \ref libvlc_video_engine_anw)
906 * \param makeCurrent_cb callback called to enter/leave the rendering context
907 * (can only be NULL when using \ref libvlc_video_engine_anw)
908 * \param getProcAddress_cb opengl function loading callback (cannot be NULL
909 * for \ref libvlc_video_engine_opengl and for \ref libvlc_video_engine_gles2)
910 * \param metadata_cb callback to provide frame metadata (D3D11 only)
911 * \param select_plane_cb callback to select different D3D11 rendering targets
912 * \param opaque private pointer passed to callbacks
913 *
914 * \note the \p setup_cb and \p cleanup_cb may be called more than once per
915 * playback.
916 *
917 * \retval true engine selected and callbacks set
918 * \retval false engine type unknown, callbacks not set
919 * \version LibVLC 4.0.0 or later
920 */
927 libvlc_video_update_output_cb update_output_cb,
928 libvlc_video_swap_cb swap_cb,
929 libvlc_video_makeCurrent_cb makeCurrent_cb,
930 libvlc_video_getProcAddress_cb getProcAddress_cb,
933 void* opaque );
934
935/**
936 * Helper to setup output_callbacks for \ref libvlc_video_engine_anw
937 */
938static inline bool
942 libvlc_video_update_output_cb update_output_cb,
943 void *opaque )
944{
946 setup_cb, cleanup_cb, NULL,
947 update_output_cb, NULL, NULL,
948 NULL, NULL, NULL, opaque );
949}
950
951/**
952 * Set the handler where the media player should display its video output.
953 *
954 * The drawable is an `NSObject` that require responding to two selectors
955 * like in this protocol:
956 *
957 * @code{.m}
958 * @protocol VLCDrawable <NSObject>
959 * - (void)addSubview:(VLCView *)view;
960 * - (CGRect)bounds;
961 * @end
962 * @endcode
963 *
964 * In this protocol `VLCView` type can either be a `UIView` or a `NSView` type
965 * class.
966 * VLCDrawable protocol conformance isn't mandatory but a drawable must respond
967 * to both `addSubview:` and `bounds` selectors.
968 *
969 * Additionally, a drawable can also conform to the `VLCPictureInPictureDrawable`
970 * protocol to allow picture in picture support :
971 *
972 * @code{.m}
973 * @protocol VLCPictureInPictureMediaControlling <NSObject>
974 * - (void)play;
975 * - (void)pause;
976 * - (void)seekBy:(int64_t)offset completion:(dispatch_block_t)completion;;
977 * - (int64_t)mediaLength;
978 * - (int64_t)mediaTime;
979 * - (BOOL)isMediaSeekable;
980 * - (BOOL)isMediaPlaying;
981 * @end
982 *
983 * @protocol VLCPictureInPictureWindowControlling <NSObject>
984 * - (void)startPictureInPicture;
985 * - (void)stopPictureInPicture;
986 * - (void)invalidatePlaybackState;
987 * @end
988 *
989 * @protocol VLCPictureInPictureDrawable <NSObject>
990 * - (id<VLCPictureInPictureMediaControlling>) mediaController;
991 * - (void (^)(id<VLCPictureInPictureWindowControlling>)) pictureInPictureReady;
992 * @end
993 * @endcode
994 *
995 * Be aware that full `VLCPictureInPictureDrawable` conformance is mandatory to
996 * enable picture in picture support and that time values in
997 * `VLCPictureInPictureMediaControlling` methods are expressed in milliseconds.
998 *
999 * If you want to use it along with Qt see the QMacCocoaViewContainer. Then
1000 * the following code should work:
1001 * @code{.mm}
1002 * {
1003 * NSView *video = [[NSView alloc] init];
1004 * QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent);
1005 * libvlc_media_player_set_nsobject(mp, video);
1006 * [video release];
1007 * }
1008 * @endcode
1009 *
1010 * You can find a live example in VLCVideoView in VLCKit.framework.
1011 *
1012 * \param p_mi the Media Player
1013 * \param drawable the drawable that is either an NSView, a UIView or any
1014 * NSObject responding to `addSubview:` and `bounds` selectors
1015 */
1017
1018/**
1019 * Get the NSView handler previously set with libvlc_media_player_set_nsobject().
1020 *
1021 * \param p_mi the Media Player
1022 * \return the NSView handler or 0 if none where set
1023 */
1025
1026/**
1027 * Set an X Window System drawable where the media player should render its
1028 * video output. The call takes effect when the playback starts. If it is
1029 * already started, it might need to be stopped before changes apply.
1030 * If LibVLC was built without X11 output support, then this function has no
1031 * effects.
1032 *
1033 * By default, LibVLC will capture input events on the video rendering area.
1034 * Use libvlc_video_set_mouse_input() and libvlc_video_set_key_input() to
1035 * disable that and deliver events to the parent window / to the application
1036 * instead. By design, the X11 protocol delivers input events to only one
1037 * recipient.
1038 *
1039 * \warning
1040 * The application must call the XInitThreads() function from Xlib before
1041 * libvlc_new(), and before any call to XOpenDisplay() directly or via any
1042 * other library. Failure to call XInitThreads() will seriously impede LibVLC
1043 * performance. Calling XOpenDisplay() before XInitThreads() will eventually
1044 * crash the process. That is a limitation of Xlib.
1045 *
1046 * \param p_mi media player
1047 * \param drawable X11 window ID
1048 *
1049 * \note
1050 * The specified identifier must correspond to an existing Input/Output class
1051 * X11 window. Pixmaps are <b>not</b> currently supported. The default X11
1052 * server is assumed, i.e. that specified in the DISPLAY environment variable.
1053 *
1054 * \warning
1055 * LibVLC can deal with invalid X11 handle errors, however some display drivers
1056 * (EGL, GLX, VA and/or VDPAU) can unfortunately not. Thus the window handle
1057 * must remain valid until playback is stopped, otherwise the process may
1058 * abort or crash.
1059 *
1060 * \bug
1061 * No more than one window handle per media player instance can be specified.
1062 * If the media has multiple simultaneously active video tracks, extra tracks
1063 * will be rendered into external windows beyond the control of the
1064 * application.
1065 */
1067 uint32_t drawable);
1068
1069/**
1070 * Get the X Window System window identifier previously set with
1071 * libvlc_media_player_set_xwindow(). Note that this will return the identifier
1072 * even if VLC is not currently using it (for instance if it is playing an
1073 * audio-only input).
1074 *
1075 * \param p_mi the Media Player
1076 * \return an X window ID, or 0 if none where set.
1077 */
1079
1080/**
1081 * Set a Win32/Win64 API window handle (HWND) where the media player should
1082 * render its video output. If LibVLC was built without Win32/Win64 API output
1083 * support, then this has no effects.
1084 *
1085 * \warning the HWND must have the WS_CLIPCHILDREN set in its style.
1086 *
1087 * \param p_mi the Media Player
1088 * \param drawable windows handle of the drawable
1089 */
1091
1092/**
1093 * Get the Windows API window handle (HWND) previously set with
1094 * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
1095 * is not currently outputting any video to it.
1096 *
1097 * \param p_mi the Media Player
1098 * \return a window handle or NULL if there are none.
1099 */
1101
1102/**
1103 * Set the android context.
1104 *
1105 * \version LibVLC 3.0.0 and later.
1106 *
1107 * \param p_mi the media player
1108 * \param p_awindow_handler org.videolan.libvlc.AWindow jobject owned by the
1109 * org.videolan.libvlc.MediaPlayer class from the libvlc-android project.
1110 */
1112 void *p_awindow_handler );
1113
1114/**
1115 * Callback prototype for audio playback.
1116 *
1117 * The LibVLC media player decodes and post-processes the audio signal
1118 * asynchronously (in an internal thread). Whenever audio samples are ready
1119 * to be queued to the output, this callback is invoked.
1120 *
1121 * The number of samples provided per invocation may depend on the file format,
1122 * the audio coding algorithm, the decoder plug-in, the post-processing
1123 * filters and timing. Application must not assume a certain number of samples.
1124 *
1125 * The exact format of audio samples is determined by libvlc_audio_set_format()
1126 * or libvlc_audio_set_format_callbacks() as is the channels layout.
1127 *
1128 * Note that the number of samples is per channel. For instance, if the audio
1129 * track sampling rate is 48000 Hz, then 1200 samples represent 25 milliseconds
1130 * of audio signal - regardless of the number of audio channels.
1131 *
1132 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1133 * \param[in] samples pointer to a table of audio samples to play back
1134 * \param count number of audio samples to play back
1135 * \param pts expected play time stamp (see libvlc_delay())
1136 */
1137typedef void (*libvlc_audio_play_cb)(void *data, const void *samples,
1138 unsigned count, int64_t pts);
1139
1140/**
1141 * Callback prototype for audio pause.
1142 *
1143 * LibVLC invokes this callback to pause audio playback.
1144 *
1145 * \note The pause callback is never called if the audio is already paused.
1146 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1147 * \param pts time stamp of the pause request (should be elapsed already)
1148 */
1149typedef void (*libvlc_audio_pause_cb)(void *data, int64_t pts);
1150
1151/**
1152 * Callback prototype for audio resumption.
1153 *
1154 * LibVLC invokes this callback to resume audio playback after it was
1155 * previously paused.
1156 *
1157 * \note The resume callback is never called if the audio is not paused.
1158 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1159 * \param pts time stamp of the resumption request (should be elapsed already)
1160 */
1161typedef void (*libvlc_audio_resume_cb)(void *data, int64_t pts);
1162
1163/**
1164 * Callback prototype for audio buffer flush.
1165 *
1166 * LibVLC invokes this callback if it needs to discard all pending buffers and
1167 * stop playback as soon as possible. This typically occurs when the media is
1168 * stopped.
1169 *
1170 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1171 */
1172typedef void (*libvlc_audio_flush_cb)(void *data, int64_t pts);
1173
1174/**
1175 * Callback prototype for audio buffer drain.
1176 *
1177 * LibVLC may invoke this callback when the decoded audio track is ending.
1178 * There will be no further decoded samples for the track, but playback should
1179 * nevertheless continue until all already pending buffers are rendered.
1180 *
1181 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1182 */
1183typedef void (*libvlc_audio_drain_cb)(void *data);
1184
1185/**
1186 * Callback prototype for audio volume change.
1187 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1188 * \param volume software volume (1. = nominal, 0. = mute)
1189 * \param mute muted flag
1190 */
1191typedef void (*libvlc_audio_set_volume_cb)(void *data,
1192 float volume, bool mute);
1193
1194/**
1195 * Sets callbacks and private data for decoded audio.
1196 *
1197 * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
1198 * to configure the decoded audio format.
1199 *
1200 * \note The audio callbacks override any other audio output mechanism.
1201 * If the callbacks are set, LibVLC will <b>not</b> output audio in any way.
1202 *
1203 * \param mp the media player
1204 * \param play callback to play audio samples (must not be NULL)
1205 * \param pause callback to pause playback (or NULL to ignore)
1206 * \param resume callback to resume playback (or NULL to ignore)
1207 * \param flush callback to flush audio buffers (or NULL to ignore)
1208 * \param drain callback to drain audio buffers (or NULL to ignore)
1209 * \param opaque private pointer for the audio callbacks (as first parameter)
1210 * \version LibVLC 2.0.0 or later
1211 */
1219 void *opaque );
1220
1221/**
1222 * Set callbacks and private data for decoded audio. This only works in
1223 * combination with libvlc_audio_set_callbacks().
1224 * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
1225 * to configure the decoded audio format.
1226 *
1227 * \param mp the media player
1228 * \param set_volume callback to apply audio volume,
1229 * or NULL to apply volume in software
1230 * \version LibVLC 2.0.0 or later
1231 */
1234 libvlc_audio_set_volume_cb set_volume );
1235
1236/**
1237 * Callback prototype to setup the audio playback.
1238 *
1239 * This is called when the media player needs to create a new audio output.
1240 * \param[in,out] opaque pointer to the data pointer passed to
1241 * libvlc_audio_set_callbacks()
1242 * \param[in,out] format 4 bytes sample format
1243 * \param[in,out] rate sample rate
1244 * \param[in,out] channels channels count
1245 * \return 0 on success, anything else to skip audio playback
1246 */
1247typedef int (*libvlc_audio_setup_cb)(void **opaque, char *format, unsigned *rate,
1248 unsigned *channels);
1249
1250/**
1251 * Callback prototype for audio playback cleanup.
1252 *
1253 * This is called when the media player no longer needs an audio output.
1254 * \param[in] opaque data pointer as passed to libvlc_audio_set_callbacks()
1255 */
1256typedef void (*libvlc_audio_cleanup_cb)(void *opaque);
1257
1258/**
1259 * Sets decoded audio format via callbacks.
1260 *
1261 * This only works in combination with libvlc_audio_set_callbacks().
1262 *
1263 * \param mp the media player
1264 * \param setup callback to select the audio format (cannot be NULL)
1265 * \param cleanup callback to release any allocated resources (or NULL)
1266 * \version LibVLC 2.0.0 or later
1267 */
1271 libvlc_audio_cleanup_cb cleanup );
1272
1273/**
1274 * Sets a fixed decoded audio format.
1275 *
1276 * This only works in combination with libvlc_audio_set_callbacks(),
1277 * and is mutually exclusive with libvlc_audio_set_format_callbacks().
1278 *
1279 * The supported formats are:
1280 * - "S16N" for signed 16-bit PCM
1281 * - "S32N" for signed 32-bit PCM
1282 * - "FL32" for single precision IEEE 754
1283 *
1284 * All supported formats use the native endianness.
1285 * If there are more than one channel, samples are interleaved.
1286 *
1287 * \param mp the media player
1288 * \param format a four-characters string identifying the sample format
1289 * \param rate sample rate (expressed in Hz)
1290 * \param channels channels count
1291 * \version LibVLC 2.0.0 or later
1292 */
1295 unsigned rate, unsigned channels );
1296
1297/** \bug This might go away ... to be replaced by a broader system */
1298
1299/**
1300 * Get the current movie length (in ms).
1301 *
1302 * \param p_mi the Media Player
1303 * \return the movie length (in ms), or -1 if there is no media.
1304 */
1306
1307/**
1308 * Get the current movie time (in ms).
1309 *
1310 * \param p_mi the Media Player
1311 * \return the movie time (in ms), or -1 if there is no media.
1312 */
1314
1315/**
1316 * Set the movie time (in ms).
1317 *
1318 * This has no effect if no media is being played.
1319 * Not all formats and protocols support this.
1320 *
1321 * \param p_mi the Media Player
1322 * \param i_time the movie time (in ms).
1323 * \param b_fast prefer fast seeking or precise seeking
1324 * \return 0 on success, -1 on error
1325 */
1327 libvlc_time_t i_time, bool b_fast );
1328
1329/**
1330 * Jump the movie time (in ms).
1331 *
1332 * This will trigger a precise and relative seek (from the current time).
1333 * This has no effect if no media is being played.
1334 * Not all formats and protocols support this.
1335 *
1336 * \param p_mi the Media Player
1337 * \param i_time the movie time (in ms).
1338 * \return 0 on success, -1 on error
1339 * \version LibVLC 4.0.0 and later.
1340 */
1342 libvlc_time_t i_time );
1343
1344/**
1345 * Get movie position as percentage between 0.0 and 1.0.
1346 *
1347 * \param p_mi the Media Player
1348 * \return movie position, or -1. in case of error
1349 */
1351
1352/**
1353 * Set movie position as percentage between 0.0 and 1.0.
1354 * This has no effect if playback is not enabled.
1355 * This might not work depending on the underlying input format and protocol.
1356 *
1357 * \param p_mi the Media Player
1358 * \param b_fast prefer fast seeking or precise seeking
1359 * \param f_pos the position
1360 * \return 0 on success, -1 on error
1361 */
1363 double f_pos, bool b_fast );
1364
1365/**
1366 * Enable A to B loop for the current media by setting the start time and end
1367 * time
1368 *
1369 * The B time must be higher than the A time.
1370 *
1371 * \param p_mi the Media Player
1372 * \param a_time start time for the loop (in ms)
1373 * \param b_time end time for the loop (in ms)
1374 * \return 0 on success, -1 on error
1375 * \version LibVLC 4.0.0 and later.
1376 */
1377LIBVLC_API int
1379 libvlc_time_t a_time, libvlc_time_t b_time );
1380
1381/**
1382 * Enable A to B loop for the current media by setting the start position and
1383 * end position
1384 *
1385 * The B position must be higher than the A position.
1386 *
1387 * \param p_mi the Media Player
1388 * \param a_pos start position for the loop
1389 * \param b_pos end position for the loop
1390 * \return 0 on success, -1 on error
1391 * \version LibVLC 4.0.0 and later.
1392 */
1393LIBVLC_API int
1395 double a_pos, double b_pos );
1396
1397/**
1398 * Reset/remove the A to B loop for the current media
1399 *
1400 * \param p_mi the Media Player
1401 * \return 0 on success, -1 on error
1402 * \version LibVLC 4.0.0 and later.
1403 */
1404LIBVLC_API int
1406
1407/**
1408 * Get the A to B loop status
1409 *
1410 * @note If the returned status is VLC_PLAYER_ABLOOP_A, then a_time and a_pos
1411 * will be valid. If the returned status is VLC_PLAYER_ABLOOP_B, then all
1412 * output parameters are valid. If the returned status is
1413 * VLC_PLAYER_ABLOOP_NONE, then all output parameters are invalid.
1414 *
1415 * @see vlc_player_cbs.on_atobloop_changed
1416 *
1417 * \param p_mi the Media Player
1418 * \param a_time A time (in ms) or -1 (if the media doesn't have valid times)
1419 * \param a_pos A position
1420 * \param b_time B time (in ms) or -1 (if the media doesn't have valid times)
1421 * \param b_pos B position
1422 * \return A to B loop status
1423 * \version LibVLC 4.0.0 and later.
1424 */
1427 libvlc_time_t *a_time, double *a_pos,
1428 libvlc_time_t *b_time, double *b_pos );
1429/**
1430 * Set movie chapter (if applicable).
1431 *
1432 * \param p_mi the Media Player
1433 * \param i_chapter chapter number to play
1434 */
1436
1437/**
1438 * Get movie chapter.
1439 *
1440 * \param p_mi the Media Player
1441 * \return chapter number currently playing, or -1 if there is no media.
1442 */
1444
1445/**
1446 * Get movie chapter count
1447 *
1448 * \param p_mi the Media Player
1449 * \return number of chapters in movie, or -1.
1450 */
1452
1453/**
1454 * Get title chapter count
1455 *
1456 * \param p_mi the Media Player
1457 * \param i_title title
1458 * \return number of chapters in title, or -1
1459 */
1461 libvlc_media_player_t *p_mi, int i_title );
1462
1463/**
1464 * Set movie title
1465 *
1466 * \param p_mi the Media Player
1467 * \param i_title title number to play
1468 */
1470
1471/**
1472 * Get movie title
1473 *
1474 * \param p_mi the Media Player
1475 * \return title number currently playing, or -1
1476 */
1478
1479/**
1480 * Get movie title count
1481 *
1482 * \param p_mi the Media Player
1483 * \return title number count, or -1
1484 */
1486
1487/**
1488 * Set previous chapter (if applicable)
1489 *
1490 * \param p_mi the Media Player
1491 */
1493
1494/**
1495 * Set next chapter (if applicable)
1496 *
1497 * \param p_mi the Media Player
1498 */
1500
1501/**
1502 * Get the requested movie play rate.
1503 * @warning Depending on the underlying media, the requested rate may be
1504 * different from the real playback rate.
1505 *
1506 * \param p_mi the Media Player
1507 * \return movie play rate
1508 */
1510
1511/**
1512 * Set movie play rate
1513 *
1514 * \param p_mi the Media Player
1515 * \param rate movie play rate to set
1516 * \return -1 if an error was detected, 0 otherwise (but even then, it might
1517 * not actually work depending on the underlying media protocol)
1518 */
1520
1521/**
1522 * Get current movie state
1523 *
1524 * \param p_mi the Media Player
1525 * \return the current state of the media player (playing, paused, ...) \see libvlc_state_t
1526 */
1528
1529/**
1530 * How many video outputs does this media player have?
1531 *
1532 * \param p_mi the media player
1533 * \return the number of video outputs
1534 */
1536
1537/**
1538 * Is this media player seekable?
1539 *
1540 * \param p_mi the media player
1541 * \retval true media player can seek
1542 * \retval false media player cannot seek
1543 */
1545
1546/**
1547 * Can this media player be paused?
1548 *
1549 * \param p_mi the media player
1550 * \retval true media player can be paused
1551 * \retval false media player cannot be paused
1552 */
1554
1555/**
1556 * Check if the current program is scrambled
1557 *
1558 * \param p_mi the media player
1559 * \retval true current program is scrambled
1560 * \retval false current program is not scrambled
1561 *
1562 * \version LibVLC 2.2.0 or later
1563 */
1565
1566/**
1567 * Display the next frame (if supported)
1568 *
1569 * \param p_mi the media player
1570 */
1572
1573/**
1574 * Navigate through DVD Menu
1575 *
1576 * \param p_mi the Media Player
1577 * \param navigate the Navigation mode
1578 * \version libVLC 2.0.0 or later
1579 */
1581 unsigned navigate );
1582
1583/**
1584 * Set if, and how, the video title will be shown when media is played.
1585 *
1586 * \param p_mi the media player
1587 * \param position position at which to display the title, or libvlc_position_disable to prevent the title from being displayed
1588 * \param timeout title display timeout in milliseconds (ignored if libvlc_position_disable)
1589 * \version libVLC 2.1.0 or later
1590 */
1592
1593/**
1594 * Get the track list for one type
1595 *
1596 * \version LibVLC 4.0.0 and later.
1597 *
1598 * \note You need to call libvlc_media_parse_request() or play the media
1599 * at least once before calling this function. Not doing this will result in
1600 * an empty list.
1601 *
1602 * \note This track list is a snapshot of the current tracks when this function
1603 * is called. If a track is updated after this call, the user will need to call
1604 * this function again to get the updated track.
1605 *
1606 *
1607 * The track list can be used to get track information and to select specific
1608 * tracks.
1609 *
1610 * \param p_mi the media player
1611 * \param type type of the track list to request
1612 * \param selected filter only selected tracks if true (return all tracks, even
1613 * selected ones if false)
1614 *
1615 * \return a valid libvlc_media_tracklist_t or NULL in case of error, if there
1616 * is no track for a category, the returned list will have a size of 0, delete
1617 * with libvlc_media_tracklist_delete()
1618 */
1621 libvlc_track_type_t type, bool selected );
1622
1623/**
1624 * Get the selected track for one type
1625 *
1626 * \version LibVLC 4.0.0 and later.
1627 *
1628 * \warning More than one tracks can be selected for one type. In that case,
1629 * libvlc_media_player_get_tracklist() should be used.
1630 *
1631 * \param p_mi the media player
1632 * \param type type of the selected track
1633 *
1634 * \return a valid track or NULL if there is no selected tracks for this type,
1635 * release it with libvlc_media_track_release().
1636 */
1639 libvlc_track_type_t type );
1640
1641/*
1642 * Get a track from a track id
1643 *
1644 * \version LibVLC 4.0.0 and later.
1645 *
1646 * This function can be used to get the last updated information of a track.
1647 *
1648 * \param p_mi the media player
1649 * \param psz_id valid string representing a track id (cf. psz_id from \ref
1650 * libvlc_media_track_t)
1651 *
1652 * \return a valid track or NULL if there is currently no tracks identified by
1653 * the string id, release it with libvlc_media_track_release().
1654 */
1657 const char *psz_id );
1658
1659
1660/**
1661 * Select a track
1662 *
1663 * This will unselected the current track.
1664 *
1665 * \version LibVLC 4.0.0 and later.
1666 *
1667 * \note Use libvlc_media_player_select_tracks() for multiple selection
1668 *
1669 * \warning Only use a \ref libvlc_media_track_t retrieved with \ref libvlc_media_player_get_tracklist
1670 *
1671 * \param p_mi the media player
1672 * \param track track to select, can't be NULL
1673 */
1674LIBVLC_API void
1676 const libvlc_media_track_t *track );
1677
1678/**
1679 * Unselect all tracks for a given type
1680 *
1681 * \version LibVLC 4.0.0 and later.
1682 *
1683 * \param p_mi the media player
1684 * \param type type to unselect
1685 */
1686LIBVLC_API void
1688 libvlc_track_type_t type );
1689
1690/**
1691 * Select multiple tracks for one type
1692 *
1693 * \version LibVLC 4.0.0 and later.
1694 *
1695 * \note The internal track list can change between the calls of
1696 * libvlc_media_player_get_tracklist() and
1697 * libvlc_media_player_set_tracks(). If a track selection change but the
1698 * track is not present anymore, the player will just ignore it.
1699 *
1700 * \note selecting multiple audio tracks is currently not supported.
1701 *
1702 * \warning Only use a \ref libvlc_media_track_t retrieved with \ref libvlc_media_player_get_tracklist
1703 *
1704 * \param p_mi the media player
1705 * \param type type of the selected track
1706 * \param tracks pointer to the track array, or NULL if track_count is 0
1707 * \param track_count number of tracks in the track array
1708 */
1709LIBVLC_API void
1712 const libvlc_media_track_t **tracks,
1713 size_t track_count );
1714
1715/**
1716 * Select tracks by their string identifier
1717 *
1718 * \version LibVLC 4.0.0 and later.
1719 *
1720 * This function can be used pre-select a list of tracks before starting the
1721 * player. It has only effect for the current media. It can also be used when
1722 * the player is already started.
1723 *
1724 * 'str_ids' can contain more than one track id, delimited with ','. "" or any
1725 * invalid track id will cause the player to unselect all tracks of that
1726 * category. NULL will disable the preference for newer tracks without
1727 * unselecting any current tracks.
1728 *
1729 * Example:
1730 * - (libvlc_track_video, "video/1,video/2") will select these 2 video tracks.
1731 * If there is only one video track with the id "video/0", no tracks will be
1732 * selected.
1733 * - (libvlc_track_type_t, "${slave_url_md5sum}/spu/0) will select one spu
1734 * added by an input slave with the corresponding url.
1735 *
1736 * \note The string identifier of a track can be found via psz_id from \ref
1737 * libvlc_media_track_t
1738 *
1739 * \note selecting multiple audio tracks is currently not supported.
1740 *
1741 * \warning Only use a \ref libvlc_media_track_t id retrieved with \ref libvlc_media_player_get_tracklist
1742 *
1743 * \param p_mi the media player
1744 * \param type type to select
1745 * \param psz_ids list of string identifier or NULL
1746 */
1747LIBVLC_API void
1750 const char *psz_ids );
1751
1752/**
1753 * Add a slave to the current media player.
1754 *
1755 * \note If the player is playing, the slave will be added directly. This call
1756 * will also update the slave list of the attached libvlc_media_t.
1757 *
1758 * \version LibVLC 3.0.0 and later.
1759 *
1760 * \see libvlc_media_slaves_add
1761 *
1762 * \param p_mi the media player
1763 * \param i_type subtitle or audio
1764 * \param psz_uri Uri of the slave (should contain a valid scheme).
1765 * \param b_select True if this slave should be selected when it's loaded
1766 *
1767 * \return 0 on success, -1 on error.
1768 */
1772 const char *psz_uri, bool b_select );
1773
1775{
1776 /** Id used for libvlc_media_player_select_program() */
1778 /** Program name, always valid */
1780 /** True if the program is selected */
1782 /** True if the program is scrambled */
1785
1786/**
1787 * Opaque struct containing a list of program
1788 */
1790
1791/**
1792 * Delete a program struct
1793 *
1794 * \version LibVLC 4.0.0 and later.
1795 *
1796 * \param program returned by libvlc_media_player_get_selected_program() or
1797 * libvlc_media_player_get_program_from_id()
1798 *
1799 */
1800LIBVLC_API void
1802
1803/**
1804 * Get the number of programs in a programlist
1805 *
1806 * \version LibVLC 4.0.0 and later.
1807 *
1808 * \param list valid programlist
1809 *
1810 * \return number of programs, or 0 if the list is empty
1811 */
1812LIBVLC_API size_t
1814
1815/**
1816 * Get a program at a specific index
1817 *
1818 * \warning The behaviour is undefined if the index is not valid.
1819 *
1820 * \version LibVLC 4.0.0 and later.
1821 *
1822 * \param list valid programlist
1823 * \param index valid index in the range [0; count[
1824 *
1825 * \return a valid program (can't be NULL if libvlc_player_programlist_count()
1826 * returned a valid count)
1827 */
1830
1831/**
1832 * Release a programlist
1833 *
1834 * \note program structs from the list are also deleted.
1835 *
1836 * \version LibVLC 4.0.0 and later.
1837 *
1838 * \see libvlc_media_player_get_programlist
1839 *
1840 * \param list valid programlist
1841 */
1842LIBVLC_API void
1844
1845/**
1846 * Select program with a given program id.
1847 *
1848 * \note program ids are sent via the libvlc_MediaPlayerProgramAdded event or
1849 * can be fetch via libvlc_media_player_get_programlist()
1850 *
1851 * \version LibVLC 4.0.0 or later
1852 *
1853 * \param p_mi opaque media player handle
1854 * \param i_group_id program id
1855 */
1857
1858/**
1859 * Get the selected program
1860 *
1861 * \version LibVLC 4.0.0 or later
1862 *
1863 * \param p_mi opaque media player handle
1864 *
1865 * \return a valid program struct or NULL if no programs are selected. The
1866 * program need to be freed with libvlc_player_program_delete().
1867 */
1870
1871/**
1872 * Get a program struct from a program id
1873 *
1874 * \version LibVLC 4.0.0 or later
1875 *
1876 * \param p_mi opaque media player handle
1877 * \param i_group_id program id
1878 *
1879 * \return a valid program struct or NULL if the i_group_id is not found. The
1880 * program need to be freed with libvlc_player_program_delete().
1881 */
1884
1885/**
1886 * Get the program list
1887 *
1888 * \version LibVLC 4.0.0 and later.
1889 * \note This program list is a snapshot of the current programs when this
1890 * function is called. If a program is updated after this call, the user will
1891 * need to call this function again to get the updated program.
1892 *
1893 * The program list can be used to get program information and to select
1894 * specific programs.
1895 *
1896 * \param p_mi the media player
1897 *
1898 * \return a valid libvlc_media_programlist_t or NULL in case of error or empty
1899 * list, delete with libvlc_media_programlist_delete()
1900 */
1903
1904
1905/** \defgroup libvlc_video LibVLC video controls
1906 * @{
1907 */
1908
1909/**
1910 * Toggle fullscreen status on non-embedded video outputs.
1911 *
1912 * @warning The same limitations applies to this function
1913 * as to libvlc_set_fullscreen().
1914 *
1915 * \param p_mi the media player
1916 */
1918
1919/**
1920 * Enable or disable fullscreen.
1921 *
1922 * @warning With most window managers, only a top-level windows can be in
1923 * full-screen mode. Hence, this function will not operate properly if
1924 * libvlc_media_player_set_xwindow() was used to embed the video in a
1925 * non-top-level window. In that case, the embedding window must be reparented
1926 * to the root window <b>before</b> fullscreen mode is enabled. You will want
1927 * to reparent it back to its normal parent when disabling fullscreen.
1928 *
1929 * \note This setting applies to any and all current or future active video
1930 * tracks and windows for the given media player. The choice of fullscreen
1931 * output for each window is left to the operating system.
1932 *
1933 * \param p_mi the media player
1934 * \param b_fullscreen boolean for fullscreen status
1935 */
1937
1938/**
1939 * Get current fullscreen status.
1940 *
1941 * \param p_mi the media player
1942 * \return the fullscreen status (boolean)
1943 *
1944 * \retval false media player is windowed
1945 * \retval true media player is in fullscreen mode
1946 */
1948
1949/**
1950 * Enable or disable key press events handling, according to the LibVLC hotkeys
1951 * configuration. By default and for historical reasons, keyboard events are
1952 * handled by the LibVLC video widget.
1953 *
1954 * \note On X11, there can be only one subscriber for key press and mouse
1955 * click events per window. If your application has subscribed to those events
1956 * for the X window ID of the video widget, then LibVLC will not be able to
1957 * handle key presses and mouse clicks in any case.
1958 *
1959 * \warning This function is only implemented for X11 and Win32 at the moment.
1960 *
1961 * \param p_mi the media player
1962 * \param on true to handle key press events, false to ignore them.
1963 */
1966
1967/**
1968 * Enable or disable mouse click events handling. By default, those events are
1969 * handled. This is needed for DVD menus to work, as well as a few video
1970 * filters such as "puzzle".
1971 *
1972 * \see libvlc_video_set_key_input().
1973 *
1974 * \warning This function is only implemented for X11 and Win32 at the moment.
1975 *
1976 * \param p_mi the media player
1977 * \param on true to handle mouse click events, false to ignore them.
1978 */
1981
1982/**
1983 * Get the pixel dimensions of a video.
1984 *
1985 * \param p_mi media player
1986 * \param num number of the video (starting from, and most commonly 0)
1987 * \param[out] px pointer to get the pixel width
1988 * \param[out] py pointer to get the pixel height
1989 * \return 0 on success, -1 if the specified video does not exist
1990 */
1993 unsigned *px, unsigned *py );
1994
1995/**
1996 * Get the mouse pointer coordinates over a video.
1997 * Coordinates are expressed in terms of the decoded video resolution,
1998 * <b>not</b> in terms of pixels on the screen/viewport (to get the latter,
1999 * you can query your windowing system directly).
2000 *
2001 * Either of the coordinates may be negative or larger than the corresponding
2002 * dimension of the video, if the cursor is outside the rendering area.
2003 *
2004 * @warning The coordinates may be out-of-date if the pointer is not located
2005 * on the video rendering area. LibVLC does not track the pointer if it is
2006 * outside of the video widget.
2007 *
2008 * @note LibVLC does not support multiple pointers (it does of course support
2009 * multiple input devices sharing the same pointer) at the moment.
2010 *
2011 * \param p_mi media player
2012 * \param num number of the video (starting from, and most commonly 0)
2013 * \param[out] px pointer to get the abscissa
2014 * \param[out] py pointer to get the ordinate
2015 * \return 0 on success, -1 if the specified video does not exist
2016 */
2019 int *px, int *py );
2020
2021/**
2022 * Get the current video scaling factor.
2023 * See also libvlc_video_set_scale().
2024 *
2025 * \param p_mi the media player
2026 * \return the currently configured zoom factor, or 0. if the video is set
2027 * to fit to the output window/drawable automatically.
2028 */
2030
2031/**
2032 * Set the video scaling factor. That is the ratio of the number of pixels on
2033 * screen to the number of pixels in the original decoded video in each
2034 * dimension. Zero is a special value; it will adjust the video to the output
2035 * window/drawable (in windowed mode) or the entire screen.
2036 *
2037 * Note that not all video outputs support scaling.
2038 *
2039 * \param p_mi the media player
2040 * \param f_factor the scaling factor, or zero
2041 */
2043
2044/**
2045 * Get current video aspect ratio.
2046 *
2047 * \param p_mi the media player
2048 * \return the video aspect ratio or NULL if unspecified
2049 * (the result must be released with free() or libvlc_free()).
2050 */
2052
2053/**
2054 * Set new video aspect ratio.
2055 *
2056 * \param p_mi the media player
2057 * \param psz_aspect new video aspect-ratio or NULL to reset to source aspect ratio
2058 * \note Invalid aspect ratios are ignored.
2059 */
2061
2062/**
2063 * Get current video display fit mode.
2064 *
2065 * \version LibVLC 4.0.0 or later
2066 *
2067 * \param p_mi the media player
2068 * \return the video display fit mode.
2069 */
2071
2072/**
2073 * Set new video display fit.
2074 *
2075 * \version LibVLC 4.0.0 or later
2076 *
2077 * \param p_mi the media player
2078 * \param fit new display fit mode
2079 * \note Invalid fit mode are ignored.
2080 */
2082
2083/**
2084 * Create a video viewpoint structure.
2085 *
2086 * \version LibVLC 3.0.0 and later
2087 *
2088 * \return video viewpoint or NULL
2089 * (the result must be released with free()).
2090 */
2092
2093/**
2094 * Update the video viewpoint information.
2095 *
2096 * \note It is safe to call this function before the media player is started.
2097 *
2098 * \version LibVLC 3.0.0 and later
2099 *
2100 * \param p_mi the media player
2101 * \param p_viewpoint video viewpoint allocated via libvlc_video_new_viewpoint()
2102 * \param b_absolute if true replace the old viewpoint with the new one. If
2103 * false, increase/decrease it.
2104 * \return -1 in case of error, 0 otherwise
2105 *
2106 * \note the values are set asynchronously, it will be used by the next frame displayed.
2107 */
2109 const libvlc_video_viewpoint_t *p_viewpoint,
2110 bool b_absolute);
2111
2112/**
2113 * Video stereo modes
2114 */
2122
2123/**
2124 * Get current video stereo mode.
2125 *
2126 * \param p_mi the media player
2127 * \return the video stereo mode.
2128 */
2130 libvlc_media_player_t *p_mi );
2131
2132/**
2133 * Set new video stereo mode.
2134 *
2135 * \param p_mi the media player
2136 * \param i_mode new video stereo mode
2137 */
2139 const libvlc_video_stereo_mode_t i_mode );
2140
2141/**
2142 * Get the current subtitle delay. Positive values means subtitles are being
2143 * displayed later, negative values earlier.
2144 *
2145 * \param p_mi media player
2146 * \return time (in microseconds) the display of subtitles is being delayed
2147 * \version LibVLC 2.0.0 or later
2148 */
2150
2151/**
2152 * Get the current subtitle text scale
2153 *
2154 * The scale factor is expressed as a percentage of the default size, where
2155 * 1.0 represents 100 percent.
2156 *
2157 * \param p_mi media player
2158 * \version LibVLC 4.0.0 or later
2159 */
2161
2162/**
2163 * Set the subtitle text scale.
2164 *
2165 * The scale factor is expressed as a percentage of the default size, where
2166 * 1.0 represents 100 percent.
2167 *
2168 * A value of 0.5 would result in text half the normal size, and a value of 2.0
2169 * would result in text twice the normal size.
2170 *
2171 * The minimum acceptable value for the scale factor is 0.1.
2172 *
2173 * The maximum is 5.0 (five times normal size).
2174 *
2175 * \param p_mi media player
2176 * \param f_scale scale factor in the range [0.1;5.0] (default: 1.0)
2177 * \version LibVLC 4.0.0 or later
2178 */
2180
2181/**
2182 * Set the subtitle delay. This affects the timing of when the subtitle will
2183 * be displayed. Positive values result in subtitles being displayed later,
2184 * while negative values will result in subtitles being displayed earlier.
2185 *
2186 * The subtitle delay will be reset to zero each time the media changes.
2187 *
2188 * \param p_mi media player
2189 * \param i_delay time (in microseconds) the display of subtitles should be delayed
2190 * \return 0 on success, -1 on error
2191 * \version LibVLC 2.0.0 or later
2192 */
2194
2195/**
2196 * Get the full description of available titles
2197 *
2198 * \version LibVLC 3.0.0 and later.
2199 *
2200 * \param p_mi the media player
2201 * \param[out] titles address to store an allocated array of title descriptions
2202 * descriptions (must be freed with libvlc_title_descriptions_release()
2203 * by the caller)
2204 *
2205 * \return the number of titles (-1 on error)
2206 */
2208 libvlc_title_description_t ***titles );
2209
2210/**
2211 * Release a title description
2212 *
2213 * \version LibVLC 3.0.0 and later
2214 *
2215 * \param p_titles title description array to release
2216 * \param i_count number of title descriptions to release
2217 */
2220 unsigned i_count );
2221
2222/**
2223 * Get the full description of available chapters
2224 *
2225 * \version LibVLC 3.0.0 and later.
2226 *
2227 * \param p_mi the media player
2228 * \param i_chapters_of_title index of the title to query for chapters (uses current title if set to -1)
2229 * \param[out] pp_chapters address to store an allocated array of chapter descriptions
2230 * descriptions (must be freed with libvlc_chapter_descriptions_release()
2231 * by the caller)
2232 *
2233 * \return the number of chapters (-1 on error)
2234 */
2236 int i_chapters_of_title,
2237 libvlc_chapter_description_t *** pp_chapters );
2238
2239/**
2240 * Release a chapter description
2241 *
2242 * \version LibVLC 3.0.0 and later
2243 *
2244 * \param p_chapters chapter description array to release
2245 * \param i_count number of chapter descriptions to release
2246 */
2249 unsigned i_count );
2250
2251/**
2252 * Set/unset the video crop ratio.
2253 *
2254 * This function forces a crop ratio on any and all video tracks rendered by
2255 * the media player. If the display aspect ratio of a video does not match the
2256 * crop ratio, either the top and bottom, or the left and right of the video
2257 * will be cut out to fit the crop ratio.
2258 *
2259 * For instance, a ratio of 1:1 will force the video to a square shape.
2260 *
2261 * To disable video crop, set a crop ratio with zero as denominator.
2262 *
2263 * A call to this function overrides any previous call to any of
2264 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
2265 * libvlc_video_set_crop_window().
2266 *
2267 * \see libvlc_video_set_aspect_ratio()
2268 *
2269 * \param mp the media player
2270 * \param num crop ratio numerator (ignored if denominator is 0)
2271 * \param den crop ratio denominator (or 0 to unset the crop ratio)
2272 *
2273 * \version LibVLC 4.0.0 and later
2274 */
2277 unsigned num, unsigned den);
2278
2279/**
2280 * Set the video crop window.
2281 *
2282 * This function selects a sub-rectangle of video to show. Any pixels outside
2283 * the rectangle will not be shown.
2284 *
2285 * To unset the video crop window, use libvlc_video_set_crop_ratio() or
2286 * libvlc_video_set_crop_border().
2287 *
2288 * A call to this function overrides any previous call to any of
2289 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
2290 * libvlc_video_set_crop_window().
2291 *
2292 * \param mp the media player
2293 * \param x abscissa (i.e. leftmost sample column offset) of the crop window
2294 * \param y ordinate (i.e. topmost sample row offset) of the crop window
2295 * \param width sample width of the crop window (cannot be zero)
2296 * \param height sample height of the crop window (cannot be zero)
2297 *
2298 * \version LibVLC 4.0.0 and later
2299 */
2302 unsigned x, unsigned y,
2303 unsigned width, unsigned height);
2304
2305/**
2306 * Set the video crop borders.
2307 *
2308 * This function selects the size of video edges to be cropped out.
2309 *
2310 * To unset the video crop borders, set all borders to zero.
2311 *
2312 * A call to this function overrides any previous call to any of
2313 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
2314 * libvlc_video_set_crop_window().
2315 *
2316 * \param mp the media player
2317 * \param left number of sample columns to crop on the left
2318 * \param right number of sample columns to crop on the right
2319 * \param top number of sample rows to crop on the top
2320 * \param bottom number of sample rows to corp on the bottom
2321 *
2322 * \version LibVLC 4.0.0 and later
2323 */
2326 unsigned left, unsigned right,
2327 unsigned top, unsigned bottom);
2328
2329/**
2330 * Get current teletext page requested or 0 if it's disabled.
2331 *
2332 * Teletext is disabled by default, call libvlc_video_set_teletext() to enable
2333 * it.
2334 *
2335 * \param p_mi the media player
2336 * \return the current teletext page requested.
2337 */
2339
2340/**
2341 * Set new teletext page to retrieve.
2342 *
2343 * This function can also be used to send a teletext key.
2344 *
2345 * \param p_mi the media player
2346 * \param i_page teletex page number requested. This value can be 0 to disable
2347 * teletext, a number in the range ]0;1000[ to show the requested page, or a
2348 * \ref libvlc_teletext_key_t. 100 is the default teletext page.
2349 */
2351
2352/**
2353 * Set teletext background transparency.
2354 *
2355 * \param p_mi the media player
2356 * \param transparent whether background should be transparent.
2357 * \version LibVLC 4.0.0 or later
2358 */
2360
2361/**
2362 * Get teletext background transparency.
2363 *
2364 * \param p_mi the media player
2365 * \retval true teletext has transparent background
2366 * \retval false teletext has opaque background
2367 * \version LibVLC 4.0.0 or later
2368 */
2370
2371/**
2372 * Take a snapshot of the current video window.
2373 *
2374 * If i_width AND i_height is 0, original size is used.
2375 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
2376 *
2377 * \param p_mi media player instance
2378 * \param num number of video output (typically 0 for the first/only one)
2379 * \param psz_filepath the path of a file or a folder to save the screenshot into
2380 * \param i_width the snapshot's width
2381 * \param i_height the snapshot's height
2382 * \return 0 on success, -1 if the video was not found
2383 */
2386 const char *psz_filepath, unsigned int i_width,
2387 unsigned int i_height );
2388
2389/**
2390 * Enable or disable deinterlace filter
2391 *
2392 * \param p_mi libvlc media player
2393 * \param deinterlace state -1: auto (default), 0: disabled, 1: enabled
2394 * \param psz_mode type of deinterlace filter, NULL for current/default filter
2395 * \version LibVLC 4.0.0 and later
2396 */
2398 int deinterlace,
2399 const char *psz_mode );
2400
2401/**
2402 * Get an integer marquee option value
2403 *
2404 * \param p_mi libvlc media player
2405 * \param option marq option to get \see libvlc_video_marquee_option_t
2406 */
2408 unsigned option );
2409
2410/**
2411 * Enable, disable or set an integer marquee option
2412 *
2413 * Setting libvlc_marquee_Enable has the side effect of enabling (arg !0)
2414 * or disabling (arg 0) the marq filter.
2415 *
2416 * \param p_mi libvlc media player
2417 * \param option marq option to set \see libvlc_video_marquee_option_t
2418 * \param i_val marq option value
2419 */
2421 unsigned option, int i_val );
2422
2423/**
2424 * Set a marquee string option
2425 *
2426 * \param p_mi libvlc media player
2427 * \param option marq option to set \see libvlc_video_marquee_option_t
2428 * \param psz_text marq option value
2429 */
2431 unsigned option, const char *psz_text );
2432
2433/** option values for libvlc_video_{get,set}_logo_{int,string} */
2444
2445/**
2446 * Get integer logo option.
2447 *
2448 * \param p_mi libvlc media player instance
2449 * \param option logo option to get, values of libvlc_video_logo_option_t
2450 */
2452 unsigned option );
2453
2454/**
2455 * Set logo option as integer. Options that take a different type value
2456 * are ignored.
2457 * Passing libvlc_logo_enable as option value has the side effect of
2458 * starting (arg !0) or stopping (arg 0) the logo filter.
2459 *
2460 * \param p_mi libvlc media player instance
2461 * \param option logo option to set, values of libvlc_video_logo_option_t
2462 * \param value logo option value
2463 */
2465 unsigned option, int value );
2466
2467/**
2468 * Set logo option as string. Options that take a different type value
2469 * are ignored.
2470 *
2471 * \param p_mi libvlc media player instance
2472 * \param option logo option to set, values of libvlc_video_logo_option_t
2473 * \param psz_value logo option value
2474 */
2476 unsigned option, const char *psz_value );
2477
2478
2479/** option values for libvlc_video_{get,set}_adjust_{int,float,bool} */
2488
2489/**
2490 * Get integer adjust option.
2491 *
2492 * \param p_mi libvlc media player instance
2493 * \param option adjust option to get, values of libvlc_video_adjust_option_t
2494 * \version LibVLC 1.1.1 and later.
2495 */
2497 unsigned option );
2498
2499/**
2500 * Set adjust option as integer. Options that take a different type value
2501 * are ignored.
2502 * Passing libvlc_adjust_enable as option value has the side effect of
2503 * starting (arg !0) or stopping (arg 0) the adjust filter.
2504 *
2505 * \param p_mi libvlc media player instance
2506 * \param option adjust option to set, values of libvlc_video_adjust_option_t
2507 * \param value adjust option value
2508 * \version LibVLC 1.1.1 and later.
2509 */
2511 unsigned option, int value );
2512
2513/**
2514 * Get float adjust option.
2515 *
2516 * \param p_mi libvlc media player instance
2517 * \param option adjust option to get, values of libvlc_video_adjust_option_t
2518 * \version LibVLC 1.1.1 and later.
2519 */
2521 unsigned option );
2522
2523/**
2524 * Set adjust option as float. Options that take a different type value
2525 * are ignored.
2526 *
2527 * \param p_mi libvlc media player instance
2528 * \param option adjust option to set, values of libvlc_video_adjust_option_t
2529 * \param value adjust option value
2530 * \version LibVLC 1.1.1 and later.
2531 */
2533 unsigned option, float value );
2534/**
2535 * Change the projection mode used for rendering the source.
2536 *
2537 * This changes how the source is mapped to the output w.r.t. 360 playback.
2538 *
2539 * \param p_mi libvlc media player instance
2540 * \param projection_mode the considered projection mode for the source
2541 * \version LibVLC 4.0.0 and later.
2542 */
2543LIBVLC_API void
2545 libvlc_video_projection_t projection_mode);
2546
2547/**
2548 * Remove previously set projection mode.
2549 *
2550 * Remove the effects from previous call to libvlc_video_set_projection_mode.
2551 *
2552 * \param p_mi libvlc media player instance
2553 * \version LibVLC 4.0.0 and later.
2554 */
2555LIBVLC_API void
2557
2558/** @} video */
2559
2560/** \defgroup libvlc_audio LibVLC audio controls
2561 * @{
2562 */
2563
2564/**
2565 * Audio stereo modes
2566 */
2576
2577/**
2578 * Audio mix modes
2579 */
2588
2589/**
2590 * Gets the list of available audio output modules.
2591 *
2592 * \param p_instance libvlc instance
2593 * \return list of available audio outputs. It must be freed with
2594* \see libvlc_audio_output_list_release \see libvlc_audio_output_t .
2595 * In case of error, NULL is returned.
2596 */
2599
2600/**
2601 * Frees the list of available audio output modules.
2602 *
2603 * \param p_list list with audio outputs for release
2604 */
2607
2608/**
2609 * Selects an audio output module.
2610 * \note Any change will take be effect only after playback is stopped and
2611 * restarted. Audio output cannot be changed while playing.
2612 *
2613 * \param p_mi media player
2614 * \param psz_name name of audio output,
2615 * use psz_name of \see libvlc_audio_output_t
2616 * \return 0 if function succeeded, -1 on error
2617 */
2619 const char *psz_name );
2620
2621/**
2622 * Gets a list of potential audio output devices.
2623 *
2624 * See also libvlc_audio_output_device_set().
2625 *
2626 * \note Not all audio outputs support enumerating devices.
2627 * The audio output may be functional even if the list is empty (NULL).
2628 *
2629 * \note The list may not be exhaustive.
2630 *
2631 * \warning Some audio output devices in the list might not actually work in
2632 * some circumstances. By default, it is recommended to not specify any
2633 * explicit audio device.
2634 *
2635 * \param mp media player
2636 * \return A NULL-terminated linked list of potential audio output devices.
2637 * It must be freed with libvlc_audio_output_device_list_release()
2638 * \version LibVLC 2.2.0 or later.
2639 */
2642
2643#if defined (__GNUC__) && !defined (__clang__)
2644__attribute__((unused))
2645__attribute__((noinline))
2646__attribute__((error("Use libvlc_audio_output_device_enum() instead")))
2648libvlc_audio_output_device_list_get( libvlc_instance_t *p_instance,
2649 const char *aout )
2650{
2651 (void) p_instance; (void) aout;
2652 return NULL;
2653}
2654#endif
2655
2656/**
2657 * Frees a list of available audio output devices.
2658 *
2659 * \param p_list list with audio outputs for release
2660 * \version LibVLC 2.1.0 or later.
2661 */
2664
2665/**
2666 * Configures an explicit audio output device.
2667 *
2668 * A list of adequate potential device strings can be obtained with
2669 * libvlc_audio_output_device_enum().
2670 *
2671 * \note This function does not select the specified audio output plugin.
2672 * libvlc_audio_output_set() is used for that purpose.
2673 *
2674 * \warning The syntax for the device parameter depends on the audio output.
2675 *
2676 * Some audio output modules require further parameters (e.g. a channels map
2677 * in the case of ALSA).
2678 *
2679 * \version This function originally expected three parameters.
2680 * The middle parameter was removed from LibVLC 4.0 onward.
2681 *
2682 * \param mp media player
2683 * \param device_id device identifier string
2684 * (see \ref libvlc_audio_output_device_t::psz_device)
2685 *
2686 * \return If the change of device was requested successfully, zero is returned
2687 * (the actual change is asynchronous and not guaranteed to succeed).
2688 * On error, a non-zero value is returned.
2689 */
2691 const char *device_id );
2692
2693/**
2694 * Get the current audio output device identifier.
2695 *
2696 * This complements libvlc_audio_output_device_set().
2697 *
2698 * \warning The initial value for the current audio output device identifier
2699 * may not be set or may be some unknown value. A LibVLC application should
2700 * compare this value against the known device identifiers (e.g. those that
2701 * were previously retrieved by a call to libvlc_audio_output_device_enum) to
2702 * find the current audio output device.
2703 *
2704 * It is possible that the selected audio output device changes (an external
2705 * change) without a call to libvlc_audio_output_device_set. That may make this
2706 * method unsuitable to use if a LibVLC application is attempting to track
2707 * dynamic audio device changes as they happen.
2708 *
2709 * \param mp media player
2710 * \return the current audio output device identifier
2711 * NULL if no device is selected or in case of error
2712 * (the result must be released with free()).
2713 * \version LibVLC 3.0.0 or later.
2714 */
2716
2717/**
2718 * Toggle mute status.
2719 *
2720 * \param p_mi media player
2721 * \warning Toggling mute atomically is not always possible: On some platforms,
2722 * other processes can mute the VLC audio playback stream asynchronously. Thus,
2723 * there is a small race condition where toggling will not work.
2724 * See also the limitations of libvlc_audio_set_mute().
2725 */
2727
2728/**
2729 * Get current mute status.
2730 *
2731 * \param p_mi media player
2732 * \return the mute status (boolean) if defined, -1 if undefined/unapplicable
2733 */
2735
2736/**
2737 * Set mute status.
2738 *
2739 * \param p_mi media player
2740 * \param status If status is true then mute, otherwise unmute
2741 * \warning This function does not always work. If there are no active audio
2742 * playback stream, the mute status might not be available. If digital
2743 * pass-through (S/PDIF, HDMI...) is in use, muting may be unapplicable. Also
2744 * some audio output plugins do not support muting at all.
2745 * \note To force silent playback, disable all audio tracks. This is more
2746 * efficient and reliable than mute.
2747 */
2749
2750/**
2751 * Get current software audio volume.
2752 *
2753 * \param p_mi media player
2754 * \return the software volume in percents
2755 * (0 = mute, 100 = nominal / 0dB)
2756 */
2758
2759/**
2760 * Set current software audio volume.
2761 *
2762 * \param p_mi media player
2763 * \param i_volume the volume in percents (0 = mute, 100 = 0dB)
2764 * \return 0 if the volume was set, -1 if it was out of range
2765 */
2767
2768/**
2769 * Get current audio stereo-mode.
2770 *
2771 * \param p_mi media player
2772 * \return the audio stereo-mode, \see libvlc_audio_output_stereomode_t
2773 * \version LibVLC 4.0.0 or later
2774 */
2776
2777/**
2778 * Set current audio stereo-mode.
2779 *
2780 * \param p_mi media player
2781 * \param mode the audio stereo-mode, \see libvlc_audio_output_stereomode_t
2782 * \return 0 on success, -1 on error
2783 * \version LibVLC 4.0.0 or later
2784 */
2787
2788/**
2789 * Get current audio mix-mode.
2790 *
2791 * \param p_mi media player
2792 * \return the audio mix-mode, \see libvlc_audio_output_mixmode_t
2793 * \version LibVLC 4.0.0 or later
2794 */
2796
2797/**
2798 * Set current audio mix-mode.
2799 *
2800 * By default (::libvlc_AudioMixMode_Unset), the audio output will keep its
2801 * original channel configuration (play stereo as stereo, or 5.1 as 5.1). Yet,
2802 * the OS and Audio API might refuse a channel configuration and asks VLC to
2803 * adapt (Stereo played as 5.1 or vice-versa).
2804 *
2805 * This function allows to force a channel configuration, it will only work if
2806 * the OS and Audio API accept this configuration (otherwise, it won't have any
2807 * effects). Here are some examples:
2808 * - Play multi-channels (5.1, 7.1...) as stereo (::libvlc_AudioMixMode_Stereo)
2809 * - Play Stereo or 5.1 as 7.1 (::libvlc_AudioMixMode_7_1)
2810 * - Play multi-channels as stereo with a binaural effect
2811 * (::libvlc_AudioMixMode_Binaural). It might be selected automatically if the
2812 * OS and Audio API can detect if a headphone is plugged.
2813 *
2814 * \param p_mi media player
2815 * \param mode the audio mix-mode, \see libvlc_audio_output_mixmode_t
2816 * \return 0 on success, -1 on error
2817 * \version LibVLC 4.0.0 or later
2818 */
2821
2822
2823/**
2824 * Get current audio delay.
2825 *
2826 * \param p_mi media player
2827 * \return the audio delay (microseconds)
2828 * \version LibVLC 1.1.1 or later
2829 */
2831
2832/**
2833 * Set current audio delay. The audio delay will be reset to zero each time the media changes.
2834 *
2835 * \param p_mi media player
2836 * \param i_delay the audio delay (microseconds)
2837 * \return 0 on success, -1 on error
2838 * \version LibVLC 1.1.1 or later
2839 */
2841
2842/**
2843 * Get the number of equalizer presets.
2844 *
2845 * \return number of presets
2846 * \version LibVLC 2.2.0 or later
2847 */
2849
2850/**
2851 * Get the name of a particular equalizer preset.
2852 *
2853 * This name can be used, for example, to prepare a preset label or menu in a user
2854 * interface.
2855 *
2856 * \param u_index index of the preset, counting from zero
2857 * \return preset name, or NULL if there is no such preset
2858 * \version LibVLC 2.2.0 or later
2859 */
2861
2862/**
2863 * Get the number of distinct frequency bands for an equalizer.
2864 *
2865 * \return number of frequency bands
2866 * \version LibVLC 2.2.0 or later
2867 */
2869
2870/**
2871 * Get a particular equalizer band frequency.
2872 *
2873 * This value can be used, for example, to create a label for an equalizer band control
2874 * in a user interface.
2875 *
2876 * \param u_index index of the band, counting from zero
2877 * \return equalizer band frequency (Hz), or -1 if there is no such band
2878 * \version LibVLC 2.2.0 or later
2879 */
2881
2882/**
2883 * Create a new default equalizer, with all frequency values zeroed.
2884 *
2885 * The new equalizer can subsequently be applied to a media player by invoking
2886 * libvlc_media_player_set_equalizer().
2887 *
2888 * The returned handle should be freed via libvlc_audio_equalizer_release() when
2889 * it is no longer needed.
2890 *
2891 * \return opaque equalizer handle, or NULL on error
2892 * \version LibVLC 2.2.0 or later
2893 */
2895
2896/**
2897 * Create a new equalizer, with initial frequency values copied from an existing
2898 * preset.
2899 *
2900 * The new equalizer can subsequently be applied to a media player by invoking
2901 * libvlc_media_player_set_equalizer().
2902 *
2903 * The returned handle should be freed via libvlc_audio_equalizer_release() when
2904 * it is no longer needed.
2905 *
2906 * \param u_index index of the preset, counting from zero
2907 * \return opaque equalizer handle, or NULL on error
2908 * (it must be released with libvlc_audio_equalizer_release())
2909 * \version LibVLC 2.2.0 or later
2910 */
2912
2913/**
2914 * Release a previously created equalizer instance.
2915 *
2916 * The equalizer was previously created by using libvlc_audio_equalizer_new() or
2917 * libvlc_audio_equalizer_new_from_preset().
2918 *
2919 * It is safe to invoke this method with a NULL p_equalizer parameter for no effect.
2920 *
2921 * \param p_equalizer opaque equalizer handle, or NULL
2922 * \version LibVLC 2.2.0 or later
2923 */
2925
2926/**
2927 * Set a new pre-amplification value for an equalizer.
2928 *
2929 * The new equalizer settings are subsequently applied to a media player by invoking
2930 * libvlc_media_player_set_equalizer().
2931 *
2932 * The supplied amplification value will be clamped to the -20.0 to +20.0 range.
2933 *
2934 * \param p_equalizer valid equalizer handle, must not be NULL
2935 * \param f_preamp preamp value (-20.0 to 20.0 Hz)
2936 * \return zero on success, -1 on error
2937 * \version LibVLC 2.2.0 or later
2938 */
2940
2941/**
2942 * Get the current pre-amplification value from an equalizer.
2943 *
2944 * \param p_equalizer valid equalizer handle, must not be NULL
2945 * \return preamp value (Hz)
2946 * \version LibVLC 2.2.0 or later
2947 */
2949
2950/**
2951 * Set a new amplification value for a particular equalizer frequency band.
2952 *
2953 * The new equalizer settings are subsequently applied to a media player by invoking
2954 * libvlc_media_player_set_equalizer().
2955 *
2956 * The supplied amplification value will be clamped to the -20.0 to +20.0 range.
2957 *
2958 * \param p_equalizer valid equalizer handle, must not be NULL
2959 * \param f_amp amplification value (-20.0 to 20.0 Hz)
2960 * \param u_band index, counting from zero, of the frequency band to set
2961 * \return zero on success, -1 on error
2962 * \version LibVLC 2.2.0 or later
2963 */
2964LIBVLC_API int libvlc_audio_equalizer_set_amp_at_index( libvlc_equalizer_t *p_equalizer, float f_amp, unsigned u_band );
2965
2966/**
2967 * Get the amplification value for a particular equalizer frequency band.
2968 *
2969 * \param p_equalizer valid equalizer handle, must not be NULL
2970 * \param u_band index, counting from zero, of the frequency band to get
2971 * \return amplification value (Hz); NaN if there is no such frequency band
2972 * \version LibVLC 2.2.0 or later
2973 */
2975
2976/**
2977 * Apply new equalizer settings to a media player.
2978 *
2979 * The equalizer is first created by invoking libvlc_audio_equalizer_new() or
2980 * libvlc_audio_equalizer_new_from_preset().
2981 *
2982 * It is possible to apply new equalizer settings to a media player whether the media
2983 * player is currently playing media or not.
2984 *
2985 * Invoking this method will immediately apply the new equalizer settings to the audio
2986 * output of the currently playing media if there is any.
2987 *
2988 * If there is no currently playing media, the new equalizer settings will be applied
2989 * later if and when new media is played.
2990 *
2991 * Equalizer settings will automatically be applied to subsequently played media.
2992 *
2993 * To disable the equalizer for a media player invoke this method passing NULL for the
2994 * p_equalizer parameter.
2995 *
2996 * The media player does not keep a reference to the supplied equalizer so it is safe
2997 * for an application to release the equalizer reference any time after this method
2998 * returns.
2999 *
3000 * \param p_mi opaque media player handle
3001 * \param p_equalizer opaque equalizer handle, or NULL to disable the equalizer for this media player
3002 * \return zero on success, -1 on error
3003 * \version LibVLC 2.2.0 or later
3004 */
3006
3007/**
3008 * Media player roles.
3009 *
3010 * \version LibVLC 3.0.0 and later.
3011 *
3012 * See \ref libvlc_media_player_set_role()
3013 */
3015 libvlc_role_None = 0, /**< Don't use a media player role */
3016 libvlc_role_Music, /**< Music (or radio) playback */
3017 libvlc_role_Video, /**< Video playback */
3018 libvlc_role_Communication, /**< Speech, real-time communication */
3019 libvlc_role_Game, /**< Video game */
3020 libvlc_role_Notification, /**< User interaction feedback */
3021 libvlc_role_Animation, /**< Embedded animation (e.g. in web page) */
3022 libvlc_role_Production, /**< Audio editing/production */
3023 libvlc_role_Accessibility, /**< Accessibility */
3024 libvlc_role_Test /** Testing */
3025#define libvlc_role_Last libvlc_role_Test
3027
3028/**
3029 * Gets the media role.
3030 *
3031 * \version LibVLC 3.0.0 and later.
3032 *
3033 * \param p_mi media player
3034 * \return the media player role (\ref libvlc_media_player_role_t)
3035 */
3037
3038/**
3039 * Sets the media role.
3040 *
3041 * \param p_mi media player
3042 * \param role the media player role (\ref libvlc_media_player_role_t)
3043 * \return 0 on success, -1 on error
3044 */
3046 unsigned role);
3047
3048/**
3049 * Start/stop recording
3050 *
3051 * \note The user should listen to the libvlc_MediaPlayerRecordChanged event,
3052 * to monitor the recording state.
3053 *
3054 * \version LibVLC 4.0.0 and later.
3055 *
3056 * \param p_mi media player
3057 * \param enable true to start recording, false to stop
3058 * \param dir_path path of the recording directory or NULL (use default path),
3059 * has only an effect when first enabling recording.
3060 */
3062 bool enable, const char *dir_path);
3063
3064/** @} audio */
3065
3066/** \defgroup libvlc_media_player_watch_time LibVLC media player time watch API
3067 * @{
3068 */
3069
3070/**
3071 * Media Player timer point
3072 *
3073 * \note ts and system_date values should not be used directly by the user.
3074 * libvlc_media_player_time_point_interpolate() will read these values and
3075 * return an interpolated ts.
3076 *
3077 * @see libvlc_media_player_watch_time_on_update
3078 */
3080{
3081 /** Position in the range [0.0f;1.0] */
3082 double position;
3083 /** Rate of the player */
3084 double rate;
3085 /** Valid time, in us >= 0 or -1 */
3086 int64_t ts_us;
3087 /** Valid length, in us >= 1 or 0 */
3088 int64_t length_us;
3089 /**
3090 * System date, in us, of this record (always valid).
3091 * Based on libvlc_clock(). This date can be in the future or in the past.
3092 * The special value of INT64_MAX mean that the clock was paused when this
3093 * point was updated. In that case,
3094 * libvlc_media_player_time_point_interpolate() will return the current
3095 * ts/pos of this point (there is nothing to interpolate).
3096 * */
3099
3100/**
3101 * Callback prototype that notify when the player state or time changed.
3102 *
3103 * Get notified when the time is updated by the input or output source. The
3104 * input source is the 'demux' or the 'access_demux'. The output source are
3105 * audio and video outputs: an update is received each time a video frame is
3106 * displayed or an audio sample is written. The delay between each updates may
3107 * depend on the input and source type (it can be every 5ms, 30ms, 1s or
3108 * 10s...). Users of this timer may need to update the position at a higher
3109 * frequency from their own mainloop via
3110 * libvlc_media_player_time_point_interpolate().
3111 *
3112 * \warning It is forbidden to call any Media Player functions from here.
3113 *
3114 * \param value always valid, the time corresponding to the state
3115 * \param data opaque pointer set by libvlc_media_player_watch_time()
3116 */
3118 const libvlc_media_player_time_point_t *value, void *data);
3119
3120/**
3121 * Callback prototype that notify when the timer is paused.
3122 *
3123 * This event is sent when the player is paused or stopping. The player
3124 * user should stop its "interpolate" timer.
3125 *
3126 * \note libvlc_media_player_watch_time_on_update() can be called when paused
3127 * for those 2 reasons:
3128 * - playback is resumed (libvlc_media_player_time_point_t.system_date is valid)
3129 * - a track, likely video (next-frame) is outputted when paused
3130 * (libvlc_media_player_time_point_t.system_date = INT64_MAX)
3131 *
3132 * \warning It is forbidden to call any Media Player functions from here.
3133 *
3134 * \param system_date_us system date, in us, of this event, only valid (> 0)
3135 * when paused. It can be used to interpolate the last updated point to this
3136 * date in order to get the last paused ts/position.
3137 * \param data opaque pointer set by libvlc_media_player_watch_time()
3138 */
3140 int64_t system_date_us, void *data);
3141
3142/**
3143 * Callback prototype that notify when the player is seeking or finished
3144 * seeking
3145 *
3146 * \warning It is forbidden to call any Media Player functions from here.
3147 *
3148 * \note It is not possible to receive points via on_update() while seeking.
3149 *
3150 * \param value point of the seek request or NULL when seeking is finished
3151 * \param data opaque pointer set by libvlc_media_player_watch_time()
3152 */
3154 const libvlc_media_player_time_point_t *value, void *data);
3155
3156/**
3157 * Watch for times updates
3158 *
3159 * \warning Only one watcher can be registered at a time. Calling this function
3160 * a second time (if libvlc_media_player_unwatch_time() was not called
3161 * in-between) will fail.
3162 *
3163 * \param p_mi the media player
3164 * \param min_period_us corresponds to the minimum period, in us, between each
3165 * updates, use it to avoid flood from too many source updates, set it to 0 to
3166 * receive all updates.
3167 * \param on_update callback to listen to update events (must not be NULL)
3168 * \param on_paused callback to listen to paused events (can be NULL)
3169 * \param on_seek callback to listen to seek events (can be NULL)
3170 * \param cbs_data opaque pointer used by the callbacks
3171 * \return 0 on success, -1 on error (allocation error, or if already watching)
3172 * \version LibVLC 4.0.0 or later
3173 */
3174LIBVLC_API int
3176 int64_t min_period_us,
3180 void *cbs_data);
3181
3182/**
3183 * Unwatch time updates
3184 *
3185 * \param p_mi the media player
3186 * \version LibVLC 4.0.0 or later
3187 */
3188LIBVLC_API void
3190
3191/**
3192 * Interpolate a timer value to now
3193
3194 * \param point time update obtained via the
3195 * libvlc_media_player_watch_time_on_update() callback
3196 * \param system_now_us current system date, in us, returned by libvlc_clock()
3197 * \param out_ts_us pointer where to set the interpolated ts, in us
3198 * \param out_pos pointer where to set the interpolated position
3199 * \return 0 in case of success, -1 if the interpolated ts is negative (could
3200 * happen during the buffering step)
3201 * \version LibVLC 4.0.0 or later
3202 */
3203LIBVLC_API int
3205 int64_t system_now_us,
3206 int64_t *out_ts_us, double *out_pos);
3207
3208/**
3209 * Get the date of the next interval
3210 *
3211 * Can be used to setup an UI timer in order to update some widgets at specific
3212 * interval. A next_interval of VLC_TICK_FROM_SEC(1) can be used to update a
3213 * time widget when the media reaches a new second.
3214 *
3215 * \note The media time doesn't necessarily correspond to the system time, that
3216 * is why this function is needed and uses the rate of the current point.
3217 *
3218 * \param point time update obtained via the
3219 * libvlc_media_player_watch_time_on_update()
3220 * \param system_now_us same system date used by
3221 * libvlc_media_player_time_point_interpolate()
3222 * \param interpolated_ts_us ts returned by
3223 * libvlc_media_player_time_point_interpolate()
3224 * \param next_interval_us next interval, in us
3225 * \return the absolute system date, in us, of the next interval,
3226 * use libvlc_delay() to get a relative delay.
3227 * \version LibVLC 4.0.0 or later
3228 */
3229LIBVLC_API int64_t
3231 int64_t system_now_us,
3232 int64_t interpolated_ts_us,
3233 int64_t next_interval_us);
3234
3235/** @} libvlc_media_player_watch_time */
3236
3237/** \defgroup libvlc_media_player_concurrency LibVLC media player concurrency API
3238 * @{
3239 */
3240
3241/**
3242 * Lock the media_player internal lock
3243
3244 * The lock is recursive, so it's safe to use it multiple times from the same
3245 * thread. You must call libvlc_media_player_unlock() the same number of times
3246 * you called libvlc_media_player_lock().
3247 *
3248 * Locking is not mandatory before calling a libvlc_media_player_t function
3249 * since they will automatically hold the lock internally.
3250 *
3251 * This lock can be used to synchronise user variables that interact with the
3252 * libvlc_media_player_t or can be used to call several functions together.
3253 *
3254 * \param mp media player object
3255 * \version LibVLC 4.0.0 or later
3256 */
3258
3259/**
3260 * Unlock the media_player internal lock
3261 *
3262 * \see libvlc_media_player_lock
3263 *
3264 * \param mp media player object locked using /ref libvlc_media_player_lock
3265 * \version LibVLC 4.0.0 or later
3266 */
3268
3269/**
3270 * Wait for an event to be signalled
3271 *
3272 * \note this is equivalent to pthread_cond_wait() with the
3273 * libvlc_media_player_t internal mutex and condition variable. This function
3274 * may spuriously wake up even without libvlc_media_player_signal() being
3275 * called.
3276 *
3277 * \warning this function must not be called from any libvlc callbacks and
3278 * events. The lock should be held only one time before waiting.
3279 *
3280 * \param mp media player object locked using /ref libvlc_media_player_lock
3281 * \version LibVLC 4.0.0 or later
3282 */
3284
3285/**
3286 * Signal all threads waiting for a signalling event
3287 *
3288 * \note this is equivalent to pthread_cond_broadcast() with the
3289 * libvlc_media_player_t internal condition variable.
3290 *
3291 * \param mp media player object locked using /ref libvlc_media_player_lock
3292 * \version LibVLC 4.0.0 or later
3293 */
3295
3296/** @} libvlc_media_player_concurrency */
3297
3298/** @} media_player */
3299
3300# ifdef __cplusplus
3301}
3302# endif
3303
3304#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:2580
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:3014
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:2567
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:2584
@ libvlc_AudioMixMode_Unset
Definition libvlc_media_player.h:2581
@ libvlc_AudioMixMode_5_1
Definition libvlc_media_player.h:2585
@ libvlc_AudioMixMode_Stereo
Definition libvlc_media_player.h:2582
@ libvlc_AudioMixMode_7_1
Definition libvlc_media_player.h:2586
@ libvlc_AudioMixMode_Binaural
Definition libvlc_media_player.h:2583
@ libvlc_role_Game
Video game.
Definition libvlc_media_player.h:3019
@ libvlc_role_None
Don't use a media player role.
Definition libvlc_media_player.h:3015
@ libvlc_role_Notification
User interaction feedback.
Definition libvlc_media_player.h:3020
@ libvlc_role_Production
Audio editing/production.
Definition libvlc_media_player.h:3022
@ libvlc_role_Communication
Speech, real-time communication.
Definition libvlc_media_player.h:3018
@ libvlc_role_Music
Music (or radio) playback.
Definition libvlc_media_player.h:3016
@ libvlc_role_Accessibility
Accessibility.
Definition libvlc_media_player.h:3023
@ libvlc_role_Video
Video playback.
Definition libvlc_media_player.h:3017
@ libvlc_role_Animation
Embedded animation (e.g.
Definition libvlc_media_player.h:3021
@ libvlc_AudioStereoMode_Stereo
Definition libvlc_media_player.h:2569
@ libvlc_AudioStereoMode_Right
Definition libvlc_media_player.h:2572
@ libvlc_AudioStereoMode_Unset
Definition libvlc_media_player.h:2568
@ libvlc_AudioStereoMode_Mono
Definition libvlc_media_player.h:2574
@ libvlc_AudioStereoMode_Dolbys
Definition libvlc_media_player.h:2573
@ libvlc_AudioStereoMode_Left
Definition libvlc_media_player.h:2571
@ libvlc_AudioStereoMode_RStereo
Definition libvlc_media_player.h:2570
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:283
LIBVLC_API void libvlc_media_player_signal(libvlc_media_player_t *mp)
Signal all threads waiting for a signalling event.
LIBVLC_API void libvlc_media_player_wait(libvlc_media_player_t *mp)
Wait for an event to be signalled.
LIBVLC_API void libvlc_media_player_unlock(libvlc_media_player_t *mp)
Unlock the media_player internal lock.
LIBVLC_API void libvlc_media_player_lock(libvlc_media_player_t *mp)
Lock the media_player internal lock.
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_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:3117
void(* libvlc_media_player_watch_time_on_paused)(int64_t system_date_us, void *data)
Callback prototype that notify when the timer is paused.
Definition libvlc_media_player.h:3139
void(* libvlc_media_player_watch_time_on_seek)(const libvlc_media_player_time_point_t *value, void *data)
Callback prototype that notify when the player is seeking or finished seeking.
Definition libvlc_media_player.h:3153
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_paused on_paused, libvlc_media_player_watch_time_on_seek on_seek, void *cbs_data)
Watch for times updates.
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:890
void(* libvlc_video_unlock_cb)(void *opaque, void *picture, void *const *planes)
Callback prototype to unlock a picture buffer.
Definition libvlc_media_player.h:400
void(* libvlc_video_output_mouse_move_cb)(void *opaque, int x, int y)
Callback type that can be called to notify the mouse position when hovering the render surface.
Definition libvlc_media_player.h:811
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:189
void(* libvlc_audio_set_volume_cb)(void *data, float volume, bool mute)
Callback prototype for audio volume change.
Definition libvlc_media_player.h:1191
libvlc_teletext_key_t
Enumeration of teletext keys than can be passed via libvlc_video_set_teletext()
Definition libvlc_media_player.h:167
void(* libvlc_video_display_cb)(void *opaque, void *picture)
Callback prototype to display a picture.
Definition libvlc_media_player.h:413
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?
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)
LIBVLC_API int libvlc_media_player_set_abloop_time(libvlc_media_player_t *p_mi, libvlc_time_t a_time, libvlc_time_t b_time)
Enable A to B loop for the current media by setting the start time and end time.
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:743
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:1256
LIBVLC_API libvlc_media_track_t * libvlc_media_player_get_track_from_id(libvlc_media_player_t *p_mi, const char *psz_id)
void(* libvlc_video_output_set_window_cb)(void *opaque, libvlc_video_output_resize_cb report_size_change, libvlc_video_output_mouse_move_cb report_mouse_move, libvlc_video_output_mouse_press_cb report_mouse_pressed, libvlc_video_output_mouse_release_cb report_mouse_released, void *report_opaque)
Set the callback to call when the host app resizes the rendering area.
Definition libvlc_media_player.h:859
void(* libvlc_video_output_mouse_press_cb)(void *opaque, libvlc_video_output_mouse_button_t button)
Callback type that can be called to notify when a mouse button is pressed in the rendering surface.
Definition libvlc_media_player.h:822
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:110
LIBVLC_API void libvlc_media_player_set_nsobject(libvlc_media_player_t *p_mi, void *drawable)
Set the handler where the media player should display 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.
LIBVLC_API int libvlc_media_player_reset_abloop(libvlc_media_player_t *p_mi)
Reset/remove the A to B loop for the current media.
void(* libvlc_video_cleanup_cb)(void *opaque)
Callback prototype to configure picture buffers format.
Definition libvlc_media_player.h:456
void(* libvlc_audio_resume_cb)(void *data, int64_t pts)
Callback prototype for audio resumption.
Definition libvlc_media_player.h:1161
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:786
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_video_fit_mode_t
Enumeration of values used to set the video fitting inside the display area.
Definition libvlc_media_player.h:155
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:347
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:382
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.
void(* libvlc_video_output_mouse_release_cb)(void *opaque, libvlc_video_output_mouse_button_t button)
Callback type that can be called to notify when a mouse button is released in the rendering surface.
Definition libvlc_media_player.h:833
libvlc_video_metadata_type_t
Definition libvlc_media_player.h:731
libvlc_video_output_mouse_button_t
Enumeration of the different mouse buttons that can be reported for user interaction can be passed to...
Definition libvlc_media_player.h:793
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:127
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.
void(* libvlc_audio_flush_cb)(void *data, int64_t pts)
Callback prototype for audio buffer flush.
Definition libvlc_media_player.h:1172
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.
LIBVLC_API int libvlc_media_player_set_abloop_position(libvlc_media_player_t *p_mi, double a_pos, double b_pos)
Enable A to B loop for the current media by setting the start position and end position.
struct libvlc_player_programlist_t libvlc_player_programlist_t
Opaque struct containing a list of program.
Definition libvlc_media_player.h:1789
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:594
libvlc_position_t
Enumeration of values used to set position (e.g.
Definition libvlc_media_player.h:139
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:1137
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:706
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:667
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:749
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:1149
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.
libvlc_abloop_t
A to B loop state.
Definition libvlc_media_player.h:178
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.
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:1247
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.
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:335
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:583
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 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_window_cb window_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_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 libvlc_abloop_t libvlc_media_player_get_abloop(libvlc_media_player_t *p_mi, libvlc_time_t *a_time, double *a_pos, libvlc_time_t *b_time, double *b_pos)
Get the A to B loop status.
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)
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:445
void(* libvlc_video_swap_cb)(void *opaque)
Callback prototype called after performing drawing calls.
Definition libvlc_media_player.h:680
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:356
void(* libvlc_audio_drain_cb)(void *data)
Callback prototype for audio buffer drain.
Definition libvlc_media_player.h:1183
void *(* libvlc_video_getProcAddress_cb)(void *opaque, const char *fct_name)
Callback prototype to load opengl functions.
Definition libvlc_media_player.h:716
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 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.
static bool libvlc_video_set_anw_callbacks(libvlc_media_player_t *mp, libvlc_video_output_setup_cb setup_cb, libvlc_video_output_cleanup_cb cleanup_cb, libvlc_video_update_output_cb update_output_cb, void *opaque)
Helper to setup output_callbacks for libvlc_video_engine_anw.
Definition libvlc_media_player.h:939
LIBVLC_API int libvlc_media_player_get_title(libvlc_media_player_t *p_mi)
Get movie title.
LIBVLC_API int libvlc_media_player_jump_time(libvlc_media_player_t *p_mi, libvlc_time_t i_time)
Jump the movie time (in ms).
@ libvlc_title_interactive
Definition libvlc_media_player.h:64
@ libvlc_title_menu
Definition libvlc_media_player.h:63
@ libvlc_teletext_key_index
Definition libvlc_media_player.h:172
@ libvlc_teletext_key_green
Definition libvlc_media_player.h:169
@ libvlc_teletext_key_blue
Definition libvlc_media_player.h:171
@ libvlc_teletext_key_red
Definition libvlc_media_player.h:168
@ libvlc_teletext_key_yellow
Definition libvlc_media_player.h:170
@ libvlc_marquee_Color
string argument
Definition libvlc_media_player.h:113
@ libvlc_marquee_Position
Definition libvlc_media_player.h:115
@ libvlc_marquee_Y
Definition libvlc_media_player.h:120
@ libvlc_marquee_Timeout
Definition libvlc_media_player.h:118
@ libvlc_marquee_Enable
Definition libvlc_media_player.h:111
@ libvlc_marquee_Opacity
Definition libvlc_media_player.h:114
@ libvlc_marquee_X
Definition libvlc_media_player.h:119
@ libvlc_marquee_Size
Definition libvlc_media_player.h:117
@ libvlc_marquee_Refresh
Definition libvlc_media_player.h:116
@ libvlc_marquee_Text
Definition libvlc_media_player.h:112
@ libvlc_video_fit_larger
Fit outside / to largest display dimension.
Definition libvlc_media_player.h:158
@ libvlc_video_fit_width
Fit to display width.
Definition libvlc_media_player.h:159
@ libvlc_video_fit_none
Explicit zoom set by libvlc_video_set_scale.
Definition libvlc_media_player.h:156
@ libvlc_video_fit_smaller
Fit inside / to smallest display dimension.
Definition libvlc_media_player.h:157
@ libvlc_video_fit_height
Fit to display height.
Definition libvlc_media_player.h:160
@ libvlc_video_colorspace_BT2020
Definition libvlc_media_player.h:350
@ libvlc_video_colorspace_BT709
Definition libvlc_media_player.h:349
@ libvlc_video_colorspace_BT601
Definition libvlc_media_player.h:348
@ libvlc_video_metadata_frame_hdr10
libvlc_video_frame_hdr10_metadata_t
Definition libvlc_media_player.h:732
@ libvlc_video_output_mouse_button_middle
Definition libvlc_media_player.h:795
@ libvlc_video_output_mouse_button_right
Definition libvlc_media_player.h:796
@ libvlc_video_output_mouse_button_left
Definition libvlc_media_player.h:794
@ libvlc_navigate_right
Definition libvlc_media_player.h:132
@ libvlc_navigate_left
Definition libvlc_media_player.h:131
@ libvlc_navigate_activate
Definition libvlc_media_player.h:128
@ libvlc_navigate_popup
Definition libvlc_media_player.h:133
@ libvlc_navigate_up
Definition libvlc_media_player.h:129
@ libvlc_navigate_down
Definition libvlc_media_player.h:130
@ libvlc_position_bottom_right
Definition libvlc_media_player.h:149
@ libvlc_position_top
Definition libvlc_media_player.h:144
@ libvlc_position_left
Definition libvlc_media_player.h:142
@ libvlc_position_top_left
Definition libvlc_media_player.h:145
@ libvlc_position_bottom_left
Definition libvlc_media_player.h:148
@ libvlc_position_right
Definition libvlc_media_player.h:143
@ libvlc_position_disable
Definition libvlc_media_player.h:140
@ libvlc_position_bottom
Definition libvlc_media_player.h:147
@ libvlc_position_center
Definition libvlc_media_player.h:141
@ libvlc_position_top_right
Definition libvlc_media_player.h:146
@ libvlc_video_engine_opengl
Definition libvlc_media_player.h:752
@ libvlc_video_engine_anw
Android ANativeWindow.
Definition libvlc_media_player.h:774
@ libvlc_video_engine_gles2
Definition libvlc_media_player.h:753
@ libvlc_video_engine_d3d9
Direct3D9 rendering engine.
Definition libvlc_media_player.h:757
@ libvlc_video_engine_disable
Disable rendering engine.
Definition libvlc_media_player.h:751
@ libvlc_video_engine_d3d11
Direct3D11 rendering engine.
Definition libvlc_media_player.h:755
@ libvlc_abloop_a
Definition libvlc_media_player.h:180
@ libvlc_abloop_b
Definition libvlc_media_player.h:181
@ libvlc_abloop_none
Definition libvlc_media_player.h:179
@ libvlc_video_primaries_BT709
Definition libvlc_media_player.h:338
@ libvlc_video_primaries_BT601_525
Definition libvlc_media_player.h:336
@ libvlc_video_primaries_BT2020
Definition libvlc_media_player.h:339
@ libvlc_video_primaries_BT601_625
Definition libvlc_media_player.h:337
@ libvlc_video_primaries_BT470_M
Definition libvlc_media_player.h:341
@ libvlc_video_primaries_DCI_P3
Definition libvlc_media_player.h:340
@ libvlc_video_transfer_func_HLG
Definition libvlc_media_player.h:364
@ libvlc_video_transfer_func_BT470_M
Definition libvlc_media_player.h:360
@ libvlc_video_transfer_func_BT709
Definition libvlc_media_player.h:361
@ libvlc_video_transfer_func_PQ
Definition libvlc_media_player.h:362
@ libvlc_video_transfer_func_SMPTE_240
Definition libvlc_media_player.h:363
@ libvlc_video_transfer_func_SRGB
Definition libvlc_media_player.h:358
@ libvlc_video_transfer_func_BT470_BG
Definition libvlc_media_player.h:359
@ libvlc_video_transfer_func_LINEAR
Definition libvlc_media_player.h:357
libvlc_track_type_t
Definition libvlc_media_track.h:45
libvlc_media_slave_type_t
Type of a media slave: subtitle or audio.
Definition libvlc_media.h:195
libvlc_state_t
libvlc media or media_player state
Definition libvlc_media.h:84
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_API void libvlc_video_set_teletext_transparency(libvlc_media_player_t *p_mi, bool transparent)
Set teletext background transparency.
libvlc_video_adjust_option_t
option values for libvlc_video_{get,set}_adjust_{int,float,bool}
Definition libvlc_media_player.h:2480
LIBVLC_API bool libvlc_get_fullscreen(libvlc_media_player_t *p_mi)
Get current fullscreen status.
LIBVLC_API libvlc_video_stereo_mode_t libvlc_video_get_video_stereo_mode(libvlc_media_player_t *p_mi)
Get current video stereo mode.
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 libvlc_video_fit_mode_t libvlc_video_get_display_fit(libvlc_media_player_t *p_mi)
Get current video display fit mode.
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_video_stereo_mode(libvlc_media_player_t *p_mi, const libvlc_video_stereo_mode_t i_mode)
Set new video stereo mode.
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 void libvlc_video_set_display_fit(libvlc_media_player_t *p_mi, libvlc_video_fit_mode_t fit)
Set new video display fit.
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_video_set_projection_mode(libvlc_media_player_t *player, libvlc_video_projection_t projection_mode)
Change the projection mode used for rendering the source.
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:2434
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_video_stereo_mode_t
Video stereo modes.
Definition libvlc_media_player.h:2115
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 bool libvlc_video_get_teletext_transparency(libvlc_media_player_t *p_mi)
Get teletext background transparency.
LIBVLC_API void libvlc_video_unset_projection_mode(libvlc_media_player_t *player)
Remove previously set projection mode.
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:2486
@ libvlc_adjust_Hue
Definition libvlc_media_player.h:2484
@ libvlc_adjust_Enable
Definition libvlc_media_player.h:2481
@ libvlc_adjust_Brightness
Definition libvlc_media_player.h:2483
@ libvlc_adjust_Saturation
Definition libvlc_media_player.h:2485
@ libvlc_adjust_Contrast
Definition libvlc_media_player.h:2482
@ libvlc_logo_position
Definition libvlc_media_player.h:2442
@ libvlc_logo_repeat
Definition libvlc_media_player.h:2440
@ libvlc_logo_delay
Definition libvlc_media_player.h:2439
@ libvlc_logo_opacity
Definition libvlc_media_player.h:2441
@ libvlc_logo_y
Definition libvlc_media_player.h:2438
@ libvlc_logo_file
string argument, "file,d,t;file,d,t;..."
Definition libvlc_media_player.h:2436
@ libvlc_logo_x
Definition libvlc_media_player.h:2437
@ libvlc_logo_enable
Definition libvlc_media_player.h:2435
@ libvlc_VideoStereoLeftEye
Definition libvlc_media_player.h:2118
@ libvlc_VideoStereoSideBySide
Definition libvlc_media_player.h:2120
@ libvlc_VideoStereoRightEye
Definition libvlc_media_player.h:2119
@ libvlc_VideoStereoAuto
Definition libvlc_media_player.h:2116
@ libvlc_VideoStereoStereo
Definition libvlc_media_player.h:2117
#define LIBVLC_API
Definition libvlc.h:42
int i_type
Definition httpd.c:1299
struct libvlc_renderer_item_t libvlc_renderer_item_t
Definition libvlc_events.h:43
struct libvlc_media_t libvlc_media_t
Definition libvlc_events.h:47
struct libvlc_media_player_t libvlc_media_player_t
Definition libvlc_media_list_player.h:34
enum libvlc_state_t libvlc_state_t
Definition libvlc_media_player.h:46
struct libvlc_media_tracklist_t libvlc_media_tracklist_t
Definition libvlc_media_player.h:43
enum libvlc_track_type_t libvlc_track_type_t
Definition libvlc_media_player.h:44
enum libvlc_media_slave_type_t libvlc_media_slave_type_t
Definition libvlc_media_player.h:40
libvlc_video_orient_t
Definition libvlc_video.h:33
libvlc_video_projection_t
Definition libvlc_video.h:45
vlc_mutex_t lock
Definition rand.c:33
Description for audio output device.
Definition libvlc_media_player.h:100
char * psz_device
Device identifier string.
Definition libvlc_media_player.h:102
struct libvlc_audio_output_device_t * p_next
Next entry in list.
Definition libvlc_media_player.h:101
char * psz_description
User-friendly device description.
Definition libvlc_media_player.h:103
Description for audio output.
Definition libvlc_media_player.h:89
char * psz_name
Definition libvlc_media_player.h:90
struct libvlc_audio_output_t * p_next
Definition libvlc_media_player.h:92
char * psz_description
Definition libvlc_media_player.h:91
Description for chapters.
Definition libvlc_media_player.h:78
char * psz_name
chapter name
Definition libvlc_media_player.h:81
int64_t i_time_offset
time-offset of the chapter in milliseconds
Definition libvlc_media_player.h:79
int64_t i_duration
duration of the chapter in milliseconds
Definition libvlc_media_player.h:80
Media Player timer point.
Definition libvlc_media_player.h:3080
int64_t system_date_us
System date, in us, of this record (always valid).
Definition libvlc_media_player.h:3097
int64_t ts_us
Valid time, in us >= 0 or -1.
Definition libvlc_media_player.h:3086
double position
Position in the range [0.0f;1.0].
Definition libvlc_media_player.h:3082
int64_t length_us
Valid length, in us >= 1 or 0.
Definition libvlc_media_player.h:3088
double rate
Rate of the player.
Definition libvlc_media_player.h:3084
Definition libvlc_media_track.h:92
Definition libvlc_media_player.h:1775
bool b_scrambled
True if the program is scrambled.
Definition libvlc_media_player.h:1783
int i_group_id
Id used for libvlc_media_player_select_program()
Definition libvlc_media_player.h:1777
char * psz_name
Program name, always valid.
Definition libvlc_media_player.h:1779
bool b_selected
True if the program is selected.
Definition libvlc_media_player.h:1781
Definition libvlc_media_player.h:68
char * psz_name
title name
Definition libvlc_media_player.h:70
unsigned i_flags
info if item was recognized as a menu, interactive or plain content by the demuxer
Definition libvlc_media_player.h:71
int64_t i_duration
duration in milliseconds
Definition libvlc_media_player.h:69
Definition libvlc_media_player.h:719
uint16_t BluePrimary[2]
Definition libvlc_media_player.h:723
unsigned int MinMasteringLuminance
Definition libvlc_media_player.h:726
uint16_t RedPrimary[2]
Definition libvlc_media_player.h:721
uint16_t WhitePoint[2]
Definition libvlc_media_player.h:724
uint16_t MaxFrameAverageLightLevel
Definition libvlc_media_player.h:728
uint16_t GreenPrimary[2]
Definition libvlc_media_player.h:722
uint16_t MaxContentLightLevel
Definition libvlc_media_player.h:727
unsigned int MaxMasteringLuminance
Definition libvlc_media_player.h:725
Definition libvlc_media_player.h:617
void * video
Pointer to an ANativeWindow, used for video rendering.
Definition libvlc_media_player.h:631
struct libvlc_video_output_cfg_t::@184::@186 anw
libvlc_video_color_space_t colorspace
video color space
Definition libvlc_media_player.h:641
bool full_range
Video is full range or studio/limited range.
Definition libvlc_media_player.h:639
void * subtitle
Pointer to an ANativeWindow, used for subtitles rendering, if blending subtitles into the video surfa...
Definition libvlc_media_player.h:635
libvlc_video_color_primaries_t primaries
video color primaries
Definition libvlc_media_player.h:643
void * p_surface
currently unused
Definition libvlc_media_player.h:628
libvlc_video_transfer_func_t transfer
video transfer function
Definition libvlc_media_player.h:645
int dxgi_format
The rendering DXGI_FORMAT for libvlc_video_engine_d3d11.
Definition libvlc_media_player.h:620
uint32_t d3d9_format
The rendering D3DFORMAT for libvlc_video_engine_d3d9.
Definition libvlc_media_player.h:622
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:626
libvlc_video_orient_t orientation
video surface orientation
Definition libvlc_media_player.h:647
Definition libvlc_media_player.h:597
libvlc_video_transfer_func_t transfer
video transfer function
Definition libvlc_media_player.h:611
libvlc_video_color_primaries_t primaries
video color primaries
Definition libvlc_media_player.h:609
bool full_range
video is full range or studio/limited range
Definition libvlc_media_player.h:605
libvlc_video_color_space_t colorspace
video color space
Definition libvlc_media_player.h:607
void * device
device used for rendering, IDirect3DDevice9* for D3D9
Definition libvlc_media_player.h:613
unsigned height
rendering video height in pixel
Definition libvlc_media_player.h:601
unsigned bitdepth
rendering video bit depth in bits per channel
Definition libvlc_media_player.h:603
unsigned width
rendering video width in pixel
Definition libvlc_media_player.h:599
Definition libvlc_media_player.h:540
bool hardware_decoding
Definition libvlc_media_player.h:541
Definition libvlc_media_player.h:545
void * device
Definition libvlc_media_player.h:552
struct libvlc_video_setup_device_info_t::@180::@183 d3d9
void * device_context
Definition libvlc_media_player.h:548
struct libvlc_video_setup_device_info_t::@180::@182 d3d11
void * context_mutex
ID3D11DeviceContext*.
Definition libvlc_media_player.h:549
int adapter
IDirect3D9*.
Definition libvlc_media_player.h:553
Viewpoint.
Definition libvlc_media_track.h:64
const char * psz_name
Definition text_style.c:33
enum vlc_video_fitting fit
Definition vout_intf.c:144
char psz_value[8]
Definition vout_intf.c:110