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