VLC  4.0.0-dev
Modules | Files | Data Structures | Macros | Typedefs | Functions

Video rendering, output and window management. More...

Collaboration diagram for Video output:


 Sub-picture channels
 Video sub-pictures
 Subpictures are pictures that should be displayed on top of the video, like subtitles and OSD.
 Video output display
 Video output display: output buffers and rendering.
 Video window
 Video output window management.


file  vlc_vout.h
 Video output thread interface.

Data Structures

struct  vout_thread_t
 Video output thread descriptor. More...


#define VOUT_ALIGN_LEFT   0x0001
#define VOUT_ALIGN_RIGHT   0x0002
#define VOUT_ALIGN_HMASK   0x0003
#define VOUT_ALIGN_TOP   0x0004
#define VOUT_ALIGN_BOTTOM   0x0008
#define VOUT_ALIGN_VMASK   0x000C
#define VOUT_SPU_CHANNEL_OSD   1 /* OSD channel is automatically cleared */
#define VOUT_SPU_CHANNEL_AVAIL_FIRST   8 /* Registerable channels from this offset */


typedef struct vout_thread_sys_t vout_thread_sys_t
 Video output thread private structure. More...


int vout_GetSnapshot (vout_thread_t *p_vout, block_t **pp_image, picture_t **pp_picture, video_format_t *p_fmt, const char *psz_format, mtime_t i_timeout)
 This function will handle a snapshot request. More...
void vout_ChangeAspectRatio (vout_thread_t *p_vout, unsigned int i_num, unsigned int i_den)
picture_tvout_GetPicture (vout_thread_t *)
 Allocates a video output picture buffer. More...
void vout_PutPicture (vout_thread_t *, picture_t *)
 It gives to the vout a picture to be displayed. More...
void vout_PutSubpicture (vout_thread_t *, subpicture_t *)
int vout_RegisterSubpictureChannel (vout_thread_t *)
void vout_FlushSubpictureChannel (vout_thread_t *, int)

Detailed Description

Video rendering, output and window management.

This module describes the programming interface for video output threads. It includes functions allowing to open a new thread, send pictures to a thread, and destroy a previously opened video output thread.

Macro Definition Documentation


#define VOUT_ALIGN_BOTTOM   0x0008


#define VOUT_ALIGN_HMASK   0x0003


#define VOUT_ALIGN_LEFT   0x0001


#define VOUT_ALIGN_RIGHT   0x0002


#define VOUT_ALIGN_TOP   0x0004


#define VOUT_ALIGN_VMASK   0x000C


#define VOUT_SPU_CHANNEL_AVAIL_FIRST   8 /* Registerable channels from this offset */


#define VOUT_SPU_CHANNEL_OSD   1 /* OSD channel is automatically cleared */

Typedef Documentation

◆ vout_thread_sys_t

Video output thread private structure.

Function Documentation

◆ vout_ChangeAspectRatio()

void vout_ChangeAspectRatio ( vout_thread_t p_vout,
unsigned int  i_num,
unsigned int  i_den 

◆ vout_FlushSubpictureChannel()

void vout_FlushSubpictureChannel ( vout_thread_t ,

◆ vout_GetPicture()

picture_t* vout_GetPicture ( vout_thread_t vout)

Allocates a video output picture buffer.

Either vout_PutPicture() or picture_Release() must be used to return the buffer to the video output free buffer pool.

You may use picture_Hold() (paired with picture_Release()) to keep a read-only reference.

References vout_thread_sys_t::decoder_pool, picture_t::format, likely, vout_thread_sys_t::original, vout_thread_t::p, picture_pool_Wait(), picture_Reset(), and VideoFormatCopyCropAr().

Referenced by vout_new_buffer().

◆ vout_GetSnapshot()

int vout_GetSnapshot ( vout_thread_t p_vout,
block_t **  pp_image,
picture_t **  pp_picture,
video_format_t p_fmt,
const char *  psz_format,
mtime_t  i_timeout 

This function will handle a snapshot request.

pp_image, pp_picture and p_fmt can be NULL otherwise they will be set with returned value in case of success.

pp_image will hold an encoded picture in psz_format format.

p_fmt can be NULL otherwise it will be set with the format used for the picture before encoding.

i_timeout specifies the time the function will wait for a snapshot to be available.

< Unspecified error

< Unspecified error

< No error

References image_Type2Fourcc(), msg_Err, vout_thread_t::p, picture_Export(), picture_Release(), vout_thread_sys_t::snapshot, var_InheritInteger(), VLC_CODEC_PNG, VLC_EGENERIC, VLC_OBJECT, VLC_SUCCESS, and vout_snapshot_Get().

Referenced by VoutSaveSnapshot().

◆ vout_PutPicture()

void vout_PutPicture ( vout_thread_t vout,
picture_t picture 

It gives to the vout a picture to be displayed.

The given picture MUST comes from vout_GetPicture.

Becareful, after vout_PutPicture is called, picture_t::p_next cannot be read/used.

References vout_thread_sys_t::control, vout_thread_sys_t::decoder_fifo, vout_thread_sys_t::decoder_pool, vout_thread_t::p, picture_t::p_next, picture_fifo_Push(), picture_pool_OwnsPic(), picture_Release(), and vout_control_Wake().

Referenced by DecoderPlayVideo().

◆ vout_PutSubpicture()

void vout_PutSubpicture ( vout_thread_t ,

◆ vout_RegisterSubpictureChannel()

int vout_RegisterSubpictureChannel ( vout_thread_t )