Commit cfbe5077 authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_output/directx/*: fixed strange race condition.

parent 53c8ef35
......@@ -2,7 +2,7 @@
* vout.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: directx.c,v 1.29 2003/12/15 20:21:45 gbazin Exp $
* $Id: directx.c,v 1.30 2003/12/23 02:11:27 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -352,16 +352,8 @@ static int Init( vout_thread_t *p_vout )
}
/* Change the window title bar text */
if( p_vout->p_sys->hparent )
; /* Do nothing */
else if( p_vout->p_sys->b_using_overlay )
SetWindowText( p_vout->p_sys->hwnd,
VOUT_TITLE " (hardware YUV overlay DirectX output)" );
else if( p_vout->p_sys->b_hw_yuv )
SetWindowText( p_vout->p_sys->hwnd,
VOUT_TITLE " (hardware YUV DirectX output)" );
else SetWindowText( p_vout->p_sys->hwnd,
VOUT_TITLE " (software RGB DirectX output)" );
if( p_vout->p_sys->hparent ) ; /* Do nothing */
else PostMessage( p_vout->p_sys->hwnd, WM_VLC_CHANGE_TEXT, 0, 0 );
return VLC_SUCCESS;
}
......
......@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: events.c,v 1.33 2003/12/16 22:10:56 gbazin Exp $
* $Id: events.c,v 1.34 2003/12/23 02:11:27 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -94,7 +94,7 @@ void DirectXEventThread( event_thread_t *p_event )
p_event->b_dead = VLC_TRUE;
}
/* signal the creation of the window */
/* Signal the creation of the window */
vlc_thread_ready( p_event );
/* Main loop */
......@@ -231,6 +231,17 @@ void DirectXEventThread( event_thread_t *p_event )
}
break;
case WM_VLC_CHANGE_TEXT:
if( p_event->p_vout->p_sys->b_using_overlay )
SetWindowText( p_event->p_vout->p_sys->hwnd,
VOUT_TITLE " (hardware YUV overlay DirectX output)" );
else if( p_event->p_vout->p_sys->b_hw_yuv )
SetWindowText( p_event->p_vout->p_sys->hwnd,
VOUT_TITLE " (hardware YUV DirectX output)" );
else SetWindowText( p_event->p_vout->p_sys->hwnd,
VOUT_TITLE " (software RGB DirectX output)" );
break;
default:
/* Messages we don't handle directly are dispatched to the
* window procedure */
......@@ -661,6 +672,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
}
else
{
msg_Warn( p_vout, "Created video sub-window" );
SetWindowLong( p_vout->p_sys->hvideownd,
GWL_WNDPROC, (LONG)DirectXVideoEventProc );
}
......
......@@ -2,7 +2,7 @@
* vout.h: Windows DirectX video output header file
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout.h,v 1.10 2003/12/11 23:12:46 gbazin Exp $
* $Id: vout.h,v 1.11 2003/12/23 02:11:27 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -126,5 +126,6 @@ void DirectXUpdateRects ( vout_thread_t *p_vout, vlc_bool_t b_force );
#define WM_VLC_HIDE_MOUSE WM_APP
#define WM_VLC_CREATE_VIDEO_WIN WM_APP + 1
#define WM_VLC_DESTROY_VIDEO_WIN WM_APP + 2
#define WM_VLC_CHANGE_TEXT WM_APP + 3
#define IDM_TOGGLE_ON_TOP WM_USER + 1
#define DX_POSITION_CHANGE 0x1000
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