VLC 4.0.0-dev
Loading...
Searching...
No Matches

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

Collaboration diagram for Video output:

Modules

 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
 Window management.
 

Files

file  vlc_vout.h
 Video output thread interface.
 

Data Structures

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_SPU_CHANNEL_INVALID   (-1) /* Always fails in comparison */
 
#define VOUT_SPU_CHANNEL_OSD   0 /* OSD channel is automatically cleared */
 
#define VOUT_SPU_CHANNEL_OSD_HSLIDER   1
 
#define VOUT_SPU_CHANNEL_OSD_VSLIDER   2
 
#define VOUT_SPU_CHANNEL_OSD_COUNT   3
 
#define vout_FlushAll(vout)   vout_Flush( vout, VLC_TICK_INVALID )
 Empty all the pending pictures in the vout.
 

Enumerations

enum  vlc_vout_order { VLC_VOUT_ORDER_NONE , VLC_VOUT_ORDER_PRIMARY , VLC_VOUT_ORDER_SECONDARY }
 vout or spu_channel order More...
 

Functions

void vout_Close (vout_thread_t *vout)
 Destroys a vout.
 
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, vlc_tick_t i_timeout)
 This function will handle a snapshot request.
 
void vout_PutPicture (vout_thread_t *, picture_t *)
 It gives to the vout a picture to be displayed.
 
void vout_PutSubpicture (vout_thread_t *, subpicture_t *)
 
ssize_t vout_RegisterSubpictureChannel (vout_thread_t *)
 
void vout_UnregisterSubpictureChannel (vout_thread_t *, size_t)
 
void vout_FlushSubpictureChannel (vout_thread_t *, size_t)
 
void vout_Flush (vout_thread_t *p_vout, vlc_tick_t i_date)
 This function will ensure that all ready/displayed pictures have at most the provided date.
 

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_FlushAll

#define vout_FlushAll (   vout)    vout_Flush( vout, VLC_TICK_INVALID )

Empty all the pending pictures in the vout.

◆ VOUT_SPU_CHANNEL_INVALID

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

◆ VOUT_SPU_CHANNEL_OSD

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

◆ VOUT_SPU_CHANNEL_OSD_COUNT

#define VOUT_SPU_CHANNEL_OSD_COUNT   3

◆ VOUT_SPU_CHANNEL_OSD_HSLIDER

#define VOUT_SPU_CHANNEL_OSD_HSLIDER   1

◆ VOUT_SPU_CHANNEL_OSD_VSLIDER

#define VOUT_SPU_CHANNEL_OSD_VSLIDER   2

Enumeration Type Documentation

◆ vlc_vout_order

vout or spu_channel order

Enumerator
VLC_VOUT_ORDER_NONE 
VLC_VOUT_ORDER_PRIMARY 

There is only one primary vout/spu_channel For vouts: this is the first vout, probably embedded in the UI.

For spu channels: main and first SPU channel.

VLC_VOUT_ORDER_SECONDARY 

There can be several secondary vouts or spu_channels For vouts: a secondary vout using its own window.

For spu channels: a secondary spu channel that is placed in function of the primary one. See "secondary-sub-margin" and "secondary-sub-alignment".

Function Documentation

◆ vout_Close()

◆ vout_Flush()

void vout_Flush ( vout_thread_t p_vout,
vlc_tick_t  i_date 
)

This function will ensure that all ready/displayed pictures have at most the provided date.

References vout_thread_sys_t::control, vout_thread_sys_t::dummy, GetTracer(), vout_thread_sys_t::str_id, vlc_tracer_TraceEvent(), vout_control_Hold(), vout_control_Release(), vout_FlushUnlocked(), and VOUT_THREAD_TO_SYS.

Referenced by ModuleThread_PlayVideo().

◆ vout_FlushSubpictureChannel()

void vout_FlushSubpictureChannel ( vout_thread_t vout,
size_t  channel 
)

◆ 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,
vlc_tick_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.

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

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.

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::dummy, picture_fifo_Push(), picture_HasChainedPics(), vout_control_Wake(), and VOUT_THREAD_TO_SYS.

Referenced by ModuleThread_PlayVideo().

◆ vout_PutSubpicture()

◆ vout_RegisterSubpictureChannel()

◆ vout_UnregisterSubpictureChannel()

void vout_UnregisterSubpictureChannel ( vout_thread_t vout,
size_t  channel 
)