[MPlayer-dev-eng] CYGWIN reading a dvd from a directory

Diego Biurrun diego at biurrun.de
Mon May 16 18:49:33 CEST 2005


On Tue, Apr 26, 2005 at 02:49:59PM +0200, Bjorn.Hermansson at teliasonera.com wrote:
> I would like to suggest to modify file libmpdvdkit2/dvd_reader.c
> to make Mplayer able to play a dvd from a hard drive directory when
> compiled in the CYGWIN environment.

What do you mean by playing a DVD from the hard drive?  Do you mean
copying a VOB file from the DVD to the hard drive?  How do you
accomplish that?

You need to send a unified diff (diff -u).  I attached your changes as a
patch to this mail.

> I am not sure if the WIN32 to __MINGW32__ substitution is correct when using MINGW!

It is correct.

Diego
-------------- next part --------------
Index: libmpdvdkit2/dvd_reader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/dvd_reader.c,v
retrieving revision 1.12
diff -u -r1.12 dvd_reader.c
--- libmpdvdkit2/dvd_reader.c	11 Mar 2005 02:40:28 -0000	1.12
+++ libmpdvdkit2/dvd_reader.c	16 May 2005 16:46:42 -0000
@@ -45,7 +45,7 @@
 #include </usr/conf/h/mnttab.h>
 #elif defined(SYS_BSD)
 #include <fstab.h>
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__CYGWIN__)
 #include <mntent.h>
 #endif
 
@@ -320,7 +320,7 @@
 	char *path_copy;
 #if defined(SYS_BSD)
 	struct fstab* fe;
-#elif defined(__sun) || defined(__linux__)
+#elif defined(__sun) || defined(__linux__) || defined(__CYGWIN__)
 	FILE *mntfile;
 #endif
 
@@ -393,7 +393,7 @@
 	    }
 	    fclose( mntfile );
 	}
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__CYGWIN__)
         mntfile = fopen( MOUNTED, "r" );
         if( mntfile ) {
             struct mntent *me;
@@ -412,7 +412,7 @@
             }
             fclose( mntfile );
 	}
-#elif defined(WIN32)	
+#elif defined(__MINGW32__)	
 	dev_name = strdup(path);
 	auth_drive = DVDOpenImageFile( path, have_css );
 #endif


More information about the MPlayer-dev-eng mailing list