VLC  3.0.15
Modules | Files | Data Structures | Macros | Typedefs | Functions
Video output
Collaboration diagram for Video output:

Modules

 Sub-picture channels
 
 Video sub-pictures
 
 Video output display
 Video output display: output buffers and rendering.
 
 Video window
 

Files

file  vlc_vout.h
 

Data Structures

struct  vout_configuration_t
 Vout configuration. More...
 
struct  vout_thread_t
 Video output thread descriptor. More...
 

Macros

#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_Request(a, b)   vout_Request(VLC_OBJECT(a),b)
 
#define VOUT_SPU_CHANNEL_INVALID   (-1) /* Always fails in comparison */
 
#define VOUT_SPU_CHANNEL_OSD   1 /* OSD channel is automatically cleared */
 
#define VOUT_SPU_CHANNEL_AVAIL_FIRST   8 /* Registerable channels from this offset */
 

Typedefs

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

Functions

vout_thread_tvout_Request (vlc_object_t *object, const vout_configuration_t *cfg)
 Returns a suitable vout or release the given one. More...
 
void vout_Close (vout_thread_t *p_vout)
 This function will close a vout created by vout_Request. More...
 
static void vout_CloseAndRelease (vout_thread_t *p_vout)
 This function will close a vout created by vout_Create and then release it. 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

◆ VOUT_ALIGN_BOTTOM

#define VOUT_ALIGN_BOTTOM   0x0008

◆ VOUT_ALIGN_HMASK

#define VOUT_ALIGN_HMASK   0x0003

◆ VOUT_ALIGN_LEFT

#define VOUT_ALIGN_LEFT   0x0001

◆ VOUT_ALIGN_RIGHT

#define VOUT_ALIGN_RIGHT   0x0002

◆ VOUT_ALIGN_TOP

#define VOUT_ALIGN_TOP   0x0004

◆ VOUT_ALIGN_VMASK

#define VOUT_ALIGN_VMASK   0x000C

◆ vout_Request

#define vout_Request (   a,
 
)    vout_Request(VLC_OBJECT(a),b)

◆ VOUT_SPU_CHANNEL_AVAIL_FIRST

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

◆ VOUT_SPU_CHANNEL_INVALID

#define VOUT_SPU_CHANNEL_INVALID   (-1) /* Always fails in comparison */

◆ VOUT_SPU_CHANNEL_OSD

#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_Close()

void vout_Close ( vout_thread_t p_vout)

This function will close a vout created by vout_Request.

The associated vout module is closed. Note: It is not released yet, you'll have to call vlc_object_release() or use the convenient vout_CloseAndRelease().

Parameters
p_voutthe vout to close

Referenced by vout_CloseAndRelease().

◆ vout_CloseAndRelease()

static void vout_CloseAndRelease ( vout_thread_t p_vout)
inlinestatic

This function will close a vout created by vout_Create and then release it.

Parameters
p_voutthe vout to close and release

References vlc_object_release, and vout_Close().

Referenced by DestroyVout().

◆ vout_FlushSubpictureChannel()

void vout_FlushSubpictureChannel ( vout_thread_t ,
int   
)

◆ 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

◆ 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().

◆ vout_PutSubpicture()

void vout_PutSubpicture ( vout_thread_t ,
subpicture_t  
)

◆ vout_RegisterSubpictureChannel()

int vout_RegisterSubpictureChannel ( vout_thread_t )

Referenced by spu_new_buffer().

◆ vout_Request()

vout_thread_t* vout_Request ( vlc_object_t object,
const vout_configuration_t cfg 
)

Returns a suitable vout or release the given one.

If cfg->fmt is non NULL and valid, a vout will be returned, reusing cfg->vout is possible, otherwise it returns NULL. If cfg->vout is not used, it will be closed and released.

You can release the returned value either by vout_Request or vout_Close() followed by a vlc_object_release() or shorter vout_CloseAndRelease()

Parameters
objecta vlc object
cfgthe video configuration requested.
Returns
a vout