Commit 475694d4 authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac, modules/video_output/wingdi.c: enable wingapi vout on WinCE.

parent b6932baa
...@@ -3184,7 +3184,7 @@ if test "${enable_wingdi}" != "no"; then ...@@ -3184,7 +3184,7 @@ if test "${enable_wingdi}" != "no"; then
VLC_ADD_LDFLAGS([wingdi],[-lgdi32]) VLC_ADD_LDFLAGS([wingdi],[-lgdi32])
fi fi
if test "${SYS}" = "mingwce"; then if test "${SYS}" = "mingwce"; then
VLC_ADD_PLUGINS([wingdi]) VLC_ADD_PLUGINS([wingdi wingapi])
fi fi
fi fi
......
...@@ -6,7 +6,7 @@ SOURCES_glide = glide.c ...@@ -6,7 +6,7 @@ SOURCES_glide = glide.c
SOURCES_vout_sdl = sdl.c SOURCES_vout_sdl = sdl.c
SOURCES_svgalib = svgalib.c SOURCES_svgalib = svgalib.c
SOURCES_wingdi = wingdi.c SOURCES_wingdi = wingdi.c
SOURCES_gapi = wingdi.c SOURCES_wingapi = wingdi.c
SOURCES_mga = mga.c SOURCES_mga = mga.c
SOURCES_hd1000v = hd1000v.cpp SOURCES_hd1000v = hd1000v.cpp
SOURCES_snapshot = snapshot.c SOURCES_snapshot = snapshot.c
......
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
# define MENU_HEIGHT 0 # define MENU_HEIGHT 0
#endif #endif
#undef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
#ifdef MODULE_NAME_IS_gapi
typedef struct GXDisplayProperties { typedef struct GXDisplayProperties {
DWORD cxWidth; DWORD cxWidth;
DWORD cyHeight; DWORD cyHeight;
...@@ -73,7 +72,7 @@ ...@@ -73,7 +72,7 @@
# define kfDirect444 0x200 # define kfDirect444 0x200
# define kfDirectInverted 0x400 # define kfDirectInverted 0x400
# endif # endif
#endif /* MODULE_NAME_IS_gapi */ #endif /* MODULE_NAME_IS_wingapi */
#define MAX_DIRECTBUFFERS 10 #define MAX_DIRECTBUFFERS 10
...@@ -105,7 +104,7 @@ static int Init ( vout_thread_t * ); ...@@ -105,7 +104,7 @@ static int Init ( vout_thread_t * );
static void End ( vout_thread_t * ); static void End ( vout_thread_t * );
static int Manage ( vout_thread_t * ); static int Manage ( vout_thread_t * );
static void Render ( vout_thread_t *, picture_t * ); static void Render ( vout_thread_t *, picture_t * );
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
static void DisplayGAPI( vout_thread_t *, picture_t * ); static void DisplayGAPI( vout_thread_t *, picture_t * );
#else #else
static void DisplayGDI( vout_thread_t *, picture_t * ); static void DisplayGDI( vout_thread_t *, picture_t * );
...@@ -166,7 +165,7 @@ struct vout_sys_t ...@@ -166,7 +165,7 @@ struct vout_sys_t
HWND hTaskBar; HWND hTaskBar;
vlc_bool_t b_video_display; vlc_bool_t b_video_display;
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
HINSTANCE gapi_dll; /* handle of the opened gapi dll */ HINSTANCE gapi_dll; /* handle of the opened gapi dll */
/* GAPI functions */ /* GAPI functions */
...@@ -194,7 +193,7 @@ struct vout_sys_t ...@@ -194,7 +193,7 @@ struct vout_sys_t
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
vlc_module_begin(); vlc_module_begin();
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
set_description( _("Windows GAPI video output") ); set_description( _("Windows GAPI video output") );
set_capability( "video output", 20 ); set_capability( "video output", 20 );
#else #else
...@@ -215,7 +214,7 @@ static int OpenVideo ( vlc_object_t *p_this ) ...@@ -215,7 +214,7 @@ static int OpenVideo ( vlc_object_t *p_this )
p_vout->p_sys = (vout_sys_t *)malloc( sizeof(vout_sys_t) ); p_vout->p_sys = (vout_sys_t *)malloc( sizeof(vout_sys_t) );
if( !p_vout->p_sys ) return VLC_ENOMEM; if( !p_vout->p_sys ) return VLC_ENOMEM;
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
/* Load GAPI */ /* Load GAPI */
p_vout->p_sys->gapi_dll = LoadLibrary( _T("GX.DLL") ); p_vout->p_sys->gapi_dll = LoadLibrary( _T("GX.DLL") );
if( p_vout->p_sys->gapi_dll == NULL ) if( p_vout->p_sys->gapi_dll == NULL )
...@@ -280,7 +279,7 @@ static int OpenVideo ( vlc_object_t *p_this ) ...@@ -280,7 +279,7 @@ static int OpenVideo ( vlc_object_t *p_this )
p_vout->pf_end = End; p_vout->pf_end = End;
p_vout->pf_manage = Manage; p_vout->pf_manage = Manage;
p_vout->pf_render = Render; p_vout->pf_render = Render;
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
p_vout->pf_display = DisplayGAPI; p_vout->pf_display = DisplayGAPI;
#else #else
p_vout->pf_display = DisplayGDI; p_vout->pf_display = DisplayGDI;
...@@ -297,7 +296,7 @@ static void CloseVideo ( vlc_object_t *p_this ) ...@@ -297,7 +296,7 @@ static void CloseVideo ( vlc_object_t *p_this )
{ {
vout_thread_t * p_vout = (vout_thread_t *)p_this; vout_thread_t * p_vout = (vout_thread_t *)p_this;
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
GXCloseDisplay(); GXCloseDisplay();
FreeLibrary( p_vout->p_sys->gapi_dll ); FreeLibrary( p_vout->p_sys->gapi_dll );
#endif #endif
...@@ -367,7 +366,7 @@ static int Init( vout_thread_t *p_vout ) ...@@ -367,7 +366,7 @@ static int Init( vout_thread_t *p_vout )
break; break;
} }
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
p_vout->output.i_width = p_vout->p_sys->render_width; p_vout->output.i_width = p_vout->p_sys->render_width;
p_vout->output.i_height = p_vout->p_sys->render_height; p_vout->output.i_height = p_vout->p_sys->render_height;
#else #else
...@@ -570,7 +569,7 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -570,7 +569,7 @@ static int Manage( vout_thread_t *p_vout )
//PostMessage( p_vout->p_sys->hwnd, WM_VLC_SHOW_MOUSE, 0, 0 ); //PostMessage( p_vout->p_sys->hwnd, WM_VLC_SHOW_MOUSE, 0, 0 );
} }
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
GXCloseDisplay(); GXCloseDisplay();
#endif #endif
...@@ -578,7 +577,7 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -578,7 +577,7 @@ static int Manage( vout_thread_t *p_vout )
ShowWindow( p_vout->p_sys->hwnd, SW_SHOW ); ShowWindow( p_vout->p_sys->hwnd, SW_SHOW );
UpdateWindow( p_vout->p_sys->hwnd ); UpdateWindow( p_vout->p_sys->hwnd );
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
GXOpenDisplay( p_vout->p_sys->hvideownd, GX_FULLSCREEN ); GXOpenDisplay( p_vout->p_sys->hvideownd, GX_FULLSCREEN );
#endif #endif
...@@ -609,7 +608,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -609,7 +608,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
#define rect_dest p_vout->p_sys->rect_dest #define rect_dest p_vout->p_sys->rect_dest
#define rect_dest_clipped p_vout->p_sys->rect_dest_clipped #define rect_dest_clipped p_vout->p_sys->rect_dest_clipped
#ifndef MODULE_NAME_IS_gapi #ifndef MODULE_NAME_IS_wingapi
static void DisplayGDI( vout_thread_t *p_vout, picture_t *p_pic ) static void DisplayGDI( vout_thread_t *p_vout, picture_t *p_pic )
{ {
vout_sys_t *p_sys = p_vout->p_sys; vout_sys_t *p_sys = p_vout->p_sys;
...@@ -895,7 +894,7 @@ static void EventThread ( vlc_object_t *p_event ) ...@@ -895,7 +894,7 @@ static void EventThread ( vlc_object_t *p_event )
} }
break; break;
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
case WM_KILLFOCUS: case WM_KILLFOCUS:
GXSuspend(); GXSuspend();
break; break;
...@@ -1133,7 +1132,7 @@ static void InitBuffers( vout_thread_t *p_vout ) ...@@ -1133,7 +1132,7 @@ static void InitBuffers( vout_thread_t *p_vout )
window_dc = GetDC( p_vout->p_sys->hvideownd ); window_dc = GetDC( p_vout->p_sys->hvideownd );
/* Get screen properties */ /* Get screen properties */
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
{ {
GXDisplayProperties gx_displayprop = GXGetDisplayProperties(); GXDisplayProperties gx_displayprop = GXGetDisplayProperties();
p_vout->p_sys->i_depth = gx_displayprop.cBPP; p_vout->p_sys->i_depth = gx_displayprop.cBPP;
...@@ -1144,7 +1143,7 @@ static void InitBuffers( vout_thread_t *p_vout ) ...@@ -1144,7 +1143,7 @@ static void InitBuffers( vout_thread_t *p_vout )
#endif #endif
msg_Dbg( p_vout, "GDI depth is %i", p_vout->p_sys->i_depth ); msg_Dbg( p_vout, "GDI depth is %i", p_vout->p_sys->i_depth );
#ifdef MODULE_NAME_IS_gapi #ifdef MODULE_NAME_IS_wingapi
if( p_vout->b_fullscreen ) if( p_vout->b_fullscreen )
{ {
/* We need to restore Maximized sized window */ /* We need to restore Maximized sized window */
......
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