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

Video output display: output buffers and rendering. More...

Collaboration diagram for Video output display:

Modules

 Video alignment
 

Files

file  vlc_vout_display.h
 

Data Structures

struct  vout_display_cfg
 User configuration for a video output display (vout_display_t) More...
 
struct  vout_display_info_t
 Information from a vout_display_t to configure the core behaviour. More...
 
struct  vout_display_owner_t
 Vout owner structures. More...
 
struct  vlc_display_operations
 
struct  vout_display_t
 
struct  vout_display_place_t
 Video placement. More...
 

Macros

#define set_callback_display(activate, priority)
 

Typedefs

typedef struct vout_display_t vout_display_t
 
typedef struct vout_display_sys_t vout_display_sys_t
 
typedef struct vout_display_owner_t vout_display_owner_t
 
typedef struct vout_display_cfg vout_display_cfg_t
 User configuration for a video output display (vout_display_t) More...
 
typedef int(* vout_display_open_cb) (vout_display_t *vd, const vout_display_cfg_t *cfg, video_format_t *fmtp, vlc_video_context *context)
 "vout display" open callback More...
 

Enumerations

enum  vout_display_query {
  VOUT_DISPLAY_CHANGE_DISPLAY_SIZE, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, VOUT_DISPLAY_CHANGE_ZOOM, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
  VOUT_DISPLAY_CHANGE_SOURCE_CROP
}
 Control query for vout_display_t. More...
 

Functions

VLC_EXPORT vout_display_tvout_display_New (vlc_object_t *, const video_format_t *, vlc_video_context *, const vout_display_cfg_t *, const char *module, const vout_display_owner_t *)
 Creates video output display. More...
 
VLC_EXPORT void vout_display_Delete (vout_display_t *)
 Destroys a video output display. More...
 
VLC_EXPORT picture_tvout_display_Prepare (vout_display_t *vd, picture_t *picture, subpicture_t *subpic, vlc_tick_t date)
 Prepares a picture for display. More...
 
static void vout_display_Display (vout_display_t *vd, picture_t *picture)
 Displays a picture. More...
 
VLC_EXPORT void vout_display_SetSize (vout_display_t *vd, unsigned width, unsigned height)
 
static void vout_display_SendEventMousePressed (vout_display_t *vd, int button)
 
static void vout_display_SendEventMouseReleased (vout_display_t *vd, int button)
 
static void vout_display_SendEventMouseDoubleClick (vout_display_t *vd)
 
static void vout_display_SendEventViewpointMoved (vout_display_t *vd, const vlc_viewpoint_t *vp)
 
static void vout_display_SendMouseMovedDisplayCoordinates (vout_display_t *vd, int m_x, int m_y)
 Helper function that applies the necessary transforms to the mouse position and then calls vout_display_SendEventMouseMoved. More...
 
static bool vout_display_cfg_IsWindowed (const vout_display_cfg_t *cfg)
 
VLC_EXPORT void vout_display_GetDefaultDisplaySize (unsigned *width, unsigned *height, const video_format_t *source, const vout_display_cfg_t *)
 Computes the default display size given the source and the display configuration. More...
 
static bool vout_display_PlaceEquals (const vout_display_place_t *p1, const vout_display_place_t *p2)
 Compares two vout_display_place_t. More...
 
VLC_EXPORT void vout_display_PlacePicture (vout_display_place_t *place, const video_format_t *source, const vout_display_cfg_t *cfg)
 Computes the intended picture placement inside the display. More...
 
void vout_display_TranslateMouseState (vout_display_t *vd, vlc_mouse_t *video, const vlc_mouse_t *window)
 Translates mouse state. More...
 

Detailed Description

Video output display: output buffers and rendering.

Macro Definition Documentation

◆ set_callback_display

#define set_callback_display (   activate,
  priority 
)
Value:
{ \
vout_display_open_cb open__ = activate; \
(void) open__; \
set_callback(activate) \
} \
set_capability( "vout display", priority )

Typedef Documentation

◆ vout_display_cfg_t

User configuration for a video output display (vout_display_t)

This primarily controls the size of the display area within the video window, as follows:

  • If is_display_filled is set, the video size is fitted to the display size.
  • If window size is valid, the video size is set to the window size,
  • Otherwise, the video size is determined from the original video format, multiplied by the zoom factor.

◆ vout_display_open_cb

typedef int(* vout_display_open_cb) (vout_display_t *vd, const vout_display_cfg_t *cfg, video_format_t *fmtp, vlc_video_context *context)

"vout display" open callback

Parameters
vdvout display context
cfgInitial and current configuration.
fmtpIt can be changed by the module to request a different format.
contextXXX: to be defined.
Returns
VLC_SUCCESS or a VLC error code

◆ vout_display_owner_t

◆ vout_display_sys_t

◆ vout_display_t

Enumeration Type Documentation

◆ vout_display_query

Control query for vout_display_t.

Enumerator
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE 

Notifies a change in display size.

Return values
VLC_SUCCESSif the display handled the change
VLC_EGENERICif a reset_pictures request is necessary
VOUT_DISPLAY_CHANGE_DISPLAY_FILLED 

Notifies a change of the display fill display flag by the user.

Return values
VLC_SUCCESSif the display handled the change
VLC_EGENERICif a reset_pictures request is necessary
VOUT_DISPLAY_CHANGE_ZOOM 

Notifies a change of the user zoom factor.

Return values
VLC_SUCCESSif the display handled the change
VLC_EGENERICif a reset_pictures request is necessary
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT 

Notifies a change of the sample aspect ratio.

Return values
VLC_SUCCESSif the display handled the change
VLC_EGENERICif a reset_pictures request is necessary
VOUT_DISPLAY_CHANGE_SOURCE_CROP 

Notifies a change of the source cropping.

The cropping requested is stored by source video_format_t::i_x/y_offset and video_format_t::i_visible_width/height

Return values
VLC_SUCCESSif the display handled the change
VLC_EGENERICif a reset_pictures request is necessary

Function Documentation

◆ vout_display_cfg_IsWindowed()

static bool vout_display_cfg_IsWindowed ( const vout_display_cfg_t cfg)
inlinestatic

◆ vout_display_Delete()

VLC_EXPORT void vout_display_Delete ( vout_display_t )

◆ vout_display_Display()

static void vout_display_Display ( vout_display_t vd,
picture_t picture 
)
inlinestatic

Displays a picture.

References vlc_display_operations::display, vout_display_t::ops, and picture_Release().

Referenced by RenderPicture().

◆ vout_display_GetDefaultDisplaySize()

VLC_EXPORT void vout_display_GetDefaultDisplaySize ( unsigned *  width,
unsigned *  height,
const video_format_t source,
const vout_display_cfg_t  
)

◆ vout_display_New()

VLC_EXPORT vout_display_t* vout_display_New ( vlc_object_t ,
const video_format_t ,
vlc_video_context ,
const vout_display_cfg_t ,
const char *  module,
const vout_display_owner_t  
)

◆ vout_display_PlaceEquals()

static bool vout_display_PlaceEquals ( const vout_display_place_t p1,
const vout_display_place_t p2 
)
inlinestatic

◆ vout_display_PlacePicture()

VLC_EXPORT void vout_display_PlacePicture ( vout_display_place_t place,
const video_format_t source,
const vout_display_cfg_t cfg 
)

◆ vout_display_Prepare()

VLC_EXPORT picture_t* vout_display_Prepare ( vout_display_t vd,
picture_t picture,
subpicture_t subpic,
vlc_tick_t  date 
)

Prepares a picture for display.

This renders a picture for subsequent display, with vout_display_Display().

Note
A reference to the input picture is consumed by the function, which returns a reference to an output picture for display. The input and output picture may or may not be equal depending on the underlying display setup.
Bug:
Currently, only one picture can be prepared at a time. It must be displayed with vout_display_Display() before any picture is prepared or before the display is destroyd with vout_display_Delete().

\ bug Rendering subpictures is not supported with this function yet. subpic must be NULL .

Parameters
vddisplay to prepare the picture for
picturepicure to be prepared
subpicreserved, must be NULL
dateintended time to show the picture
Returns
The prepared picture is returned, NULL on error.

References vout_display_t::ops, vlc_display_operations::prepare, and vout_ConvertForDisplay().

◆ vout_display_SendEventMouseDoubleClick()

static void vout_display_SendEventMouseDoubleClick ( vout_display_t vd)
inlinestatic

◆ vout_display_SendEventMousePressed()

static void vout_display_SendEventMousePressed ( vout_display_t vd,
int  button 
)
inlinestatic

◆ vout_display_SendEventMouseReleased()

static void vout_display_SendEventMouseReleased ( vout_display_t vd,
int  button 
)
inlinestatic

◆ vout_display_SendEventViewpointMoved()

static void vout_display_SendEventViewpointMoved ( vout_display_t vd,
const vlc_viewpoint_t vp 
)
inlinestatic

◆ vout_display_SendMouseMovedDisplayCoordinates()

static void vout_display_SendMouseMovedDisplayCoordinates ( vout_display_t vd,
int  m_x,
int  m_y 
)
inlinestatic

Helper function that applies the necessary transforms to the mouse position and then calls vout_display_SendEventMouseMoved.

Parameters
vdvout_display_t.
m_xMouse x position (relative to place, origin is top left).
m_yMouse y position (relative to place, origin is top left).

References vout_display_t::cfg, vout_window_ReportMouseMoved(), and vout_display_cfg::window.

◆ vout_display_SetSize()

VLC_EXPORT void vout_display_SetSize ( vout_display_t vd,
unsigned  width,
unsigned  height 
)

◆ vout_display_TranslateMouseState()

void vout_display_TranslateMouseState ( vout_display_t vd,
vlc_mouse_t video,
const vlc_mouse_t window 
)