[MPlayer-dev-eng] [PATCH] internal dvdnav

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Dec 31 12:18:56 CET 2008


On Wed, Dec 31, 2008 at 11:22:57AM +0100, Nico Sabbi wrote:
> Il giorno mer, 31/12/2008 alle 09.47 +0100, Reimar Döffinger ha scritto:
> > On Tue, Dec 30, 2008 at 04:50:25PM +0100, Reimar Döffinger wrote:
> > > Hello,
> > > with some more small changes to libdvdread and libdvdnav which are
> > > currently pending, and these two new svn externals:
> > > libdvdread svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread/src 
> > > libdvdnav svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav/src 
> > > MPlayer can be built with (a working) embedded libdvdnav, and as far
> > > as I can tell it will use the embedded libdvdcss, too.
> > > A patch for that is attached.
> > 
> > The dvdread part that replaces our internal copy with an svn:externals
> > entry is ready to be applied any time...
> > I am in favour of doing this rather soon, even though I am not sure how
> > well replacing an internal directory with and external will work,
> > calling the new directory e.g. libdvdread4 might be safer.
> > Any opinions?
> 
> I agree completely with the inclusion of both externals and with your
> patch, but using different names is the only sane way to proceed: it
> eliminates any ambiguity. 

Ok, I would then propose attached patch, to be applied in two steps,
with the following additional externals:
libdvdread4     svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread/src
libdvdnav       svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav/src

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 28215)
+++ configure	(working copy)
@@ -5510,6 +5541,7 @@
      || darwin || win32; then
     _dvdread_internal=yes
     _dvdread=yes
+    _inc_extra="$_inc_extra -Ilibdvdread4"
   fi
 elif test "$_dvdread" = auto ; then
   _dvdread=no
@@ -5535,7 +5567,6 @@
 fi
 
 if test "$_dvdread_internal" = yes; then
-  _def_dvdread_internal="#define CONFIG_DVDREAD_INTERNAL 1"
   _def_dvdread='#define CONFIG_DVDREAD 1'
   _inputmodules="dvdread(internal) $_inputmodules"
   _largefiles=yes
@@ -5547,7 +5578,6 @@
   _inputmodules="dvdread(external) $_inputmodules"
   _res_comment="external"
 else
-  _def_dvdread_internal="#undef CONFIG_DVDREAD_INTERNAL"
   _def_dvdread='#undef CONFIG_DVDREAD'
   _noinputmodules="dvdread $_noinputmodules"
 fi
@@ -7763,8 +7810,10 @@
 echocheck "DVD support (libdvdnav)"
 if test "$_dvdnav" = auto ; then
   if test "$_dvdread_internal" = yes ; then
-    _dvdnav=no
-    _res_comment="Disabled in favor of the internal copy of dvdread. Append --disable-dvdread-internal."
+    _dvdnav=yes
+    dvdnav_internal=yes
+    _inc_extra="$_inc_extra -Ilibdvdnav"
+    _res_comment="internal"
   else
     $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
   fi
@@ -7961,6 +8009,7 @@
 DIRECTX = $_directx
 DVBIN = $_dvbin
 DVDNAV = $_dvdnav
+DVDNAV_INTERNAL = $dvdnav_internal
 DVDREAD = $_dvdread
 DVDREAD_INTERNAL = $_dvdread_internal
 DXR2 = $_dxr2
@@ -8319,7 +8368,6 @@
 $_def_dvdio
 $_def_dvdnav
 $_def_dvdread
-$_def_dvdread_internal
 $_def_hpux_scsi_h
 $_def_libcdio
 $_def_sol_scsi_h
Index: Makefile
===================================================================
--- Makefile	(revision 28215)
+++ Makefile	(working copy)
@@ -234,17 +234,28 @@
 SRCS_COMMON-$(DVBIN)                 += stream/dvb_tune.c \
                                         stream/stream_dvb.c
 SRCS_COMMON-$(DVDNAV)                += stream/stream_dvdnav.c
+SRCS_COMMON-$(DVDNAV_INTERNAL)       += libdvdnav/dvdnav.c \
+                                        libdvdnav/highlight.c \
+                                        libdvdnav/navigation.c \
+                                        libdvdnav/read_cache.c \
+                                        libdvdnav/remap.c \
+                                        libdvdnav/searching.c \
+                                        libdvdnav/settings.c \
+                                        libdvdnav/vm/decoder.c \
+                                        libdvdnav/vm/vm.c \
+                                        libdvdnav/vm/vmcmd.c \
+
 SRCS_COMMON-$(DVDREAD)               += stream/stream_dvd.c \
                                         stream/stream_dvd_common.c
-SRCS_COMMON-$(DVDREAD_INTERNAL)      += libdvdread/cmd_print.c \
-                                        libdvdread/dvd_input.c \
-                                        libdvdread/dvd_reader.c \
-                                        libdvdread/dvd_udf.c \
-                                        libdvdread/ifo_print.c \
-                                        libdvdread/ifo_read.c \
-                                        libdvdread/md5.c \
-                                        libdvdread/nav_print.c \
-                                        libdvdread/nav_read.c \
+SRCS_COMMON-$(DVDREAD_INTERNAL)      += libdvdread4/bitreader.c \
+                                        libdvdread4/dvd_input.c \
+                                        libdvdread4/dvd_reader.c \
+                                        libdvdread4/dvd_udf.c \
+                                        libdvdread4/ifo_print.c \
+                                        libdvdread4/ifo_read.c \
+                                        libdvdread4/md5.c \
+                                        libdvdread4/nav_print.c \
+                                        libdvdread4/nav_read.c \
 
 SRCS_COMMON-$(FAAD)                  += libmpcodecs/ad_faad.c
 SRCS_COMMON-$(FAAD_INTERNAL)         += libfaad2/bits.c \
@@ -733,7 +744,8 @@
         libavformat \
         libavutil \
         libdvdcss \
-        libdvdread \
+        libdvdnav \
+        libdvdread4 \
         libfaad2 \
         libmenu \
         libmpcodecs \
@@ -839,7 +851,8 @@
 $(DEPS): help_mp.h
 
 libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\" $(CFLAGS_LIBDVDCSS)
-libdvdread/%.o libdvdread/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_LIBDVDCSS_DVDREAD)
+libdvdnav/%.o libdvdnav/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H -DVERSION=\"MPlayer-custom\"
+libdvdread4/%.o libdvdread4/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_LIBDVDCSS_DVDREAD)
 libfaad2/%.o libfaad2/%.d: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE -DHAVE_CONFIG_H $(CFLAGS_FAAD_FIXED)
 
 loader/% loader/%: CFLAGS += -Iloader -fno-omit-frame-pointer $(CFLAGS_NO_OMIT_LEAF_FRAME_POINTER)
Index: stream/stream_dvd.h
===================================================================
--- stream/stream_dvd.h	(revision 28215)
+++ stream/stream_dvd.h	(working copy)
@@ -3,17 +3,10 @@
 
 #include "config.h"
 #include <stdint.h>
-#ifdef CONFIG_DVDREAD_INTERNAL
-#include "libdvdread/dvd_reader.h"
-#include "libdvdread/ifo_types.h"
-#include "libdvdread/ifo_read.h"
-#include "libdvdread/nav_read.h"
-#else
 #include <dvdread/dvd_reader.h>
 #include <dvdread/ifo_types.h>
 #include <dvdread/ifo_read.h>
 #include <dvdread/nav_read.h>
-#endif
 #include "stream.h"
 
 typedef struct {
Index: stream/stream_dvd_common.h
===================================================================
--- stream/stream_dvd_common.h	(revision 28215)
+++ stream/stream_dvd_common.h	(working copy)
@@ -3,11 +3,7 @@
 
 #include "config.h"
 #include <inttypes.h>
-#ifdef CONFIG_DVDREAD_INTERNAL
-#include "libdvdread/ifo_types.h"
-#else
 #include <dvdread/ifo_types.h>
-#endif
 
 int mp_dvdtimetomsec(dvd_time_t *dt);
 
Index: stream/stream_dvd_common.c
===================================================================
--- stream/stream_dvd_common.c	(revision 28215)
+++ stream/stream_dvd_common.c	(working copy)
@@ -1,10 +1,6 @@
 #include "config.h"
 #include <inttypes.h>
-#ifdef CONFIG_DVDREAD_INTERNAL
-#include "libdvdread/ifo_types.h"
-#else
 #include <dvdread/ifo_types.h>
-#endif
 #include "stream_dvd_common.h"
 
 /** 


More information about the MPlayer-dev-eng mailing list