* 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>
/* 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
* 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>
*
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;
else /* using overlay */
{
+#if 0
/* Flip the overlay buffers */
dxresult = IDirectDrawSurface3_Flip( p_pic->p_sys->p_front_surface,
NULL, DDFLIP_WAIT );
if( dxresult != DD_OK )
intf_WarnMsg( 8, "vout: couldn't flip overlay surface" );
+#endif
if( !DirectXGetSurfaceDesc( p_pic ) )
{
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;
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 )
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;
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 )
{
* -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: Stéphane Borel <stef@via.ecp.fr>
*
psz_device = config_GetPszVariable( "dvd_device" );
}
+#ifndef WIN32
/* check block device */
if( stat( psz_device, &stat_info ) == -1 )
{
return NULL;
}
-#ifndef WIN32
if( !S_ISBLK(stat_info.st_mode) && !S_ISCHR(stat_info.st_mode) )
{
intf_WarnMsg( 3, "input: DVD plugin discarded"