VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions
vlc_vout_display.h File Reference

This file defines vout display structures and functions in vlc. More...

Include dependency graph for vlc_vout_display.h:

Go to the source code of this file.

Data Structures

struct  vout_display_cfg_t
 Initial/Current configuration for a 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  vout_display_t
struct  vout_display_place_t
 Structure used to store the result of a vout_display_PlacePicture. More...

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_owner_sys_t 
vout_display_owner_sys_t

Enumerations

enum  vout_display_align_t {
  VOUT_DISPLAY_ALIGN_CENTER, VOUT_DISPLAY_ALIGN_LEFT, VOUT_DISPLAY_ALIGN_RIGHT, VOUT_DISPLAY_ALIGN_TOP,
  VOUT_DISPLAY_ALIGN_BOTTOM
}
 Possible alignments for vout_display. More...
enum  { VOUT_WINDOW_STATE_NORMAL = 0, VOUT_WINDOW_STATE_ABOVE = 1, VOUT_WINDOW_STATE_BELOW = 2, VOUT_WINDOW_STACK_MASK = 3 }
 Window management state. More...
enum  {
  VOUT_DISPLAY_HIDE_MOUSE, VOUT_DISPLAY_RESET_PICTURES, VOUT_DISPLAY_CHANGE_FULLSCREEN, VOUT_DISPLAY_CHANGE_WINDOW_STATE,
  VOUT_DISPLAY_CHANGE_DISPLAY_SIZE, VOUT_DISPLAY_CHANGE_DISPLAY_FILLED, VOUT_DISPLAY_CHANGE_ZOOM, VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
  VOUT_DISPLAY_CHANGE_SOURCE_CROP, VOUT_DISPLAY_GET_OPENGL
}
 Control query for vout_display_t. More...
enum  {
  VOUT_DISPLAY_EVENT_PICTURES_INVALID, VOUT_DISPLAY_EVENT_FULLSCREEN, VOUT_DISPLAY_EVENT_WINDOW_STATE, VOUT_DISPLAY_EVENT_DISPLAY_SIZE,
  VOUT_DISPLAY_EVENT_CLOSE, VOUT_DISPLAY_EVENT_KEY, VOUT_DISPLAY_EVENT_MOUSE_STATE, VOUT_DISPLAY_EVENT_MOUSE_MOVED,
  VOUT_DISPLAY_EVENT_MOUSE_PRESSED, VOUT_DISPLAY_EVENT_MOUSE_RELEASED, VOUT_DISPLAY_EVENT_MOUSE_DOUBLE_CLICK
}
 Event from vout_display_t. More...

Functions

static void vout_display_SendEvent (vout_display_t *vd, int query,...)
static void vout_display_SendEventDisplaySize (vout_display_t *vd, int width, int height, bool is_fullscreen)
static void vout_display_SendEventPicturesInvalid (vout_display_t *vd)
static void vout_display_SendEventClose (vout_display_t *vd)
static void vout_display_SendEventKey (vout_display_t *vd, int key)
static void vout_display_SendEventFullscreen (vout_display_t *vd, bool is_fullscreen)
static void vout_display_SendWindowState (vout_display_t *vd, unsigned state)
static void vout_display_SendEventMouseState (vout_display_t *vd, int x, int y, int button_mask)
static void vout_display_SendEventMouseMoved (vout_display_t *vd, int x, int y)
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 vout_window_tvout_display_NewWindow (vout_display_t *vd, const vout_window_cfg_t *cfg)
 Asks for a new window with the given configuration as hint.
static void vout_display_DeleteWindow (vout_display_t *vd, vout_window_t *window)
 Deletes a window created by vout_display_NewWindow if window is non NULL or any unused windows otherwise.
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.
void vout_display_PlacePicture (vout_display_place_t *place, const video_format_t *source, const vout_display_cfg_t *cfg, bool do_clipping)
 Computes how to place a picture inside the display to respect the given parameters.

Detailed Description

This file defines vout display structures and functions in vlc.

Typedef Documentation

Enumeration Type Documentation

anonymous enum

Window management state.

Enumerator:
VOUT_WINDOW_STATE_NORMAL 
VOUT_WINDOW_STATE_ABOVE 
VOUT_WINDOW_STATE_BELOW 
VOUT_WINDOW_STACK_MASK 
anonymous enum

Control query for vout_display_t.

Enumerator:
VOUT_DISPLAY_HIDE_MOUSE 
VOUT_DISPLAY_RESET_PICTURES 
VOUT_DISPLAY_CHANGE_FULLSCREEN 
VOUT_DISPLAY_CHANGE_WINDOW_STATE 
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE 
VOUT_DISPLAY_CHANGE_DISPLAY_FILLED 
VOUT_DISPLAY_CHANGE_ZOOM 
VOUT_DISPLAY_CHANGE_SOURCE_ASPECT 
VOUT_DISPLAY_CHANGE_SOURCE_CROP 
VOUT_DISPLAY_GET_OPENGL 
anonymous enum

Event from vout_display_t.

Events modifiying the state may be sent multiple times. Only the transition will be retained and acted upon.

Enumerator:
VOUT_DISPLAY_EVENT_PICTURES_INVALID 
VOUT_DISPLAY_EVENT_FULLSCREEN 
VOUT_DISPLAY_EVENT_WINDOW_STATE 
VOUT_DISPLAY_EVENT_DISPLAY_SIZE 
VOUT_DISPLAY_EVENT_CLOSE 
VOUT_DISPLAY_EVENT_KEY 
VOUT_DISPLAY_EVENT_MOUSE_STATE 
VOUT_DISPLAY_EVENT_MOUSE_MOVED 
VOUT_DISPLAY_EVENT_MOUSE_PRESSED 
VOUT_DISPLAY_EVENT_MOUSE_RELEASED 
VOUT_DISPLAY_EVENT_MOUSE_DOUBLE_CLICK 

Possible alignments for vout_display.

Enumerator:
VOUT_DISPLAY_ALIGN_CENTER 
VOUT_DISPLAY_ALIGN_LEFT 
VOUT_DISPLAY_ALIGN_RIGHT 
VOUT_DISPLAY_ALIGN_TOP 
VOUT_DISPLAY_ALIGN_BOTTOM 

Function Documentation

static void vout_display_DeleteWindow ( vout_display_t vd,
vout_window_t window 
)
inlinestatic

Deletes a window created by vout_display_NewWindow if window is non NULL or any unused windows otherwise.

References vout_display_t::owner, and vout_display_owner_t::window_del.

void vout_display_GetDefaultDisplaySize ( unsigned *  width,
unsigned *  height,
const video_format_t source,
const vout_display_cfg_t  
)
static vout_window_t* vout_display_NewWindow ( vout_display_t vd,
const vout_window_cfg_t cfg 
)
inlinestatic

Asks for a new window with the given configuration as hint.

b_standalone/i_x/i_y may be overwritten by the core

References vout_display_t::owner, and vout_display_owner_t::window_new.

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

Computes how to place a picture inside the display to respect the given parameters.

This assumes that cropping is done by an external mean.

Parameters
p_placePlace inside the window (window pixel unit)
p_sourceVideo source format
p_cfgDisplay configuration
b_clipIf true, prevent the video to go outside the display (break zoom).

References vout_display_cfg_t::align, vout_display_cfg_t::display, vout_display_cfg_t::height, vout_display_place_t::height, vout_display_cfg_t::horizontal, video_format_t::i_sar_den, video_format_t::i_sar_num, video_format_t::i_visible_height, video_format_t::i_visible_width, vout_display_cfg_t::is_display_filled, vout_display_cfg_t::sar, vout_display_cfg_t::vertical, VOUT_DISPLAY_ALIGN_BOTTOM, VOUT_DISPLAY_ALIGN_LEFT, VOUT_DISPLAY_ALIGN_RIGHT, VOUT_DISPLAY_ALIGN_TOP, vout_display_GetDefaultDisplaySize(), vout_display_cfg_t::width, vout_display_place_t::width, vout_display_place_t::x, and vout_display_place_t::y.

Referenced by ThreadDisplayRenderPicture().

static void vout_display_SendEvent ( vout_display_t vd,
int  query,
  ... 
)
inlinestatic
static void vout_display_SendEventClose ( vout_display_t vd)
inlinestatic
static void vout_display_SendEventDisplaySize ( vout_display_t vd,
int  width,
int  height,
bool  is_fullscreen 
)
inlinestatic
static void vout_display_SendEventFullscreen ( vout_display_t vd,
bool  is_fullscreen 
)
inlinestatic
static void vout_display_SendEventKey ( vout_display_t vd,
int  key 
)
inlinestatic
static void vout_display_SendEventMouseDoubleClick ( vout_display_t vd)
inlinestatic
static void vout_display_SendEventMouseMoved ( vout_display_t vd,
int  x,
int  y 
)
inlinestatic
static void vout_display_SendEventMousePressed ( vout_display_t vd,
int  button 
)
inlinestatic
static void vout_display_SendEventMouseReleased ( vout_display_t vd,
int  button 
)
inlinestatic
static void vout_display_SendEventMouseState ( vout_display_t vd,
int  x,
int  y,
int  button_mask 
)
inlinestatic
static void vout_display_SendEventPicturesInvalid ( vout_display_t vd)
inlinestatic
static void vout_display_SendWindowState ( vout_display_t vd,
unsigned  state 
)
inlinestatic