Commit 712e7249 authored by Gildas Bazin's avatar Gildas Bazin

* 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.
parent 9305e95b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libdvdcss.c: DVD reading library. * libdvdcss.c: DVD reading library.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * 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: Stphane Borel <stef@via.ecp.fr> * Authors: Stphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -460,6 +460,8 @@ static int _dvdcss_close ( dvdcss_handle dvdcss ) ...@@ -460,6 +460,8 @@ static int _dvdcss_close ( dvdcss_handle dvdcss )
static int _dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks ) static int _dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks )
{ {
#if defined( WIN32 ) #if defined( WIN32 )
dvdcss->i_seekpos = i_blocks;
if( WIN2K ) if( WIN2K )
{ {
LARGE_INTEGER li_read; LARGE_INTEGER li_read;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_directx.c: Windows DirectX audio output method * aout_directx.c: Windows DirectX audio output method
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -40,10 +40,6 @@ ...@@ -40,10 +40,6 @@
#include <fcntl.h> /* open(), O_WRONLY */ #include <fcntl.h> /* open(), O_WRONLY */
#include <string.h> /* strerror() */ #include <string.h> /* strerror() */
#ifdef HAVE_UNISTD_H
# include <unistd.h> /* write(), close() */
#endif
#include <stdio.h> /* "intf_msg.h" */ #include <stdio.h> /* "intf_msg.h" */
#include <stdlib.h> /* calloc(), malloc(), free() */ #include <stdlib.h> /* calloc(), malloc(), free() */
...@@ -56,7 +52,7 @@ ...@@ -56,7 +52,7 @@
#if defined( _MSC_VER ) #if defined( _MSC_VER )
# include <dsound.h> # include <dsound.h>
#else #else
# include "directx.h" # include <directx.h>
#endif #endif
#include "audio_output.h" /* aout_thread_t */ #include "audio_output.h" /* aout_thread_t */
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* -dvd_udf to find files * -dvd_udf to find files
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * 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: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -389,6 +389,8 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -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 ) 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 * We have to load all title information
...@@ -486,11 +488,13 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -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_nb = p_dvd->i_angle_nb;
p_input->stream.p_selected_area->i_angle = p_dvd->i_angle; p_input->stream.p_selected_area->i_angle = p_dvd->i_angle;
#if 0
/* start at the beginning of the title */ /* start at the beginning of the title */
/* FIXME: create a conf option to select whether to restart /* FIXME: create a conf option to select whether to restart
* title or not */ * title or not */
p_input->stream.p_selected_area->i_tell = 0; p_input->stream.p_selected_area->i_tell = 0;
p_input->stream.p_selected_area->i_part = 1; p_input->stream.p_selected_area->i_part = 1;
#endif
/* /*
* Destroy obsolete ES by reinitializing program 0 * Destroy obsolete ES by reinitializing program 0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method * vout_xvideo.c: Xvideo video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN * 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> * Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -204,12 +204,42 @@ void _M( vout_getfunctions )( function_list_t * p_function_list ) ...@@ -204,12 +204,42 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
*****************************************************************************/ *****************************************************************************/
static int vout_Probe( probedata_t *p_data ) 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" ) ) if( TestMethod( VOUT_METHOD_VAR, "xvideo" ) )
{ {
return( 999 ); return( 999 );
} }
return( 60 ); return( 150 );
} }
/***************************************************************************** /*****************************************************************************
...@@ -266,6 +296,7 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -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 ) 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 ); XVideoDestroyWindow( p_vout );
XCloseDisplay( p_vout->p_sys->p_display ); XCloseDisplay( p_vout->p_sys->p_display );
free( p_vout->p_sys ); free( p_vout->p_sys );
...@@ -696,15 +727,15 @@ static int XVideoCheckForXv( Display *dpy ) ...@@ -696,15 +727,15 @@ static int XVideoCheckForXv( Display *dpy )
return( 1 ); return( 1 );
case XvBadExtension: case XvBadExtension:
intf_ErrMsg( "vout error: XvBadExtension" ); intf_WarnMsg( 3, "vout error: XvBadExtension" );
return( 0 ); return( 0 );
case XvBadAlloc: case XvBadAlloc:
intf_ErrMsg( "vout error: XvBadAlloc" ); intf_WarnMsg( 3, "vout error: XvBadAlloc" );
return( 0 ); return( 0 );
default: default:
intf_ErrMsg( "vout error: XvQueryExtension failed" ); intf_WarnMsg( 3, "vout error: XvQueryExtension failed" );
return( 0 ); return( 0 );
} }
} }
...@@ -1136,15 +1167,15 @@ static int XVideoGetPort( Display *dpy ) ...@@ -1136,15 +1167,15 @@ static int XVideoGetPort( Display *dpy )
break; break;
case XvBadExtension: case XvBadExtension:
intf_ErrMsg( "vout error: XvBadExtension for XvQueryAdaptors" ); intf_WarnMsg( 3, "vout error: XvBadExtension for XvQueryAdaptors" );
return( -1 ); return( -1 );
case XvBadAlloc: case XvBadAlloc:
intf_ErrMsg( "vout error: XvBadAlloc for XvQueryAdaptors" ); intf_WarnMsg( 3, "vout error: XvBadAlloc for XvQueryAdaptors" );
return( -1 ); return( -1 );
default: default:
intf_ErrMsg( "vout error: XvQueryAdaptors failed" ); intf_WarnMsg( 3, "vout error: XvQueryAdaptors failed" );
return( -1 ); return( -1 );
} }
...@@ -1190,7 +1221,7 @@ static int XVideoGetPort( Display *dpy ) ...@@ -1190,7 +1221,7 @@ static int XVideoGetPort( Display *dpy )
if( xv_port == -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 ); return( xv_port );
......
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