Mercurial > mplayer.hg
changeset 20635:9ed557ae1383
Streamline and simplify internal vs external libdvdread handling.
author | diego |
---|---|
date | Fri, 03 Nov 2006 22:03:58 +0000 |
parents | 32b693286d0b |
children | 325db3f2aba3 |
files | Makefile configure stream/Makefile stream/stream.c stream/stream_dvd.c stream/stream_dvd.h |
diffstat | 6 files changed, 64 insertions(+), 101 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Fri Nov 03 21:52:35 2006 +0000 +++ b/Makefile Fri Nov 03 22:03:58 2006 +0000 @@ -114,7 +114,7 @@ ifeq ($(FAME),yes) PARTS += libfame endif -ifeq ($(DVDKIT2),yes) +ifeq ($(DVDREAD_INTERNAL),yes) PARTS += libdvdread PARTS += libdvdcss endif @@ -173,7 +173,7 @@ ifeq ($(FAME),yes) COMMON_DEPS += libfame/libfame.a endif -ifeq ($(DVDKIT2),yes) +ifeq ($(DVDREAD_INTERNAL),yes) COMMON_DEPS += libdvdread/libdvdread.a COMMON_LIBS += libdvdread/libdvdread.a COMMON_DEPS += libdvdcss/libdvdcss.a
--- a/configure Fri Nov 03 21:52:35 2006 +0000 +++ b/configure Fri Nov 03 22:03:58 2006 +0000 @@ -241,7 +241,7 @@ --enable-live enable LIVE555 Streaming Media support [autodetect] --disable-dvdnav disable libdvdnav support [autodetect] --disable-dvdread Disable libdvdread support [autodetect] - --disable-mpdvdkit Disable mpdvdkit2 support [autodetect] + --disable-dvdread-internal Disable internal libdvdread support [autodetect] --disable-cdparanoia Disable cdparanoia support [autodetect] --disable-bitmap-font Disable bitmap font support [enable] --disable-freetype Disable freetype2 font rendering support [autodetect] @@ -1641,11 +1641,10 @@ _faac=auto _ladspa=auto _xmms=no -_have_dvd=no _dvdnav=auto _dvdnavconfig=dvdnav-config _dvdread=auto -_mpdvdkit=auto +_dvdread_internal=auto _xanim=auto _real=auto _live=auto @@ -1878,8 +1877,8 @@ --disable-xmms) _xmms=no ;; --enable-dvdread) _dvdread=yes ;; --disable-dvdread) _dvdread=no ;; - --enable-mpdvdkit) _mpdvdkit=yes ;; - --disable-mpdvdkit) _mpdvdkit=no ;; + --enable-dvdread-internal) _dvdread_internal=yes ;; + --disable-dvdread-internal) _dvdread_internal=no ;; --enable-dvdnav) _dvdnav=yes ;; --disable-dvdnav) _dvdnav=no ;; --enable-xanim) _xanim=yes ;; @@ -5185,8 +5184,8 @@ _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`" _inputmodules="dvdnav $_inputmodules" - #disable mpdvdkit and dvdread checks: dvdread will be enabled using dvdnav's version of dvdread - _mpdvdkit=no + #disable dvdread checks: dvdread will be enabled using dvdnav's version of dvdread + _dvdread_internal=no _dvdread=yes else _def_dvdnav='#undef USE_DVDNAV' @@ -5194,47 +5193,22 @@ fi echores "$_dvdnav" -echocheck "DVD support (libmpdvdkit2)" -if test "$_mpdvdkit" = auto ; then - _mpdvdkit=no - if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux; then - _mpdvdkit=yes - fi -fi -if test "$_mpdvdkit" = yes ; then - if test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || test "$_dvdio" = yes || test "$_bsdi_dvd" = yes || test "$_hpux_scsi_h" = yes || darwin || win32 ; then - _inputmodules="mpdvdkit2 $_inputmodules" - _dvdread=libmpdvdkit2 - else - _noinputmodules="mpdvdkit2 $_noinputmodules" + +echocheck "dvdread" +if test "$_dvdread_internal" = auto ; then + _dvdread_internal=no + if linux || freebsd || netbsd || darwin || openbsd || win32 || sunos || hpux && \ + test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || \ + test "$_dvdio" = yes || test "$_bsdi_dvd" = yes || \ + test "$_hpux_scsi_h" = yes || darwin || win32 ; then + _dvdread_internal=yes + _dvdread=yes + _res_comment="internal" fi - _def_dvd_linux='#undef HAVE_LINUX_DVD_STRUCT' - _def_dvd_bsd='#undef HAVE_BSD_DVD_STRUCT' - _dev_dvd_openbsd='#undef HAVE_OPENBSD_DVD_STRUCT' - _def_dvd_darwin='#undef DARWIN_DVD_IOCTL' - if linux || netbsd || openbsd || bsdos ; then - _def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1' - if openbsd ; then - _dev_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1' - fi - else - if freebsd ; then - _def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1' - else - if darwin ; then - _def_dvd_darwin='#define DARWIN_DVD_IOCTL' - _macosx_frameworks="$_macosx_frameworks -framework IOKit" - fi - fi - fi -else - _noinputmodules="mpdvdkit2 $_noinputmodules" -fi -echores "$_mpdvdkit" - -echocheck "DVD support (libdvdread)" -if test "$_dvdread" = auto ; then - cat > $TMPC << EOF +elif test "$_dvdread" = auto ; then + _dvdread=no + if test "$_dl" = yes; then + cat > $TMPC << EOF #include <inttypes.h> #include <dvdread/dvd_reader.h> #include <dvdread/ifo_types.h> @@ -5242,46 +5216,37 @@ #include <dvdread/nav_read.h> int main(void) { return 0; } EOF - _dvdread=no - if test "$_dl" = yes; then - cc_check \ - -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \ - _dvdread=yes + cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + -ldvdread $_ld_dl && _dvdread=yes && _res_comment="external" fi fi -_def_mpdvdkit="#undef USE_MPDVDKIT" -case "$_dvdread" in - yes) - _largefiles=yes - _def_dvdread='#define USE_DVDREAD 1' - if test "$_dvdnav" != yes ; then - _ld_dvdread='-ldvdread' - fi - _inputmodules="dvdread $_inputmodules" - _have_dvd=yes - ;; - no) - _def_dvdread='#undef USE_DVDREAD' - _noinputmodules="dvdread $_noinputmodules" - ;; - libmpdvdkit2) - _largefiles=yes - _def_dvdread='#define USE_DVDREAD 1' - _noinputmodules="dvdread $_noinputmodules" - _def_mpdvdkit="#define USE_MPDVDKIT 2" - _have_dvd=yes - _dvdread=no - _res_comment="disabled by libmpdvdkit2" - ;; -esac + +if test "$_dvdread_internal" = yes; then + _def_dvdread_internal="#define USE_DVDREAD_INTERNAL 1" + _def_dvdread='#define USE_DVDREAD 1' + _inputmodules="dvdread $_noinputmodules" + _largefiles=yes + if linux || netbsd || openbsd || bsdos ; then + _def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1' + openbsd && _dev_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1' + elif freebsd ; then + _def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1' + elif darwin ; then + _def_dvd_darwin='#define DARWIN_DVD_IOCTL' + _macosx_frameworks="$_macosx_frameworks -framework IOKit" + fi +elif test "$_dvdread" = yes; then + _def_dvdread='#define USE_DVDREAD 1' + _inputmodules="dvdread $_inputmodules" + _largefiles=yes + test "$_dvdnav" != yes && _ld_dvdread='-ldvdread' +else + _def_dvdread_internal="#undef USE_DVDREAD_INTERNAL" + _def_dvdread='#undef USE_DVDREAD' + _noinputmodules="dvdread $_noinputmodules" +fi echores "$_dvdread" -if test "$_have_dvd" = yes ; then - _def_have_dvd='#define HAVE_DVD 1' -else - _def_have_dvd='#undef HAVE_DVD' -fi - echocheck "cdparanoia" if test "$_cdparanoia" = auto ; then @@ -7523,9 +7488,8 @@ TV_BSDBT848 = $_tv_bsdbt848 PVR = $_pvr VCD = $_vcd -HAVE_DVD = $_have_dvd DVDREAD = $_dvdread -DVDKIT2 = $_mpdvdkit +DVDREAD_INTERNAL = $_dvdread_internal DVDNAV = $_dvdnav WIN32DLL = $_win32 W32_DEP = $_dep_win32 @@ -7687,10 +7651,10 @@ /* Indicates that Ogle's libdvdread is available for DVD playback */ $_def_dvdread -/* Indicates that dvdread is from libmpdvdkit */ -$_def_mpdvdkit - -/* Additional options for libmpdvdkit*/ +/* Indicates that dvdread is internal */ +$_def_dvdread_internal + +/* Additional options for libdvdread/libdvdcss */ $_def_dvd $_def_cdrom $_def_cdio @@ -7703,7 +7667,6 @@ $_def_sol_scsi_h $_def_hpux_scsi_h $_def_stddef -$_def_have_dvd /* Common data directory (for fonts, etc) */ #define MPLAYER_DATADIR "$_datadir"
--- a/stream/Makefile Fri Nov 03 21:52:35 2006 +0000 +++ b/stream/Makefile Fri Nov 03 22:03:58 2006 +0000 @@ -25,7 +25,7 @@ stream_mf.c \ stream_null.c \ -ifeq ($(HAVE_DVD),yes) +ifeq ($(DVDREAD),yes) SRCS += stream_dvd.c endif ifeq ($(DVDNAV),yes)
--- a/stream/stream.c Fri Nov 03 21:52:35 2006 +0000 +++ b/stream/stream.c Fri Nov 03 22:03:58 2006 +0000 @@ -84,7 +84,7 @@ extern stream_info_t stream_info_null; extern stream_info_t stream_info_mf; extern stream_info_t stream_info_file; -#ifdef HAVE_DVD +#ifdef USE_DVDREAD extern stream_info_t stream_info_dvd; #endif @@ -131,7 +131,7 @@ &stream_info_smb, #endif &stream_info_cue, -#ifdef HAVE_DVD +#ifdef USE_DVDREAD &stream_info_dvd, #endif #ifdef USE_DVDNAV
--- a/stream/stream_dvd.c Fri Nov 03 21:52:35 2006 +0000 +++ b/stream/stream_dvd.c Fri Nov 03 22:03:58 2006 +0000 @@ -742,7 +742,7 @@ if(vts_file->vts_pgcit) { int i; for(i=0;i<8;i++) -#ifdef USE_MPDVDKIT +#ifdef USE_DVDREAD_INTERNAL if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i].present) { #else if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i] & 0x8000) { @@ -759,7 +759,7 @@ } d->audio_streams[d->nr_of_channels].language=language; -#ifdef USE_MPDVDKIT +#ifdef USE_DVDREAD_INTERNAL d->audio_streams[d->nr_of_channels].id=vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i].s_audio; #else d->audio_streams[d->nr_of_channels].id=vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i] >> 8 & 7; @@ -810,7 +810,7 @@ d->nr_of_subtitles=0; for(i=0;i<32;i++) -#ifdef USE_MPDVDKIT +#ifdef USE_DVDREAD_INTERNAL if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].present) { #else if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] & 0x80000000) { @@ -830,13 +830,13 @@ d->subtitles[ d->nr_of_subtitles ].language=language; d->subtitles[ d->nr_of_subtitles ].id=d->nr_of_subtitles; if(video->display_aspect_ratio == 0) /* 4:3 */ -#ifdef USE_MPDVDKIT +#ifdef USE_DVDREAD_INTERNAL d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].s_4p3; #else d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 24 & 31; #endif else if(video->display_aspect_ratio == 3) /* 16:9 */ -#ifdef USE_MPDVDKIT +#ifdef USE_DVDREAD_INTERNAL d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].s_lbox; #else d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 8 & 31;
--- a/stream/stream_dvd.h Fri Nov 03 21:52:35 2006 +0000 +++ b/stream/stream_dvd.h Fri Nov 03 22:03:58 2006 +0000 @@ -1,7 +1,7 @@ #ifdef USE_DVDREAD -#ifdef USE_MPDVDKIT +#ifdef USE_DVDREAD_INTERNAL #include "libdvdread/dvd_reader.h" #include "libdvdread/ifo_types.h" #include "libdvdread/ifo_read.h"