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

Converted directx to "vout display".

parent 6870df18
SOURCES_directx = \ SOURCES_directx = \
directx.c \ directx.c \
vout.h \ common.h \
events_vo.h \ events.h \
events_vo.c \ events.c \
common_vo.c \ common.c \
$(NULL) $(NULL)
SOURCES_direct3d = \ SOURCES_direct3d = \
......
...@@ -97,7 +97,7 @@ int CommonInit(vout_display_t *vd) ...@@ -97,7 +97,7 @@ int CommonInit(vout_display_t *vd)
cfg.use_desktop = sys->use_desktop; cfg.use_desktop = sys->use_desktop;
#endif #endif
#ifdef MODULE_NAME_IS_directx #ifdef MODULE_NAME_IS_directx
cfg.use_overlay = sys->b_using_overlay; cfg.use_overlay = sys->use_overlay;
#endif #endif
cfg.win.type = VOUT_WINDOW_TYPE_HWND; cfg.win.type = VOUT_WINDOW_TYPE_HWND;
cfg.win.x = 0; cfg.win.x = 0;
...@@ -300,7 +300,7 @@ void UpdateRects(vout_display_t *vd, ...@@ -300,7 +300,7 @@ void UpdateRects(vout_display_t *vd,
#ifdef MODULE_NAME_IS_directx #ifdef MODULE_NAME_IS_directx
/* Apply overlay hardware constraints */ /* Apply overlay hardware constraints */
if (sys->b_using_overlay) { if (sys->use_overlay) {
if (sys->i_align_dest_boundary) if (sys->i_align_dest_boundary)
rect_dest.left = (rect_dest.left + rect_dest.left = (rect_dest.left +
sys->i_align_dest_boundary / 2) & sys->i_align_dest_boundary / 2) &
...@@ -373,7 +373,7 @@ void UpdateRects(vout_display_t *vd, ...@@ -373,7 +373,7 @@ void UpdateRects(vout_display_t *vd,
#ifdef MODULE_NAME_IS_directx #ifdef MODULE_NAME_IS_directx
/* Apply overlay hardware constraints */ /* Apply overlay hardware constraints */
if (sys->b_using_overlay) { if (sys->use_overlay) {
if (sys->i_align_src_boundary) if (sys->i_align_src_boundary)
rect_src_clipped.left = rect_src_clipped.left =
(rect_src_clipped.left + (rect_src_clipped.left +
...@@ -408,9 +408,6 @@ void UpdateRects(vout_display_t *vd, ...@@ -408,9 +408,6 @@ void UpdateRects(vout_display_t *vd,
rect_dest_clipped.right -= sys->rect_display.left; rect_dest_clipped.right -= sys->rect_display.left;
rect_dest_clipped.top -= sys->rect_display.top; rect_dest_clipped.top -= sys->rect_display.top;
rect_dest_clipped.bottom -= sys->rect_display.top; rect_dest_clipped.bottom -= sys->rect_display.top;
if (sys->b_using_overlay)
DirectDrawUpdateOverlay(vd);
#endif #endif
#ifndef UNDER_CE #ifndef UNDER_CE
......
...@@ -80,9 +80,10 @@ struct vout_display_sys_t ...@@ -80,9 +80,10 @@ struct vout_display_sys_t
HWND hparent; /* Handle of the parent window */ HWND hparent; /* Handle of the parent window */
HWND hfswnd; /* Handle of the fullscreen 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 */ HMONITOR hmonitor; /* handle of the current monitor */
GUID *p_display_driver; GUID *display_driver;
HMONITOR (WINAPI* MonitorFromWindow)(HWND, DWORD); HMONITOR (WINAPI* MonitorFromWindow)(HWND, DWORD);
BOOL (WINAPI* GetMonitorInfo)(HMONITOR, LPMONITORINFO); BOOL (WINAPI* GetMonitorInfo)(HMONITOR, LPMONITORINFO);
...@@ -114,8 +115,7 @@ struct vout_display_sys_t ...@@ -114,8 +115,7 @@ struct vout_display_sys_t
RECT rect_dest; RECT rect_dest;
RECT rect_dest_clipped; RECT rect_dest_clipped;
bool allow_hw_yuv; /* Should we use hardware YUV->RGB conversions */ picture_pool_t *pool;
#ifdef MODULE_NAME_IS_directx #ifdef MODULE_NAME_IS_directx
/* Overlay alignment restrictions */ /* Overlay alignment restrictions */
...@@ -124,27 +124,30 @@ struct vout_display_sys_t ...@@ -124,27 +124,30 @@ struct vout_display_sys_t
int i_align_dest_boundary; int i_align_dest_boundary;
int i_align_dest_size; 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 use_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 */
/* DDraw capabilities */ /* DDraw capabilities */
int b_caps_overlay_clipping; bool can_blit_fourcc;
unsigned int i_rgb_colorkey; /* colorkey in RGB used by the overlay */ uint32_t i_rgb_colorkey; /* colorkey in RGB used by the overlay */
unsigned int i_colorkey; /* colorkey used by the overlay */ uint32_t i_colorkey; /* colorkey used by the overlay */
COLORREF color_bkg; COLORREF color_bkg;
COLORREF color_bkgtxt; COLORREF color_bkgtxt;
LPDIRECTDRAW2 p_ddobject; /* DirectDraw object */ LPDIRECTDRAW2 ddobject; /* DirectDraw object */
LPDIRECTDRAWSURFACE2 p_display; /* Display device */ LPDIRECTDRAWSURFACE2 display; /* Display device */
LPDIRECTDRAWSURFACE2 p_current_surface; /* surface currently displayed */ LPDIRECTDRAWCLIPPER clipper; /* clipper used for blitting */
LPDIRECTDRAWCLIPPER p_clipper; /* clipper used for blitting */
HINSTANCE hddraw_dll; /* handle of the opened ddraw dll */ HINSTANCE hddraw_dll; /* handle of the opened ddraw dll */
picture_resource_t resource;
/* It protects the following variables */
vlc_mutex_t lock; vlc_mutex_t lock;
bool ch_wallpaper;
bool wallpaper_requested;
#endif #endif
#ifdef MODULE_NAME_IS_glwin32 #ifdef MODULE_NAME_IS_glwin32
...@@ -152,10 +155,10 @@ struct vout_display_sys_t ...@@ -152,10 +155,10 @@ struct vout_display_sys_t
HGLRC hGLRC; HGLRC hGLRC;
vout_opengl_t gl; vout_opengl_t gl;
vout_display_opengl_t vgl; vout_display_opengl_t vgl;
picture_pool_t *pool;
#endif #endif
#ifdef MODULE_NAME_IS_direct3d #ifdef MODULE_NAME_IS_direct3d
bool allow_hw_yuv; /* Should we use hardware YUV->RGB conversions */
/* show video on desktop window ? */ /* show video on desktop window ? */
bool use_desktop; bool use_desktop;
struct { struct {
...@@ -175,7 +178,6 @@ struct vout_display_sys_t ...@@ -175,7 +178,6 @@ struct vout_display_sys_t
LPDIRECT3DVERTEXBUFFER9 d3dvtc; LPDIRECT3DVERTEXBUFFER9 d3dvtc;
picture_resource_t resource; picture_resource_t resource;
picture_pool_t *pool;
/* */ /* */
bool reset_device; bool reset_device;
...@@ -194,8 +196,6 @@ struct vout_display_sys_t ...@@ -194,8 +196,6 @@ struct vout_display_sys_t
HDC off_dc; HDC off_dc;
HBITMAP off_bitmap; HBITMAP off_bitmap;
picture_pool_t *pool;
struct struct
{ {
BITMAPINFO bitmapinfo; BITMAPINFO bitmapinfo;
...@@ -229,11 +229,6 @@ struct vout_display_sys_t ...@@ -229,11 +229,6 @@ struct vout_display_sys_t
# define GXResume p_vout->p_sys->GXResume # define GXResume p_vout->p_sys->GXResume
#endif #endif
/*****************************************************************************
* Prototypes from directx.c
*****************************************************************************/
int DirectDrawUpdateOverlay(vout_display_t *);
/***************************************************************************** /*****************************************************************************
* Prototypes from common.c * Prototypes from common.c
*****************************************************************************/ *****************************************************************************/
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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