VLC 4.0.0-dev
Loading...
Searching...
No Matches
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 };
630 /** Video is full range or studio/limited range. */
632 /** video color space */
634 /** video color primaries */
636 /** video transfer function */
638 /** video surface orientation */
641
642/**
643 * Callback prototype called on video size changes.
644 * Update the rendering output setup.
645 *
646 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
647 * \param[in] cfg configuration of the video that will be rendered
648 * \param[out] output configuration describing with how the rendering is setup
649 * \version LibVLC 4.0.0 or later
650 *
651 * \note the configuration device for Direct3D9 is the IDirect3DDevice9 that VLC
652 * uses to render. The host must set a Render target and call Present()
653 * when it needs the drawing from VLC to be done. This object is not valid
654 * anymore after Cleanup is called.
655 *
656 * Tone mapping, range and color conversion will be done depending on the values
657 * set in the output structure.
658 */
659typedef bool (*libvlc_video_update_output_cb)(void* opaque, const libvlc_video_render_cfg_t *cfg,
661
662
663/**
664 * Callback prototype called after performing drawing calls.
665 *
666 * This callback is called outside of libvlc_video_makeCurrent_cb current/not-current
667 * calls.
668 *
669 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
670 * \version LibVLC 4.0.0 or later
671 */
672typedef void (*libvlc_video_swap_cb)(void* opaque);
673
674/**
675 * Callback prototype to set up the OpenGL context for rendering.
676 * Tell the host the rendering is about to start/has finished.
677 *
678 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
679 * \param[in] enter true to set the context as current, false to unset it
680 * \return true on success
681 * \version LibVLC 4.0.0 or later
682 *
683 * On Direct3D11 the following may change on the provided ID3D11DeviceContext*
684 * between \p enter being true and \p enter being false:
685 * - IASetPrimitiveTopology()
686 * - IASetInputLayout()
687 * - IASetVertexBuffers()
688 * - IASetIndexBuffer()
689 * - VSSetConstantBuffers()
690 * - VSSetShader()
691 * - PSSetSamplers()
692 * - PSSetConstantBuffers()
693 * - PSSetShaderResources()
694 * - PSSetShader()
695 * - RSSetViewports()
696 * - DrawIndexed()
697 */
698typedef bool (*libvlc_video_makeCurrent_cb)(void* opaque, bool enter);
699
700/**
701 * Callback prototype to load opengl functions
702 *
703 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
704 * \param fct_name name of the opengl function to load
705 * \return a pointer to the named OpenGL function the NULL otherwise
706 * \version LibVLC 4.0.0 or later
707 */
708typedef void* (*libvlc_video_getProcAddress_cb)(void* opaque, const char* fct_name);
709
711{
712 /* similar to SMPTE ST 2086 mastering display color volume */
713 uint16_t RedPrimary[2];
714 uint16_t GreenPrimary[2];
715 uint16_t BluePrimary[2];
716 uint16_t WhitePoint[2];
722
726
727/**
728 * Callback prototype to receive metadata before rendering.
729 *
730 * \param[in] opaque private pointer passed to the @a libvlc_video_set_output_callbacks()
731 * \param[in] type type of data passed in metadata
732 * \param[in] metadata the type of metadata
733 * \version LibVLC 4.0.0 or later
734 */
735typedef void (*libvlc_video_frameMetadata_cb)(void* opaque, libvlc_video_metadata_type_t type, const void *metadata);
736
737/**
738 * Enumeration of the Video engine to be used on output.
739 * can be passed to @a libvlc_video_set_output_callbacks
740 */
742 /** Disable rendering engine */
746 /** Direct3D11 rendering engine */
748 /** Direct3D9 rendering engine */
751
752
753/** Callback type that can be called to request a render size changes.
754 *
755 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
756 *
757 * \param report_opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
758 * \param width new rendering width requested. [IN]
759 * \param height new rendering height requested. [IN]
760 */
761typedef void( *libvlc_video_output_resize_cb )( void *report_opaque, unsigned width, unsigned height );
762
763
764/**
765 * Enumeration of the different mouse buttons that can be reported for user interaction
766 * can be passed to \ref libvlc_video_output_mouse_press_cb and \ref libvlc_video_output_mouse_release_cb.
767 */
773
774
775/** Callback type that can be called to notify the mouse position when hovering the render surface.
776 *
777 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
778 *
779 * The position (0,0) denotes the top left corner, bottom right corner position
780 * is (width,height) as reported by \ref libvlc_video_output_resize_cb.
781 *
782 * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
783 * \param x horizontal mouse position in \ref libvlc_video_output_resize_cb coordinates. [IN]
784 * \param y vertical mouse position in \ref libvlc_video_output_resize_cb coordinates. [IN]
785 */
786typedef void (*libvlc_video_output_mouse_move_cb)(void *opaque, int x, int y);
787
788/** Callback type that can be called to notify when a mouse button is pressed in the rendering surface.
789 *
790 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
791 *
792 * The button event will be reported at the last position provided by \ref libvlc_video_output_mouse_move_cb
793 *
794 * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
795 * \param button represent the button pressed, see \ref libvlc_video_output_mouse_button_t for available buttons. [IN]
796 */
798
799/** Callback type that can be called to notify when a mouse button is released in the rendering surface.
800 *
801 * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
802 *
803 * The button event will be reported at the last position provided by \ref libvlc_video_output_mouse_move_cb.
804 *
805 * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
806 * \param button represent the button released, see \ref libvlc_video_output_mouse_button_t for available buttons. [IN]
807 */
809
810/** Set the callback to call when the host app resizes the rendering area.
811 *
812 * This allows text rendering and aspect ratio to be handled properly when the host
813 * rendering size changes and to provide mouse.
814 *
815 * It may be called before the \ref libvlc_video_output_setup_cb callback.
816 *
817 * \warning These callbacks cannot be called concurrently, the caller is responsible for serialization
818 *
819 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
820 * \param[in] report_size_change callback which must be called when the host size changes.
821 * The callback is valid until another call to \ref libvlc_video_output_set_window_cb
822 * is done. This may be called from any thread.
823 * \param[in] report_mouse_move callback which must be called when the mouse position change on the video surface.
824 * The coordinates are relative to the size reported through the \p report_size_change.
825 * This may be called from any thread.
826 * \param[in] report_mouse_pressed callback which must be called when a mouse button is pressed on the video surface,
827 * The position of the event is the last position reported by the report_mouse_move callback. This may be
828 * called from any thread.
829 * \param[in] report_mouse_released callback which must be called when a mouse button is released on the video surface,
830 * The position of the event is the last position reported by the report_mouse_move callback. This may be
831 * called from any thread.
832 * \param[in] report_opaque private pointer to pass to the \p report_size_change callback.
833 */
834typedef void( *libvlc_video_output_set_window_cb )( void *opaque,
835 libvlc_video_output_resize_cb report_size_change,
836 libvlc_video_output_mouse_move_cb report_mouse_move,
837 libvlc_video_output_mouse_press_cb report_mouse_pressed,
838 libvlc_video_output_mouse_release_cb report_mouse_released,
839 void *report_opaque );
840
841/** Tell the host the rendering for the given plane is about to start
842 *
843 * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
844 * \param plane number of the rendering plane to select
845 * \param output handle of the rendering output for the given plane
846 * \return true on success
847 * \version LibVLC 4.0.0 or later
848 *
849 * \note This is only used with \ref libvlc_video_engine_d3d11.
850 *
851 * The output parameter receives the ID3D11RenderTargetView* to use for rendering
852 * the plane.
853 *
854 * If this callback is not used (set to NULL in @a libvlc_video_set_output_callbacks())
855 * OMSetRenderTargets has to be set during the @a libvlc_video_makeCurrent_cb()
856 * entering call.
857 *
858 * The number of planes depend on the DXGI_FORMAT returned during the
859 * @a libvlc_video_update_output_cb() call. It's usually one plane except for
860 * semi-planar formats like DXGI_FORMAT_NV12 or DXGI_FORMAT_P010.
861 *
862 * This callback is called between libvlc_video_makeCurrent_cb current/not-current
863 * calls.
864 */
865typedef bool( *libvlc_video_output_select_plane_cb )( void *opaque, size_t plane, void *output );
866
867/**
868 * Set callbacks and data to render decoded video to a custom texture
869 *
870 * \warning VLC will perform video rendering in its own thread and at its own rate,
871 * You need to provide your own synchronisation mechanism.
872 *
873 * \param mp the media player
874 * \param engine the GPU engine to use
875 * \param setup_cb callback called to initialize user data
876 * \param cleanup_cb callback called to clean up user data
877 * \param window_cb callback called to setup the window
878 * \param update_output_cb callback to get the rendering format of the host (cannot be NULL)
879 * \param swap_cb callback called after rendering a video frame (cannot be NULL)
880 * \param makeCurrent_cb callback called to enter/leave the rendering context (cannot be NULL)
881 * \param getProcAddress_cb opengl function loading callback (cannot be NULL for \ref libvlc_video_engine_opengl and for \ref libvlc_video_engine_gles2)
882 * \param metadata_cb callback to provide frame metadata (D3D11 only)
883 * \param select_plane_cb callback to select different D3D11 rendering targets
884 * \param opaque private pointer passed to callbacks
885 *
886 * \note the \p setup_cb and \p cleanup_cb may be called more than once per
887 * playback.
888 *
889 * \retval true engine selected and callbacks set
890 * \retval false engine type unknown, callbacks not set
891 * \version LibVLC 4.0.0 or later
892 */
899 libvlc_video_update_output_cb update_output_cb,
900 libvlc_video_swap_cb swap_cb,
901 libvlc_video_makeCurrent_cb makeCurrent_cb,
902 libvlc_video_getProcAddress_cb getProcAddress_cb,
905 void* opaque );
906
907/**
908 * Set the handler where the media player should display its video output.
909 *
910 * The drawable is an `NSObject` that require responding to two selectors
911 * like in this protocol:
912 *
913 * @code{.m}
914 * @protocol VLCDrawable <NSObject>
915 * - (void)addSubview:(VLCView *)view;
916 * - (CGRect)bounds;
917 * @end
918 * @endcode
919 *
920 * In this protocol `VLCView` type can either be a `UIView` or a `NSView` type
921 * class.
922 * VLCDrawable protocol conformance isn't mandatory but a drawable must respond
923 * to both `addSubview:` and `bounds` selectors.
924 *
925 * Additionally, a drawable can also conform to the `VLCPictureInPictureDrawable`
926 * protocol to allow picture in picture support :
927 *
928 * @code{.m}
929 * @protocol VLCPictureInPictureMediaControlling <NSObject>
930 * - (void)play;
931 * - (void)pause;
932 * - (void)seekBy:(int64_t)offset completion:(dispatch_block_t)completion;;
933 * - (int64_t)mediaLength;
934 * - (int64_t)mediaTime;
935 * - (BOOL)isMediaSeekable;
936 * - (BOOL)isMediaPlaying;
937 * @end
938 *
939 * @protocol VLCPictureInPictureWindowControlling <NSObject>
940 * - (void)startPictureInPicture;
941 * - (void)stopPictureInPicture;
942 * - (void)invalidatePlaybackState;
943 * @end
944 *
945 * @protocol VLCPictureInPictureDrawable <NSObject>
946 * - (id<VLCPictureInPictureMediaControlling>) mediaController;
947 * - (void (^)(id<VLCPictureInPictureWindowControlling>)) pictureInPictureReady;
948 * @end
949 * @endcode
950 *
951 * Be aware that full `VLCPictureInPictureDrawable` conformance is mandatory to
952 * enable picture in picture support and that time values in
953 * `VLCPictureInPictureMediaControlling` methods are expressed in milliseconds.
954 *
955 * If you want to use it along with Qt see the QMacCocoaViewContainer. Then
956 * the following code should work:
957 * @code{.mm}
958 * {
959 * NSView *video = [[NSView alloc] init];
960 * QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent);
961 * libvlc_media_player_set_nsobject(mp, video);
962 * [video release];
963 * }
964 * @endcode
965 *
966 * You can find a live example in VLCVideoView in VLCKit.framework.
967 *
968 * \param p_mi the Media Player
969 * \param drawable the drawable that is either an NSView, a UIView or any
970 * NSObject responding to `addSubview:` and `bounds` selectors
971 */
973
974/**
975 * Get the NSView handler previously set with libvlc_media_player_set_nsobject().
976 *
977 * \param p_mi the Media Player
978 * \return the NSView handler or 0 if none where set
979 */
981
982/**
983 * Set an X Window System drawable where the media player should render its
984 * video output. The call takes effect when the playback starts. If it is
985 * already started, it might need to be stopped before changes apply.
986 * If LibVLC was built without X11 output support, then this function has no
987 * effects.
988 *
989 * By default, LibVLC will capture input events on the video rendering area.
990 * Use libvlc_video_set_mouse_input() and libvlc_video_set_key_input() to
991 * disable that and deliver events to the parent window / to the application
992 * instead. By design, the X11 protocol delivers input events to only one
993 * recipient.
994 *
995 * \warning
996 * The application must call the XInitThreads() function from Xlib before
997 * libvlc_new(), and before any call to XOpenDisplay() directly or via any
998 * other library. Failure to call XInitThreads() will seriously impede LibVLC
999 * performance. Calling XOpenDisplay() before XInitThreads() will eventually
1000 * crash the process. That is a limitation of Xlib.
1001 *
1002 * \param p_mi media player
1003 * \param drawable X11 window ID
1004 *
1005 * \note
1006 * The specified identifier must correspond to an existing Input/Output class
1007 * X11 window. Pixmaps are <b>not</b> currently supported. The default X11
1008 * server is assumed, i.e. that specified in the DISPLAY environment variable.
1009 *
1010 * \warning
1011 * LibVLC can deal with invalid X11 handle errors, however some display drivers
1012 * (EGL, GLX, VA and/or VDPAU) can unfortunately not. Thus the window handle
1013 * must remain valid until playback is stopped, otherwise the process may
1014 * abort or crash.
1015 *
1016 * \bug
1017 * No more than one window handle per media player instance can be specified.
1018 * If the media has multiple simultaneously active video tracks, extra tracks
1019 * will be rendered into external windows beyond the control of the
1020 * application.
1021 */
1023 uint32_t drawable);
1024
1025/**
1026 * Get the X Window System window identifier previously set with
1027 * libvlc_media_player_set_xwindow(). Note that this will return the identifier
1028 * even if VLC is not currently using it (for instance if it is playing an
1029 * audio-only input).
1030 *
1031 * \param p_mi the Media Player
1032 * \return an X window ID, or 0 if none where set.
1033 */
1035
1036/**
1037 * Set a Win32/Win64 API window handle (HWND) where the media player should
1038 * render its video output. If LibVLC was built without Win32/Win64 API output
1039 * support, then this has no effects.
1040 *
1041 * \warning the HWND must have the WS_CLIPCHILDREN set in its style.
1042 *
1043 * \param p_mi the Media Player
1044 * \param drawable windows handle of the drawable
1045 */
1047
1048/**
1049 * Get the Windows API window handle (HWND) previously set with
1050 * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
1051 * is not currently outputting any video to it.
1052 *
1053 * \param p_mi the Media Player
1054 * \return a window handle or NULL if there are none.
1055 */
1057
1058/**
1059 * Set the android context.
1060 *
1061 * \version LibVLC 3.0.0 and later.
1062 *
1063 * \param p_mi the media player
1064 * \param p_awindow_handler org.videolan.libvlc.AWindow jobject owned by the
1065 * org.videolan.libvlc.MediaPlayer class from the libvlc-android project.
1066 */
1068 void *p_awindow_handler );
1069
1070/**
1071 * Callback prototype for audio playback.
1072 *
1073 * The LibVLC media player decodes and post-processes the audio signal
1074 * asynchronously (in an internal thread). Whenever audio samples are ready
1075 * to be queued to the output, this callback is invoked.
1076 *
1077 * The number of samples provided per invocation may depend on the file format,
1078 * the audio coding algorithm, the decoder plug-in, the post-processing
1079 * filters and timing. Application must not assume a certain number of samples.
1080 *
1081 * The exact format of audio samples is determined by libvlc_audio_set_format()
1082 * or libvlc_audio_set_format_callbacks() as is the channels layout.
1083 *
1084 * Note that the number of samples is per channel. For instance, if the audio
1085 * track sampling rate is 48000 Hz, then 1200 samples represent 25 milliseconds
1086 * of audio signal - regardless of the number of audio channels.
1087 *
1088 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1089 * \param[in] samples pointer to a table of audio samples to play back
1090 * \param count number of audio samples to play back
1091 * \param pts expected play time stamp (see libvlc_delay())
1092 */
1093typedef void (*libvlc_audio_play_cb)(void *data, const void *samples,
1094 unsigned count, int64_t pts);
1095
1096/**
1097 * Callback prototype for audio pause.
1098 *
1099 * LibVLC invokes this callback to pause audio playback.
1100 *
1101 * \note The pause callback is never called if the audio is already paused.
1102 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1103 * \param pts time stamp of the pause request (should be elapsed already)
1104 */
1105typedef void (*libvlc_audio_pause_cb)(void *data, int64_t pts);
1106
1107/**
1108 * Callback prototype for audio resumption.
1109 *
1110 * LibVLC invokes this callback to resume audio playback after it was
1111 * previously paused.
1112 *
1113 * \note The resume callback is never called if the audio is not paused.
1114 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1115 * \param pts time stamp of the resumption request (should be elapsed already)
1116 */
1117typedef void (*libvlc_audio_resume_cb)(void *data, int64_t pts);
1118
1119/**
1120 * Callback prototype for audio buffer flush.
1121 *
1122 * LibVLC invokes this callback if it needs to discard all pending buffers and
1123 * stop playback as soon as possible. This typically occurs when the media is
1124 * stopped.
1125 *
1126 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1127 */
1128typedef void (*libvlc_audio_flush_cb)(void *data, int64_t pts);
1129
1130/**
1131 * Callback prototype for audio buffer drain.
1132 *
1133 * LibVLC may invoke this callback when the decoded audio track is ending.
1134 * There will be no further decoded samples for the track, but playback should
1135 * nevertheless continue until all already pending buffers are rendered.
1136 *
1137 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1138 */
1139typedef void (*libvlc_audio_drain_cb)(void *data);
1140
1141/**
1142 * Callback prototype for audio volume change.
1143 * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
1144 * \param volume software volume (1. = nominal, 0. = mute)
1145 * \param mute muted flag
1146 */
1147typedef void (*libvlc_audio_set_volume_cb)(void *data,
1148 float volume, bool mute);
1149
1150/**
1151 * Sets callbacks and private data for decoded audio.
1152 *
1153 * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
1154 * to configure the decoded audio format.
1155 *
1156 * \note The audio callbacks override any other audio output mechanism.
1157 * If the callbacks are set, LibVLC will <b>not</b> output audio in any way.
1158 *
1159 * \param mp the media player
1160 * \param play callback to play audio samples (must not be NULL)
1161 * \param pause callback to pause playback (or NULL to ignore)
1162 * \param resume callback to resume playback (or NULL to ignore)
1163 * \param flush callback to flush audio buffers (or NULL to ignore)
1164 * \param drain callback to drain audio buffers (or NULL to ignore)
1165 * \param opaque private pointer for the audio callbacks (as first parameter)
1166 * \version LibVLC 2.0.0 or later
1167 */
1175 void *opaque );
1176
1177/**
1178 * Set callbacks and private data for decoded audio. This only works in
1179 * combination with libvlc_audio_set_callbacks().
1180 * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
1181 * to configure the decoded audio format.
1182 *
1183 * \param mp the media player
1184 * \param set_volume callback to apply audio volume,
1185 * or NULL to apply volume in software
1186 * \version LibVLC 2.0.0 or later
1187 */
1190 libvlc_audio_set_volume_cb set_volume );
1191
1192/**
1193 * Callback prototype to setup the audio playback.
1194 *
1195 * This is called when the media player needs to create a new audio output.
1196 * \param[in,out] opaque pointer to the data pointer passed to
1197 * libvlc_audio_set_callbacks()
1198 * \param[in,out] format 4 bytes sample format
1199 * \param[in,out] rate sample rate
1200 * \param[in,out] channels channels count
1201 * \return 0 on success, anything else to skip audio playback
1202 */
1203typedef int (*libvlc_audio_setup_cb)(void **opaque, char *format, unsigned *rate,
1204 unsigned *channels);
1205
1206/**
1207 * Callback prototype for audio playback cleanup.
1208 *
1209 * This is called when the media player no longer needs an audio output.
1210 * \param[in] opaque data pointer as passed to libvlc_audio_set_callbacks()
1211 */
1212typedef void (*libvlc_audio_cleanup_cb)(void *opaque);
1213
1214/**
1215 * Sets decoded audio format via callbacks.
1216 *
1217 * This only works in combination with libvlc_audio_set_callbacks().
1218 *
1219 * \param mp the media player
1220 * \param setup callback to select the audio format (cannot be NULL)
1221 * \param cleanup callback to release any allocated resources (or NULL)
1222 * \version LibVLC 2.0.0 or later
1223 */
1227 libvlc_audio_cleanup_cb cleanup );
1228
1229/**
1230 * Sets a fixed decoded audio format.
1231 *
1232 * This only works in combination with libvlc_audio_set_callbacks(),
1233 * and is mutually exclusive with libvlc_audio_set_format_callbacks().
1234 *
1235 * The supported formats are:
1236 * - "S16N" for signed 16-bit PCM
1237 * - "S32N" for signed 32-bit PCM
1238 * - "FL32" for single precision IEEE 754
1239 *
1240 * All supported formats use the native endianness.
1241 * If there are more than one channel, samples are interleaved.
1242 *
1243 * \param mp the media player
1244 * \param format a four-characters string identifying the sample format
1245 * \param rate sample rate (expressed in Hz)
1246 * \param channels channels count
1247 * \version LibVLC 2.0.0 or later
1248 */
1251 unsigned rate, unsigned channels );
1252
1253/** \bug This might go away ... to be replaced by a broader system */
1254
1255/**
1256 * Get the current movie length (in ms).
1257 *
1258 * \param p_mi the Media Player
1259 * \return the movie length (in ms), or -1 if there is no media.
1260 */
1262
1263/**
1264 * Get the current movie time (in ms).
1265 *
1266 * \param p_mi the Media Player
1267 * \return the movie time (in ms), or -1 if there is no media.
1268 */
1270
1271/**
1272 * Set the movie time (in ms).
1273 *
1274 * This has no effect if no media is being played.
1275 * Not all formats and protocols support this.
1276 *
1277 * \param p_mi the Media Player
1278 * \param i_time the movie time (in ms).
1279 * \param b_fast prefer fast seeking or precise seeking
1280 * \return 0 on success, -1 on error
1281 */
1283 libvlc_time_t i_time, bool b_fast );
1284
1285/**
1286 * Jump the movie time (in ms).
1287 *
1288 * This will trigger a precise and relative seek (from the current time).
1289 * This has no effect if no media is being played.
1290 * Not all formats and protocols support this.
1291 *
1292 * \param p_mi the Media Player
1293 * \param i_time the movie time (in ms).
1294 * \return 0 on success, -1 on error
1295 * \version LibVLC 4.0.0 and later.
1296 */
1298 libvlc_time_t i_time );
1299
1300/**
1301 * Get movie position as percentage between 0.0 and 1.0.
1302 *
1303 * \param p_mi the Media Player
1304 * \return movie position, or -1. in case of error
1305 */
1307
1308/**
1309 * Set movie position as percentage between 0.0 and 1.0.
1310 * This has no effect if playback is not enabled.
1311 * This might not work depending on the underlying input format and protocol.
1312 *
1313 * \param p_mi the Media Player
1314 * \param b_fast prefer fast seeking or precise seeking
1315 * \param f_pos the position
1316 * \return 0 on success, -1 on error
1317 */
1319 double f_pos, bool b_fast );
1320
1321/**
1322 * Enable A to B loop for the current media by setting the start time and end
1323 * time
1324 *
1325 * The B time must be higher than the A time.
1326 *
1327 * \param p_mi the Media Player
1328 * \param a_time start time for the loop (in ms)
1329 * \param b_time end time for the loop (in ms)
1330 * \return 0 on success, -1 on error
1331 * \version LibVLC 4.0.0 and later.
1332 */
1333LIBVLC_API int
1335 libvlc_time_t a_time, libvlc_time_t b_time );
1336
1337/**
1338 * Enable A to B loop for the current media by setting the start position and
1339 * end position
1340 *
1341 * The B position must be higher than the A position.
1342 *
1343 * \param p_mi the Media Player
1344 * \param a_pos start position for the loop
1345 * \param b_pos end position for the loop
1346 * \return 0 on success, -1 on error
1347 * \version LibVLC 4.0.0 and later.
1348 */
1349LIBVLC_API int
1351 double a_pos, double b_pos );
1352
1353/**
1354 * Reset/remove the A to B loop for the current media
1355 *
1356 * \param p_mi the Media Player
1357 * \return 0 on success, -1 on error
1358 * \version LibVLC 4.0.0 and later.
1359 */
1360LIBVLC_API int
1362
1363/**
1364 * Get the A to B loop status
1365 *
1366 * @note If the returned status is VLC_PLAYER_ABLOOP_A, then a_time and a_pos
1367 * will be valid. If the returned status is VLC_PLAYER_ABLOOP_B, then all
1368 * output parameters are valid. If the returned status is
1369 * VLC_PLAYER_ABLOOP_NONE, then all output parameters are invalid.
1370 *
1371 * @see vlc_player_cbs.on_atobloop_changed
1372 *
1373 * \param p_mi the Media Player
1374 * \param a_time A time (in ms) or -1 (if the media doesn't have valid times)
1375 * \param a_pos A position
1376 * \param b_time B time (in ms) or -1 (if the media doesn't have valid times)
1377 * \param b_pos B position
1378 * \return A to B loop status
1379 * \version LibVLC 4.0.0 and later.
1380 */
1383 libvlc_time_t *a_time, double *a_pos,
1384 libvlc_time_t *b_time, double *b_pos );
1385/**
1386 * Set movie chapter (if applicable).
1387 *
1388 * \param p_mi the Media Player
1389 * \param i_chapter chapter number to play
1390 */
1392
1393/**
1394 * Get movie chapter.
1395 *
1396 * \param p_mi the Media Player
1397 * \return chapter number currently playing, or -1 if there is no media.
1398 */
1400
1401/**
1402 * Get movie chapter count
1403 *
1404 * \param p_mi the Media Player
1405 * \return number of chapters in movie, or -1.
1406 */
1408
1409/**
1410 * Get title chapter count
1411 *
1412 * \param p_mi the Media Player
1413 * \param i_title title
1414 * \return number of chapters in title, or -1
1415 */
1417 libvlc_media_player_t *p_mi, int i_title );
1418
1419/**
1420 * Set movie title
1421 *
1422 * \param p_mi the Media Player
1423 * \param i_title title number to play
1424 */
1426
1427/**
1428 * Get movie title
1429 *
1430 * \param p_mi the Media Player
1431 * \return title number currently playing, or -1
1432 */
1434
1435/**
1436 * Get movie title count
1437 *
1438 * \param p_mi the Media Player
1439 * \return title number count, or -1
1440 */
1442
1443/**
1444 * Set previous chapter (if applicable)
1445 *
1446 * \param p_mi the Media Player
1447 */
1449
1450/**
1451 * Set next chapter (if applicable)
1452 *
1453 * \param p_mi the Media Player
1454 */
1456
1457/**
1458 * Get the requested movie play rate.
1459 * @warning Depending on the underlying media, the requested rate may be
1460 * different from the real playback rate.
1461 *
1462 * \param p_mi the Media Player
1463 * \return movie play rate
1464 */
1466
1467/**
1468 * Set movie play rate
1469 *
1470 * \param p_mi the Media Player
1471 * \param rate movie play rate to set
1472 * \return -1 if an error was detected, 0 otherwise (but even then, it might
1473 * not actually work depending on the underlying media protocol)
1474 */
1476
1477/**
1478 * Get current movie state
1479 *
1480 * \param p_mi the Media Player
1481 * \return the current state of the media player (playing, paused, ...) \see libvlc_state_t
1482 */
1484
1485/**
1486 * How many video outputs does this media player have?
1487 *
1488 * \param p_mi the media player
1489 * \return the number of video outputs
1490 */
1492
1493/**
1494 * Is this media player seekable?
1495 *
1496 * \param p_mi the media player
1497 * \retval true media player can seek
1498 * \retval false media player cannot seek
1499 */
1501
1502/**
1503 * Can this media player be paused?
1504 *
1505 * \param p_mi the media player
1506 * \retval true media player can be paused
1507 * \retval false media player cannot be paused
1508 */
1510
1511/**
1512 * Check if the current program is scrambled
1513 *
1514 * \param p_mi the media player
1515 * \retval true current program is scrambled
1516 * \retval false current program is not scrambled
1517 *
1518 * \version LibVLC 2.2.0 or later
1519 */
1521
1522/**
1523 * Display the next frame (if supported)
1524 *
1525 * \param p_mi the media player
1526 */
1528
1529/**
1530 * Navigate through DVD Menu
1531 *
1532 * \param p_mi the Media Player
1533 * \param navigate the Navigation mode
1534 * \version libVLC 2.0.0 or later
1535 */
1537 unsigned navigate );
1538
1539/**
1540 * Set if, and how, the video title will be shown when media is played.
1541 *
1542 * \param p_mi the media player
1543 * \param position position at which to display the title, or libvlc_position_disable to prevent the title from being displayed
1544 * \param timeout title display timeout in milliseconds (ignored if libvlc_position_disable)
1545 * \version libVLC 2.1.0 or later
1546 */
1548
1549/**
1550 * Get the track list for one type
1551 *
1552 * \version LibVLC 4.0.0 and later.
1553 *
1554 * \note You need to call libvlc_media_parse_request() or play the media
1555 * at least once before calling this function. Not doing this will result in
1556 * an empty list.
1557 *
1558 * \note This track list is a snapshot of the current tracks when this function
1559 * is called. If a track is updated after this call, the user will need to call
1560 * this function again to get the updated track.
1561 *
1562 *
1563 * The track list can be used to get track information and to select specific
1564 * tracks.
1565 *
1566 * \param p_mi the media player
1567 * \param type type of the track list to request
1568 * \param selected filter only selected tracks if true (return all tracks, even
1569 * selected ones if false)
1570 *
1571 * \return a valid libvlc_media_tracklist_t or NULL in case of error, if there
1572 * is no track for a category, the returned list will have a size of 0, delete
1573 * with libvlc_media_tracklist_delete()
1574 */
1577 libvlc_track_type_t type, bool selected );
1578
1579/**
1580 * Get the selected track for one type
1581 *
1582 * \version LibVLC 4.0.0 and later.
1583 *
1584 * \warning More than one tracks can be selected for one type. In that case,
1585 * libvlc_media_player_get_tracklist() should be used.
1586 *
1587 * \param p_mi the media player
1588 * \param type type of the selected track
1589 *
1590 * \return a valid track or NULL if there is no selected tracks for this type,
1591 * release it with libvlc_media_track_release().
1592 */
1595 libvlc_track_type_t type );
1596
1597/*
1598 * Get a track from a track id
1599 *
1600 * \version LibVLC 4.0.0 and later.
1601 *
1602 * This function can be used to get the last updated information of a track.
1603 *
1604 * \param p_mi the media player
1605 * \param psz_id valid string representing a track id (cf. psz_id from \ref
1606 * libvlc_media_track_t)
1607 *
1608 * \return a valid track or NULL if there is currently no tracks identified by
1609 * the string id, release it with libvlc_media_track_release().
1610 */
1613 const char *psz_id );
1614
1615
1616/**
1617 * Select a track
1618 *
1619 * This will unselected the current track.
1620 *
1621 * \version LibVLC 4.0.0 and later.
1622 *
1623 * \note Use libvlc_media_player_select_tracks() for multiple selection
1624 *
1625 * \warning Only use a \ref libvlc_media_track_t retrieved with \ref libvlc_media_player_get_tracklist
1626 *
1627 * \param p_mi the media player
1628 * \param track track to select, can't be NULL
1629 */
1630LIBVLC_API void
1632 const libvlc_media_track_t *track );
1633
1634/**
1635 * Unselect all tracks for a given type
1636 *
1637 * \version LibVLC 4.0.0 and later.
1638 *
1639 * \param p_mi the media player
1640 * \param type type to unselect
1641 */
1642LIBVLC_API void
1644 libvlc_track_type_t type );
1645
1646/**
1647 * Select multiple tracks for one type
1648 *
1649 * \version LibVLC 4.0.0 and later.
1650 *
1651 * \note The internal track list can change between the calls of
1652 * libvlc_media_player_get_tracklist() and
1653 * libvlc_media_player_set_tracks(). If a track selection change but the
1654 * track is not present anymore, the player will just ignore it.
1655 *
1656 * \note selecting multiple audio tracks is currently not supported.
1657 *
1658 * \warning Only use a \ref libvlc_media_track_t retrieved with \ref libvlc_media_player_get_tracklist
1659 *
1660 * \param p_mi the media player
1661 * \param type type of the selected track
1662 * \param tracks pointer to the track array, or NULL if track_count is 0
1663 * \param track_count number of tracks in the track array
1664 */
1665LIBVLC_API void
1668 const libvlc_media_track_t **tracks,
1669 size_t track_count );
1670
1671/**
1672 * Select tracks by their string identifier
1673 *
1674 * \version LibVLC 4.0.0 and later.
1675 *
1676 * This function can be used pre-select a list of tracks before starting the
1677 * player. It has only effect for the current media. It can also be used when
1678 * the player is already started.
1679 *
1680 * 'str_ids' can contain more than one track id, delimited with ','. "" or any
1681 * invalid track id will cause the player to unselect all tracks of that
1682 * category. NULL will disable the preference for newer tracks without
1683 * unselecting any current tracks.
1684 *
1685 * Example:
1686 * - (libvlc_track_video, "video/1,video/2") will select these 2 video tracks.
1687 * If there is only one video track with the id "video/0", no tracks will be
1688 * selected.
1689 * - (libvlc_track_type_t, "${slave_url_md5sum}/spu/0) will select one spu
1690 * added by an input slave with the corresponding url.
1691 *
1692 * \note The string identifier of a track can be found via psz_id from \ref
1693 * libvlc_media_track_t
1694 *
1695 * \note selecting multiple audio tracks is currently not supported.
1696 *
1697 * \warning Only use a \ref libvlc_media_track_t id retrieved with \ref libvlc_media_player_get_tracklist
1698 *
1699 * \param p_mi the media player
1700 * \param type type to select
1701 * \param psz_ids list of string identifier or NULL
1702 */
1703LIBVLC_API void
1706 const char *psz_ids );
1707
1708/**
1709 * Add a slave to the current media player.
1710 *
1711 * \note If the player is playing, the slave will be added directly. This call
1712 * will also update the slave list of the attached libvlc_media_t.
1713 *
1714 * \version LibVLC 3.0.0 and later.
1715 *
1716 * \see libvlc_media_slaves_add
1717 *
1718 * \param p_mi the media player
1719 * \param i_type subtitle or audio
1720 * \param psz_uri Uri of the slave (should contain a valid scheme).
1721 * \param b_select True if this slave should be selected when it's loaded
1722 *
1723 * \return 0 on success, -1 on error.
1724 */
1728 const char *psz_uri, bool b_select );
1729
1731{
1732 /** Id used for libvlc_media_player_select_program() */
1734 /** Program name, always valid */
1736 /** True if the program is selected */
1738 /** True if the program is scrambled */
1741
1742/**
1743 * Opaque struct containing a list of program
1744 */
1746
1747/**
1748 * Delete a program struct
1749 *
1750 * \version LibVLC 4.0.0 and later.
1751 *
1752 * \param program returned by libvlc_media_player_get_selected_program() or
1753 * libvlc_media_player_get_program_from_id()
1754 *
1755 */
1756LIBVLC_API void
1758
1759/**
1760 * Get the number of programs in a programlist
1761 *
1762 * \version LibVLC 4.0.0 and later.
1763 *
1764 * \param list valid programlist
1765 *
1766 * \return number of programs, or 0 if the list is empty
1767 */
1768LIBVLC_API size_t
1770
1771/**
1772 * Get a program at a specific index
1773 *
1774 * \warning The behaviour is undefined if the index is not valid.
1775 *
1776 * \version LibVLC 4.0.0 and later.
1777 *
1778 * \param list valid programlist
1779 * \param index valid index in the range [0; count[
1780 *
1781 * \return a valid program (can't be NULL if libvlc_player_programlist_count()
1782 * returned a valid count)
1783 */
1786
1787/**
1788 * Release a programlist
1789 *
1790 * \note program structs from the list are also deleted.
1791 *
1792 * \version LibVLC 4.0.0 and later.
1793 *
1794 * \see libvlc_media_player_get_programlist
1795 *
1796 * \param list valid programlist
1797 */
1798LIBVLC_API void
1800
1801/**
1802 * Select program with a given program id.
1803 *
1804 * \note program ids are sent via the libvlc_MediaPlayerProgramAdded event or
1805 * can be fetch via libvlc_media_player_get_programlist()
1806 *
1807 * \version LibVLC 4.0.0 or later
1808 *
1809 * \param p_mi opaque media player handle
1810 * \param i_group_id program id
1811 */
1813
1814/**
1815 * Get the selected program
1816 *
1817 * \version LibVLC 4.0.0 or later
1818 *
1819 * \param p_mi opaque media player handle
1820 *
1821 * \return a valid program struct or NULL if no programs are selected. The
1822 * program need to be freed with libvlc_player_program_delete().
1823 */
1826
1827/**
1828 * Get a program struct from a program id
1829 *
1830 * \version LibVLC 4.0.0 or later
1831 *
1832 * \param p_mi opaque media player handle
1833 * \param i_group_id program id
1834 *
1835 * \return a valid program struct or NULL if the i_group_id is not found. The
1836 * program need to be freed with libvlc_player_program_delete().
1837 */
1840
1841/**
1842 * Get the program list
1843 *
1844 * \version LibVLC 4.0.0 and later.
1845 * \note This program list is a snapshot of the current programs when this
1846 * function is called. If a program is updated after this call, the user will
1847 * need to call this function again to get the updated program.
1848 *
1849 * The program list can be used to get program information and to select
1850 * specific programs.
1851 *
1852 * \param p_mi the media player
1853 *
1854 * \return a valid libvlc_media_programlist_t or NULL in case of error or empty
1855 * list, delete with libvlc_media_programlist_delete()
1856 */
1859
1860
1861/** \defgroup libvlc_video LibVLC video controls
1862 * @{
1863 */
1864
1865/**
1866 * Toggle fullscreen status on non-embedded video outputs.
1867 *
1868 * @warning The same limitations applies to this function
1869 * as to libvlc_set_fullscreen().
1870 *
1871 * \param p_mi the media player
1872 */
1874
1875/**
1876 * Enable or disable fullscreen.
1877 *
1878 * @warning With most window managers, only a top-level windows can be in
1879 * full-screen mode. Hence, this function will not operate properly if
1880 * libvlc_media_player_set_xwindow() was used to embed the video in a
1881 * non-top-level window. In that case, the embedding window must be reparented
1882 * to the root window <b>before</b> fullscreen mode is enabled. You will want
1883 * to reparent it back to its normal parent when disabling fullscreen.
1884 *
1885 * \note This setting applies to any and all current or future active video
1886 * tracks and windows for the given media player. The choice of fullscreen
1887 * output for each window is left to the operating system.
1888 *
1889 * \param p_mi the media player
1890 * \param b_fullscreen boolean for fullscreen status
1891 */
1893
1894/**
1895 * Get current fullscreen status.
1896 *
1897 * \param p_mi the media player
1898 * \return the fullscreen status (boolean)
1899 *
1900 * \retval false media player is windowed
1901 * \retval true media player is in fullscreen mode
1902 */
1904
1905/**
1906 * Enable or disable key press events handling, according to the LibVLC hotkeys
1907 * configuration. By default and for historical reasons, keyboard events are
1908 * handled by the LibVLC video widget.
1909 *
1910 * \note On X11, there can be only one subscriber for key press and mouse
1911 * click events per window. If your application has subscribed to those events
1912 * for the X window ID of the video widget, then LibVLC will not be able to
1913 * handle key presses and mouse clicks in any case.
1914 *
1915 * \warning This function is only implemented for X11 and Win32 at the moment.
1916 *
1917 * \param p_mi the media player
1918 * \param on true to handle key press events, false to ignore them.
1919 */
1922
1923/**
1924 * Enable or disable mouse click events handling. By default, those events are
1925 * handled. This is needed for DVD menus to work, as well as a few video
1926 * filters such as "puzzle".
1927 *
1928 * \see libvlc_video_set_key_input().
1929 *
1930 * \warning This function is only implemented for X11 and Win32 at the moment.
1931 *
1932 * \param p_mi the media player
1933 * \param on true to handle mouse click events, false to ignore them.
1934 */
1937
1938/**
1939 * Get the pixel dimensions of a video.
1940 *
1941 * \param p_mi media player
1942 * \param num number of the video (starting from, and most commonly 0)
1943 * \param[out] px pointer to get the pixel width
1944 * \param[out] py pointer to get the pixel height
1945 * \return 0 on success, -1 if the specified video does not exist
1946 */
1949 unsigned *px, unsigned *py );
1950
1951/**
1952 * Get the mouse pointer coordinates over a video.
1953 * Coordinates are expressed in terms of the decoded video resolution,
1954 * <b>not</b> in terms of pixels on the screen/viewport (to get the latter,
1955 * you can query your windowing system directly).
1956 *
1957 * Either of the coordinates may be negative or larger than the corresponding
1958 * dimension of the video, if the cursor is outside the rendering area.
1959 *
1960 * @warning The coordinates may be out-of-date if the pointer is not located
1961 * on the video rendering area. LibVLC does not track the pointer if it is
1962 * outside of the video widget.
1963 *
1964 * @note LibVLC does not support multiple pointers (it does of course support
1965 * multiple input devices sharing the same pointer) at the moment.
1966 *
1967 * \param p_mi media player
1968 * \param num number of the video (starting from, and most commonly 0)
1969 * \param[out] px pointer to get the abscissa
1970 * \param[out] py pointer to get the ordinate
1971 * \return 0 on success, -1 if the specified video does not exist
1972 */
1975 int *px, int *py );
1976
1977/**
1978 * Get the current video scaling factor.
1979 * See also libvlc_video_set_scale().
1980 *
1981 * \param p_mi the media player
1982 * \return the currently configured zoom factor, or 0. if the video is set
1983 * to fit to the output window/drawable automatically.
1984 */
1986
1987/**
1988 * Set the video scaling factor. That is the ratio of the number of pixels on
1989 * screen to the number of pixels in the original decoded video in each
1990 * dimension. Zero is a special value; it will adjust the video to the output
1991 * window/drawable (in windowed mode) or the entire screen.
1992 *
1993 * Note that not all video outputs support scaling.
1994 *
1995 * \param p_mi the media player
1996 * \param f_factor the scaling factor, or zero
1997 */
1999
2000/**
2001 * Get current video aspect ratio.
2002 *
2003 * \param p_mi the media player
2004 * \return the video aspect ratio or NULL if unspecified
2005 * (the result must be released with free() or libvlc_free()).
2006 */
2008
2009/**
2010 * Set new video aspect ratio.
2011 *
2012 * \param p_mi the media player
2013 * \param psz_aspect new video aspect-ratio or NULL to reset to source aspect ratio
2014 * \note Invalid aspect ratios are ignored.
2015 */
2017
2018/**
2019 * Get current video display fit mode.
2020 *
2021 * \version LibVLC 4.0.0 or later
2022 *
2023 * \param p_mi the media player
2024 * \return the video display fit mode.
2025 */
2027
2028/**
2029 * Set new video display fit.
2030 *
2031 * \version LibVLC 4.0.0 or later
2032 *
2033 * \param p_mi the media player
2034 * \param fit new display fit mode
2035 * \note Invalid fit mode are ignored.
2036 */
2038
2039/**
2040 * Create a video viewpoint structure.
2041 *
2042 * \version LibVLC 3.0.0 and later
2043 *
2044 * \return video viewpoint or NULL
2045 * (the result must be released with free()).
2046 */
2048
2049/**
2050 * Update the video viewpoint information.
2051 *
2052 * \note It is safe to call this function before the media player is started.
2053 *
2054 * \version LibVLC 3.0.0 and later
2055 *
2056 * \param p_mi the media player
2057 * \param p_viewpoint video viewpoint allocated via libvlc_video_new_viewpoint()
2058 * \param b_absolute if true replace the old viewpoint with the new one. If
2059 * false, increase/decrease it.
2060 * \return -1 in case of error, 0 otherwise
2061 *
2062 * \note the values are set asynchronously, it will be used by the next frame displayed.
2063 */
2065 const libvlc_video_viewpoint_t *p_viewpoint,
2066 bool b_absolute);
2067
2068/**
2069 * Video stereo modes
2070 */
2078
2079/**
2080 * Get current video stereo mode.
2081 *
2082 * \param p_mi the media player
2083 * \return the video stereo mode.
2084 */
2086 libvlc_media_player_t *p_mi );
2087
2088/**
2089 * Set new video stereo mode.
2090 *
2091 * \param p_mi the media player
2092 * \param i_mode new video stereo mode
2093 */
2095 const libvlc_video_stereo_mode_t i_mode );
2096
2097/**
2098 * Get the current subtitle delay. Positive values means subtitles are being
2099 * displayed later, negative values earlier.
2100 *
2101 * \param p_mi media player
2102 * \return time (in microseconds) the display of subtitles is being delayed
2103 * \version LibVLC 2.0.0 or later
2104 */
2106
2107/**
2108 * Get the current subtitle text scale
2109 *
2110 * The scale factor is expressed as a percentage of the default size, where
2111 * 1.0 represents 100 percent.
2112 *
2113 * \param p_mi media player
2114 * \version LibVLC 4.0.0 or later
2115 */
2117
2118/**
2119 * Set the subtitle text scale.
2120 *
2121 * The scale factor is expressed as a percentage of the default size, where
2122 * 1.0 represents 100 percent.
2123 *
2124 * A value of 0.5 would result in text half the normal size, and a value of 2.0
2125 * would result in text twice the normal size.
2126 *
2127 * The minimum acceptable value for the scale factor is 0.1.
2128 *
2129 * The maximum is 5.0 (five times normal size).
2130 *
2131 * \param p_mi media player
2132 * \param f_scale scale factor in the range [0.1;5.0] (default: 1.0)
2133 * \version LibVLC 4.0.0 or later
2134 */
2136
2137/**
2138 * Set the subtitle delay. This affects the timing of when the subtitle will
2139 * be displayed. Positive values result in subtitles being displayed later,
2140 * while negative values will result in subtitles being displayed earlier.
2141 *
2142 * The subtitle delay will be reset to zero each time the media changes.
2143 *
2144 * \param p_mi media player
2145 * \param i_delay time (in microseconds) the display of subtitles should be delayed
2146 * \return 0 on success, -1 on error
2147 * \version LibVLC 2.0.0 or later
2148 */
2150
2151/**
2152 * Get the full description of available titles
2153 *
2154 * \version LibVLC 3.0.0 and later.
2155 *
2156 * \param p_mi the media player
2157 * \param[out] titles address to store an allocated array of title descriptions
2158 * descriptions (must be freed with libvlc_title_descriptions_release()
2159 * by the caller)
2160 *
2161 * \return the number of titles (-1 on error)
2162 */
2164 libvlc_title_description_t ***titles );
2165
2166/**
2167 * Release a title description
2168 *
2169 * \version LibVLC 3.0.0 and later
2170 *
2171 * \param p_titles title description array to release
2172 * \param i_count number of title descriptions to release
2173 */
2176 unsigned i_count );
2177
2178/**
2179 * Get the full description of available chapters
2180 *
2181 * \version LibVLC 3.0.0 and later.
2182 *
2183 * \param p_mi the media player
2184 * \param i_chapters_of_title index of the title to query for chapters (uses current title if set to -1)
2185 * \param[out] pp_chapters address to store an allocated array of chapter descriptions
2186 * descriptions (must be freed with libvlc_chapter_descriptions_release()
2187 * by the caller)
2188 *
2189 * \return the number of chapters (-1 on error)
2190 */
2192 int i_chapters_of_title,
2193 libvlc_chapter_description_t *** pp_chapters );
2194
2195/**
2196 * Release a chapter description
2197 *
2198 * \version LibVLC 3.0.0 and later
2199 *
2200 * \param p_chapters chapter description array to release
2201 * \param i_count number of chapter descriptions to release
2202 */
2205 unsigned i_count );
2206
2207/**
2208 * Set/unset the video crop ratio.
2209 *
2210 * This function forces a crop ratio on any and all video tracks rendered by
2211 * the media player. If the display aspect ratio of a video does not match the
2212 * crop ratio, either the top and bottom, or the left and right of the video
2213 * will be cut out to fit the crop ratio.
2214 *
2215 * For instance, a ratio of 1:1 will force the video to a square shape.
2216 *
2217 * To disable video crop, set a crop ratio with zero as denominator.
2218 *
2219 * A call to this function overrides any previous call to any of
2220 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
2221 * libvlc_video_set_crop_window().
2222 *
2223 * \see libvlc_video_set_aspect_ratio()
2224 *
2225 * \param mp the media player
2226 * \param num crop ratio numerator (ignored if denominator is 0)
2227 * \param den crop ratio denominator (or 0 to unset the crop ratio)
2228 *
2229 * \version LibVLC 4.0.0 and later
2230 */
2233 unsigned num, unsigned den);
2234
2235/**
2236 * Set the video crop window.
2237 *
2238 * This function selects a sub-rectangle of video to show. Any pixels outside
2239 * the rectangle will not be shown.
2240 *
2241 * To unset the video crop window, use libvlc_video_set_crop_ratio() or
2242 * libvlc_video_set_crop_border().
2243 *
2244 * A call to this function overrides any previous call to any of
2245 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
2246 * libvlc_video_set_crop_window().
2247 *
2248 * \param mp the media player
2249 * \param x abscissa (i.e. leftmost sample column offset) of the crop window
2250 * \param y ordinate (i.e. topmost sample row offset) of the crop window
2251 * \param width sample width of the crop window (cannot be zero)
2252 * \param height sample height of the crop window (cannot be zero)
2253 *
2254 * \version LibVLC 4.0.0 and later
2255 */
2258 unsigned x, unsigned y,
2259 unsigned width, unsigned height);
2260
2261/**
2262 * Set the video crop borders.
2263 *
2264 * This function selects the size of video edges to be cropped out.
2265 *
2266 * To unset the video crop borders, set all borders to zero.
2267 *
2268 * A call to this function overrides any previous call to any of
2269 * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
2270 * libvlc_video_set_crop_window().
2271 *
2272 * \param mp the media player
2273 * \param left number of sample columns to crop on the left
2274 * \param right number of sample columns to crop on the right
2275 * \param top number of sample rows to crop on the top
2276 * \param bottom number of sample rows to corp on the bottom
2277 *
2278 * \version LibVLC 4.0.0 and later
2279 */
2282 unsigned left, unsigned right,
2283 unsigned top, unsigned bottom);
2284
2285/**
2286 * Get current teletext page requested or 0 if it's disabled.
2287 *
2288 * Teletext is disabled by default, call libvlc_video_set_teletext() to enable
2289 * it.
2290 *
2291 * \param p_mi the media player
2292 * \return the current teletext page requested.
2293 */
2295
2296/**
2297 * Set new teletext page to retrieve.
2298 *
2299 * This function can also be used to send a teletext key.
2300 *
2301 * \param p_mi the media player
2302 * \param i_page teletex page number requested. This value can be 0 to disable
2303 * teletext, a number in the range ]0;1000[ to show the requested page, or a
2304 * \ref libvlc_teletext_key_t. 100 is the default teletext page.
2305 */
2307
2308/**
2309 * Set teletext background transparency.
2310 *
2311 * \param p_mi the media player
2312 * \param transparent whether background should be transparent.
2313 * \version LibVLC 4.0.0 or later
2314 */
2316
2317/**
2318 * Get teletext background transparency.
2319 *
2320 * \param p_mi the media player
2321 * \retval true teletext has transparent background
2322 * \retval false teletext has opaque background
2323 * \version LibVLC 4.0.0 or later
2324 */
2326
2327/**
2328 * Take a snapshot of the current video window.
2329 *
2330 * If i_width AND i_height is 0, original size is used.
2331 * If i_width XOR i_height is 0, original aspect-ratio is preserved.
2332 *
2333 * \param p_mi media player instance
2334 * \param num number of video output (typically 0 for the first/only one)
2335 * \param psz_filepath the path of a file or a folder to save the screenshot into
2336 * \param i_width the snapshot's width
2337 * \param i_height the snapshot's height
2338 * \return 0 on success, -1 if the video was not found
2339 */
2342 const char *psz_filepath, unsigned int i_width,
2343 unsigned int i_height );
2344
2345/**
2346 * Enable or disable deinterlace filter
2347 *
2348 * \param p_mi libvlc media player
2349 * \param deinterlace state -1: auto (default), 0: disabled, 1: enabled
2350 * \param psz_mode type of deinterlace filter, NULL for current/default filter
2351 * \version LibVLC 4.0.0 and later
2352 */
2354 int deinterlace,
2355 const char *psz_mode );
2356
2357/**
2358 * Get an integer marquee option value
2359 *
2360 * \param p_mi libvlc media player
2361 * \param option marq option to get \see libvlc_video_marquee_option_t
2362 */
2364 unsigned option );
2365
2366/**
2367 * Enable, disable or set an integer marquee option
2368 *
2369 * Setting libvlc_marquee_Enable has the side effect of enabling (arg !0)
2370 * or disabling (arg 0) the marq filter.
2371 *
2372 * \param p_mi libvlc media player
2373 * \param option marq option to set \see libvlc_video_marquee_option_t
2374 * \param i_val marq option value
2375 */
2377 unsigned option, int i_val );
2378
2379/**
2380 * Set a marquee string option
2381 *
2382 * \param p_mi libvlc media player
2383 * \param option marq option to set \see libvlc_video_marquee_option_t
2384 * \param psz_text marq option value
2385 */
2387 unsigned option, const char *psz_text );
2388
2389/** option values for libvlc_video_{get,set}_logo_{int,string} */
2400
2401/**
2402 * Get integer logo option.
2403 *
2404 * \param p_mi libvlc media player instance
2405 * \param option logo option to get, values of libvlc_video_logo_option_t
2406 */
2408 unsigned option );
2409
2410/**
2411 * Set logo option as integer. Options that take a different type value
2412 * are ignored.
2413 * Passing libvlc_logo_enable as option value has the side effect of
2414 * starting (arg !0) or stopping (arg 0) the logo filter.
2415 *
2416 * \param p_mi libvlc media player instance
2417 * \param option logo option to set, values of libvlc_video_logo_option_t
2418 * \param value logo option value
2419 */
2421 unsigned option, int value );
2422
2423/**
2424 * Set logo option as string. Options that take a different type value
2425 * are ignored.
2426 *
2427 * \param p_mi libvlc media player instance
2428 * \param option logo option to set, values of libvlc_video_logo_option_t
2429 * \param psz_value logo option value
2430 */
2432 unsigned option, const char *psz_value );
2433
2434
2435/** option values for libvlc_video_{get,set}_adjust_{int,float,bool} */
2444
2445/**
2446 * Get integer adjust option.
2447 *
2448 * \param p_mi libvlc media player instance
2449 * \param option adjust option to get, values of libvlc_video_adjust_option_t
2450 * \version LibVLC 1.1.1 and later.
2451 */
2453 unsigned option );
2454
2455/**
2456 * Set adjust option as integer. Options that take a different type value
2457 * are ignored.
2458 * Passing libvlc_adjust_enable as option value has the side effect of
2459 * starting (arg !0) or stopping (arg 0) the adjust filter.
2460 *
2461 * \param p_mi libvlc media player instance
2462 * \param option adjust option to set, values of libvlc_video_adjust_option_t
2463 * \param value adjust option value
2464 * \version LibVLC 1.1.1 and later.
2465 */
2467 unsigned option, int value );
2468
2469/**
2470 * Get float adjust option.
2471 *
2472 * \param p_mi libvlc media player instance
2473 * \param option adjust option to get, values of libvlc_video_adjust_option_t
2474 * \version LibVLC 1.1.1 and later.
2475 */
2477 unsigned option );
2478
2479/**
2480 * Set adjust option as float. Options that take a different type value
2481 * are ignored.
2482 *
2483 * \param p_mi libvlc media player instance
2484 * \param option adjust option to set, values of libvlc_video_adjust_option_t
2485 * \param value adjust option value
2486 * \version LibVLC 1.1.1 and later.
2487 */
2489 unsigned option, float value );
2490/**
2491 * Change the projection mode used for rendering the source.
2492 *
2493 * This changes how the source is mapped to the output w.r.t. 360 playback.
2494 *
2495 * \param p_mi libvlc media player instance
2496 * \param projection_mode the considered projection mode for the source
2497 * \version LibVLC 4.0.0 and later.
2498 */
2499LIBVLC_API void
2501 libvlc_video_projection_t projection_mode);
2502
2503/**
2504 * Remove previously set projection mode.
2505 *
2506 * Remove the effects from previous call to libvlc_video_set_projection_mode.
2507 *
2508 * \param p_mi libvlc media player instance
2509 * \version LibVLC 4.0.0 and later.
2510 */
2511LIBVLC_API void
2513
2514/** @} video */
2515
2516/** \defgroup libvlc_audio LibVLC audio controls
2517 * @{
2518 */
2519
2520/**
2521 * Audio stereo modes
2522 */
2532
2533/**
2534 * Audio mix modes
2535 */
2544
2545/**
2546 * Gets the list of available audio output modules.
2547 *
2548 * \param p_instance libvlc instance
2549 * \return list of available audio outputs. It must be freed with
2550* \see libvlc_audio_output_list_release \see libvlc_audio_output_t .
2551 * In case of error, NULL is returned.
2552 */
2555
2556/**
2557 * Frees the list of available audio output modules.
2558 *
2559 * \param p_list list with audio outputs for release
2560 */
2563
2564/**
2565 * Selects an audio output module.
2566 * \note Any change will take be effect only after playback is stopped and
2567 * restarted. Audio output cannot be changed while playing.
2568 *
2569 * \param p_mi media player
2570 * \param psz_name name of audio output,
2571 * use psz_name of \see libvlc_audio_output_t
2572 * \return 0 if function succeeded, -1 on error
2573 */
2575 const char *psz_name );
2576
2577/**
2578 * Gets a list of potential audio output devices.
2579 *
2580 * See also libvlc_audio_output_device_set().
2581 *
2582 * \note Not all audio outputs support enumerating devices.
2583 * The audio output may be functional even if the list is empty (NULL).
2584 *
2585 * \note The list may not be exhaustive.
2586 *
2587 * \warning Some audio output devices in the list might not actually work in
2588 * some circumstances. By default, it is recommended to not specify any
2589 * explicit audio device.
2590 *
2591 * \param mp media player
2592 * \return A NULL-terminated linked list of potential audio output devices.
2593 * It must be freed with libvlc_audio_output_device_list_release()
2594 * \version LibVLC 2.2.0 or later.
2595 */
2598
2599#if defined (__GNUC__) && !defined (__clang__)
2600__attribute__((unused))
2601__attribute__((noinline))
2602__attribute__((error("Use libvlc_audio_output_device_enum() instead")))
2604libvlc_audio_output_device_list_get( libvlc_instance_t *p_instance,
2605 const char *aout )
2606{
2607 (void) p_instance; (void) aout;
2608 return NULL;
2609}
2610#endif
2611
2612/**
2613 * Frees a list of available audio output devices.
2614 *
2615 * \param p_list list with audio outputs for release
2616 * \version LibVLC 2.1.0 or later.
2617 */
2620
2621/**
2622 * Configures an explicit audio output device.
2623 *
2624 * A list of adequate potential device strings can be obtained with
2625 * libvlc_audio_output_device_enum().
2626 *
2627 * \note This function does not select the specified audio output plugin.
2628 * libvlc_audio_output_set() is used for that purpose.
2629 *
2630 * \warning The syntax for the device parameter depends on the audio output.
2631 *
2632 * Some audio output modules require further parameters (e.g. a channels map
2633 * in the case of ALSA).
2634 *
2635 * \version This function originally expected three parameters.
2636 * The middle parameter was removed from LibVLC 4.0 onward.
2637 *
2638 * \param mp media player
2639 * \param device_id device identifier string
2640 * (see \ref libvlc_audio_output_device_t::psz_device)
2641 *
2642 * \return If the change of device was requested successfully, zero is returned
2643 * (the actual change is asynchronous and not guaranteed to succeed).
2644 * On error, a non-zero value is returned.
2645 */
2647 const char *device_id );
2648
2649/**
2650 * Get the current audio output device identifier.
2651 *
2652 * This complements libvlc_audio_output_device_set().
2653 *
2654 * \warning The initial value for the current audio output device identifier
2655 * may not be set or may be some unknown value. A LibVLC application should
2656 * compare this value against the known device identifiers (e.g. those that
2657 * were previously retrieved by a call to libvlc_audio_output_device_enum) to
2658 * find the current audio output device.
2659 *
2660 * It is possible that the selected audio output device changes (an external
2661 * change) without a call to libvlc_audio_output_device_set. That may make this
2662 * method unsuitable to use if a LibVLC application is attempting to track
2663 * dynamic audio device changes as they happen.
2664 *
2665 * \param mp media player
2666 * \return the current audio output device identifier
2667 * NULL if no device is selected or in case of error
2668 * (the result must be released with free()).
2669 * \version LibVLC 3.0.0 or later.
2670 */
2672
2673/**
2674 * Toggle mute status.
2675 *
2676 * \param p_mi media player
2677 * \warning Toggling mute atomically is not always possible: On some platforms,
2678 * other processes can mute the VLC audio playback stream asynchronously. Thus,
2679 * there is a small race condition where toggling will not work.
2680 * See also the limitations of libvlc_audio_set_mute().
2681 */
2683
2684/**
2685 * Get current mute status.
2686 *
2687 * \param p_mi media player
2688 * \return the mute status (boolean) if defined, -1 if undefined/unapplicable
2689 */
2691
2692/**
2693 * Set mute status.
2694 *
2695 * \param p_mi media player
2696 * \param status If status is true then mute, otherwise unmute
2697 * \warning This function does not always work. If there are no active audio
2698 * playback stream, the mute status might not be available. If digital
2699 * pass-through (S/PDIF, HDMI...) is in use, muting may be unapplicable. Also
2700 * some audio output plugins do not support muting at all.
2701 * \note To force silent playback, disable all audio tracks. This is more
2702 * efficient and reliable than mute.
2703 */
2705
2706/**
2707 * Get current software audio volume.
2708 *
2709 * \param p_mi media player
2710 * \return the software volume in percents
2711 * (0 = mute, 100 = nominal / 0dB)
2712 */
2714
2715/**
2716 * Set current software audio volume.
2717 *
2718 * \param p_mi media player
2719 * \param i_volume the volume in percents (0 = mute, 100 = 0dB)
2720 * \return 0 if the volume was set, -1 if it was out of range
2721 */
2723
2724/**
2725 * Get current audio stereo-mode.
2726 *
2727 * \param p_mi media player
2728 * \return the audio stereo-mode, \see libvlc_audio_output_stereomode_t
2729 * \version LibVLC 4.0.0 or later
2730 */
2732
2733/**
2734 * Set current audio stereo-mode.
2735 *
2736 * \param p_mi media player
2737 * \param mode the audio stereo-mode, \see libvlc_audio_output_stereomode_t
2738 * \return 0 on success, -1 on error
2739 * \version LibVLC 4.0.0 or later
2740 */
2743
2744/**
2745 * Get current audio mix-mode.
2746 *
2747 * \param p_mi media player
2748 * \return the audio mix-mode, \see libvlc_audio_output_mixmode_t
2749 * \version LibVLC 4.0.0 or later
2750 */
2752
2753/**
2754 * Set current audio mix-mode.
2755 *
2756 * By default (::libvlc_AudioMixMode_Unset), the audio output will keep its
2757 * original channel configuration (play stereo as stereo, or 5.1 as 5.1). Yet,
2758 * the OS and Audio API might refuse a channel configuration and asks VLC to
2759 * adapt (Stereo played as 5.1 or vice-versa).
2760 *
2761 * This function allows to force a channel configuration, it will only work if
2762 * the OS and Audio API accept this configuration (otherwise, it won't have any
2763 * effects). Here are some examples:
2764 * - Play multi-channels (5.1, 7.1...) as stereo (::libvlc_AudioMixMode_Stereo)
2765 * - Play Stereo or 5.1 as 7.1 (::libvlc_AudioMixMode_7_1)
2766 * - Play multi-channels as stereo with a binaural effect
2767 * (::libvlc_AudioMixMode_Binaural). It might be selected automatically if the
2768 * OS and Audio API can detect if a headphone is plugged.
2769 *
2770 * \param p_mi media player
2771 * \param mode the audio mix-mode, \see libvlc_audio_output_mixmode_t
2772 * \return 0 on success, -1 on error
2773 * \version LibVLC 4.0.0 or later
2774 */
2777
2778
2779/**
2780 * Get current audio delay.
2781 *
2782 * \param p_mi media player
2783 * \return the audio delay (microseconds)
2784 * \version LibVLC 1.1.1 or later
2785 */
2787
2788/**
2789 * Set current audio delay. The audio delay will be reset to zero each time the media changes.
2790 *
2791 * \param p_mi media player
2792 * \param i_delay the audio delay (microseconds)
2793 * \return 0 on success, -1 on error
2794 * \version LibVLC 1.1.1 or later
2795 */
2797
2798/**
2799 * Get the number of equalizer presets.
2800 *
2801 * \return number of presets
2802 * \version LibVLC 2.2.0 or later
2803 */
2805
2806/**
2807 * Get the name of a particular equalizer preset.
2808 *
2809 * This name can be used, for example, to prepare a preset label or menu in a user
2810 * interface.
2811 *
2812 * \param u_index index of the preset, counting from zero
2813 * \return preset name, or NULL if there is no such preset
2814 * \version LibVLC 2.2.0 or later
2815 */
2817
2818/**
2819 * Get the number of distinct frequency bands for an equalizer.
2820 *
2821 * \return number of frequency bands
2822 * \version LibVLC 2.2.0 or later
2823 */
2825
2826/**
2827 * Get a particular equalizer band frequency.
2828 *
2829 * This value can be used, for example, to create a label for an equalizer band control
2830 * in a user interface.
2831 *
2832 * \param u_index index of the band, counting from zero
2833 * \return equalizer band frequency (Hz), or -1 if there is no such band
2834 * \version LibVLC 2.2.0 or later
2835 */
2837
2838/**
2839 * Create a new default equalizer, with all frequency values zeroed.
2840 *
2841 * The new equalizer can subsequently be applied to a media player by invoking
2842 * libvlc_media_player_set_equalizer().
2843 *
2844 * The returned handle should be freed via libvlc_audio_equalizer_release() when
2845 * it is no longer needed.
2846 *
2847 * \return opaque equalizer handle, or NULL on error
2848 * \version LibVLC 2.2.0 or later
2849 */
2851
2852/**
2853 * Create a new equalizer, with initial frequency values copied from an existing
2854 * preset.
2855 *
2856 * The new equalizer can subsequently be applied to a media player by invoking
2857 * libvlc_media_player_set_equalizer().
2858 *
2859 * The returned handle should be freed via libvlc_audio_equalizer_release() when
2860 * it is no longer needed.
2861 *
2862 * \param u_index index of the preset, counting from zero
2863 * \return opaque equalizer handle, or NULL on error
2864 * (it must be released with libvlc_audio_equalizer_release())
2865 * \version LibVLC 2.2.0 or later
2866 */
2868
2869/**
2870 * Release a previously created equalizer instance.
2871 *
2872 * The equalizer was previously created by using libvlc_audio_equalizer_new() or
2873 * libvlc_audio_equalizer_new_from_preset().
2874 *
2875 * It is safe to invoke this method with a NULL p_equalizer parameter for no effect.
2876 *
2877 * \param p_equalizer opaque equalizer handle, or NULL
2878 * \version LibVLC 2.2.0 or later
2879 */
2881
2882/**
2883 * Set a new pre-amplification value for an equalizer.
2884 *
2885 * The new equalizer settings are subsequently applied to a media player by invoking
2886 * libvlc_media_player_set_equalizer().
2887 *
2888 * The supplied amplification value will be clamped to the -20.0 to +20.0 range.
2889 *
2890 * \param p_equalizer valid equalizer handle, must not be NULL
2891 * \param f_preamp preamp value (-20.0 to 20.0 Hz)
2892 * \return zero on success, -1 on error
2893 * \version LibVLC 2.2.0 or later
2894 */
2896
2897/**
2898 * Get the current pre-amplification value from an equalizer.
2899 *
2900 * \param p_equalizer valid equalizer handle, must not be NULL
2901 * \return preamp value (Hz)
2902 * \version LibVLC 2.2.0 or later
2903 */
2905
2906/**
2907 * Set a new amplification value for a particular equalizer frequency band.
2908 *
2909 * The new equalizer settings are subsequently applied to a media player by invoking
2910 * libvlc_media_player_set_equalizer().
2911 *
2912 * The supplied amplification value will be clamped to the -20.0 to +20.0 range.
2913 *
2914 * \param p_equalizer valid equalizer handle, must not be NULL
2915 * \param f_amp amplification value (-20.0 to 20.0 Hz)
2916 * \param u_band index, counting from zero, of the frequency band to set
2917 * \return zero on success, -1 on error
2918 * \version LibVLC 2.2.0 or later
2919 */
2920LIBVLC_API int libvlc_audio_equalizer_set_amp_at_index( libvlc_equalizer_t *p_equalizer, float f_amp, unsigned u_band );
2921
2922/**
2923 * Get the amplification value for a particular equalizer frequency band.
2924 *
2925 * \param p_equalizer valid equalizer handle, must not be NULL
2926 * \param u_band index, counting from zero, of the frequency band to get
2927 * \return amplification value (Hz); NaN if there is no such frequency band
2928 * \version LibVLC 2.2.0 or later
2929 */
2931
2932/**
2933 * Apply new equalizer settings to a media player.
2934 *
2935 * The equalizer is first created by invoking libvlc_audio_equalizer_new() or
2936 * libvlc_audio_equalizer_new_from_preset().
2937 *
2938 * It is possible to apply new equalizer settings to a media player whether the media
2939 * player is currently playing media or not.
2940 *
2941 * Invoking this method will immediately apply the new equalizer settings to the audio
2942 * output of the currently playing media if there is any.
2943 *
2944 * If there is no currently playing media, the new equalizer settings will be applied
2945 * later if and when new media is played.
2946 *
2947 * Equalizer settings will automatically be applied to subsequently played media.
2948 *
2949 * To disable the equalizer for a media player invoke this method passing NULL for the
2950 * p_equalizer parameter.
2951 *
2952 * The media player does not keep a reference to the supplied equalizer so it is safe
2953 * for an application to release the equalizer reference any time after this method
2954 * returns.
2955 *
2956 * \param p_mi opaque media player handle
2957 * \param p_equalizer opaque equalizer handle, or NULL to disable the equalizer for this media player
2958 * \return zero on success, -1 on error
2959 * \version LibVLC 2.2.0 or later
2960 */
2962
2963/**
2964 * Media player roles.
2965 *
2966 * \version LibVLC 3.0.0 and later.
2967 *
2968 * See \ref libvlc_media_player_set_role()
2969 */
2971 libvlc_role_None = 0, /**< Don't use a media player role */
2972 libvlc_role_Music, /**< Music (or radio) playback */
2973 libvlc_role_Video, /**< Video playback */
2974 libvlc_role_Communication, /**< Speech, real-time communication */
2975 libvlc_role_Game, /**< Video game */
2976 libvlc_role_Notification, /**< User interaction feedback */
2977 libvlc_role_Animation, /**< Embedded animation (e.g. in web page) */
2978 libvlc_role_Production, /**< Audio editing/production */
2979 libvlc_role_Accessibility, /**< Accessibility */
2980 libvlc_role_Test /** Testing */
2981#define libvlc_role_Last libvlc_role_Test
2983
2984/**
2985 * Gets the media role.
2986 *
2987 * \version LibVLC 3.0.0 and later.
2988 *
2989 * \param p_mi media player
2990 * \return the media player role (\ref libvlc_media_player_role_t)
2991 */
2993
2994/**
2995 * Sets the media role.
2996 *
2997 * \param p_mi media player
2998 * \param role the media player role (\ref libvlc_media_player_role_t)
2999 * \return 0 on success, -1 on error
3000 */
3002 unsigned role);
3003
3004/**
3005 * Start/stop recording
3006 *
3007 * \note The user should listen to the libvlc_MediaPlayerRecordChanged event,
3008 * to monitor the recording state.
3009 *
3010 * \version LibVLC 4.0.0 and later.
3011 *
3012 * \param p_mi media player
3013 * \param enable true to start recording, false to stop
3014 * \param dir_path path of the recording directory or NULL (use default path),
3015 * has only an effect when first enabling recording.
3016 */
3018 bool enable, const char *dir_path);
3019
3020/** @} audio */
3021
3022/** \defgroup libvlc_media_player_watch_time LibVLC media player time watch API
3023 * @{
3024 */
3025
3026/**
3027 * Media Player timer point
3028 *
3029 * \note ts and system_date values should not be used directly by the user.
3030 * libvlc_media_player_time_point_interpolate() will read these values and
3031 * return an interpolated ts.
3032 *
3033 * @see libvlc_media_player_watch_time_on_update
3034 */
3036{
3037 /** Position in the range [0.0f;1.0] */
3038 double position;
3039 /** Rate of the player */
3040 double rate;
3041 /** Valid time, in us >= 0 or -1 */
3042 int64_t ts_us;
3043 /** Valid length, in us >= 1 or 0 */
3044 int64_t length_us;
3045 /**
3046 * System date, in us, of this record (always valid).
3047 * Based on libvlc_clock(). This date can be in the future or in the past.
3048 * The special value of INT64_MAX mean that the clock was paused when this
3049 * point was updated. In that case,
3050 * libvlc_media_player_time_point_interpolate() will return the current
3051 * ts/pos of this point (there is nothing to interpolate).
3052 * */
3055
3056/**
3057 * Callback prototype that notify when the player state or time changed.
3058 *
3059 * Get notified when the time is updated by the input or output source. The
3060 * input source is the 'demux' or the 'access_demux'. The output source are
3061 * audio and video outputs: an update is received each time a video frame is
3062 * displayed or an audio sample is written. The delay between each updates may
3063 * depend on the input and source type (it can be every 5ms, 30ms, 1s or
3064 * 10s...). Users of this timer may need to update the position at a higher
3065 * frequency from their own mainloop via
3066 * libvlc_media_player_time_point_interpolate().
3067 *
3068 * \warning It is forbidden to call any Media Player functions from here.
3069 *
3070 * \param value always valid, the time corresponding to the state
3071 * \param data opaque pointer set by libvlc_media_player_watch_time()
3072 */
3074 const libvlc_media_player_time_point_t *value, void *data);
3075
3076/**
3077 * Callback prototype that notify when the timer is paused.
3078 *
3079 * This event is sent when the player is paused or stopping. The player
3080 * user should stop its "interpolate" timer.
3081 *
3082 * \note libvlc_media_player_watch_time_on_update() can be called when paused
3083 * for those 2 reasons:
3084 * - playback is resumed (libvlc_media_player_time_point_t.system_date is valid)
3085 * - a track, likely video (next-frame) is outputted when paused
3086 * (libvlc_media_player_time_point_t.system_date = INT64_MAX)
3087 *
3088 * \warning It is forbidden to call any Media Player functions from here.
3089 *
3090 * \param system_date_us system date, in us, of this event, only valid (> 0)
3091 * when paused. It can be used to interpolate the last updated point to this
3092 * date in order to get the last paused ts/position.
3093 * \param data opaque pointer set by libvlc_media_player_watch_time()
3094 */
3096 int64_t system_date_us, void *data);
3097
3098/**
3099 * Callback prototype that notify when the player is seeking or finished
3100 * seeking
3101 *
3102 * \warning It is forbidden to call any Media Player functions from here.
3103 *
3104 * \note It is not possible to receive points via on_update() while seeking.
3105 *
3106 * \param value point of the seek request or NULL when seeking is finished
3107 * \param data opaque pointer set by libvlc_media_player_watch_time()
3108 */
3110 const libvlc_media_player_time_point_t *value, void *data);
3111
3112/**
3113 * Watch for times updates
3114 *
3115 * \warning Only one watcher can be registered at a time. Calling this function
3116 * a second time (if libvlc_media_player_unwatch_time() was not called
3117 * in-between) will fail.
3118 *
3119 * \param p_mi the media player
3120 * \param min_period_us corresponds to the minimum period, in us, between each
3121 * updates, use it to avoid flood from too many source updates, set it to 0 to
3122 * receive all updates.
3123 * \param on_update callback to listen to update events (must not be NULL)
3124 * \param on_paused callback to listen to paused events (can be NULL)
3125 * \param on_seek callback to listen to seek events (can be NULL)
3126 * \param cbs_data opaque pointer used by the callbacks
3127 * \return 0 on success, -1 on error (allocation error, or if already watching)
3128 * \version LibVLC 4.0.0 or later
3129 */
3130LIBVLC_API int
3132 int64_t min_period_us,
3136 void *cbs_data);
3137
3138/**
3139 * Unwatch time updates
3140 *
3141 * \param p_mi the media player
3142 * \version LibVLC 4.0.0 or later
3143 */
3144LIBVLC_API void
3146
3147/**
3148 * Interpolate a timer value to now
3149
3150 * \param point time update obtained via the
3151 * libvlc_media_player_watch_time_on_update() callback
3152 * \param system_now_us current system date, in us, returned by libvlc_clock()
3153 * \param out_ts_us pointer where to set the interpolated ts, in us
3154 * \param out_pos pointer where to set the interpolated position
3155 * \return 0 in case of success, -1 if the interpolated ts is negative (could
3156 * happen during the buffering step)
3157 * \version LibVLC 4.0.0 or later
3158 */
3159LIBVLC_API int
3161 int64_t system_now_us,
3162 int64_t *out_ts_us, double *out_pos);
3163
3164/**
3165 * Get the date of the next interval
3166 *
3167 * Can be used to setup an UI timer in order to update some widgets at specific
3168 * interval. A next_interval of VLC_TICK_FROM_SEC(1) can be used to update a
3169 * time widget when the media reaches a new second.
3170 *
3171 * \note The media time doesn't necessarily correspond to the system time, that
3172 * is why this function is needed and uses the rate of the current point.
3173 *
3174 * \param point time update obtained via the
3175 * libvlc_media_player_watch_time_on_update()
3176 * \param system_now_us same system date used by
3177 * libvlc_media_player_time_point_interpolate()
3178 * \param interpolated_ts_us ts returned by
3179 * libvlc_media_player_time_point_interpolate()
3180 * \param next_interval_us next interval, in us
3181 * \return the absolute system date, in us, of the next interval,
3182 * use libvlc_delay() to get a relative delay.
3183 * \version LibVLC 4.0.0 or later
3184 */
3185LIBVLC_API int64_t
3187 int64_t system_now_us,
3188 int64_t interpolated_ts_us,
3189 int64_t next_interval_us);
3190
3191/** @} libvlc_media_player_watch_time */
3192
3193/** \defgroup libvlc_media_player_concurrency LibVLC media player concurrency API
3194 * @{
3195 */
3196
3197/**
3198 * Lock the media_player internal lock
3199
3200 * The lock is recursive, so it's safe to use it multiple times from the same
3201 * thread. You must call libvlc_media_player_unlock() the same number of times
3202 * you called libvlc_media_player_lock().
3203 *
3204 * Locking is not mandatory before calling a libvlc_media_player_t function
3205 * since they will automatically hold the lock internally.
3206 *
3207 * This lock can be used to synchronise user variables that interact with the
3208 * libvlc_media_player_t or can be used to call several functions together.
3209 *
3210 * \param mp media player object
3211 * \version LibVLC 4.0.0 or later
3212 */
3214
3215/**
3216 * Unlock the media_player internal lock
3217 *
3218 * \see libvlc_media_player_lock
3219 *
3220 * \param mp media player object locked using /ref libvlc_media_player_lock
3221 * \version LibVLC 4.0.0 or later
3222 */
3224
3225/**
3226 * Wait for an event to be signalled
3227 *
3228 * \note this is equivalent to pthread_cond_wait() with the
3229 * libvlc_media_player_t internal mutex and condition variable. This function
3230 * may spuriously wake up even without libvlc_media_player_signal() being
3231 * called.
3232 *
3233 * \warning this function must not be called from any libvlc callbacks and
3234 * events. The lock should be held only one time before waiting.
3235 *
3236 * \param mp media player object locked using /ref libvlc_media_player_lock
3237 * \version LibVLC 4.0.0 or later
3238 */
3240
3241/**
3242 * Signal all threads waiting for a signalling event
3243 *
3244 * \note this is equivalent to pthread_cond_broadcast() with the
3245 * libvlc_media_player_t internal condition variable.
3246 *
3247 * \param mp media player object locked using /ref libvlc_media_player_lock
3248 * \version LibVLC 4.0.0 or later
3249 */
3251
3252/** @} libvlc_media_player_concurrency */
3253
3254/** @} media_player */
3255
3256# ifdef __cplusplus
3257}
3258# endif
3259
3260#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:2536
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:2970
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:2523
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:2540
@ libvlc_AudioMixMode_Unset
Definition libvlc_media_player.h:2537
@ libvlc_AudioMixMode_5_1
Definition libvlc_media_player.h:2541
@ libvlc_AudioMixMode_Stereo
Definition libvlc_media_player.h:2538
@ libvlc_AudioMixMode_7_1
Definition libvlc_media_player.h:2542
@ libvlc_AudioMixMode_Binaural
Definition libvlc_media_player.h:2539
@ libvlc_role_Game
Video game.
Definition libvlc_media_player.h:2975
@ libvlc_role_None
Don't use a media player role.
Definition libvlc_media_player.h:2971
@ libvlc_role_Notification
User interaction feedback.
Definition libvlc_media_player.h:2976
@ libvlc_role_Production
Audio editing/production.
Definition libvlc_media_player.h:2978
@ libvlc_role_Communication
Speech, real-time communication.
Definition libvlc_media_player.h:2974
@ libvlc_role_Music
Music (or radio) playback.
Definition libvlc_media_player.h:2972
@ libvlc_role_Accessibility
Accessibility.
Definition libvlc_media_player.h:2979
@ libvlc_role_Video
Video playback.
Definition libvlc_media_player.h:2973
@ libvlc_role_Animation
Embedded animation (e.g.
Definition libvlc_media_player.h:2977
@ libvlc_AudioStereoMode_Stereo
Definition libvlc_media_player.h:2525
@ libvlc_AudioStereoMode_Right
Definition libvlc_media_player.h:2528
@ libvlc_AudioStereoMode_Unset
Definition libvlc_media_player.h:2524
@ libvlc_AudioStereoMode_Mono
Definition libvlc_media_player.h:2530
@ libvlc_AudioStereoMode_Dolbys
Definition libvlc_media_player.h:2529
@ libvlc_AudioStereoMode_Left
Definition libvlc_media_player.h:2527
@ libvlc_AudioStereoMode_RStereo
Definition libvlc_media_player.h:2526
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:3073
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:3095
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:3109
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:865
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:786
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:1147
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:735
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:1212
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:834
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:797
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:1117
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:761
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:808
libvlc_video_metadata_type_t
Definition libvlc_media_player.h:723
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:768
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:1128
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:1745
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:1093
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:698
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:659
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:741
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:1105
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:1203
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:672
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:1139
void *(* libvlc_video_getProcAddress_cb)(void *opaque, const char *fct_name)
Callback prototype to load opengl functions.
Definition libvlc_media_player.h:708
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.
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:724
@ libvlc_video_output_mouse_button_middle
Definition libvlc_media_player.h:770
@ libvlc_video_output_mouse_button_right
Definition libvlc_media_player.h:771
@ libvlc_video_output_mouse_button_left
Definition libvlc_media_player.h:769
@ 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:744
@ libvlc_video_engine_gles2
Definition libvlc_media_player.h:745
@ libvlc_video_engine_d3d9
Direct3D9 rendering engine.
Definition libvlc_media_player.h:749
@ libvlc_video_engine_disable
Disable rendering engine.
Definition libvlc_media_player.h:743
@ libvlc_video_engine_d3d11
Direct3D11 rendering engine.
Definition libvlc_media_player.h:747
@ 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:2436
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:2390
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:2071
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:2442
@ libvlc_adjust_Hue
Definition libvlc_media_player.h:2440
@ libvlc_adjust_Enable
Definition libvlc_media_player.h:2437
@ libvlc_adjust_Brightness
Definition libvlc_media_player.h:2439
@ libvlc_adjust_Saturation
Definition libvlc_media_player.h:2441
@ libvlc_adjust_Contrast
Definition libvlc_media_player.h:2438
@ libvlc_logo_position
Definition libvlc_media_player.h:2398
@ libvlc_logo_repeat
Definition libvlc_media_player.h:2396
@ libvlc_logo_delay
Definition libvlc_media_player.h:2395
@ libvlc_logo_opacity
Definition libvlc_media_player.h:2397
@ libvlc_logo_y
Definition libvlc_media_player.h:2394
@ libvlc_logo_file
string argument, "file,d,t;file,d,t;..."
Definition libvlc_media_player.h:2392
@ libvlc_logo_x
Definition libvlc_media_player.h:2393
@ libvlc_logo_enable
Definition libvlc_media_player.h:2391
@ libvlc_VideoStereoLeftEye
Definition libvlc_media_player.h:2074
@ libvlc_VideoStereoSideBySide
Definition libvlc_media_player.h:2076
@ libvlc_VideoStereoRightEye
Definition libvlc_media_player.h:2075
@ libvlc_VideoStereoAuto
Definition libvlc_media_player.h:2072
@ libvlc_VideoStereoStereo
Definition libvlc_media_player.h:2073
#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:3036
int64_t system_date_us
System date, in us, of this record (always valid).
Definition libvlc_media_player.h:3053
int64_t ts_us
Valid time, in us >= 0 or -1.
Definition libvlc_media_player.h:3042
double position
Position in the range [0.0f;1.0].
Definition libvlc_media_player.h:3038
int64_t length_us
Valid length, in us >= 1 or 0.
Definition libvlc_media_player.h:3044
double rate
Rate of the player.
Definition libvlc_media_player.h:3040
Definition libvlc_media_track.h:92
Definition libvlc_media_player.h:1731
bool b_scrambled
True if the program is scrambled.
Definition libvlc_media_player.h:1739
int i_group_id
Id used for libvlc_media_player_select_program()
Definition libvlc_media_player.h:1733
char * psz_name
Program name, always valid.
Definition libvlc_media_player.h:1735
bool b_selected
True if the program is selected.
Definition libvlc_media_player.h:1737
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:711
uint16_t BluePrimary[2]
Definition libvlc_media_player.h:715
unsigned int MinMasteringLuminance
Definition libvlc_media_player.h:718
uint16_t RedPrimary[2]
Definition libvlc_media_player.h:713
uint16_t WhitePoint[2]
Definition libvlc_media_player.h:716
uint16_t MaxFrameAverageLightLevel
Definition libvlc_media_player.h:720
uint16_t GreenPrimary[2]
Definition libvlc_media_player.h:714
uint16_t MaxContentLightLevel
Definition libvlc_media_player.h:719
unsigned int MaxMasteringLuminance
Definition libvlc_media_player.h:717
Definition libvlc_media_player.h:617
libvlc_video_color_space_t colorspace
video color space
Definition libvlc_media_player.h:633
bool full_range
Video is full range or studio/limited range.
Definition libvlc_media_player.h:631
libvlc_video_color_primaries_t primaries
video color primaries
Definition libvlc_media_player.h:635
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:637
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:639
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