mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
Streamline and simplify internal vs external libdvdread handling.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20651 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
630302ad63
commit
0384045e30
4
Makefile
4
Makefile
@ -114,7 +114,7 @@ endif
|
|||||||
ifeq ($(FAME),yes)
|
ifeq ($(FAME),yes)
|
||||||
PARTS += libfame
|
PARTS += libfame
|
||||||
endif
|
endif
|
||||||
ifeq ($(DVDKIT2),yes)
|
ifeq ($(DVDREAD_INTERNAL),yes)
|
||||||
PARTS += libdvdread
|
PARTS += libdvdread
|
||||||
PARTS += libdvdcss
|
PARTS += libdvdcss
|
||||||
endif
|
endif
|
||||||
@ -173,7 +173,7 @@ endif
|
|||||||
ifeq ($(FAME),yes)
|
ifeq ($(FAME),yes)
|
||||||
COMMON_DEPS += libfame/libfame.a
|
COMMON_DEPS += libfame/libfame.a
|
||||||
endif
|
endif
|
||||||
ifeq ($(DVDKIT2),yes)
|
ifeq ($(DVDREAD_INTERNAL),yes)
|
||||||
COMMON_DEPS += libdvdread/libdvdread.a
|
COMMON_DEPS += libdvdread/libdvdread.a
|
||||||
COMMON_LIBS += libdvdread/libdvdread.a
|
COMMON_LIBS += libdvdread/libdvdread.a
|
||||||
COMMON_DEPS += libdvdcss/libdvdcss.a
|
COMMON_DEPS += libdvdcss/libdvdcss.a
|
||||||
|
129
configure
vendored
129
configure
vendored
@ -241,7 +241,7 @@ Optional features:
|
|||||||
--enable-live enable LIVE555 Streaming Media support [autodetect]
|
--enable-live enable LIVE555 Streaming Media support [autodetect]
|
||||||
--disable-dvdnav disable libdvdnav support [autodetect]
|
--disable-dvdnav disable libdvdnav support [autodetect]
|
||||||
--disable-dvdread Disable libdvdread 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-cdparanoia Disable cdparanoia support [autodetect]
|
||||||
--disable-bitmap-font Disable bitmap font support [enable]
|
--disable-bitmap-font Disable bitmap font support [enable]
|
||||||
--disable-freetype Disable freetype2 font rendering support [autodetect]
|
--disable-freetype Disable freetype2 font rendering support [autodetect]
|
||||||
@ -1641,11 +1641,10 @@ _faad_fixed=no
|
|||||||
_faac=auto
|
_faac=auto
|
||||||
_ladspa=auto
|
_ladspa=auto
|
||||||
_xmms=no
|
_xmms=no
|
||||||
_have_dvd=no
|
|
||||||
_dvdnav=auto
|
_dvdnav=auto
|
||||||
_dvdnavconfig=dvdnav-config
|
_dvdnavconfig=dvdnav-config
|
||||||
_dvdread=auto
|
_dvdread=auto
|
||||||
_mpdvdkit=auto
|
_dvdread_internal=auto
|
||||||
_xanim=auto
|
_xanim=auto
|
||||||
_real=auto
|
_real=auto
|
||||||
_live=auto
|
_live=auto
|
||||||
@ -1878,8 +1877,8 @@ for ac_option do
|
|||||||
--disable-xmms) _xmms=no ;;
|
--disable-xmms) _xmms=no ;;
|
||||||
--enable-dvdread) _dvdread=yes ;;
|
--enable-dvdread) _dvdread=yes ;;
|
||||||
--disable-dvdread) _dvdread=no ;;
|
--disable-dvdread) _dvdread=no ;;
|
||||||
--enable-mpdvdkit) _mpdvdkit=yes ;;
|
--enable-dvdread-internal) _dvdread_internal=yes ;;
|
||||||
--disable-mpdvdkit) _mpdvdkit=no ;;
|
--disable-dvdread-internal) _dvdread_internal=no ;;
|
||||||
--enable-dvdnav) _dvdnav=yes ;;
|
--enable-dvdnav) _dvdnav=yes ;;
|
||||||
--disable-dvdnav) _dvdnav=no ;;
|
--disable-dvdnav) _dvdnav=no ;;
|
||||||
--enable-xanim) _xanim=yes ;;
|
--enable-xanim) _xanim=yes ;;
|
||||||
@ -5185,8 +5184,8 @@ if test "$_dvdnav" = yes ; then
|
|||||||
_inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
|
_inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
|
||||||
_inputmodules="dvdnav $_inputmodules"
|
_inputmodules="dvdnav $_inputmodules"
|
||||||
|
|
||||||
#disable mpdvdkit and dvdread checks: dvdread will be enabled using dvdnav's version of dvdread
|
#disable dvdread checks: dvdread will be enabled using dvdnav's version of dvdread
|
||||||
_mpdvdkit=no
|
_dvdread_internal=no
|
||||||
_dvdread=yes
|
_dvdread=yes
|
||||||
else
|
else
|
||||||
_def_dvdnav='#undef USE_DVDNAV'
|
_def_dvdnav='#undef USE_DVDNAV'
|
||||||
@ -5194,46 +5193,21 @@ else
|
|||||||
fi
|
fi
|
||||||
echores "$_dvdnav"
|
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"
|
|
||||||
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)"
|
echocheck "dvdread"
|
||||||
if test "$_dvdread" = auto ; then
|
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
|
||||||
|
elif test "$_dvdread" = auto ; then
|
||||||
|
_dvdread=no
|
||||||
|
if test "$_dl" = yes; then
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <dvdread/dvd_reader.h>
|
#include <dvdread/dvd_reader.h>
|
||||||
@ -5242,45 +5216,36 @@ if test "$_dvdread" = auto ; then
|
|||||||
#include <dvdread/nav_read.h>
|
#include <dvdread/nav_read.h>
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
EOF
|
EOF
|
||||||
_dvdread=no
|
cc_check -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \
|
||||||
if test "$_dl" = yes; then
|
-ldvdread $_ld_dl && _dvdread=yes && _res_comment="external"
|
||||||
cc_check \
|
|
||||||
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -ldvdread $_ld_dl && \
|
|
||||||
_dvdread=yes
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
_def_mpdvdkit="#undef USE_MPDVDKIT"
|
|
||||||
case "$_dvdread" in
|
if test "$_dvdread_internal" = yes; then
|
||||||
yes)
|
_def_dvdread_internal="#define USE_DVDREAD_INTERNAL 1"
|
||||||
_largefiles=yes
|
|
||||||
_def_dvdread='#define USE_DVDREAD 1'
|
_def_dvdread='#define USE_DVDREAD 1'
|
||||||
if test "$_dvdnav" != yes ; then
|
_inputmodules="dvdread $_noinputmodules"
|
||||||
_ld_dvdread='-ldvdread'
|
_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
|
fi
|
||||||
|
elif test "$_dvdread" = yes; then
|
||||||
|
_def_dvdread='#define USE_DVDREAD 1'
|
||||||
_inputmodules="dvdread $_inputmodules"
|
_inputmodules="dvdread $_inputmodules"
|
||||||
_have_dvd=yes
|
_largefiles=yes
|
||||||
;;
|
test "$_dvdnav" != yes && _ld_dvdread='-ldvdread'
|
||||||
no)
|
else
|
||||||
|
_def_dvdread_internal="#undef USE_DVDREAD_INTERNAL"
|
||||||
_def_dvdread='#undef USE_DVDREAD'
|
_def_dvdread='#undef USE_DVDREAD'
|
||||||
_noinputmodules="dvdread $_noinputmodules"
|
_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
|
|
||||||
echores "$_dvdread"
|
|
||||||
|
|
||||||
if test "$_have_dvd" = yes ; then
|
|
||||||
_def_have_dvd='#define HAVE_DVD 1'
|
|
||||||
else
|
|
||||||
_def_have_dvd='#undef HAVE_DVD'
|
|
||||||
fi
|
fi
|
||||||
|
echores "$_dvdread"
|
||||||
|
|
||||||
|
|
||||||
echocheck "cdparanoia"
|
echocheck "cdparanoia"
|
||||||
@ -7523,9 +7488,8 @@ TV_V4L2 = $_tv_v4l2
|
|||||||
TV_BSDBT848 = $_tv_bsdbt848
|
TV_BSDBT848 = $_tv_bsdbt848
|
||||||
PVR = $_pvr
|
PVR = $_pvr
|
||||||
VCD = $_vcd
|
VCD = $_vcd
|
||||||
HAVE_DVD = $_have_dvd
|
|
||||||
DVDREAD = $_dvdread
|
DVDREAD = $_dvdread
|
||||||
DVDKIT2 = $_mpdvdkit
|
DVDREAD_INTERNAL = $_dvdread_internal
|
||||||
DVDNAV = $_dvdnav
|
DVDNAV = $_dvdnav
|
||||||
WIN32DLL = $_win32
|
WIN32DLL = $_win32
|
||||||
W32_DEP = $_dep_win32
|
W32_DEP = $_dep_win32
|
||||||
@ -7687,10 +7651,10 @@ $_def_libcdio
|
|||||||
/* Indicates that Ogle's libdvdread is available for DVD playback */
|
/* Indicates that Ogle's libdvdread is available for DVD playback */
|
||||||
$_def_dvdread
|
$_def_dvdread
|
||||||
|
|
||||||
/* Indicates that dvdread is from libmpdvdkit */
|
/* Indicates that dvdread is internal */
|
||||||
$_def_mpdvdkit
|
$_def_dvdread_internal
|
||||||
|
|
||||||
/* Additional options for libmpdvdkit*/
|
/* Additional options for libdvdread/libdvdcss */
|
||||||
$_def_dvd
|
$_def_dvd
|
||||||
$_def_cdrom
|
$_def_cdrom
|
||||||
$_def_cdio
|
$_def_cdio
|
||||||
@ -7703,7 +7667,6 @@ $_def_dvd_darwin
|
|||||||
$_def_sol_scsi_h
|
$_def_sol_scsi_h
|
||||||
$_def_hpux_scsi_h
|
$_def_hpux_scsi_h
|
||||||
$_def_stddef
|
$_def_stddef
|
||||||
$_def_have_dvd
|
|
||||||
|
|
||||||
/* Common data directory (for fonts, etc) */
|
/* Common data directory (for fonts, etc) */
|
||||||
#define MPLAYER_DATADIR "$_datadir"
|
#define MPLAYER_DATADIR "$_datadir"
|
||||||
|
@ -25,7 +25,7 @@ SRCS += stream.c \
|
|||||||
stream_mf.c \
|
stream_mf.c \
|
||||||
stream_null.c \
|
stream_null.c \
|
||||||
|
|
||||||
ifeq ($(HAVE_DVD),yes)
|
ifeq ($(DVDREAD),yes)
|
||||||
SRCS += stream_dvd.c
|
SRCS += stream_dvd.c
|
||||||
endif
|
endif
|
||||||
ifeq ($(DVDNAV),yes)
|
ifeq ($(DVDNAV),yes)
|
||||||
|
@ -84,7 +84,7 @@ extern stream_info_t stream_info_cue;
|
|||||||
extern stream_info_t stream_info_null;
|
extern stream_info_t stream_info_null;
|
||||||
extern stream_info_t stream_info_mf;
|
extern stream_info_t stream_info_mf;
|
||||||
extern stream_info_t stream_info_file;
|
extern stream_info_t stream_info_file;
|
||||||
#ifdef HAVE_DVD
|
#ifdef USE_DVDREAD
|
||||||
extern stream_info_t stream_info_dvd;
|
extern stream_info_t stream_info_dvd;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ stream_info_t* auto_open_streams[] = {
|
|||||||
&stream_info_smb,
|
&stream_info_smb,
|
||||||
#endif
|
#endif
|
||||||
&stream_info_cue,
|
&stream_info_cue,
|
||||||
#ifdef HAVE_DVD
|
#ifdef USE_DVDREAD
|
||||||
&stream_info_dvd,
|
&stream_info_dvd,
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_DVDNAV
|
#ifdef USE_DVDNAV
|
||||||
|
@ -742,7 +742,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
|
|||||||
if(vts_file->vts_pgcit) {
|
if(vts_file->vts_pgcit) {
|
||||||
int i;
|
int i;
|
||||||
for(i=0;i<8;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) {
|
if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i].present) {
|
||||||
#else
|
#else
|
||||||
if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i] & 0x8000) {
|
if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i] & 0x8000) {
|
||||||
@ -759,7 +759,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
d->audio_streams[d->nr_of_channels].language=language;
|
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;
|
d->audio_streams[d->nr_of_channels].id=vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i].s_audio;
|
||||||
#else
|
#else
|
||||||
d->audio_streams[d->nr_of_channels].id=vts_file->vts_pgcit->pgci_srp[ttn].pgc->audio_control[i] >> 8 & 7;
|
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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
|
|||||||
|
|
||||||
d->nr_of_subtitles=0;
|
d->nr_of_subtitles=0;
|
||||||
for(i=0;i<32;i++)
|
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) {
|
if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].present) {
|
||||||
#else
|
#else
|
||||||
if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] & 0x80000000) {
|
if(vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] & 0x80000000) {
|
||||||
@ -830,13 +830,13 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
|
|||||||
d->subtitles[ d->nr_of_subtitles ].language=language;
|
d->subtitles[ d->nr_of_subtitles ].language=language;
|
||||||
d->subtitles[ d->nr_of_subtitles ].id=d->nr_of_subtitles;
|
d->subtitles[ d->nr_of_subtitles ].id=d->nr_of_subtitles;
|
||||||
if(video->display_aspect_ratio == 0) /* 4:3 */
|
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;
|
d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].s_4p3;
|
||||||
#else
|
#else
|
||||||
d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 24 & 31;
|
d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 24 & 31;
|
||||||
#endif
|
#endif
|
||||||
else if(video->display_aspect_ratio == 3) /* 16:9 */
|
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;
|
d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i].s_lbox;
|
||||||
#else
|
#else
|
||||||
d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 8 & 31;
|
d->subtitles[d->nr_of_subtitles].id = vts_file->vts_pgcit->pgci_srp[ttn].pgc->subp_control[i] >> 8 & 31;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#ifdef USE_DVDREAD
|
#ifdef USE_DVDREAD
|
||||||
|
|
||||||
#ifdef USE_MPDVDKIT
|
#ifdef USE_DVDREAD_INTERNAL
|
||||||
#include "libdvdread/dvd_reader.h"
|
#include "libdvdread/dvd_reader.h"
|
||||||
#include "libdvdread/ifo_types.h"
|
#include "libdvdread/ifo_types.h"
|
||||||
#include "libdvdread/ifo_read.h"
|
#include "libdvdread/ifo_read.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user