Commit 703ed7fc authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_output/directx/*: fixed symbol conflicts when compiling both...

* modules/video_output/directx/*: fixed symbol conflicts when compiling both vout_directx and glwin32 as builtins.
parent dfef7d71
...@@ -254,7 +254,7 @@ static int OpenVideo( vlc_object_t *p_this ) ...@@ -254,7 +254,7 @@ static int OpenVideo( vlc_object_t *p_this )
vlc_object_create( p_vout, sizeof(event_thread_t) ); vlc_object_create( p_vout, sizeof(event_thread_t) );
p_vout->p_sys->p_event->p_vout = p_vout; p_vout->p_sys->p_event->p_vout = p_vout;
if( vlc_thread_create( p_vout->p_sys->p_event, "DirectX Events Thread", if( vlc_thread_create( p_vout->p_sys->p_event, "DirectX Events Thread",
DirectXEventThread, 0, 1 ) ) E_(DirectXEventThread), 0, 1 ) )
{ {
msg_Err( p_vout, "cannot create DirectXEventThread" ); msg_Err( p_vout, "cannot create DirectXEventThread" );
vlc_object_destroy( p_vout->p_sys->p_event ); vlc_object_destroy( p_vout->p_sys->p_event );
...@@ -541,7 +541,7 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -541,7 +541,7 @@ static int Manage( vout_thread_t *p_vout )
{ {
SwitchWallpaperMode( p_vout, !p_vout->p_sys->b_wallpaper ); SwitchWallpaperMode( p_vout, !p_vout->p_sys->b_wallpaper );
p_vout->p_sys->i_changes &= ~DX_WALLPAPER_CHANGE; p_vout->p_sys->i_changes &= ~DX_WALLPAPER_CHANGE;
DirectXUpdateOverlay( p_vout ); E_(DirectXUpdateOverlay)( p_vout );
} }
/* /*
...@@ -722,7 +722,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -722,7 +722,7 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic )
{ {
if( IDirectDrawSurface2_Restore( p_vout->p_sys->p_display ) == DD_OK && if( IDirectDrawSurface2_Restore( p_vout->p_sys->p_display ) == DD_OK &&
p_vout->p_sys->b_using_overlay ) p_vout->p_sys->b_using_overlay )
DirectXUpdateOverlay( p_vout ); E_(DirectXUpdateOverlay)( p_vout );
} }
if( !p_vout->p_sys->b_using_overlay ) if( !p_vout->p_sys->b_using_overlay )
...@@ -1025,7 +1025,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout ) ...@@ -1025,7 +1025,7 @@ static int DirectXCreateDisplay( vout_thread_t *p_vout )
SetClassLong( p_vout->p_sys->hvideownd, GCL_HBRBACKGROUND, SetClassLong( p_vout->p_sys->hvideownd, GCL_HBRBACKGROUND,
(LONG)CreateSolidBrush( p_vout->p_sys->i_rgb_colorkey ) ); (LONG)CreateSolidBrush( p_vout->p_sys->i_rgb_colorkey ) );
InvalidateRect( p_vout->p_sys->hvideownd, NULL, TRUE ); InvalidateRect( p_vout->p_sys->hvideownd, NULL, TRUE );
DirectXUpdateRects( p_vout, VLC_TRUE ); E_(DirectXUpdateRects)( p_vout, VLC_TRUE );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -1193,7 +1193,7 @@ static int DirectXCreateSurface( vout_thread_t *p_vout, ...@@ -1193,7 +1193,7 @@ static int DirectXCreateSurface( vout_thread_t *p_vout,
/* Check the overlay is useable as some graphics cards allow creating /* Check the overlay is useable as some graphics cards allow creating
* several overlays but only one can be used at one time. */ * several overlays but only one can be used at one time. */
p_vout->p_sys->p_current_surface = *pp_surface_final; p_vout->p_sys->p_current_surface = *pp_surface_final;
if( DirectXUpdateOverlay( p_vout ) != VLC_SUCCESS ) if( E_(DirectXUpdateOverlay)( p_vout ) != VLC_SUCCESS )
{ {
IDirectDrawSurface2_Release( *pp_surface_final ); IDirectDrawSurface2_Release( *pp_surface_final );
*pp_surface_final = NULL; *pp_surface_final = NULL;
...@@ -1212,7 +1212,7 @@ static int DirectXCreateSurface( vout_thread_t *p_vout, ...@@ -1212,7 +1212,7 @@ static int DirectXCreateSurface( vout_thread_t *p_vout,
* Ususally the overlay is moved by the user and thus, by a move or resize * Ususally the overlay is moved by the user and thus, by a move or resize
* event (in Manage). * event (in Manage).
*****************************************************************************/ *****************************************************************************/
int DirectXUpdateOverlay( vout_thread_t *p_vout ) int E_(DirectXUpdateOverlay)( vout_thread_t *p_vout )
{ {
DDOVERLAYFX ddofx; DDOVERLAYFX ddofx;
DWORD dwFlags; DWORD dwFlags;
...@@ -1433,7 +1433,7 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic, ...@@ -1433,7 +1433,7 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic,
DirectXUnlockSurface( p_vout, &front_pic ); DirectXUnlockSurface( p_vout, &front_pic );
} }
DirectXUpdateOverlay( p_vout ); E_(DirectXUpdateOverlay)( p_vout );
I_OUTPUTPICTURES = 1; I_OUTPUTPICTURES = 1;
msg_Dbg( p_vout, "YUV overlay created successfully" ); msg_Dbg( p_vout, "YUV overlay created successfully" );
} }
......
...@@ -81,7 +81,7 @@ static int DirectXConvertKey( int i_key ); ...@@ -81,7 +81,7 @@ static int DirectXConvertKey( int i_key );
* The main goal of this thread is to isolate the Win32 PeekMessage function * The main goal of this thread is to isolate the Win32 PeekMessage function
* because this one can block for a long time. * because this one can block for a long time.
*****************************************************************************/ *****************************************************************************/
void DirectXEventThread( event_thread_t *p_event ) void E_(DirectXEventThread)( event_thread_t *p_event )
{ {
MSG msg; MSG msg;
POINT old_mouse_pos = {0,0}, mouse_pos; POINT old_mouse_pos = {0,0}, mouse_pos;
...@@ -109,7 +109,7 @@ void DirectXEventThread( event_thread_t *p_event ) ...@@ -109,7 +109,7 @@ void DirectXEventThread( event_thread_t *p_event )
{ {
ULONG (WINAPI* OurSetThreadExecutionState)( ULONG ); ULONG (WINAPI* OurSetThreadExecutionState)( ULONG );
OurSetThreadExecutionState = OurSetThreadExecutionState = (ULONG (WINAPI*)( ULONG ))
GetProcAddress( hkernel32, _T("SetThreadExecutionState") ); GetProcAddress( hkernel32, _T("SetThreadExecutionState") );
if( OurSetThreadExecutionState ) if( OurSetThreadExecutionState )
...@@ -538,7 +538,7 @@ static void DirectXCloseWindow( vout_thread_t *p_vout ) ...@@ -538,7 +538,7 @@ static void DirectXCloseWindow( vout_thread_t *p_vout )
* its job is to update the source and destination RECTs used to display the * its job is to update the source and destination RECTs used to display the
* picture. * picture.
*****************************************************************************/ *****************************************************************************/
void DirectXUpdateRects( vout_thread_t *p_vout, vlc_bool_t b_force ) void E_(DirectXUpdateRects)( vout_thread_t *p_vout, vlc_bool_t b_force )
{ {
#define rect_src p_vout->p_sys->rect_src #define rect_src p_vout->p_sys->rect_src
#define rect_src_clipped p_vout->p_sys->rect_src_clipped #define rect_src_clipped p_vout->p_sys->rect_src_clipped
...@@ -674,7 +674,7 @@ void DirectXUpdateRects( vout_thread_t *p_vout, vlc_bool_t b_force ) ...@@ -674,7 +674,7 @@ void DirectXUpdateRects( vout_thread_t *p_vout, vlc_bool_t b_force )
rect_dest_clipped.bottom -= p_vout->p_sys->rect_display.top; rect_dest_clipped.bottom -= p_vout->p_sys->rect_display.top;
if( p_vout->p_sys->b_using_overlay ) if( p_vout->p_sys->b_using_overlay )
DirectXUpdateOverlay( p_vout ); E_(DirectXUpdateOverlay)( p_vout );
/* Signal the change in size/position */ /* Signal the change in size/position */
p_vout->p_sys->i_changes |= DX_POSITION_CHANGE; p_vout->p_sys->i_changes |= DX_POSITION_CHANGE;
...@@ -734,7 +734,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -734,7 +734,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
{ {
case WM_WINDOWPOSCHANGED: case WM_WINDOWPOSCHANGED:
DirectXUpdateRects( p_vout, VLC_TRUE ); E_(DirectXUpdateRects)( p_vout, VLC_TRUE );
return 0; return 0;
/* the user wants to close the window */ /* the user wants to close the window */
......
...@@ -134,7 +134,7 @@ static int OpenVideo( vlc_object_t *p_this ) ...@@ -134,7 +134,7 @@ static int OpenVideo( vlc_object_t *p_this )
vlc_object_create( p_vout, sizeof(event_thread_t) ); vlc_object_create( p_vout, sizeof(event_thread_t) );
p_vout->p_sys->p_event->p_vout = p_vout; p_vout->p_sys->p_event->p_vout = p_vout;
if( vlc_thread_create( p_vout->p_sys->p_event, "DirectX Events Thread", if( vlc_thread_create( p_vout->p_sys->p_event, "DirectX Events Thread",
DirectXEventThread, 0, 1 ) ) E_(DirectXEventThread), 0, 1 ) )
{ {
msg_Err( p_vout, "cannot create DirectXEventThread" ); msg_Err( p_vout, "cannot create DirectXEventThread" );
vlc_object_destroy( p_vout->p_sys->p_event ); vlc_object_destroy( p_vout->p_sys->p_event );
...@@ -467,7 +467,7 @@ static void GLSwapBuffers( vout_thread_t *p_vout ) ...@@ -467,7 +467,7 @@ static void GLSwapBuffers( vout_thread_t *p_vout )
SwapBuffers( p_vout->p_sys->hGLDC ); SwapBuffers( p_vout->p_sys->hGLDC );
} }
int DirectXUpdateOverlay( vout_thread_t *p_vout ) int E_(DirectXUpdateOverlay)( vout_thread_t *p_vout )
{ {
return 1; return 1;
} }
...@@ -130,13 +130,13 @@ struct picture_sys_t ...@@ -130,13 +130,13 @@ struct picture_sys_t
/***************************************************************************** /*****************************************************************************
* Prototypes from vout.c * Prototypes from vout.c
*****************************************************************************/ *****************************************************************************/
int DirectXUpdateOverlay( vout_thread_t *p_vout ); int E_(DirectXUpdateOverlay)( vout_thread_t *p_vout );
/***************************************************************************** /*****************************************************************************
* Prototypes from events.c * Prototypes from events.c
*****************************************************************************/ *****************************************************************************/
void DirectXEventThread ( event_thread_t *p_event ); void E_(DirectXEventThread) ( event_thread_t *p_event );
void DirectXUpdateRects ( vout_thread_t *p_vout, vlc_bool_t b_force ); void E_(DirectXUpdateRects) ( vout_thread_t *p_vout, vlc_bool_t b_force );
/***************************************************************************** /*****************************************************************************
* Constants * Constants
......
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