From: Gildas Bazin Date: Mon, 30 Jul 2001 18:56:36 +0000 (+0000) Subject: * Fixed a Win32 bug in libdvdcss. This bug was appearing on title change. X-Git-Tag: 0.2.83~31 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=712e724961fb491e49cb2aaed1e5c6b9eb6d1053;p=vlc * Fixed a Win32 bug in libdvdcss. This bug was appearing on title change. * Modified input_dvd so you can now go directly to the selected chapter when you change the title. * Implemented the Probe function in the Xvideo plugin. Xvideo is now the default video output plugin when it is supported. --- diff --git a/extras/libdvdcss/libdvdcss.c b/extras/libdvdcss/libdvdcss.c index ade73a0ca8..30b037f43a 100644 --- a/extras/libdvdcss/libdvdcss.c +++ b/extras/libdvdcss/libdvdcss.c @@ -2,7 +2,7 @@ * 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 * Samuel Hocevar @@ -460,6 +460,8 @@ static int _dvdcss_close ( dvdcss_handle dvdcss ) static int _dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks ) { #if defined( WIN32 ) + dvdcss->i_seekpos = i_blocks; + if( WIN2K ) { LARGE_INTEGER li_read; diff --git a/plugins/directx/aout_directx.c b/plugins/directx/aout_directx.c index 61f4728a3b..2b2892ff14 100644 --- a/plugins/directx/aout_directx.c +++ b/plugins/directx/aout_directx.c @@ -2,7 +2,7 @@ * 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 * @@ -40,10 +40,6 @@ #include /* open(), O_WRONLY */ #include /* strerror() */ -#ifdef HAVE_UNISTD_H -# include /* write(), close() */ -#endif - #include /* "intf_msg.h" */ #include /* calloc(), malloc(), free() */ @@ -56,7 +52,7 @@ #if defined( _MSC_VER ) # include #else -# include "directx.h" +# include #endif #include "audio_output.h" /* aout_thread_t */ diff --git a/plugins/dvd/input_dvd.c b/plugins/dvd/input_dvd.c index 5a3b68f092..26ff4cf115 100644 --- a/plugins/dvd/input_dvd.c +++ b/plugins/dvd/input_dvd.c @@ -10,7 +10,7 @@ * -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 * @@ -389,6 +389,8 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) 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 @@ -486,11 +488,13 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) 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 diff --git a/plugins/x11/vout_xvideo.c b/plugins/x11/vout_xvideo.c index b7daae1a4a..38b7cde503 100644 --- a/plugins/x11/vout_xvideo.c +++ b/plugins/x11/vout_xvideo.c @@ -2,7 +2,7 @@ * 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 * Vincent Seguin @@ -204,12 +204,42 @@ void _M( vout_getfunctions )( function_list_t * p_function_list ) *****************************************************************************/ 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 ); } /***************************************************************************** @@ -266,6 +296,7 @@ static int vout_Create( vout_thread_t *p_vout ) 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 ); @@ -696,15 +727,15 @@ static int XVideoCheckForXv( Display *dpy ) 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 ); } } @@ -1136,15 +1167,15 @@ static int XVideoGetPort( Display *dpy ) 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 ); } @@ -1190,7 +1221,7 @@ static int XVideoGetPort( Display *dpy ) 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 );