[MPlayer-dev-eng] fix dynamic dvd drive selection on darwin

Emanuele Giaquinta e.giaquinta at glauco.it
Sat Nov 19 16:16:36 CET 2005


> On Sat, Nov 19, 2005 at 03:41:10AM +0100, Emanuele Giaquinta wrote:
> > Forget the previous patch for now; I've found that dvd_reader.c does not
> > define SYS_BSD on osx, as it should, cause there is no test for
> > __APPLE__
> 
> You mean no configure test?

No, I meant there isn't a preprocessor test on __APPLE__ at line 39 of
dvd_reader.c, and the patch adds it.

> 
> > and __DARWIN__ is not defined on osx.
> 
> You mean in MPlayer or OS X in general?

The latter.

> 
> > The attached patch
> > fixes this.  Now, since the rdisk devices are raw, how can the dynamic
> > dvd selection ever work?  DVDOpen just calls DVDOpenImageFile in the
> > SYS_BSD case, which is the right one, and its return value is not a valid
> > way to check that the device is associated to a dvd drive.  IMO it is
> > better to revert to the traditional behaviour using rdisk1 as the
> > default dvd device.
> 
> I'd apply this patch, but does it fix the problem in the end?

No, and I think it's cleaner to just try to open the default dvd device
as on the other os, since to detect the device properly DVDOpen is not
enough and you should use something like ifoOpen, which sounds like a
dirty hack.  The dynamic dvd detection currently works only if the first
device, rdisk1, is the dvd drive, which is the same as trying to just
open rdisk1.




More information about the MPlayer-dev-eng mailing list