From fc7461768bd38509f42f8e603ce28dde76585f99 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Fri, 9 Aug 2002 22:13:08 +0000 Subject: make developers life easier: add possibility to use an existing shared version of libdvdnav CVS patchset: 2415 CVS date: 2002/08/09 22:13:08 --- src/input/Makefile.am | 20 ++++++++++++++++++-- src/input/input_dvd.c | 22 +++++++++++++++++++--- 2 files changed, 37 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 5f40efecd..ff8a88d9a 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -2,7 +2,11 @@ ## Process this file with automake to produce Makefile.in ## +if HAVE_DVDNAV +SUBDIRS = libdvdread +else SUBDIRS = libdvdread libdvdnav +endif LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic @@ -21,9 +25,15 @@ in_cda = xineplug_inp_cda.la endif # For DVD +if HAVE_DVDNAV +DVD_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ + $(DVDNAV_CFLAGS) \ + -Ilibdvdread/ +else DVD_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE \ -Ilibdvdnav/ \ -Ilibdvdread/ +endif CFLAGS = @CFLAGS@ $(DVD_CFLAGS) DEBUG_CFLAGS = @DEBUG_CFLAGS@ $(DVD_CFLAGS) @@ -37,9 +47,15 @@ xineplug_inp_file_la_LIBADD = $(top_builddir)/src/xine-engine/libxine.la xineplug_inp_file_la_LDFLAGS = -avoid-version -module xineplug_inp_dvd_la_SOURCES = input_dvd.c +if HAVE_DVDNAV +xineplug_inp_dvd_la_LIBADD = $(top_builddir)/src/xine-engine/libxine.la \ + libdvdread/libdvdread.la $(DVDNAV_LIBS) +xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module +else xineplug_inp_dvd_la_LIBADD = $(top_builddir)/src/xine-engine/libxine.la \ libdvdnav/libdvdnav.la libdvdread/libdvdread.la xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module +endif xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c xineplug_inp_net_la_LIBADD = $(top_builddir)/src/xine-engine/libxine.la @@ -70,9 +86,9 @@ xineplug_inp_cda_la_LIBADD = $(top_builddir)/src/xine-engine/libxine.la xineplug_inp_cda_la_LDFLAGS = -avoid-version -module include_HEADERS = input_plugin.h -noinst_HEADERS = dvd_udf.h read_cache.h net_buf_ctrl.h mms.h +noinst_HEADERS = read_cache.h net_buf_ctrl.h mms.h -EXTRA_DIST = input_dvd.c dvd_udf.c input_vcd.c read_cache.c +EXTRA_DIST = input_dvd.c input_vcd.c read_cache.c ## ## Install header files (default=$includedir/xine) diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 1cd1fb39c..6b4042878 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.56 2002/08/09 15:38:13 mroi Exp $ + * $Id: input_dvd.c,v 1.57 2002/08/09 22:13:08 mroi Exp $ * */ @@ -69,8 +69,12 @@ #include "xine_internal.h" /* DVDNAV includes */ -#include "dvdnav.h" - +#ifdef HAVE_DVDNAV +# include +#else +# include "dvdnav.h" +#endif + /* libdvdread includes */ #include "nav_read.h" @@ -93,8 +97,10 @@ /* The default DVD device on Solaris is not /dev/dvd */ #if defined(__sun) #define DVD_PATH "/vol/dev/aliases/cdrom0" +#define RDVD_PATH NULL #else #define DVD_PATH "/dev/dvd" +#define RDVD_PATH "/dev/rdvd" #endif /* Some misc. defines */ @@ -1300,6 +1306,7 @@ check_solaris_vold_device(dvdnav_input_plugin_t *this) input_plugin_t *init_input_plugin (int iface, xine_t *xine) { dvdnav_input_plugin_t *this; config_values_t *config = xine->config; + char *raw_device; trace_print("Called\n"); @@ -1350,6 +1357,11 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) { device_change_cb, (void *)this); this->current_dvd_device = this->dvd_device; + raw_device = config->register_string(config, "input.dvd_raw_device", + RDVD_PATH, "raw device set up for dvd access", + NULL, NULL, NULL); + if (raw_device) setenv("DVDCSS_RAW_DEVICE", raw_device, 0); + config->register_num(config, "input.dvd_region", 1, "Region that DVD player claims " @@ -1393,6 +1405,10 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) { /* * $Log: input_dvd.c,v $ + * Revision 1.57 2002/08/09 22:13:08 mroi + * make developers life easier: add possibility to use an existing shared + * version of libdvdnav + * * Revision 1.56 2002/08/09 15:38:13 mroi * fix mrl parsing * -- cgit v1.2.3