* libdvdcss.c: DVD reading library.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: libdvdcss.c,v 1.12 2001/07/30 00:53:04 sam Exp $
+ * $Id: libdvdcss.c,v 1.13 2001/07/30 18:56:35 gbazin Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
static int _dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks )
{
#if defined( WIN32 )
+ dvdcss->i_seekpos = i_blocks;
+
if( WIN2K )
{
LARGE_INTEGER li_read;
* aout_directx.c: Windows DirectX audio output method
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: aout_directx.c,v 1.7 2001/07/30 00:53:04 sam Exp $
+ * $Id: aout_directx.c,v 1.8 2001/07/30 18:56:36 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#include <fcntl.h> /* open(), O_WRONLY */
#include <string.h> /* strerror() */
-#ifdef HAVE_UNISTD_H
-# include <unistd.h> /* write(), close() */
-#endif
-
#include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */
#if defined( _MSC_VER )
# include <dsound.h>
#else
-# include "directx.h"
+# include <directx.h>
#endif
#include "audio_output.h" /* aout_thread_t */
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.82 2001/07/30 00:53:05 sam Exp $
+ * $Id: input_dvd.c,v 1.83 2001/07/30 18:56:35 gbazin Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
if( p_area != p_input->stream.p_selected_area )
{
+ /* Reset the Chapter position of the old title */
+ p_input->stream.p_selected_area->i_part = 0;
/*
* We have to load all title information
p_input->stream.p_selected_area->i_angle_nb = p_dvd->i_angle_nb;
p_input->stream.p_selected_area->i_angle = p_dvd->i_angle;
+#if 0
/* start at the beginning of the title */
/* FIXME: create a conf option to select whether to restart
* title or not */
p_input->stream.p_selected_area->i_tell = 0;
p_input->stream.p_selected_area->i_part = 1;
+#endif
/*
* Destroy obsolete ES by reinitializing program 0
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
- * $Id: vout_xvideo.c,v 1.22 2001/07/10 06:07:53 gbazin Exp $
+ * $Id: vout_xvideo.c,v 1.23 2001/07/30 18:56:36 gbazin Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
*****************************************************************************/
static int vout_Probe( probedata_t *p_data )
{
+ Display *p_display; /* display pointer */
+ char *psz_display;
+
+ /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
+ psz_display = XDisplayName( main_GetPszVariable(VOUT_DISPLAY_VAR, NULL) );
+ p_display = XOpenDisplay( psz_display );
+ if( p_display == NULL ) /* error */
+ {
+ intf_WarnMsg( 3, "vout: Xvideo cannot open display %s", psz_display );
+ intf_WarnMsg( 3, "vout: Xvideo not supported" );
+ return( 0 );
+ }
+
+ if( !XVideoCheckForXv( p_display ) )
+ {
+ intf_WarnMsg( 3, "vout: Xvideo not supported" );
+ XCloseDisplay( p_display );
+ return( 0 );
+ }
+
+ if( XVideoGetPort( p_display ) < 0 )
+ {
+ intf_WarnMsg( 3, "vout: Xvideo not supported" );
+ XCloseDisplay( p_display );
+ return( 0 );
+ }
+
+ /* Clean-up everyting */
+ XCloseDisplay( p_display );
+
if( TestMethod( VOUT_METHOD_VAR, "xvideo" ) )
{
return( 999 );
}
- return( 60 );
+ return( 150 );
}
/*****************************************************************************
if( (p_vout->p_sys->xv_port = XVideoGetPort( p_vout->p_sys->p_display ))<0 )
{
+ intf_ErrMsg( "vout error: cannot get XVideo port" );
XVideoDestroyWindow( p_vout );
XCloseDisplay( p_vout->p_sys->p_display );
free( p_vout->p_sys );
return( 1 );
case XvBadExtension:
- intf_ErrMsg( "vout error: XvBadExtension" );
+ intf_WarnMsg( 3, "vout error: XvBadExtension" );
return( 0 );
case XvBadAlloc:
- intf_ErrMsg( "vout error: XvBadAlloc" );
+ intf_WarnMsg( 3, "vout error: XvBadAlloc" );
return( 0 );
default:
- intf_ErrMsg( "vout error: XvQueryExtension failed" );
+ intf_WarnMsg( 3, "vout error: XvQueryExtension failed" );
return( 0 );
}
}
break;
case XvBadExtension:
- intf_ErrMsg( "vout error: XvBadExtension for XvQueryAdaptors" );
+ intf_WarnMsg( 3, "vout error: XvBadExtension for XvQueryAdaptors" );
return( -1 );
case XvBadAlloc:
- intf_ErrMsg( "vout error: XvBadAlloc for XvQueryAdaptors" );
+ intf_WarnMsg( 3, "vout error: XvBadAlloc for XvQueryAdaptors" );
return( -1 );
default:
- intf_ErrMsg( "vout error: XvQueryAdaptors failed" );
+ intf_WarnMsg( 3, "vout error: XvQueryAdaptors failed" );
return( -1 );
}
if( xv_port == -1 )
{
- intf_ErrMsg( "vout error: no suitable Xvideo image input port" );
+ intf_WarnMsg( 3, "vout: no suitable Xvideo image input port" );
}
return( xv_port );