[vlc-commits] Contribs: add dvdnav
Jean-Baptiste Kempf
git at videolan.org
Sat Aug 6 19:50:30 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Aug 6 16:25:41 2011 +0200| [23231add7147fa5fff5fbff7bb34f3a73826fd16] | committer: Jean-Baptiste Kempf
Contribs: add dvdnav
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=23231add7147fa5fff5fbff7bb34f3a73826fd16
---
contrib/src/dvdnav/dvdnav.patch | 46 +++++++++++++++++++++++++++++++++++++++
contrib/src/dvdnav/rules.mak | 30 +++++++++++++++++++++++++
2 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/contrib/src/dvdnav/dvdnav.patch b/contrib/src/dvdnav/dvdnav.patch
new file mode 100644
index 0000000..3f592a3
--- /dev/null
+++ b/contrib/src/dvdnav/dvdnav.patch
@@ -0,0 +1,46 @@
+diff -ruN dvdnav-svn/Makefile.am dvdnav/Makefile.am
+--- dvdnav-svn/Makefile.am 2008-06-18 17:06:33.000000000 +0200
++++ dvdnav/Makefile.am 2011-08-06 18:38:10.243875945 +0200
+@@ -1,7 +1,7 @@
+ include $(top_srcdir)/misc/Makefile.common
+
+
+-SUBDIRS = src examples doc misc m4
++SUBDIRS = src misc m4
+
+ EXTRA_DIST = autogen.sh \
+ AUTHORS \
+diff -ruN dvdnav-svn/src/vm/vm.c dvdnav/src/vm/vm.c
+--- dvdnav-svn/src/vm/vm.c 2010-11-22 00:59:43.000000000 +0100
++++ dvdnav/src/vm/vm.c 2011-08-06 18:38:03.263841341 +0200
+@@ -174,12 +174,11 @@
+ fd = open(device, O_RDONLY);
+ if (fd > 0) {
+ off = lseek( fd, 32 * (off_t) DVD_VIDEO_LB_LEN, SEEK_SET );
+- if( off == ( 32 * (off_t) DVD_VIDEO_LB_LEN ) ) {
++ if (off == 16) {
+ off = read( fd, data, DVD_VIDEO_LB_LEN );
+- close(fd);
+ if (off == ( (off_t) DVD_VIDEO_LB_LEN )) {
+ fprintf(MSG_OUT, "libdvdnav: DVD Title: ");
+- for(i=25; i < 73; i++ ) {
++ for(i=40; i < 73; i++ ) {
+ if((data[i] == 0)) break;
+ if((data[i] > 32) && (data[i] < 127)) {
+ fprintf(MSG_OUT, "%c", data[i]);
+@@ -187,10 +186,12 @@
+ fprintf(MSG_OUT, " ");
+ }
+ }
+- strncpy(name, (char*) &data[25], 48);
+- name[48] = 0;
++ strncpy(name, (char*) &data[40], 32);
++ i=31;
++ while( (i>=0) && (name[i] <= ' ')) --i;
++ name[i+1] = '\0';
+ fprintf(MSG_OUT, "\nlibdvdnav: DVD Serial Number: ");
+- for(i=73; i < 89; i++ ) {
++ for(i=813; i < 829; i++ ) {
+ if((data[i] == 0)) break;
+ if((data[i] > 32) && (data[i] < 127)) {
+ fprintf(MSG_OUT, "%c", data[i]);
diff --git a/contrib/src/dvdnav/rules.mak b/contrib/src/dvdnav/rules.mak
new file mode 100644
index 0000000..4c58099
--- /dev/null
+++ b/contrib/src/dvdnav/rules.mak
@@ -0,0 +1,30 @@
+# DVDNAV
+
+ifdef BUILD_DISCS
+PKGS += dvdnav
+endif
+ifeq ($(call need_pkg,"dvdnav"),)
+PKGS_FOUND += dvdnav
+endif
+
+$(TARBALLS)/dvdnav-svn.tar.xz:
+ rm -Rf dvdnav-svn
+ $(SVN) export svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav dvdnav-svn
+ tar cvJ dvdnav-svn > $@
+
+.sum-dvdnav: dvdnav-svn.tar.xz
+ $(warning Integrity check skipped.)
+ touch $@
+
+dvdnav: dvdnav-svn.tar.xz .sum-dvdnav
+ $(UNPACK)
+ $(APPLY) $(SRC)/dvdnav/dvdnav.patch
+ $(MOVE)
+
+DEPS_dvdnav = dvdcss dvdread
+
+.dvdnav: dvdnav .dvdcss .dvdread
+ cd $< && sh autogen.sh noconfig
+ cd $< && $(HOSTVARS) ./configure $(HOSTCONF)
+ cd $< && $(MAKE) install
+ touch $@
More information about the vlc-commits
mailing list