Commit 8d099c47 authored by Laurent Aimar's avatar Laurent Aimar
Browse files

Converted directx to "vout display".

parent 6870df18
SOURCES_directx = \
directx.c \
vout.h \
events_vo.h \
events_vo.c \
common_vo.c \
common.h \
events.h \
events.c \
common.c \
$(NULL)
SOURCES_direct3d = \
......
......@@ -97,7 +97,7 @@ int CommonInit(vout_display_t *vd)
cfg.use_desktop = sys->use_desktop;
#endif
#ifdef MODULE_NAME_IS_directx
cfg.use_overlay = sys->b_using_overlay;
cfg.use_overlay = sys->use_overlay;
#endif
cfg.win.type = VOUT_WINDOW_TYPE_HWND;
cfg.win.x = 0;
......@@ -300,7 +300,7 @@ void UpdateRects(vout_display_t *vd,
#ifdef MODULE_NAME_IS_directx
/* Apply overlay hardware constraints */
if (sys->b_using_overlay) {
if (sys->use_overlay) {
if (sys->i_align_dest_boundary)
rect_dest.left = (rect_dest.left +
sys->i_align_dest_boundary / 2) &
......@@ -373,7 +373,7 @@ void UpdateRects(vout_display_t *vd,
#ifdef MODULE_NAME_IS_directx
/* Apply overlay hardware constraints */
if (sys->b_using_overlay) {
if (sys->use_overlay) {
if (sys->i_align_src_boundary)
rect_src_clipped.left =
(rect_src_clipped.left +
......@@ -408,9 +408,6 @@ void UpdateRects(vout_display_t *vd,
rect_dest_clipped.right -= sys->rect_display.left;
rect_dest_clipped.top -= sys->rect_display.top;
rect_dest_clipped.bottom -= sys->rect_display.top;
if (sys->b_using_overlay)
DirectDrawUpdateOverlay(vd);
#endif
#ifndef UNDER_CE
......
......@@ -80,9 +80,10 @@ struct vout_display_sys_t
HWND hparent; /* Handle of the parent window */
HWND hfswnd; /* Handle of the fullscreen window */
/* Multi-monitor support */
/* Multi-monitor support
* TODO move to directx only */
HMONITOR hmonitor; /* handle of the current monitor */
GUID *p_display_driver;
GUID *display_driver;
HMONITOR (WINAPI* MonitorFromWindow)(HWND, DWORD);
BOOL (WINAPI* GetMonitorInfo)(HMONITOR, LPMONITORINFO);
......@@ -114,8 +115,7 @@ struct vout_display_sys_t
RECT rect_dest;
RECT rect_dest_clipped;
bool allow_hw_yuv; /* Should we use hardware YUV->RGB conversions */
picture_pool_t *pool;
#ifdef MODULE_NAME_IS_directx
/* Overlay alignment restrictions */
......@@ -124,27 +124,30 @@ struct vout_display_sys_t
int i_align_dest_boundary;
int i_align_dest_size;
bool b_wallpaper; /* show as desktop wallpaper ? */
bool use_wallpaper; /* show as desktop wallpaper ? */
bool b_using_overlay; /* Are we using an overlay surface */
bool b_use_sysmem; /* Should we use system memory for surfaces */
bool b_3buf_overlay; /* Should we use triple buffered overlays */
bool use_overlay; /* Are we using an overlay surface */
/* DDraw capabilities */
int b_caps_overlay_clipping;
bool can_blit_fourcc;
unsigned int i_rgb_colorkey; /* colorkey in RGB used by the overlay */
unsigned int i_colorkey; /* colorkey used by the overlay */
uint32_t i_rgb_colorkey; /* colorkey in RGB used by the overlay */
uint32_t i_colorkey; /* colorkey used by the overlay */
COLORREF color_bkg;
COLORREF color_bkgtxt;
LPDIRECTDRAW2 p_ddobject; /* DirectDraw object */
LPDIRECTDRAWSURFACE2 p_display; /* Display device */
LPDIRECTDRAWSURFACE2 p_current_surface; /* surface currently displayed */
LPDIRECTDRAWCLIPPER p_clipper; /* clipper used for blitting */
LPDIRECTDRAW2 ddobject; /* DirectDraw object */
LPDIRECTDRAWSURFACE2 display; /* Display device */
LPDIRECTDRAWCLIPPER clipper; /* clipper used for blitting */
HINSTANCE hddraw_dll; /* handle of the opened ddraw dll */
picture_resource_t resource;
/* It protects the following variables */
vlc_mutex_t lock;
bool ch_wallpaper;
bool wallpaper_requested;
#endif
#ifdef MODULE_NAME_IS_glwin32
......@@ -152,10 +155,10 @@ struct vout_display_sys_t
HGLRC hGLRC;
vout_opengl_t gl;
vout_display_opengl_t vgl;
picture_pool_t *pool;
#endif
#ifdef MODULE_NAME_IS_direct3d
bool allow_hw_yuv; /* Should we use hardware YUV->RGB conversions */
/* show video on desktop window ? */
bool use_desktop;
struct {
......@@ -175,7 +178,6 @@ struct vout_display_sys_t
LPDIRECT3DVERTEXBUFFER9 d3dvtc;
picture_resource_t resource;
picture_pool_t *pool;
/* */
bool reset_device;
......@@ -194,8 +196,6 @@ struct vout_display_sys_t
HDC off_dc;
HBITMAP off_bitmap;
picture_pool_t *pool;
struct
{
BITMAPINFO bitmapinfo;
......@@ -229,11 +229,6 @@ struct vout_display_sys_t
# define GXResume p_vout->p_sys->GXResume
#endif
/*****************************************************************************
* Prototypes from directx.c
*****************************************************************************/
int DirectDrawUpdateOverlay(vout_display_t *);
/*****************************************************************************
* Prototypes from common.c
*****************************************************************************/
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment