VLC  3.0.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Modules | Files | Data Structures | Macros | Typedefs | Functions
Video output

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_configuration_t
 Vout configuration. More...
struct  vout_thread_t
 Video output thread descriptor. More...
struct  vlc_viewpoint_t
 Viewpoints. 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_Request(a, b)   vout_Request(VLC_OBJECT(a),b)


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


static void vlc_viewpoint_init (vlc_viewpoint_t *p_vp)
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)
void vout_EnableFilter (vout_thread_t *, const char *, bool, bool)

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_Request (   a,
)    vout_Request(VLC_OBJECT(a),b)

Referenced by RequestVout().

Typedef Documentation

Video output thread private structure.

Function Documentation

static void vlc_viewpoint_init ( vlc_viewpoint_t p_vp)
void vout_ChangeAspectRatio ( vout_thread_t p_vout,
unsigned int  i_num,
unsigned int  i_den 
void vout_Close ( vout_thread_t p_vout)
static void vout_CloseAndRelease ( vout_thread_t p_vout)

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

p_voutthe vout to close and release

References vlc_object_release, and vout_Close().

Referenced by DestroyVout(), RequestVout(), vout_Request(), and VoutCreate().

void vout_EnableFilter ( vout_thread_t ,
const char *  ,
bool  ,
void vout_FlushSubpictureChannel ( vout_thread_t ,
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().

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.

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

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_t::p, picture_t::p_next, picture_fifo_Push(), and vout_control_Wake().

Referenced by DecoderPlayVideo().

void vout_PutSubpicture ( vout_thread_t ,
int vout_RegisterSubpictureChannel ( vout_thread_t )
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()

objecta vlc object
cfgthe video configuration requested.
a vout

References vout_control_cmd_t::cfg, vout_configuration_t::change_fmt, vout_thread_sys_t::control, vout_thread_sys_t::dead, vout_configuration_t::fmt, vout_thread_sys_t::input, vout_configuration_t::input, msg_Dbg, msg_Warn, vout_thread_t::p, vout_thread_sys_t::spu, spu_Attach(), vout_control_cmd_t::u, vout_configuration_t::vout, vout_CloseAndRelease(), vout_control_cmd_Init(), vout_control_Push(), VOUT_CONTROL_REINIT, vout_control_WaitEmpty(), vout_IntfReinit(), and VoutCreate().