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