[Mplayer-cvslog] CVS: main/libmpdvdkit dvd_reader.c,1.7,1.8

Atmosfear atmos4 at mplayerhq.hu
Sun Jul 28 00:09:38 CEST 2002


Update of /cvsroot/mplayer/main/libmpdvdkit
In directory mail:/var/tmp.root/cvs-serv31142/libmpdvdkit

Modified Files:
	dvd_reader.c 
Log Message:
Allow dvd playback from hdd on cygwin/win32.


Index: dvd_reader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit/dvd_reader.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- dvd_reader.c	10 Jul 2002 03:01:33 -0000	1.7
+++ dvd_reader.c	27 Jul 2002 22:09:35 -0000	1.8
@@ -286,6 +286,8 @@
     mkdir( dir,493 );
 
 #if !defined(WIN32)
+/* moved win32 code to S_ISDIR block, so it can also read from dir :: atmos */    
+#if !defined(WIN32)
     /* First check if this is a block/char device or a file*/
     if( S_ISBLK( fileinfo.st_mode ) || 
 	S_ISCHR( fileinfo.st_mode ) || 
@@ -336,12 +338,16 @@
 
 	free( dir );
 	
-        return DVDOpenImageFile( device );
+	return DVDOpenImageFile( device );
 // ---
 
     }
+#endif /* !defined(WIN32) */	
 #if !defined(WIN32)
     else if( S_ISDIR( fileinfo.st_mode ) ) {
+#else
+    {
+#endif	    
 	dvd_reader_t *auth_drive = 0;
 	char *path_copy;
 #if defined(SYS_BSD)
@@ -437,6 +443,8 @@
             }
             fclose( mntfile );
 	}
+#elif defined(WIN32)	
+	auth_drive = DVDOpenImageFile( path );
 #endif
 	if( !auth_drive ) {
 	    fprintf( stderr, "libdvdread: Device inaccessible, "
@@ -464,7 +472,6 @@
 	fprintf( stderr, "libdvdread: Using normal filesystem access.\n" );
         return DVDOpenPath( path );
     }
-#endif
 
     /* If it's none of the above, screw it. */
     fprintf( stderr, "libdvdread: Could not open %s\n", path );




More information about the MPlayer-cvslog mailing list