[MPlayer-dev-eng] [PATH] libmpdvdkit and tvi_bsdbt848 on NetBSD
Steven M. Schultz
sms at 2BSD.COM
Sun Apr 28 20:44:53 CEST 2002
Hi!
> From: Arpi <arpi at thot.banki.hu>
>
> from the prev patch, sugegsts that netbsd has linux-style dvd
Ah, ok. I have FreeBSD, Linux and BSD/OS systems but not a NetBSD
one (yet;)). I know FreeBSD has <dvdio.h> instead of <dvd.h>
> is there a way to detect the type of dvd struct, instead of hardwiring to
> os?
I was going to make that suggestion ;)
Testing for capabilities and .h files would be much better than
hardwiring by OS type.
My suggestion (which will work for FreeBSD and BSD/OS) is soemthing
like this:
Check for <dvdio.h>, if it exists then check that something like
"struct dvd_struct foo;" will compile. If it succeeds then "BSD"
style is present.
If the above does not work then look for <dvd.h> and try something
like "dvd_struct foo;". If that works then "Linux" style DVD handling
is present.
Perhaps it is also necessary to test for <cdrom.h> and <sys/cdio.h>.
More than one capability can be set I think (a system might have
both cdrom.h and dvd.h) - it shouldn't harm anything to include both.
Cheers,
Steven Schultz
sms at 2bsd.com
More information about the MPlayer-dev-eng
mailing list