Commit 112b3738 authored by gbazin's avatar gbazin
Browse files

* don't try to stat() the dvd drive letter on win32
* disabled YUV overlay double buffering for now, as it seems to actually be
    slower.
* temporary fix in vlc_cond_signal() for win32 (I really should use
    SignalObjectAndWait() on WinNT so we can avoid race conditions in the
    pthread code). This fixes a problem noticed on WinXP where vlc would
    freeze regularly and eat-up all the CPU (fun no?)
parent 6ce92ec7
......@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: threads.h,v 1.37 2002/03/01 00:33:18 massiot Exp $
* $Id: threads.h,v 1.38 2002/03/28 10:17:06 gbazin Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -588,13 +588,7 @@ static __inline__ int vlc_cond_signal( vlc_cond_t *p_condvar )
/* Release one waiting thread if one is available. */
/* For this trick to work properly, the vlc_cond_signal must be surrounded
* by a mutex. This will prevent another thread from stealing the signal */
int i_waiting_threads = p_condvar->i_waiting_threads;
while( p_condvar->i_waiting_threads
&& p_condvar->i_waiting_threads == i_waiting_threads )
{
PulseEvent( p_condvar->signal );
Sleep( 0 ); /* deschedule the current thread */
}
PulseEvent( p_condvar->signal );
return 0;
#endif
......
......@@ -2,7 +2,7 @@
* vout_directx.c: Windows DirectX video output display method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: vout_directx.c,v 1.27 2002/03/21 22:10:32 gbazin Exp $
* $Id: vout_directx.c,v 1.28 2002/03/28 10:17:06 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -133,8 +133,7 @@ static int vout_Create( vout_thread_t *p_vout )
p_vout->p_sys->b_event_thread_die = 0;
p_vout->p_sys->b_caps_overlay_clipping = 0;
SetRectEmpty( &p_vout->p_sys->rect_display );
p_vout->p_sys->b_using_overlay =
!config_GetIntVariable( "nooverlay" );
p_vout->p_sys->b_using_overlay = !config_GetIntVariable( "nooverlay" );
p_vout->p_sys->b_cursor = 1;
......@@ -470,6 +469,7 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
else /* using overlay */
{
#if 0
/* Flip the overlay buffers */
dxresult = IDirectDrawSurface3_Flip( p_pic->p_sys->p_front_surface,
NULL, DDFLIP_WAIT );
......@@ -488,6 +488,7 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
if( dxresult != DD_OK )
intf_WarnMsg( 8, "vout: couldn't flip overlay surface" );
#endif
if( !DirectXGetSurfaceDesc( p_pic ) )
{
......@@ -753,11 +754,11 @@ static int DirectXCreateSurface( vout_thread_t *p_vout,
ddsd.dwFlags = DDSD_CAPS |
DDSD_HEIGHT |
DDSD_WIDTH |
DDSD_BACKBUFFERCOUNT |
//DDSD_BACKBUFFERCOUNT |
DDSD_PIXELFORMAT;
ddsd.ddsCaps.dwCaps = DDSCAPS_OVERLAY |
DDSCAPS_COMPLEX |
DDSCAPS_FLIP |
//DDSCAPS_COMPLEX |
//DDSCAPS_FLIP |
DDSCAPS_VIDEOMEMORY;
ddsd.dwHeight = p_vout->render.i_height;
ddsd.dwWidth = p_vout->render.i_width;
......@@ -1022,7 +1023,7 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic,
else p_vout->p_sys->b_using_overlay = 0;
}
/* As we can't have overlays, will try to create plain RBG surfaces in
/* As we can't have overlays, we'll try to create plain RBG surfaces in
* system memory. These surfaces will then be blitted onto the primary
* surface (display) so they can be displayed */
if( !p_vout->p_sys->b_using_overlay )
......@@ -1195,7 +1196,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
p_pic->V_PIXELS = p_pic->U_PIXELS
+ p_pic->p[U_PLANE].i_lines * p_pic->p[U_PLANE].i_pitch;
p_pic->p[V_PLANE].i_lines = p_vout->output.i_height / 2;
p_pic->p[V_PLANE].i_pitch = p_pic->p[U_PLANE].i_pitch;
p_pic->p[V_PLANE].i_pitch = p_pic->p[Y_PLANE].i_pitch / 2;
p_pic->p[V_PLANE].i_pixel_bytes = 1;
p_pic->p[V_PLANE].b_margin = 0;
......@@ -1308,7 +1309,7 @@ static int DirectXGetSurfaceDesc( picture_t *p_pic )
p_pic->p_sys->ddsd.dwSize = sizeof(DDSURFACEDESC);
dxresult = IDirectDrawSurface3_Lock( p_pic->p_sys->p_surface,
NULL, &p_pic->p_sys->ddsd,
DDLOCK_NOSYSLOCK | DDLOCK_WAIT,
DDLOCK_NOSYSLOCK,
NULL );
if ( dxresult == DDERR_SURFACELOST )
{
......
......@@ -8,7 +8,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_access.c,v 1.10 2002/03/19 12:48:01 gbazin Exp $
* $Id: dvd_access.c,v 1.11 2002/03/28 10:17:06 gbazin Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -784,6 +784,7 @@ static char * DVDParse( input_thread_t * p_input )
psz_device = config_GetPszVariable( "dvd_device" );
}
#ifndef WIN32
/* check block device */
if( stat( psz_device, &stat_info ) == -1 )
{
......@@ -793,7 +794,6 @@ static char * DVDParse( input_thread_t * p_input )
return NULL;
}
#ifndef WIN32
if( !S_ISBLK(stat_info.st_mode) && !S_ISCHR(stat_info.st_mode) )
{
intf_WarnMsg( 3, "input: DVD plugin discarded"
......
Supports Markdown
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