[MPlayer-dev-eng] [PATCH] mpdvdkit2 cygwin support
Arpi
arpi at thot.banki.hu
Thu Aug 15 00:06:50 CEST 2002
Hi,
> > Attached below is a patch against libmpdvdkit-2.1test as posted
> --- libmpdvdkit/dvd_reader.c 2002-08-10 08:42:26.000000000 -0500.
> @@ -422,6 +424,9 @@.
> }.
> fclose( mntfile );.
> }.
> +#elif defined(WIN32) .
> + dev_name = strdup(path);.
> + auth_drive = DVDOpenImageFile( path, have_css );.
> #endif.
> if( !dev_name ) {.
> fprintf( stderr, "libdvdread: Couldn't find device name.\n" );.
hmm. are you sure this patch is ok and working???
the DVDOpen() function's structure:
ret = stat( path, &fileinfo );
...
/* First check if this is a block/char device or a file*/
if( S_ISBLK( fileinfo.st_mode ) ||
S_ISCHR( fileinfo.st_mode ) ||
S_ISREG( fileinfo.st_mode ) ) {
(... open as raw device or image file using DVDOpenImageFile() ...)
} else if( S_ISDIR( fileinfo.st_mode ) ) {
/**
* If we're being asked to open a directory, check if that directory
* is the mountpoint for a DVD-ROM which we can use instead.
*/
(here you added:)
#elif defined(WIN32)
dev_name = strdup(path);
auth_drive = DVDOpenImageFile( path, have_css );
#endif
/**
* Otherwise, we now try to open the directory tree instead.
*/
return DVDOpenPath( path );
}
it would work only if cygwin handles DVD device as a directory(!) (S_ISDIR()
true) but it's really a raw device and can be open()'ed and read()'ed as
raw sectors? otherwise teh fallback method (DVDOpenPath()) would be OK.
A'rpi / Astral & ESP-team
--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
More information about the MPlayer-dev-eng
mailing list