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