Commit 348f9662 authored by Gildas Bazin's avatar Gildas Bazin

* updated INSTALL.win32
* a little bit of clean-up in the directx video output plugin
parent c673b2b9
...@@ -53,7 +53,7 @@ to remove the make utility included with MINGW as it conflicts with the one ...@@ -53,7 +53,7 @@ to remove the make utility included with MINGW as it conflicts with the one
from MSYS (just rename or remove c:\msys\1.0\mingw\bin\make.exe). from MSYS (just rename or remove c:\msys\1.0\mingw\bin\make.exe).
http://www.mingw.org/download.shtml http://www.mingw.org/download.shtml
http://prdownloads.sourceforge.net/mingw/MSYS-1.0.7-i686-2002.04.24-1.exe http://prdownloads.sourceforge.net/mingw/MSYS-1.0.7-i686-2.exe
http://prdownloads.sourceforge.net/mingw/MinGW-1.1.tar.gz http://prdownloads.sourceforge.net/mingw/MinGW-1.1.tar.gz
You must also not forget to install the extra development packages if you want You must also not forget to install the extra development packages if you want
...@@ -81,8 +81,8 @@ If you are cross-compiling from Debian, you can use something ...@@ -81,8 +81,8 @@ If you are cross-compiling from Debian, you can use something
along those lines: along those lines:
make distclean ; \ make distclean ; \
./configure --host=i586-mingw32msvc --target=i586-mingw32msvc \ CC=i586-mingw32msvc-gcc \
--build=i386-linux \ ./configure --host=i586-mingw32msvc --build=i386-linux \
--with-gtk-config-path=/usr/local/gtk-win32/bin \ --with-gtk-config-path=/usr/local/gtk-win32/bin \
--with-sdl-config-path=/usr/local/SDL-1.2.3-win32/i386-mingw32msvc/bin \ --with-sdl-config-path=/usr/local/SDL-1.2.3-win32/i386-mingw32msvc/bin \
--with-directx=/usr/local/dxheaders \ --with-directx=/usr/local/dxheaders \
...@@ -91,10 +91,9 @@ along those lines: ...@@ -91,10 +91,9 @@ along those lines:
If you are cross-compiling using the mingw32 package provided by If you are cross-compiling using the mingw32 package provided by
www.videolan.org, you have to use something along those lines: www.videolan.org, you have to use something along those lines:
CC=/usr/local/cross-tools/bin/i586-mingw32msvc-gcc \ CC=i586-mingw32msvc-gcc \
PATH=/usr/local/cross-tools/bin:$PATH \ PATH=/usr/local/cross-tools/bin:$PATH \
./configure --host=i586-mingw32msvc --target=i586-mingw32msvc \ ./configure --host=i586-mingw32msvc --build=i386-linux \
--build=i386-linux \
--with-gtk-config-path=/usr/local/gtk-win32/bin \ --with-gtk-config-path=/usr/local/gtk-win32/bin \
--with-sdl-config-path=/usr/local/SDL-1.2.3-win32/i386-mingw32msvc/bin \ --with-sdl-config-path=/usr/local/SDL-1.2.3-win32/i386-mingw32msvc/bin \
--with-directx=/usr/local/dxheaders \ --with-directx=/usr/local/dxheaders \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_directx.c: Windows DirectX video output display method * vout_directx.c: Windows DirectX video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: vout_directx.c,v 1.34 2002/05/18 15:34:04 gbazin Exp $ * $Id: vout_directx.c,v 1.35 2002/05/18 22:41:43 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -179,19 +179,11 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -179,19 +179,11 @@ static int vout_Create( vout_thread_t *p_vout )
intf_WarnMsg( 3, "vout: vout_Create DirectXEventThread running" ); intf_WarnMsg( 3, "vout: vout_Create DirectXEventThread running" );
/* Initialise DirectDraw */ /* Initialise DirectDraw */
if( DirectXInitDDraw( p_vout ) ) if( DirectXInitDDraw( p_vout ) )
{ {
intf_ErrMsg( "vout error: can't initialise DirectDraw" ); intf_ErrMsg( "vout error: can't initialise DirectDraw" );
vout_Destroy( p_vout );
/* Kill DirectXEventThread */
p_vout->p_sys->b_event_thread_die = 1;
/* we need to be sure DirectXEventThread won't stay stuck in
* GetMessage, so we send a fake message */
PostMessage( p_vout->p_sys->hwnd, WM_NULL, 0, 0);
vlc_thread_join( p_vout->p_sys->event_thread_id );
return ( 1 ); return ( 1 );
} }
...@@ -200,14 +192,7 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -200,14 +192,7 @@ static int vout_Create( vout_thread_t *p_vout )
{ {
intf_ErrMsg( "vout error: can't initialise DirectDraw" ); intf_ErrMsg( "vout error: can't initialise DirectDraw" );
DirectXCloseDDraw( p_vout ); DirectXCloseDDraw( p_vout );
vout_Destroy( p_vout );
/* Kill DirectXEventThread */
p_vout->p_sys->b_event_thread_die = 1;
/* we need to be sure DirectXEventThread won't stay stuck in
* GetMessage, so we send a fake message */
PostMessage( p_vout->p_sys->hwnd, WM_NULL, 0, 0);
vlc_thread_join( p_vout->p_sys->event_thread_id );
return ( 1 ); return ( 1 );
} }
...@@ -272,15 +257,16 @@ static void vout_Destroy( vout_thread_t *p_vout ) ...@@ -272,15 +257,16 @@ static void vout_Destroy( vout_thread_t *p_vout )
DirectXCloseDDraw( p_vout ); DirectXCloseDDraw( p_vout );
/* Kill DirectXEventThread */ /* Kill DirectXEventThread */
vlc_mutex_lock( &p_vout->p_sys->event_thread_lock );
p_vout->p_sys->b_event_thread_die = 1; p_vout->p_sys->b_event_thread_die = 1;
/* we need to be sure DirectXEventThread won't stay stuck in GetMessage, /* we need to be sure DirectXEventThread won't stay stuck in GetMessage,
* so we send a fake message */ * so we send a fake message */
if( p_vout->p_sys->i_event_thread_status == THREAD_READY && if( p_vout->p_sys->hwnd )
p_vout->p_sys->hwnd )
{
PostMessage( p_vout->p_sys->hwnd, WM_NULL, 0, 0); PostMessage( p_vout->p_sys->hwnd, WM_NULL, 0, 0);
vlc_thread_join( p_vout->p_sys->event_thread_id );
} vlc_mutex_unlock( &p_vout->p_sys->event_thread_lock );
vlc_thread_join( p_vout->p_sys->event_thread_id );
if( p_vout->p_sys != NULL ) if( p_vout->p_sys != NULL )
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_events.c: Windows DirectX video output events handler * vout_events.c: Windows DirectX video output events handler
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: vout_events.c,v 1.17 2002/05/18 15:34:04 gbazin Exp $ * $Id: vout_events.c,v 1.18 2002/05/18 22:41:43 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -142,7 +142,7 @@ void DirectXEventThread( vout_thread_t *p_vout ) ...@@ -142,7 +142,7 @@ void DirectXEventThread( vout_thread_t *p_vout )
case VK_ESCAPE: case VK_ESCAPE:
case VK_F12: case VK_F12:
/* exit application */ /* exit application */
p_main->p_intf->b_die = p_vout->p_sys->b_event_thread_die = 1; p_main->p_intf->b_die = 1;
break; break;
} }
TranslateMessage(&msg); TranslateMessage(&msg);
...@@ -154,7 +154,7 @@ void DirectXEventThread( vout_thread_t *p_vout ) ...@@ -154,7 +154,7 @@ void DirectXEventThread( vout_thread_t *p_vout )
case 'q': case 'q':
case 'Q': case 'Q':
/* exit application */ /* exit application */
p_main->p_intf->b_die = p_vout->p_sys->b_event_thread_die = 1; p_main->p_intf->b_die = 1;
break; break;
case 'f': /* switch to fullscreen */ case 'f': /* switch to fullscreen */
...@@ -379,12 +379,19 @@ static int DirectXCreateWindow( vout_thread_t *p_vout ) ...@@ -379,12 +379,19 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
static void DirectXCloseWindow( vout_thread_t *p_vout ) static void DirectXCloseWindow( vout_thread_t *p_vout )
{ {
intf_WarnMsg( 3, "vout: DirectXCloseWindow" ); intf_WarnMsg( 3, "vout: DirectXCloseWindow" );
vlc_mutex_lock( &p_vout->p_sys->event_thread_lock );
if( p_vout->p_sys->hwnd != NULL ) if( p_vout->p_sys->hwnd != NULL )
{ {
DestroyWindow( p_vout->p_sys->hwnd ); DestroyWindow( p_vout->p_sys->hwnd );
p_vout->p_sys->hwnd = NULL; p_vout->p_sys->hwnd = NULL;
} }
p_vout->p_sys->i_event_thread_status = THREAD_OVER;
vlc_mutex_unlock( &p_vout->p_sys->event_thread_lock );
/* We don't unregister the Window Class because it could lead to race /* We don't unregister the Window Class because it could lead to race
* conditions and it will be done anyway by the system when the app will * conditions and it will be done anyway by the system when the app will
* exit */ * exit */
...@@ -527,8 +534,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -527,8 +534,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
case WM_CLOSE: case WM_CLOSE:
intf_WarnMsg( 4, "vout: WinProc WM_CLOSE" ); intf_WarnMsg( 4, "vout: WinProc WM_CLOSE" );
/* exit application */ /* exit application */
p_vout = (vout_thread_t *)GetWindowLong( hwnd, GWL_USERDATA ); p_main->p_intf->b_die = 1;
p_main->p_intf->b_die = p_vout->p_sys->b_event_thread_die = 1;
return 0; return 0;
break; break;
......
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