From 3d91be0230447a60d737f17e623b4c17527af37a Mon Sep 17 00:00:00 2001 From: nicodvb Date: Wed, 14 Dec 2005 21:52:41 +0000 Subject: fix compilation when dvdkit and dvdread are not available git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17192 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 14 ++++++++++++++ libmpdemux/Makefile | 4 +++- libmpdemux/open.c | 4 ++++ libmpdemux/stream.c | 4 ++++ libmpdemux/stream_dvd.c | 10 ++++++---- 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 2dce10935c..73269e808a 100755 --- a/configure +++ b/configure @@ -1493,6 +1493,7 @@ _faad_external=auto _faac=auto _ladspa=auto _xmms=no +_have_dvd=no # dvdnav disabled, it does not work #_dvdnav=no _dvdread=auto @@ -4948,6 +4949,7 @@ else _noinputmodules="mpdvdkit $_noinputmodules" fi if test "$_dvdkit" = yes || test "$_dvdkit2" = yes; then + _have_dvd=yes echores "yes" else echores "no" @@ -4977,6 +4979,7 @@ case "$_dvdread" in _def_dvdread='#define USE_DVDREAD 1' _ld_dvdread='-ldvdread' _inputmodules="dvdread $_inputmodules" + _have_dvd=yes echores "yes" ;; no) @@ -4990,6 +4993,7 @@ case "$_dvdread" in _ld_dvdread='-Llibmpdvdkit -lmpdvdkit' _noinputmodules="dvdread $_noinputmodules" _def_mpdvdkit="#define USE_MPDVDKIT 1" + _have_dvd=yes echores "disabled by libmpdvdkit" ;; libmpdvdkit2) @@ -4998,10 +5002,17 @@ case "$_dvdread" in _ld_dvdread='-Llibmpdvdkit2 -lmpdvdkit' _noinputmodules="dvdread $_noinputmodules" _def_mpdvdkit="#define USE_MPDVDKIT 2" + _have_dvd=yes echores "disabled by libmpdvdkit2" ;; esac +if test "$_have_dvd" = yes ; then + _def_have_dvd='#define HAVE_DVD 1' +else + _def_have_dvd='#undef HAVE_DVD' +fi + # dvdnav disabled, it does not work # echocheck "DVD support (libdvdnav)" # if test "$_dvdnav" = yes ; then @@ -7116,6 +7127,8 @@ SGIAUDIO_LIB = $_ld_sgiaudio TERMCAP_LIB = $_ld_termcap LIRC_LIB = $_ld_lirc LIRCC_LIB = $_ld_lircc +HAVE_DVD = $_have_dvd +DVDREAD = $_dvdread DVDREAD_LIB = $_ld_dvdread DVDKIT = $_dvdkit DVDKIT2 = $_dvdkit2 @@ -7290,6 +7303,7 @@ $_def_dvd_darwin $_def_sol_scsi_h $_def_hpux_scsi_h $_def_stddef +$_def_have_dvd /* Common data directory (for fonts, etc) */ #define MPLAYER_DATADIR "$_datadir" diff --git a/libmpdemux/Makefile b/libmpdemux/Makefile index 01deaa3f72..62e65e6c97 100644 --- a/libmpdemux/Makefile +++ b/libmpdemux/Makefile @@ -31,7 +31,6 @@ SRCS += cdda.c \ # Stream readers/writers SRCS += stream.c \ - stream_dvd.c \ stream_file.c \ stream_ftp.c \ stream_livedotcom.c \ @@ -89,6 +88,9 @@ SRCS += demuxer.c \ demux_vqf.c \ demux_y4m.c \ +ifeq ($(HAVE_DVD),yes) +SRCS += stream_dvd.c +endif ifeq ($(XMMS_PLUGINS),yes) SRCS += demux_xmms.c endif diff --git a/libmpdemux/open.c b/libmpdemux/open.c index 9d813d63f7..5fcfa5b508 100644 --- a/libmpdemux/open.c +++ b/libmpdemux/open.c @@ -24,6 +24,10 @@ /// We keep these 2 for the gui atm, but they will be removed. int vcd_track=0; char* cdrom_device=NULL; +int dvd_chapter=1; +int dvd_last_chapter=0; +char* dvd_device=NULL; +int dvd_title=0; // Open a new stream (stdin/file/vcd/url) diff --git a/libmpdemux/stream.c b/libmpdemux/stream.c index 84babf0ed5..4eebbbc485 100644 --- a/libmpdemux/stream.c +++ b/libmpdemux/stream.c @@ -75,7 +75,9 @@ extern stream_info_t stream_info_rtsp_sip; extern stream_info_t stream_info_cue; extern stream_info_t stream_info_null; extern stream_info_t stream_info_file; +#ifdef HAVE_DVD extern stream_info_t stream_info_dvd; +#endif stream_info_t* auto_open_streams[] = { #ifdef HAVE_VCD @@ -110,7 +112,9 @@ stream_info_t* auto_open_streams[] = { &stream_info_smb, #endif &stream_info_cue, +#ifdef HAVE_DVD &stream_info_dvd, +#endif #ifdef USE_DVDNAV &stream_info_dvdnav; #endif diff --git a/libmpdemux/stream_dvd.c b/libmpdemux/stream_dvd.c index eb0048b5a2..c5793ffd96 100644 --- a/libmpdemux/stream_dvd.c +++ b/libmpdemux/stream_dvd.c @@ -26,12 +26,13 @@ #include "m_struct.h" /// We keep these 2 for the gui atm, but they will be removed. -int dvd_title=0; -int dvd_chapter=1; -int dvd_last_chapter=0; +extern int dvd_title; +extern int dvd_chapter; +extern int dvd_last_chapter; +extern char* dvd_device; int dvd_angle=1; -char* dvd_device=NULL; +#ifdef HAVE_DVD #ifdef USE_DVDREAD #define DVDREAD_VERSION(maj,min,micro) ((maj)*10000 + (min)*100 + (micro)) /* @@ -792,3 +793,4 @@ stream_info_t stream_info_dvd = { &stream_opts, 1 // Urls are an option string }; +#endif -- cgit v1.2.3