summaryrefslogtreecommitdiffstats
path: root/contrib/libdvdread
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-04-27 15:18:05 +0000
committerjstebbins <[email protected]>2009-04-27 15:18:05 +0000
commit6b9c017e63f06e9a7b66062d0a8cb460a02ca6b6 (patch)
tree13479caa23219b5476a4d1e534a970cd6fce29fd /contrib/libdvdread
parent3bb12e29d03f62a303c7728cd6f40c6498f2858e (diff)
add libdvdnav support
emulates the vm of a dvd player in order to navigate the disc more reliably it is optional and disabled by default CLI option '--dvdnav' enables. GUI's have a new option in preferences. When dvdnav is enabled, you can also select angles (cli '--angle') git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2355 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/libdvdread')
-rw-r--r--contrib/libdvdread/A00-volume-name.patch12
-rw-r--r--contrib/libdvdread/P00-darwin-css-vlc-dylib.patch22
-rw-r--r--contrib/libdvdread/P01-cygwin.patch26
-rw-r--r--contrib/libdvdread/P02-mingw-ssize_t.patch26
-rw-r--r--contrib/libdvdread/P03-mingw-disable-dlopen.patch134
-rw-r--r--contrib/libdvdread/P04-mingw-endian-macros.patch29
-rw-r--r--contrib/libdvdread/P05-mingw-large-file.patch8
-rw-r--r--contrib/libdvdread/P06-darwin.patch25
-rw-r--r--contrib/libdvdread/module.defs4
9 files changed, 55 insertions, 231 deletions
diff --git a/contrib/libdvdread/A00-volume-name.patch b/contrib/libdvdread/A00-volume-name.patch
new file mode 100644
index 000000000..af7018e7a
--- /dev/null
+++ b/contrib/libdvdread/A00-volume-name.patch
@@ -0,0 +1,12 @@
+diff -Naur libdvdread.orig/src/dvd_udf.c libdvdread/src/dvd_udf.c
+--- libdvdread.orig/src/dvd_udf.c 2009-01-08 14:57:10.000000000 -0800
++++ libdvdread/src/dvd_udf.c 2009-04-23 13:36:08.000000000 -0700
+@@ -928,7 +928,7 @@
+ if(GetUDFCache(device, PVDCache, 0, pvd))
+ return 1;
+
+- if(!UDFGetDescriptor( device, 1, pvd_buf, sizeof(pvd_buf)))
++ if(!UDFGetDescriptor( device, 1, pvd_buf, DVD_VIDEO_LB_LEN))
+ return 0;
+
+ memcpy(pvd->VolumeIdentifier, &pvd_buf[24], 32);
diff --git a/contrib/libdvdread/P00-darwin-css-vlc-dylib.patch b/contrib/libdvdread/P00-darwin-css-vlc-dylib.patch
index cb0181517..d6c5f6d57 100644
--- a/contrib/libdvdread/P00-darwin-css-vlc-dylib.patch
+++ b/contrib/libdvdread/P00-darwin-css-vlc-dylib.patch
@@ -1,12 +1,12 @@
-diff -Naur libdvdread.orig/dvdread/dvd_input.c libdvdread/dvdread/dvd_input.c
---- libdvdread.orig/dvdread/dvd_input.c 2005-09-19 09:43:08.000000000 -0400
-+++ libdvdread/dvdread/dvd_input.c 2009-02-21 10:22:42.000000000 -0500
-@@ -332,7 +332,7 @@
+diff -Naur libdvdread.orig/src/dvd_input.c libdvdread/src/dvd_input.c
+--- libdvdread.orig/src/dvd_input.c 2009-01-08 14:57:10.000000000 -0800
++++ libdvdread/src/dvd_input.c 2009-04-24 09:02:34.000000000 -0700
+@@ -285,7 +285,7 @@
+ /* dlopening libdvdcss */
- #else
-
-- dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
-+ dvdcss_library = dlopen("/Applications/VLC.app/Contents/MacOS/lib/libdvdcss.2.dylib", RTLD_LAZY);
-
- if(dvdcss_library != NULL) {
- #if defined(__OpenBSD__) && !defined(__ELF__)
+ #ifdef __APPLE__
+- #define CSS_LIB "libdvdcss.2.dylib"
++ #define CSS_LIB "/Applications/VLC.app/Contents/MacOS/lib/libdvdcss.2.dylib"
+ #elif defined(WIN32)
+ #define CSS_LIB "libdvdcss.dll"
+ #elif defined(__OS2__)
diff --git a/contrib/libdvdread/P01-cygwin.patch b/contrib/libdvdread/P01-cygwin.patch
deleted file mode 100644
index fbb1f12d3..000000000
--- a/contrib/libdvdread/P01-cygwin.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -Naur libdvdread/configure libdvdread/configure
---- libdvdread/configure 2006-10-06 04:14:24.000000000 -0400
-+++ libdvdread/configure 2008-10-04 08:51:17.153181000 -0400
-@@ -3550,9 +3550,6 @@
- _ACEOF
-
- ;;
-- x*mingw32* | x*cygwin*)
-- CFLAGS="${CFLAGS} -Dssize_t=long"
-- ;;
- x*)
- ;;
- esac
-diff -Naur libdvdread/configure.in libdvdread/configure.in
---- libdvdread/configure.in 2006-10-06 04:12:31.000000000 -0400
-+++ libdvdread/configure.in 2008-10-04 08:51:26.356306000 -0400
-@@ -15,9 +15,6 @@
- CFLAGS="${CFLAGS} -no-cpp-precomp"
- AC_DEFINE(__DARWIN__, 1, Have a Mac OS X system)
- ;;
-- x*mingw32* | x*cygwin*)
-- CFLAGS="${CFLAGS} -Dssize_t=long"
-- ;;
- x*)
- ;;
- esac \ No newline at end of file
diff --git a/contrib/libdvdread/P02-mingw-ssize_t.patch b/contrib/libdvdread/P02-mingw-ssize_t.patch
deleted file mode 100644
index a4dc5eda7..000000000
--- a/contrib/libdvdread/P02-mingw-ssize_t.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -Naur libdvdread.orig/configure libdvdread/configure
---- libdvdread.orig/configure 2006-10-06 04:14:24.000000000 -0400
-+++ libdvdread/configure 2009-03-10 17:45:06.000000000 -0400
-@@ -3550,9 +3550,6 @@
- _ACEOF
-
- ;;
-- x*mingw32* | x*cygwin*)
-- CFLAGS="${CFLAGS} -Dssize_t=long"
-- ;;
- x*)
- ;;
- esac
-diff -Naur libdvdread.orig/configure.in libdvdread/configure.in
---- libdvdread.orig/configure.in 2006-10-06 04:12:31.000000000 -0400
-+++ libdvdread/configure.in 2009-03-10 17:45:06.000000000 -0400
-@@ -15,9 +15,6 @@
- CFLAGS="${CFLAGS} -no-cpp-precomp"
- AC_DEFINE(__DARWIN__, 1, Have a Mac OS X system)
- ;;
-- x*mingw32* | x*cygwin*)
-- CFLAGS="${CFLAGS} -Dssize_t=long"
-- ;;
- x*)
- ;;
- esac
diff --git a/contrib/libdvdread/P03-mingw-disable-dlopen.patch b/contrib/libdvdread/P03-mingw-disable-dlopen.patch
deleted file mode 100644
index 515526289..000000000
--- a/contrib/libdvdread/P03-mingw-disable-dlopen.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-diff -Naur libdvdread.orig/configure libdvdread/configure
---- libdvdread.orig/configure 2006-10-06 04:14:24.000000000 -0400
-+++ libdvdread/configure 2009-03-10 17:48:56.000000000 -0400
-@@ -18889,11 +18889,6 @@
- echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
- if test $ac_cv_lib_dl_dlopen = yes; then
- DL_LIBS=-ldl
--else
-- { { echo "$as_me:$LINENO: error: You need libdl (dlopen)" >&5
--echo "$as_me: error: You need libdl (dlopen)" >&2;}
-- { (exit 1); exit 1; }; }
--
- fi
-
-
-diff -Naur libdvdread.orig/dvdread/dvd_input.c libdvdread/dvdread/dvd_input.c
---- libdvdread.orig/dvdread/dvd_input.c 2005-09-19 09:43:08.000000000 -0400
-+++ libdvdread/dvdread/dvd_input.c 2009-03-10 18:01:43.000000000 -0400
-@@ -44,18 +44,6 @@
-
- char * (*dvdinput_error) (dvd_input_t);
-
--#ifdef HAVE_DVDCSS_DVDCSS_H
--/* linking to libdvdcss */
--#include <dvdcss/dvdcss.h>
--#define DVDcss_open(a) dvdcss_open((char*)(a))
--#define DVDcss_close dvdcss_close
--#define DVDcss_seek dvdcss_seek
--#define DVDcss_title dvdcss_title
--#define DVDcss_read dvdcss_read
--#define DVDcss_error dvdcss_error
--#else
--/* dlopening libdvdcss */
--#include <dlfcn.h>
- typedef struct dvdcss_s *dvdcss_handle;
- static dvdcss_handle (*DVDcss_open) (const char *);
- static int (*DVDcss_close) (dvdcss_handle);
-@@ -63,7 +51,6 @@
- static int (*DVDcss_title) (dvdcss_handle, int);
- static int (*DVDcss_read) (dvdcss_handle, void *, int, int);
- static char * (*DVDcss_error) (dvdcss_handle);
--#endif
-
- /* The DVDinput handle, add stuff here for new input methods. */
- struct dvd_input_s {
-@@ -290,17 +277,7 @@
- */
- void dvdinput_free(void)
- {
--#ifdef HAVE_DVDCSS_DVDCSS_H
-- /* linked statically, nothing to free */
- return;
--#else
-- if(dvdcss_library) {
-- dlclose(dvdcss_library);
-- dvdcss_library = NULL;
-- }
-- dvdcss_library_init = 0;
-- return;
--#endif
- }
-
-
-@@ -324,58 +301,6 @@
-
- verbose = get_verbose();
-
--#ifdef HAVE_DVDCSS_DVDCSS_H
-- /* linking to libdvdcss */
-- dvdcss_library = &dvdcss_library; /* Give it some value != NULL */
-- /* the DVDcss_* functions have been #defined at the top */
-- dvdcss_version = &dvdcss_interface_2;
--
--#else
--
-- dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
--
-- if(dvdcss_library != NULL) {
--#if defined(__OpenBSD__) && !defined(__ELF__)
--#define U_S "_"
--#else
--#define U_S
--#endif
-- DVDcss_open = (dvdcss_handle (*)(const char*))
-- dlsym(dvdcss_library, U_S "dvdcss_open");
-- DVDcss_close = (int (*)(dvdcss_handle))
-- dlsym(dvdcss_library, U_S "dvdcss_close");
-- DVDcss_title = (int (*)(dvdcss_handle, int))
-- dlsym(dvdcss_library, U_S "dvdcss_title");
-- DVDcss_seek = (int (*)(dvdcss_handle, int, int))
-- dlsym(dvdcss_library, U_S "dvdcss_seek");
-- DVDcss_read = (int (*)(dvdcss_handle, void*, int, int))
-- dlsym(dvdcss_library, U_S "dvdcss_read");
-- DVDcss_error = (char* (*)(dvdcss_handle))
-- dlsym(dvdcss_library, U_S "dvdcss_error");
--
-- dvdcss_version = (char **)dlsym(dvdcss_library, U_S "dvdcss_interface_2");
--
-- if(dlsym(dvdcss_library, U_S "dvdcss_crack")) {
-- if(verbose >= 0) {
-- fprintf(stderr,
-- "libdvdread: Old (pre-0.0.2) version of libdvdcss found.\n"
-- "libdvdread: You should get the latest version from "
-- "http://www.videolan.org/\n" );
-- }
-- dlclose(dvdcss_library);
-- dvdcss_library = NULL;
-- } else if(!DVDcss_open || !DVDcss_close || !DVDcss_title || !DVDcss_seek
-- || !DVDcss_read || !DVDcss_error || !dvdcss_version) {
-- if(verbose >= 0) {
-- fprintf(stderr, "libdvdread: Missing symbols in libdvdcss.so.2, "
-- "this shouldn't happen !\n");
-- }
-- dlclose(dvdcss_library);
-- dvdcss_library = NULL;
-- }
-- }
--#endif /* HAVE_DVDCSS_DVDCSS_H */
--
- dvdcss_library_init = 1;
-
- if(dvdcss_library) {
-diff -Naur libdvdread.orig/dvdread/dvd_reader.c libdvdread/dvdread/dvd_reader.c
---- libdvdread.orig/dvdread/dvd_reader.c 2006-10-06 03:58:03.000000000 -0400
-+++ libdvdread/dvdread/dvd_reader.c 2009-03-10 17:51:22.000000000 -0400
-@@ -183,7 +183,7 @@
- dev->align = align;
- }
-
--#ifdef WIN32 /* replacement gettimeofday implementation */
-+#if defined(WIN32) && !defined(__MINGW32__) /* replacement gettimeofday implementation */
- #include <sys/timeb.h>
- static int gettimeofday( struct timeval *tv, void *tz )
- {
diff --git a/contrib/libdvdread/P04-mingw-endian-macros.patch b/contrib/libdvdread/P04-mingw-endian-macros.patch
deleted file mode 100644
index 872b8518d..000000000
--- a/contrib/libdvdread/P04-mingw-endian-macros.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -Naur libdvdread.orig/dvdread/bswap.h libdvdread/dvdread/bswap.h
---- libdvdread.orig/dvdread/bswap.h 2006-06-06 16:03:37.000000000 -0400
-+++ libdvdread/dvdread/bswap.h 2009-03-13 21:05:23.000000000 -0400
-@@ -83,6 +83,25 @@
- #define B2N_32(x) x = OSSwapBigToHostConstInt32(x)
- #define B2N_64(x) x = OSSwapBigToHostConstInt64(x)
-
-+#elif defined(__MINGW32__)
-+#define B2N_16(x) \
-+ x = ((((x) & 0xff00) >> 8) | \
-+ (((x) & 0x00ff) << 8))
-+#define B2N_32(x) \
-+ x = ((((x) & 0xff000000) >> 24) | \
-+ (((x) & 0x00ff0000) >> 8) | \
-+ (((x) & 0x0000ff00) << 8) | \
-+ (((x) & 0x000000ff) << 24))
-+#define B2N_64(x) \
-+ x = ((((x) & 0xff00000000000000ULL) >> 56) | \
-+ (((x) & 0x00ff000000000000ULL) >> 40) | \
-+ (((x) & 0x0000ff0000000000ULL) >> 24) | \
-+ (((x) & 0x000000ff00000000ULL) >> 8) | \
-+ (((x) & 0x00000000ff000000ULL) << 8) | \
-+ (((x) & 0x0000000000ff0000ULL) << 24) | \
-+ (((x) & 0x000000000000ff00ULL) << 40) | \
-+ (((x) & 0x00000000000000ffULL) << 56))
-+
- #else
- #if defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__BEOS__) || defined(__INTERIX)
- /* These systems don't have swap macros */
diff --git a/contrib/libdvdread/P05-mingw-large-file.patch b/contrib/libdvdread/P05-mingw-large-file.patch
index 7ed9b6540..480d1e955 100644
--- a/contrib/libdvdread/P05-mingw-large-file.patch
+++ b/contrib/libdvdread/P05-mingw-large-file.patch
@@ -1,6 +1,7 @@
---- libdvdread.orig/dvdread/dvd_input.h 2005-09-06 12:23:00.000000000 -0700
-+++ libdvdread/dvdread/dvd_input.h 2009-03-25 15:01:39.000000000 -0700
-@@ -28,6 +28,24 @@
+diff -Naur libdvdread.orig/src/dvd_input.h libdvdread/src/dvd_input.h
+--- libdvdread.orig/src/dvd_input.h 2008-10-03 13:11:30.000000000 -0700
++++ libdvdread/src/dvd_input.h 2009-04-23 13:47:04.000000000 -0700
+@@ -29,6 +29,24 @@
#define DVDINPUT_READ_DECRYPT (1 << 0)
@@ -25,4 +26,3 @@
typedef struct dvd_input_s *dvd_input_t;
/**
-
diff --git a/contrib/libdvdread/P06-darwin.patch b/contrib/libdvdread/P06-darwin.patch
new file mode 100644
index 000000000..b6efc2e52
--- /dev/null
+++ b/contrib/libdvdread/P06-darwin.patch
@@ -0,0 +1,25 @@
+diff -Naur libdvdread.orig/configure.ac libdvdread/configure.ac
+--- libdvdread.orig/configure.ac 2009-01-08 17:57:10.000000000 -0500
++++ libdvdread/configure.ac 2009-04-24 01:50:56.000000000 -0400
+@@ -145,6 +145,9 @@
+ *cygwin*)
+ LDFLAGS="-no-undefined $LDFLAGS"
+ ;;
++ *darwin*)
++ CFLAGS="${CFLAGS} -D__DARWIN__"
++ ;;
+ *os2*)
+ LDFLAGS="-no-undefined -Zbin-files $LDFLAGS"
+ ;;
+diff -Naur libdvdread.orig/src/dvd_reader.c libdvdread/src/dvd_reader.c
+--- libdvdread.orig/src/dvd_reader.c 2009-03-13 21:28:21.000000000 -0400
++++ libdvdread/src/dvd_reader.c 2009-04-24 01:35:43.000000000 -0400
+@@ -314,7 +314,7 @@
+ char *new_path;
+
+ /* If it doesn't start with "/dev/" or does start with "/dev/r" exit */
+- if( !strncmp( path, "/dev/", 5 ) || strncmp( path, "/dev/r", 6 ) )
++ if( strncmp( path, "/dev/", 5 ) || !strncmp( path, "/dev/r", 6 ) )
+ return (char *) strdup( path );
+
+ /* Replace "/dev/" with "/dev/r" */
diff --git a/contrib/libdvdread/module.defs b/contrib/libdvdread/module.defs
index 99b70923a..3db333bb8 100644
--- a/contrib/libdvdread/module.defs
+++ b/contrib/libdvdread/module.defs
@@ -1,5 +1,7 @@
$(eval $(call import.MODULE.defs,LIBDVDREAD,libdvdread))
$(eval $(call import.CONTRIB.defs,LIBDVDREAD))
-LIBDVDREAD.FETCH.url = http://download.m0k.org/handbrake/contrib/libdvdread-0.9.7.tar.gz
+LIBDVDREAD.FETCH.url = http://download.m0k.org/handbrake/contrib/libdvdread-svn1168.tar.gz
LIBDVDREAD.EXTRACT.tarbase = libdvdread
+
+LIBDVDREAD.CONFIGURE.bootstrap = rm -fr aclocal.m4 autom4te.cache; autoreconf -fiv;