Commit 1477cfb4 authored by Stéphane Borel's avatar Stéphane Borel

-removed some useless printf

-replaced dvdcss_title(,) with dvdcss_seek( ,,DVDCSS_SEEK_KEY )
parent b08376be
...@@ -106,7 +106,6 @@ static dvd_reader_t *DVDOpenPath( const char *path_root ) ...@@ -106,7 +106,6 @@ static dvd_reader_t *DVDOpenPath( const char *path_root )
{ {
dvd_reader_t *dvd; dvd_reader_t *dvd;
fprintf(stderr, "libdvdread: opening %s as folder\n", path_root );
dvd = (dvd_reader_t *) malloc( sizeof( dvd_reader_t ) ); dvd = (dvd_reader_t *) malloc( sizeof( dvd_reader_t ) );
if( !dvd ) return 0; if( !dvd ) return 0;
dvd->isImageFile = 0; dvd->isImageFile = 0;
...@@ -289,7 +288,6 @@ dvd_reader_t *DVDOpen( const char *path ) ...@@ -289,7 +288,6 @@ dvd_reader_t *DVDOpen( const char *path )
break; break;
} }
} }
fprintf(stderr, "libdvdread: mounted device %p\n", me );
fclose( mntfile ); fclose( mntfile );
} }
#endif #endif
...@@ -308,7 +306,6 @@ dvd_reader_t *DVDOpen( const char *path ) ...@@ -308,7 +306,6 @@ dvd_reader_t *DVDOpen( const char *path )
/** /**
* Otherwise, we now try to open the directory tree instead. * Otherwise, we now try to open the directory tree instead.
*/ */
fprintf( stderr, "libdvdread: Using normal filesystem access.\n" );
return DVDOpenPath( path ); return DVDOpenPath( path );
} }
...@@ -338,7 +335,6 @@ static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, char *filename ) ...@@ -338,7 +335,6 @@ static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, char *filename )
start = UDFFindFile( dvd, filename, &len ); start = UDFFindFile( dvd, filename, &len );
if( !start ) return 0; if( !start ) return 0;
fprintf( stderr, "libdvdread: opening %s as image\n", filename );
dvd_file = (dvd_file_t *) malloc( sizeof( dvd_file_t ) ); dvd_file = (dvd_file_t *) malloc( sizeof( dvd_file_t ) );
if( !dvd_file ) return 0; if( !dvd_file ) return 0;
dvd_file->dvd = dvd; dvd_file->dvd = dvd;
...@@ -420,7 +416,6 @@ static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, char *filename ) ...@@ -420,7 +416,6 @@ static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, char *filename )
/* Get the full path of the file. */ /* Get the full path of the file. */
if( !findDVDFile( dvd, filename, full_path ) ) return 0; if( !findDVDFile( dvd, filename, full_path ) ) return 0;
fprintf( stderr, "libdvdread: opening %s as file\n", full_path );
dev = pf_dvd_open( full_path ); dev = pf_dvd_open( full_path );
if( dev == NULL ) return 0; if( dev == NULL ) return 0;
...@@ -451,7 +446,6 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *dvd, int title, int menu ) ...@@ -451,7 +446,6 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *dvd, int title, int menu )
uint32_t start, len; uint32_t start, len;
dvd_file_t *dvd_file; dvd_file_t *dvd_file;
fprintf( stderr, "libdvdread: opening VOB as image\n" );
if( title == 0 ) { if( title == 0 ) {
sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" ); sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
} else { } else {
...@@ -496,7 +490,6 @@ static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int menu ) ...@@ -496,7 +490,6 @@ static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int menu )
dvd_file_t *dvd_file; dvd_file_t *dvd_file;
int i; int i;
fprintf( stderr, "libdvdread: opening VOB as file\n" );
dvd_file = (dvd_file_t *) malloc( sizeof( dvd_file_t ) ); dvd_file = (dvd_file_t *) malloc( sizeof( dvd_file_t ) );
if( !dvd_file ) return 0; if( !dvd_file ) return 0;
dvd_file->dvd = dvd; dvd_file->dvd = dvd;
...@@ -532,7 +525,7 @@ static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int menu ) ...@@ -532,7 +525,7 @@ static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int menu )
} }
dvd_file->title_sizes[ 0 ] = fileinfo.st_size / DVD_VIDEO_LB_LEN; dvd_file->title_sizes[ 0 ] = fileinfo.st_size / DVD_VIDEO_LB_LEN;
dvd_file->title_devs[ 0 ] = dev; dvd_file->title_devs[ 0 ] = dev;
pf_dvd_title( dvd_file->title_devs[0], 0 ); pf_dvd_seek( dvd_file->title_devs[0], 0, DVDCSS_SEEK_KEY );
dvd_file->filesize = dvd_file->title_sizes[ 0 ]; dvd_file->filesize = dvd_file->title_sizes[ 0 ];
} else { } else {
...@@ -550,7 +543,7 @@ static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int menu ) ...@@ -550,7 +543,7 @@ static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int menu )
dvd_file->title_sizes[ i ] = fileinfo.st_size / DVD_VIDEO_LB_LEN; dvd_file->title_sizes[ i ] = fileinfo.st_size / DVD_VIDEO_LB_LEN;
dvd_file->title_devs[ i ] = pf_dvd_open( full_path ); dvd_file->title_devs[ i ] = pf_dvd_open( full_path );
pf_dvd_title( dvd_file->title_devs[i], 0 ); pf_dvd_seek( dvd_file->title_devs[i], 0, DVDCSS_SEEK_KEY );
dvd_file->filesize += dvd_file->title_sizes[ i ]; dvd_file->filesize += dvd_file->title_sizes[ i ];
} }
if( !(dvd_file->title_sizes[ 0 ]) ) { if( !(dvd_file->title_sizes[ 0 ]) ) {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
/** /**
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: dvd_setup.c,v 1.1 2002/01/23 03:15:31 stef Exp $ * $Id: dvd_setup.c,v 1.2 2002/01/23 03:56:51 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -86,14 +86,6 @@ static int dvd_seek ( dvd_handle dev, int i_blocks, int i_flags ) ...@@ -86,14 +86,6 @@ static int dvd_seek ( dvd_handle dev, int i_blocks, int i_flags )
return i_read / DVD_VIDEO_LB_LEN; return i_read / DVD_VIDEO_LB_LEN;
} }
/**
* dvd_title: crack the current title key if needed.
*/
static int dvd_title ( dvd_handle dev, int i_block )
{
return 0;
}
/** /**
* dvd_read: read data from the device. * dvd_read: read data from the device.
*/ */
...@@ -150,16 +142,14 @@ void DVDSetupRead( void ) ...@@ -150,16 +142,14 @@ void DVDSetupRead( void )
{ {
pf_dvd_open = dlsym( dvdcss_library, "dvdcss_open" ); pf_dvd_open = dlsym( dvdcss_library, "dvdcss_open" );
pf_dvd_close = dlsym( dvdcss_library, "dvdcss_close" ); pf_dvd_close = dlsym( dvdcss_library, "dvdcss_close" );
pf_dvd_title = dlsym( dvdcss_library, "dvdcss_title" );
pf_dvd_seek = dlsym( dvdcss_library, "dvdcss_seek" ); pf_dvd_seek = dlsym( dvdcss_library, "dvdcss_seek" );
pf_dvd_read = dlsym( dvdcss_library, "dvdcss_read" ); pf_dvd_read = dlsym( dvdcss_library, "dvdcss_read" );
pf_dvd_readv = dlsym( dvdcss_library, "dvdcss_readv" ); pf_dvd_readv = dlsym( dvdcss_library, "dvdcss_readv" );
pf_dvd_error = dlsym( dvdcss_library, "dvdcss_error" ); pf_dvd_error = dlsym( dvdcss_library, "dvdcss_error" );
if( pf_dvd_open == NULL || pf_dvd_close == NULL if( pf_dvd_open == NULL || pf_dvd_close == NULL
|| pf_dvd_title == NULL || pf_dvd_seek == NULL || pf_dvd_seek == NULL || pf_dvd_read == NULL
|| pf_dvd_read == NULL || pf_dvd_readv == NULL || pf_dvd_readv == NULL || pf_dvd_error == NULL )
|| pf_dvd_error == NULL )
{ {
fprintf( stderr, "libdvdread: Missing symbols in libdvdcss.so.1, " fprintf( stderr, "libdvdread: Missing symbols in libdvdcss.so.1, "
"this shouldn't happen !" ); "this shouldn't happen !" );
...@@ -182,7 +172,6 @@ void DVDSetupRead( void ) ...@@ -182,7 +172,6 @@ void DVDSetupRead( void )
/* Replacement functions */ /* Replacement functions */
pf_dvd_open = dvd_open; pf_dvd_open = dvd_open;
pf_dvd_close = dvd_close; pf_dvd_close = dvd_close;
pf_dvd_title = dvd_title;
pf_dvd_seek = dvd_seek; pf_dvd_seek = dvd_seek;
pf_dvd_read = dvd_read; pf_dvd_read = dvd_read;
pf_dvd_readv = dvd_readv; pf_dvd_readv = dvd_readv;
...@@ -194,7 +183,6 @@ void DVDSetupRead( void ) ...@@ -194,7 +183,6 @@ void DVDSetupRead( void )
{ {
pf_dvd_open = dvdcss_open; pf_dvd_open = dvdcss_open;
pf_dvd_close = dvdcss_close; pf_dvd_close = dvdcss_close;
pf_dvd_title = dvdcss_title;
pf_dvd_seek = dvdcss_seek; pf_dvd_seek = dvdcss_seek;
pf_dvd_read = dvdcss_read; pf_dvd_read = dvdcss_read;
pf_dvd_readv = dvdcss_readv; pf_dvd_readv = dvdcss_readv;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
/* Copyright (C) 2001 VideoLAN /* Copyright (C) 2001 VideoLAN
* $Id: dvd_setup.h,v 1.1 2002/01/23 03:15:31 stef Exp $ * $Id: dvd_setup.h,v 1.2 2002/01/23 03:56:51 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -52,7 +52,6 @@ typedef struct dvdcss_s* dvd_handle; ...@@ -52,7 +52,6 @@ typedef struct dvdcss_s* dvd_handle;
*/ */
dvd_handle (*pf_dvd_open) ( char * ); dvd_handle (*pf_dvd_open) ( char * );
int (*pf_dvd_close) ( dvd_handle ); int (*pf_dvd_close) ( dvd_handle );
int (*pf_dvd_title) ( dvd_handle, int );
int (*pf_dvd_seek) ( dvd_handle, int, int ); int (*pf_dvd_seek) ( dvd_handle, int, int );
int (*pf_dvd_read) ( dvd_handle, void *, int, int ); int (*pf_dvd_read) ( dvd_handle, void *, int, int );
int (*pf_dvd_readv) ( dvd_handle, void *, int, int ); int (*pf_dvd_readv) ( dvd_handle, void *, int, int );
......
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