diff options
78 files changed, 4437 insertions, 6698 deletions
diff --git a/.gitignore b/.gitignore index 68497a369e..deb3d3bb50 100644 --- a/.gitignore +++ b/.gitignore @@ -781,30 +781,42 @@ lib/cpluff/stamp-h1 # /lib/libdvd/libdvdcss/ /lib/libdvd/libdvdcss/.auto/ +/lib/libdvd/libdvdcss/Makefile /lib/libdvd/libdvdcss/Makefile.in /lib/libdvd/libdvdcss/aclocal.m4 /lib/libdvd/libdvdcss/autom4te.cache/ +/lib/libdvd/libdvdcss/config.guess +/lib/libdvd/libdvdcss/config.h +/lib/libdvd/libdvdcss/config.h.in /lib/libdvd/libdvdcss/config.h.in~ -/lib/libdvd/libdvdcss/configure -/lib/libdvd/libdvdcss/doc/Makefile.in -/lib/libdvd/libdvdcss/src/Makefile.in -/lib/libdvd/libdvdcss/src/dvdcss/Makefile.in -/lib/libdvd/libdvdcss/test/Makefile.in +/lib/libdvd/libdvdcss/config.status +/lib/libdvd/libdvdcss/config.sub /lib/libdvd/libdvdcss/config.log /lib/libdvd/libdvdcss/config.st -/lib/libdvd/libdvdcss/stamp-h1 -/lib/libdvd/libdvdcss/config.h -/lib/libdvd/libdvdcss/libtool +/lib/libdvd/libdvdcss/configure /lib/libdvd/libdvdcss/configure.lineno -/lib/libdvd/libdvdcss/Makefile -/lib/libdvd/libdvdcss/config.status -/lib/libdvd/libdvdcss/config.h.in -/lib/libdvd/libdvdcss/doc/Makefile +/lib/libdvd/libdvdcss/depcomp +/lib/libdvd/libdvdcss/install-sh +/lib/libdvd/libdvdcss/libtool +/lib/libdvd/libdvdcss/ltmain.sh +/lib/libdvd/libdvdcss/missing +/lib/libdvd/libdvdcss/stamp-h1 +/lib/libdvd/libdvdcss/m4/libtool.m4 +/lib/libdvd/libdvdcss/m4/ltoptions.m4 +/lib/libdvd/libdvdcss/m4/ltsugar.m4 +/lib/libdvd/libdvdcss/m4/ltversion.m4 +/lib/libdvd/libdvdcss/m4/lt~obsolete.m4 /lib/libdvd/libdvdcss/src/d /lib/libdvd/libdvdcss/src/Makefile /lib/libdvd/libdvdcss/src/dvdcss/Makefile +/lib/libdvd/libdvdcss/src/.dirstamp +/lib/libdvd/libdvdcss/src/Makefile.in +/lib/libdvd/libdvdcss/src/dvdcss/Makefile.in /lib/libdvd/libdvdcss/test/Makefile /lib/libdvd/libdvdcss/doc/doxygen.cfg +/lib/libdvd/libdvdcss/doc/Makefile +/lib/libdvd/libdvdcss/doc/Makefile.in +/lib/libdvd/libdvdcss/test/Makefile.in /lib/libdvd/libdvdcss/test/csstest /lib/libdvd/libdvdcss/test/csstest.exe diff --git a/lib/libdvd/Makefile.in b/lib/libdvd/Makefile.in index 69d2286e1e..54387cc99a 100644 --- a/lib/libdvd/Makefile.in +++ b/lib/libdvd/Makefile.in @@ -26,7 +26,7 @@ endif ifeq (@BUILD_DVDCSS@,1) DIRS += libdvdcss SOS += libdvdcss-$(ARCH).so - DVDCSS_A = libdvdcss/src/.libs/libdvdcss.a + DVDCSS_A = libdvdcss/.libs/libdvdcss.a DVDCSS_O = libdvdcss/src/.libs/*.o DVDNAV_PREREQ = libdvdcss endif @@ -44,7 +44,7 @@ all: $(SLIB) ifeq ($(findstring osx,$(ARCH)), osx) -$(SYSDIR)/libdvdcss-$(ARCH).so: $($(WRAPPER)) libdvdcss/src/.libs/libdvdcss.a +$(SYSDIR)/libdvdcss-$(ARCH).so: $($(WRAPPER)) libdvdcss/.libs/libdvdcss.a $(CC) $(LDFLAGS) -Wl,-alias_list,$(WRAPPER_MACH_ALIAS) -o $@ \ $(WRAPPER) libdvdcss/src/*.o $(BUNDLE1_O) @@ -54,7 +54,7 @@ $(SYSDIR)/libdvdnav-$(ARCH).so: $($(WRAPPER)) $(DVDCSS_A) libdvdread/obj/libdvdr else -$(SYSDIR)/libdvdcss-$(ARCH).so: $(WRAPPER) libdvdcss/src/.libs/libdvdcss.a +$(SYSDIR)/libdvdcss-$(ARCH).so: $(WRAPPER) libdvdcss/.libs/libdvdcss.a $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ \ libdvdcss/src/*.o -Wl,--unresolved-symbols=ignore-all -lm \ `cat $(WRAPPER:.o=.def)` $(WRAPPER) @@ -66,7 +66,7 @@ $(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER) $(DVDCSS_A) libdvdread/obj/libdvdread endif -libdvdcss/src/.libs/libdvdcss.a: libdvdcss; +libdvdcss/.libs/libdvdcss.a: libdvdcss; libdvdcss: compile $(MAKE) -C $@ diff --git a/lib/libdvd/build-xbmc-win32.sh b/lib/libdvd/build-xbmc-win32.sh index 3babd83398..e9287380ca 100644 --- a/lib/libdvd/build-xbmc-win32.sh +++ b/lib/libdvd/build-xbmc-win32.sh @@ -21,18 +21,18 @@ then make distclean fi echo "***** Building libdvdcss *****" -sh bootstrap +autoreconf -i ./configure \ CFLAGS="-DNDEBUG" \ --disable-doc \ --enable-static \ --with-pic make $MAKEFLAGS -strip -S src/.libs/libdvdcss-2.dll +strip -S .libs/libdvdcss-2.dll cd .. mkdir -p includes/dvdcss cp libdvdcss/src/dvdcss/dvdcss.h includes/dvdcss -cp libdvdcss/src/.libs/libdvdcss-2.dll /xbmc/system/players/dvdplayer/ +cp libdvdcss/.libs/libdvdcss-2.dll /xbmc/system/players/dvdplayer/ #libdvdread cd libdvdread @@ -72,7 +72,7 @@ make $MAKEFLAGS gcc \ -shared \ -o obj/libdvdnav.dll \ - ../libdvdread/obj/*.o obj/*.o ../libdvdcss/src/.libs/libdvdcss.dll.a \ + ../libdvdread/obj/*.o obj/*.o ../libdvdcss/.libs/libdvdcss.dll.a \ -ldl \ -Wl,--enable-auto-image-base \ -Xlinker --enable-auto-import diff --git a/lib/libdvd/libdvdcss/AUTHORS b/lib/libdvd/libdvdcss/AUTHORS index fd0321c101..bec3772f79 100644 --- a/lib/libdvd/libdvdcss/AUTHORS +++ b/lib/libdvd/libdvdcss/AUTHORS @@ -2,41 +2,40 @@ # # Authors and contributors are listed alphabetically. # -# The fields are: name (N), email (E), web-address (W), CVS/SVN account login (C), -# PGP key ID and fingerprint (P), description (D), and snail-mail address (S). +# The fields are: name (N), email (E), web-address (W), +# PGP key ID and fingerprint (P), description (D) N: Billy Biggs E: vektor@dumbterm.net D: libdvdcss enhancements -N: Stéphane Borel +N: Diego Biurrun +E: diego@biurrun.de +D: misc build and portability fixes, cleanup + +N: Stéphane Borel E: stef@via.ecp.fr -C: stef -D: original CSS decryption code from vlc +D: original CSS decryption code from VLC N: Sven Heithecker E: sven.heithecker@web.de D: cache bug fix for discs with identical content but different keys -N: Håkan Hjort +N: HÃ¥kan Hjort E: d95hjort@dtek.chalmers.se -C: hjort D: Solaris port of the DVD ioctls D: libdvdcss enhancements N: Samuel Hocevar E: sam@zoy.org -C: sam -D: original CSS decryption code from vlc +D: original CSS decryption code from VLC N: Eugenio Jarosiewicz E: ej0@cise.ufl.edu -C: ej -D: MacOS X DVD ioctls +D: Mac OS X DVD ioctls N: Jon Lech Johansen E: jon-vl@nanocrew.net -C: jlj D: Win32 port D: Fixes to the Darwin port @@ -45,7 +44,6 @@ E: komh@chollian.net D: OS/2 port N: Jean-Baptiste Kempf -C: jb E: jb@videolan.org D: maintainer @@ -65,11 +63,15 @@ N: Christophe Massiot E: massiot@via.ecp.fr D: former maintainer +N: Diego Elio Pettenò +E: flameeyes@flameeyes.eu +D: build system rewrite + N: Steven M. Schultz E: sms@TO.GD-ES.COM D: BSD/OS port -N: David Siebörger +N: David Siebörger E: drs-videolan@rucus.ru.ac.za D: HP-UX port of the DVD ioctls @@ -83,5 +85,4 @@ D: FreeBSD DVD input patch N: Gildas Bazin E: gbazin@netcourrier.com -C: gbazin D: various fixes to the Win32 port diff --git a/lib/libdvd/libdvdcss/ChangeLog b/lib/libdvd/libdvdcss/ChangeLog index 984083e6c5..5b6f837a52 100644 --- a/lib/libdvd/libdvdcss/ChangeLog +++ b/lib/libdvd/libdvdcss/ChangeLog @@ -1,2494 +1,2236 @@ ------------------------------------------------------------------------- -r251 | jb | 2012-03-11 13:33:49 +0000 (Sun, 11 Mar 2012) | 3 lines -Changed paths: - M /trunk/NEWS - M /trunk/configure.ac - M /trunk/doc/doxygen.cfg.in +commit 8572e60d54aaa1f752ac5a1aa842183dab900420 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Wed Feb 27 11:12:24 2013 +0100 -Prepare 1.2.12 + NEWS +commit 745ba0b4f6cdf773adecab0c79e09cceeb5ca982 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Wed Feb 27 11:08:38 2013 +0100 ------------------------------------------------------------------------- -r250 | jb | 2012-03-11 12:37:40 +0000 (Sun, 11 Mar 2012) | 3 lines -Changed paths: - M /trunk/AUTHORS + Simplify INSTALL document -Update Authors file +commit 2af9a1e3d10677c2aca1d798b2df4dd8044c258b +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Wed Feb 27 07:52:56 2013 +0100 + build: use an alternative method for making O_BINARY use conditional. + + Instead of creating a new mode altogether, check for the definition of + O_BINARY in the headers, and if missing define it to zero. + + Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> ------------------------------------------------------------------------- -r249 | jb | 2012-02-18 16:22:03 +0000 (Sat, 18 Feb 2012) | 4 lines -Changed paths: - M /trunk/src/css.c +commit ffb8bab440e45d12b12064720d7fbffbedbc0cb3 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Mon Feb 18 09:43:21 2013 -0800 -If unsure, assume the drive is of RPC-I type + build: set the libtool version info in configure.ac + + This follows the same pattern used for libdvdread/libdvdnav and xine. + + Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> -This can happen when patched drives do not answer to ioctl_ReportRPC correctly +commit 4742c52aa57ade08fc7b03bb0be871c978c9f782 +Author: Diego Biurrun <diego@biurrun.de> +Date: Tue Feb 19 15:23:17 2013 +0100 ------------------------------------------------------------------------- -r247 | jb | 2011-11-14 10:40:05 +0000 (Mon, 14 Nov 2011) | 3 lines -Changed paths: - M /trunk/ChangeLog + build: proper dependencies for ChangeLog generation target + + This fixes the ChangeLog file getting continuously rebuilt instead + of after each Git commit, which is the case now. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> -Update Changelog +commit 1d66d696a1d18db48a868cada1eb9b47cd7f5206 +Author: Diego Biurrun <diego@biurrun.de> +Date: Tue Feb 19 14:48:24 2013 +0100 + INSTALL: Bootstrap with autoreconf now that ./bootstrap is gone + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> ------------------------------------------------------------------------- -r246 | jb | 2011-11-14 10:27:32 +0000 (Mon, 14 Nov 2011) | 3 lines -Changed paths: - M /trunk/NEWS - M /trunk/configure.ac - M /trunk/doc/doxygen.cfg.in - M /trunk/msvc/config.h +commit 45999b756e2b6491eabcd548f7eb1453ab7fb365 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Thu Feb 14 22:59:20 2013 +0100 -Bumping version to 1.2.11 + Next release will be 1.2.13 +commit 08198b1215e511c67d27e29594cb0ae1e282ceec +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 21:04:41 2013 +0100 ------------------------------------------------------------------------- -r245 | jb | 2011-11-14 10:26:47 +0000 (Mon, 14 Nov 2011) | 3 lines -Changed paths: - M /trunk/INSTALL - M /trunk/README + Update some comments now that Windows 95 is no longer supported + + Signed-off-by: Diego Biurrun <diego@biurrun.de> -Update README and INSTALL to be a bit less out-of-date +commit 3a5b5a7de809124d3ba1027bcb3dbc3aed97e8a4 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 20:22:39 2013 +0100 + doxygen: Fix typo and drop wrong EXCLUDE + + Signed-off-by: Diego Biurrun <diego@biurrun.de> ------------------------------------------------------------------------- -r244 | jb | 2011-10-26 05:10:24 +0000 (Wed, 26 Oct 2011) | 3 lines -Changed paths: - M /trunk/Makefile.am +commit be8000902de468717540e678bdf9c000af2e98f3 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 18:58:52 2013 +0100 -Fix "doc" Makefile target + gitignore: Use directory-specific patterns; use wildcard for config.foo + + Signed-off-by: Diego Biurrun <diego@biurrun.de> +commit b9def08ea38f7509a039a362f20a996914c1545b +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 11:29:08 2013 -0800 ------------------------------------------------------------------------- -r243 | jb | 2011-10-26 05:01:11 +0000 (Wed, 26 Oct 2011) | 12 lines -Changed paths: - M /trunk/src/common.h + src: mark tables static and constant. -Win32: Drop #define of snprintf() to _snprintf() if the former is undefined. +commit 391ba536164924b0a2b78d9c167661c717f3c2c2 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 11:16:33 2013 -0800 -This workaround was added for MinGW originally, but nowadays MinGW supports -snprintf() directly so it has become unnecessary. + csstables: mark static constant. -Furthermore this can play havoc with Cygwin which does not have a _snprintf() -declaration and gives implicit function declaration warnings. Depending on -compiler flags, this can be a fatal error. +commit b3ee829a5e321539ff8ca377637e0b4ac8699ed0 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 11:14:33 2013 -0800 -Patch by Diego Biurrun - diego at biurrun d0t de + build: include the msvc directory in the distribution. +commit 58355c7e8726444aea52b08958495ff43d58b8d5 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 11:08:57 2013 -0800 ------------------------------------------------------------------------- -r242 | jb | 2011-10-26 04:59:23 +0000 (Wed, 26 Oct 2011) | 8 lines -Changed paths: - M /trunk/src/device.c + libdvdcss: use a static constant array instead of a variable to hold the cache sig. -Win32: consistently use snprintf() instead of _snprintf() +commit 5cb06542b1a0c88e585bb78dc00d0d31970e5833 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 11:03:13 2013 -0800 -Both functions are available on Cygwin and MinGW nowadays so there is -no need to be inconsistent anymore. + ioctl: rename DVD_INVALIDATE_AGID to DVDCSS_INVALIDATE_AGID + + The reason for the rename is that the Linux kernel userspace headers + are defining their own version of DVD_INVALIDATE_AGID which has a + different meaning (it's an enumeration, not a command). -Patch by Diego Biurrun - diego at biurrun d0t de +commit 20621b7176cab00a967d98a3e25282a0d675b09c +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 10:58:20 2013 -0800 + doxygen: update configuration file to avoid warnings. ------------------------------------------------------------------------- -r241 | jb | 2011-08-16 10:41:24 +0000 (Tue, 16 Aug 2011) | 4 lines -Changed paths: - M /trunk/INSTALL - M /trunk/README +commit 76f088780b25aa2476039a98ee963de6533a8ca1 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 10:54:44 2013 -0800 -Fix typos in README and INSTALL + pkg-config: fix include path, it was always wrong. + + Not only the headers are installed in $includedir/dvdcss rather than + libdvdcss but there was a missing dollar sign in front of the first + variable. -Patch by bryce, ref http://trac.videolan.org/vlc/ticket/5200 +commit 490cb7d934163e0ff0a319786720096b2bf2fd35 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 10:52:49 2013 -0800 ------------------------------------------------------------------------- -r240 | jb | 2011-03-23 15:00:06 +0000 (Wed, 23 Mar 2011) | 3 lines -Changed paths: - M /trunk/src/libdvdcss.h + build: allow opt-out from maintainer mode. -Remove excessive whitespace +commit 5007bfb39187e6d0633f8d51a28c88b7c9a9ad48 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 10:51:50 2013 -0800 + build: use dnl for comments in configure.ac. ------------------------------------------------------------------------- -r239 | jb | 2011-03-23 14:59:36 +0000 (Wed, 23 Mar 2011) | 5 lines -Changed paths: - M /trunk/src/css.c +commit 29af7f48ed02aefb1342e5be57c0ae6a1336935c +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 07:32:00 2013 -0800 -Fix a small memleak + build: fix apidoc generation and install it as well. + + This removes the LaTeX documentation generation, and makes sure that + if doc is enabled, it's built and installed as well (using htmldir). -Reported by Thélesphonse Bigorneault +commit 059709270c0abfc70bf4c493e0a3ca3e6225ea79 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 08:12:24 2013 -0800 + build: generate ChangeLog from git, if git is present. + + This would work both from the repository and from the tarball. ------------------------------------------------------------------------- -r238 | jb | 2011-02-09 22:48:29 +0000 (Wed, 09 Feb 2011) | 3 lines -Changed paths: - M /trunk/doc/doxygen.cfg.in +commit 75590b889feb6cf518d624fb014555269f53657f +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 08:05:09 2013 -0800 -Update documentation version + build: do not build the .tar.gz archive +commit d3b3d398030dc1e57cebb7f9756c658b6f071eaf +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 07:58:45 2013 -0800 ------------------------------------------------------------------------- -r237 | reimar | 2010-09-25 14:21:47 +0000 (Sat, 25 Sep 2010) | 3 lines -Changed paths: - M /trunk/src/libdvdcss.c + build: install the documentation files (but not INSTALL) + + The INSTALL file just needs to be distributed. -Ensure dvdcss->css.p_disc_key is always initialized, -even if _dvdcss_disckey fails. +commit e9a536a00d337e79fde3b69bf5461f8bedda9391 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 16:17:42 2013 +0100 ------------------------------------------------------------------------- -r236 | jb | 2010-08-02 15:59:13 +0000 (Mon, 02 Aug 2010) | 9 lines -Changed paths: - M /trunk/src/css.h - M /trunk/src/device.h - M /trunk/src/libdvdcss.h + Replace memset(0) by zero initializations + + Signed-off-by: Diego Biurrun <diego@biurrun.de> -Make libdvdcss headers self-sufficient +commit 1ea1dffd2d44956e8bd1ff92bdc2035376fb6272 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 18:24:01 2013 +0100 -This patch adds required #includes to libdvdcss headers so that they can be used -without other headers as prerequisites. -This leaves out limits.h and stdint.h, for the moment, since they aren't on all systems. + build: Use silent build rules by default + + Signed-off-by: Diego Biurrun <diego@biurrun.de> -Patch by Diego Biurrun - diego at biurrun d0t de +commit 043e7f53033b8ed8fd9b04f719e08c5cf23409e5 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 17:43:46 2013 +0100 + + build: Add -mwin32 to CFLAGS on Cygwin instead of globally defining WIN32 + + It's better to have gcc enable all Windows-related flags and adjust its + behavior in a predictable fashion, rather than do parts of it manually. + +commit 5e6047bd1eacd57bb4e3164110b1c043f8ed30f1 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 18:22:15 2013 +0100 + + Fix a number of spelling and grammar errors + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + +commit b3a1b17b01f8da7cf038bc7d01cd6c90582875f1 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 16:51:54 2013 +0100 + + gitignore: Add config.cache + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + +commit 6ad715c39f7d0d06e7cc0e17190bf13ca3fe635f +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 16:48:04 2013 +0100 + + AUTHORS: Add Diego#1 and Diego#2 + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 193ed81a73ccc8f54270810ee957f72447f2aa3f +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 16:46:27 2013 +0100 + + AUTHORS: Drop obsolete CVS/SVN login and snail-mail fields + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit b0ab71d530b8a9553ce5d1986779ec8766c13e40 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 15:05:37 2013 +0100 + + Drop ChangeLog file; it is no longer necessary with Git. + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit bec71804e527198aeaaccddba807e6aef1cd6a21 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 03:31:19 2013 +0100 + + Drop BSDI support code. + + Around 1100 out of 6100 lines total are dedicated to BSDI support. + This is a totally absurd ratio for a completely fringe OS. + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit d7f38cee4dcb64f99f493e3a0dfeef57dd165be3 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 15:31:10 2013 +0100 + + AUTHORS: Convert to UTF-8 + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 5cf584c09e12517a889e176d1aa6a906d584b763 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 16:30:34 2013 +0100 + + Remove leftover Subversion $Id$ markers + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 2fc9238f7fabd783cf681d14d2d9058071da4796 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 16:16:41 2013 +0100 + + dvd_region: Drop unused-but-set variable + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit dacda2a5596a9a956e7b192c87f9ab8eedb72c43 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 01:32:14 2013 +0100 + + build: Refactor an instance of system-specific O_BINARY-related ifdeffery + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 45b27b0629da78813838f6bcdaaf5421490ba44a +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 07:27:35 2013 -0800 + + git: ignore the libtool m4 files. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 14dc79797a4b0300572efe53b133c1971bdd1651 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 07:26:17 2013 -0800 + + build: get rid of recursion within doc/ for Doxygen API doc. + + It still recurses for latex documentation. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 5c454e815a7abfeed7e48abc2a7df3071b16fcb4 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Thu Feb 14 16:46:40 2013 +0100 + + Win32: use the correct HAVE_BROKEN_MKDIR define + +commit c5fc11a1179a088c9cafb14a1b5cdf40adbb946c +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 06:48:36 2013 -0800 + + build: check for POSIX mkdir() function. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 391036711755ec403aca99e8668d5755a44be32f +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 07:11:22 2013 -0800 + + build: don't use tiered header checks. + + This check is more reliable, and should be easier to deal with. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 1987df11ddbb2be00147e8affd66d740a84cfeee +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 07:00:25 2013 -0800 + + build: use m4/attributes.m4 from xine/feng to check for cflags and visibility. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 452734e367847d02f5bbbd3228bebf099d6abcd8 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 07:00:05 2013 -0800 + + build: add support for macros in m4/ directory + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit d8d519ca07f7fd1fdc5853bd05b1e076e9df3601 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 06:54:45 2013 -0800 + + build: fix make dist now that the bootstrap script is gone + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 576475c03f4569b6678d7bea05988396eb2be3a7 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Thu Feb 14 06:35:31 2013 -0800 + + build: remove obsolete bootstrap script. + + Just run `autoreconf -i` and that would do. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 42ac89492c9de73f66b70643e0a1045ad7091f9a +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Thu Feb 14 13:05:33 2013 +0100 + + Win32: define and use _WIN32_IE for shell api + + This effectively drops support for Windows 95 + +commit 2a6cd147d7347e509d628c1b9fe5763a97110920 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Wed Feb 13 19:04:24 2013 -0800 + + dvd_region: move ioctl_SendRPC in dvd_region.c; mark functions static. + + This basically ensures that no unused, unexported functions are built + into the library. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 1ee4cfdfd0b57372111aec320597376805f4cc9d +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Wed Feb 13 19:02:08 2013 -0800 + + build: allow once again building of dvd_region binary + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit efd20464a07fdff475b6cecedb8b743f32efe905 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Wed Feb 13 19:01:23 2013 -0800 + + src: mark _dvdcss_titlekey static as it's never used outside of the unit + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 03949ac8b59f0cf68649745f8bc310da9d5a1e4f +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Wed Feb 13 17:39:01 2013 -0800 + + build: fix messed up rule in building latex documentation. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit ee2b1c28e2b36e0c9fb0a8bd06d948bd4aae8ddf +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Wed Feb 13 17:36:48 2013 -0800 + + build: get rid of recursion for building the library and the csstest program. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 078b6df43b0482264defa2d2beeb9158e89b2da1 +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Wed Feb 13 17:27:13 2013 -0800 + + build: update to libtool 2 + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit f72d6689a0dfd86667ac18d2ae48fa1a9271aeed +Author: Diego Elio Pettenò <flameeyes@flameeyes.eu> +Date: Wed Feb 13 17:24:49 2013 -0800 + + build: update autotools to modern format. + + This includes quite a bit of fixes all around that allows it to build + with automake 1.13 and autoconf 2.68. + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 24968037296bdb623fc5d47a699c226c4122d213 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Thu Feb 14 01:49:28 2013 +0100 + + Win32: fix signedness warning + +commit 1517e70fbb0a94e75e9c2032a92f0b90b4026913 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Thu Feb 14 01:42:14 2013 +0100 + + Fix compilation with MSVC + +commit d08ae210cac8a07ef80b361aaa6becb268e75a1f +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Thu Feb 14 01:00:39 2013 +0100 + + Win32: correct include for lseeki64 + +commit b468e1f1ac9c4ec594aedcd68911bd1d2acff929 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 00:45:18 2013 +0100 + + build: Refactor system-specific ifdeffery around raw device access + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit f25268db2b31006b3aa0ffeb011482328e0a86aa +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 00:06:58 2013 +0100 + + configure.ac: Remove unused global DVDCSSDIST preprocessor flag + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit c5ef915232b096cbe750465066089bf926eea22a +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Feb 14 00:10:21 2013 +0100 + + build: Replace system-specific ifdeffery by proper sys/uio.h check + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 0e48b8313f3b70bc0cb0806385f4c5786efd0c64 +Author: Diego Biurrun <diego@biurrun.de> +Date: Wed Feb 13 22:50:01 2013 +0100 + + device: Eliminate some unnecessary ifdefs + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 77f561a53feaf5b2ebaf55e00e43189c8b9be237 +Author: Diego Biurrun <diego@biurrun.de> +Date: Wed Feb 13 22:50:00 2013 +0100 + + build: win32: Surround Windows-specific code by appropriate ifdef + + Also drop the now unnecessary direct.h configure.ac check. + That header file is always available on Windows. + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit 84b0992477e07748f6a8cb5109ed56616d6b10cb +Author: Diego Biurrun <diego@biurrun.de> +Date: Wed Feb 13 14:43:52 2013 +0100 + + build: Drop unnecessary local SYS_BEOS config.h #define + + __BEOS__ is always available and can be used instead. + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> +commit a9bf4c166d6af89a7310a61ae082944f9d960b22 +Author: Diego Biurrun <diego@biurrun.de> +Date: Wed Feb 13 14:43:51 2013 +0100 ------------------------------------------------------------------------- -r235 | jb | 2010-08-02 15:41:14 +0000 (Mon, 02 Aug 2010) | 8 lines -Changed paths: - M /trunk/src/common.h - M /trunk/src/css.h - M /trunk/src/csstables.h - M /trunk/src/device.h - M /trunk/src/ioctl.h - M /trunk/src/libdvdcss.h + build: Drop unnecessary local SYS_OS2 config.h #define + + __OS2__ is always available and can be used instead. + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> -Add multiple inclusion guards to header files +commit 0938da8a3ebb4b9e1e3c2383a4821fa8eb524a87 +Author: Diego Biurrun <diego@biurrun.de> +Date: Wed Feb 13 14:43:50 2013 +0100 -Most header files in libdvdcss lack multiple inclusion guards, although they are -a sensible thing to have for header files. This adds them where currently missing. + build: Drop unnecessary local SYS_CYGWIN config.h #define + + __CYGWIN__ is always available and can be used instead. + + Signed-off-by: Diego Biurrun <diego@biurrun.de> + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> -Patch by Diego Biurrun - diego at biurrun d0t de +commit 1fab727ead1c7f84300cae8d077a24c9c9aa83aa +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Feb 11 01:21:26 2013 +0100 + Win32: Fix broken mkdir() invocations that need to be mapped to _mkdir() + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit c19c82dff9232cf8aa60dc0ff267e5e24dadbd90 +Author: Diego Biurrun <diego@biurrun.de> +Date: Sun Feb 10 12:59:16 2013 +0100 + + cygwin: Drop some obsolete POSIX int types fallbacks + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit e7df02a90f2aff82d24603da162602ee381205d2 +Author: Diego Biurrun <diego@biurrun.de> +Date: Thu Jan 31 21:51:01 2013 +0100 + + ioctl.h Drop some pointless ifdefs around a set of harmless #defines + + Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org> + +commit ca926c62869bbb9079a2ddc1af5f7f08f356dd9b +Author: Reimar Döffinger <Reimar.Doeffinger@gmx.de> +Date: Tue Nov 6 18:15:08 2012 +0000 ------------------------------------------------------------------------- -r234 | jb | 2010-08-02 15:38:08 +0000 (Mon, 02 Aug 2010) | 7 lines -Changed paths: - M /trunk/src/bsdi_dvd.h + Use calloc instead of malloc+memset. + + Besides being simpler, it fixes the malloc failure + checks which currently are useless since we would + crash in memset first. -Use filename as multiple inclusion guard +commit 31bf1942f771409e9375a4daf8a53b309cd3a088 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Wed Aug 29 08:57:27 2012 +0000 -For some reason bsdi_dvd.h does not use the (full) filename as multiple -inclusion guard. + Support ELF visibility attribute -Patch by Diego Biurrun - diego at biurrun d0t de +commit 5c8ae97ccd0b5ee13c66f249efb630645622eaf9 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Fri Jun 15 11:35:09 2012 +0000 ------------------------------------------------------------------------- -r233 | jb | 2010-08-02 14:04:16 +0000 (Mon, 02 Aug 2010) | 7 lines -Changed paths: - M /trunk/doc/doxygen.cfg.in + Automake 12 is out -Shut up doxygen run +commit 839b9184e8fb92040e2004845532f2b15c0e8f23 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Sun Mar 11 13:35:44 2012 +0000 -Doxygen is terribly verbose by default and spams the console with useless by -the metric ton. This patch makes its output more terse and thus more sensible. + Update ChangeLog -Patch by Diego Biurrun - diego at biurrun d0t de +commit 673cf17677756d73647eaed5ceb2b2e108be1f93 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Sun Mar 11 13:33:49 2012 +0000 ------------------------------------------------------------------------- -r232 | jb | 2010-08-02 13:56:10 +0000 (Mon, 02 Aug 2010) | 4 lines -Changed paths: - M /trunk/src + Prepare 1.2.12 -svn:ignore src/libdvdcss.pc +commit f45f9f5f2fa97a0bd97c4bf84d72a01b2358a9ed +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Sun Mar 11 12:37:40 2012 +0000 -As tipped by Diego - ------------------------------------------------------------------------- -r231 | jb | 2010-05-10 10:03:06 +0000 (Mon, 10 May 2010) | 5 lines -Changed paths: - M /trunk/src/css.c - -Try other methods also if GetBusKey fails instead of failing completely - -Patch from MPlayer, from Reimar Döffinger, forwarded by Diego Biurrun + Update Authors file +commit c514694dbbf9c94732a26678c144863a77e8bd58 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Sat Feb 18 16:22:03 2012 +0000 ------------------------------------------------------------------------- -r230 | sam | 2009-09-02 22:07:32 +0000 (Wed, 02 Sep 2009) | 3 lines -Changed paths: - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - -Remove the RPC-II sanity check and only issue a warning. Capable drives are -far too common. - ------------------------------------------------------------------------- -r229 | sam | 2009-09-02 22:01:07 +0000 (Wed, 02 Sep 2009) | 2 lines -Changed paths: - M /trunk/src/device.c - -Use 64-bit IO and binary mode on OS/2. Patch courtesy of KO Myung-Hun. - ------------------------------------------------------------------------- -r228 | sam | 2009-05-13 21:28:53 +0000 (Wed, 13 May 2009) | 1 line -Changed paths: - M /trunk/src/css.c - -Prepend 0x to the region mask for clarity. ------------------------------------------------------------------------- -r227 | sam | 2009-05-13 21:00:31 +0000 (Wed, 13 May 2009) | 1 line -Changed paths: - M /trunk/src/libdvdcss.c - -Duh, typo in the RPC-II sanity check. ------------------------------------------------------------------------- -r226 | sam | 2009-05-13 20:54:40 +0000 (Wed, 13 May 2009) | 2 lines -Changed paths: - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - -Add support for the DVDCSS_IGNORE_RPC environment variable in order to -bypass our new RPC-II sanity check. ------------------------------------------------------------------------- -r225 | sam | 2009-05-13 20:54:39 +0000 (Wed, 13 May 2009) | 1 line -Changed paths: - M /trunk/src/css.c - -Add a debug message in the copyright information retrieval. ------------------------------------------------------------------------- -r224 | sam | 2009-05-13 20:54:37 +0000 (Wed, 13 May 2009) | 3 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/libdvdcss.c - -Check drive's RPC status before trying to access a scrambled disc. Patch -provided by Ori Avtalion <ori@avtalion.name> and refactored by Sam Hocevar -<sam@hocevar.net>. ------------------------------------------------------------------------- -r223 | sam | 2009-05-13 20:54:35 +0000 (Wed, 13 May 2009) | 1 line -Changed paths: - M /trunk/src/libdvdcss.c - -Fix a potential format string crash. ------------------------------------------------------------------------- -r221 | sam | 2009-02-09 00:45:44 +0000 (Mon, 09 Feb 2009) | 1 line -Changed paths: - M /trunk/src/css.c - M /trunk/src/device.c - M /trunk/src/error.c - M /trunk/src/ioctl.c - M /trunk/src/libdvdcss.c - -Remove occurrences of "this program" from the license headers. ------------------------------------------------------------------------- -r220 | sam | 2009-02-09 00:45:33 +0000 (Mon, 09 Feb 2009) | 1 line -Changed paths: - M /trunk/AUTHORS - M /trunk/configure.ac - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - -Adding OS/2 support, courtesy of KO Myung-Hun <komh@chollian.net>. ------------------------------------------------------------------------- -r219 | jb | 2009-02-09 00:03:47 +0000 (Mon, 09 Feb 2009) | 5 lines -Changed paths: - M /trunk/src/common.h - M /trunk/src/css.c - M /trunk/src/css.h - M /trunk/src/csstables.h - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/error.c - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - -Update the FSF address. - -Patch by Diego Biurrun - - ------------------------------------------------------------------------- -r218 | sam | 2008-08-29 19:00:14 +0000 (Fri, 29 Aug 2008) | 2 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/NEWS - M /trunk/configure.ac - M /trunk/msvc/config.h - - * Bump version number to 1.2.10. - * Update NEWS and ChangeLog. ------------------------------------------------------------------------- -r217 | sam | 2008-08-29 18:57:52 +0000 (Fri, 29 Aug 2008) | 2 lines -Changed paths: - M /trunk/src/Makefile.am - - * src/Makefile.am: bump the library minor version since we ship an extra - symbole (dvdcss_is_scrambled). ------------------------------------------------------------------------- -r216 | sam | 2008-08-29 18:57:51 +0000 (Fri, 29 Aug 2008) | 1 line -Changed paths: - M /trunk/configure.ac - M /trunk/src/Makefile.am - A /trunk/src/libdvdcss.pc.in - - * Ship a .pc file with the library. ------------------------------------------------------------------------- -r215 | sam | 2008-08-29 18:57:48 +0000 (Fri, 29 Aug 2008) | 1 line -Changed paths: - M /trunk/libdvdcss.spec - M /trunk/src/common.h - M /trunk/src/css.c - M /trunk/src/device.h - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/error.c - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - M /trunk/test/csstest.c - - * Update copyeight information here and there. ------------------------------------------------------------------------- -r214 | sam | 2008-08-29 18:57:45 +0000 (Fri, 29 Aug 2008) | 3 lines -Changed paths: - A /trunk/.gitignore - M /trunk/bootstrap - M /trunk/configure.ac - - * bootstrap: update bootstrapping script. - * configure.ac: hide autotools files in .auto/. - * .gitignore: add an ignore file for git-svn users. ------------------------------------------------------------------------- -r213 | sam | 2008-08-29 18:57:42 +0000 (Fri, 29 Aug 2008) | 2 lines -Changed paths: - M /trunk/src/libdvdcss.c - - * libdvdcss.c: ignore failure to get the disc key in case we have a - chance to decrypt anyway afterwards. Patch courtesy of Diego Biurrun. ------------------------------------------------------------------------- -r212 | sam | 2008-07-13 12:52:22 +0000 (Sun, 13 Jul 2008) | 2 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/css.h - M /trunk/src/csstables.h - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/ioctl.c - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - - * Convert all source code to UTF-8, or Doxygen will fail to generate proper - LaTeX documents. ------------------------------------------------------------------------- -r211 | sam | 2008-07-13 12:52:19 +0000 (Sun, 13 Jul 2008) | 1 line -Changed paths: - M /trunk/doc/doxygen.cfg.in - - * Update outdated Doxygen configuration file using doxygen -u. ------------------------------------------------------------------------- -r210 | massiot | 2008-07-12 12:19:57 +0000 (Sat, 12 Jul 2008) | 5 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/libdvdcss.c - - * src/libdvdcss.c: initialize p_disc_key in the case when DVD is encrypted - but no ioctl is available ; - * src/css.c: initialize p_disc_key in the case when key decryption fails. -Patch by Kirill Belokurov. - ------------------------------------------------------------------------- -r209 | massiot | 2008-07-11 17:23:25 +0000 (Fri, 11 Jul 2008) | 3 lines -Changed paths: - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/libdvdcss.c - - * src/libdvdcss.c: add dvdcss_is_scrambled() function, patch courtesy of - Olivier Rolland. - ------------------------------------------------------------------------- -r208 | robux4 | 2008-01-07 16:48:35 +0000 (Mon, 07 Jan 2008) | 1 line -Changed paths: - M /trunk/src/dvdcss/dvdcss.h - -nicer comment, patch by Diego Biurrun ------------------------------------------------------------------------- -r207 | robux4 | 2007-09-17 12:10:20 +0000 (Mon, 17 Sep 2007) | 1 line -Changed paths: - M /trunk/src/bsdi_dvd.h - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/ioctl.h - -(from Diego Biurrun) Identifiers starting with two underscores or an underscore and capital letters are reserved for the system in C. ------------------------------------------------------------------------- -r206 | robux4 | 2007-09-17 12:07:41 +0000 (Mon, 17 Sep 2007) | 4 lines -Changed paths: - M /trunk/src/libdvdcss.c - -(from Diego Biurrun) This patch removes the following warning when compiling MPlayer: - -libdvdcss.c:145: warning: redundant redeclaration of 'dvdcss_interface_2' -dvdcss/dvdcss.h:70: warning: previous declaration of 'dvdcss_interface_2' was here ------------------------------------------------------------------------- -r205 | robux4 | 2007-07-29 10:14:53 +0000 (Sun, 29 Jul 2007) | 7 lines -Changed paths: - M /trunk/src/libdvdcss.c - -Pathc from iive (via Diego Biurrun) -Date: Sat Jul 7 01:22:51 2007 - -Fix crash on some DVDs -sprintf(tmp,"%.02x",(char)0xef); would print "ffffffef" instead of "ef", -in this case this leads to local array buffer overflow and hard to trace stack corruption. -The quick, easy & dirty solution is to use (unsigned char) or (uint8_t) ------------------------------------------------------------------------- -r204 | xtophe | 2007-07-15 22:23:39 +0000 (Sun, 15 Jul 2007) | 2 lines -Changed paths: - M /trunk/bootstrap - -support automake 1.10 - ------------------------------------------------------------------------- -r203 | robux4 | 2006-11-07 16:27:40 +0000 (Tue, 07 Nov 2006) | 2 lines -Changed paths: - M /trunk/src/common.h - M /trunk/src/device.c - -fix cygwin compilation regarding the lseek change -(patch by Diego Biurrun) ------------------------------------------------------------------------- -r202 | robux4 | 2006-11-01 14:31:51 +0000 (Wed, 01 Nov 2006) | 2 lines -Changed paths: - M /trunk/src/common.h - -fix compilation on MINGW (patch by Diego Biurrun) -(lseek vs lseek64 typo) ------------------------------------------------------------------------- -r201 | sam | 2006-09-19 23:03:53 +0000 (Tue, 19 Sep 2006) | 2 lines -Changed paths: - M /trunk/src/libdvdcss.c - - * Fixed spelling in documentation. Also testing buildbot. - ------------------------------------------------------------------------- -r200 | sam | 2006-09-19 22:28:06 +0000 (Tue, 19 Sep 2006) | 2 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/libdvdcss.c - - * Fix warnings due to signed / unsigned pointer targets. - ------------------------------------------------------------------------- -r199 | sam | 2006-09-19 22:27:46 +0000 (Tue, 19 Sep 2006) | 2 lines -Changed paths: - M /trunk/bootstrap - - * Update bootstrap script. - ------------------------------------------------------------------------- -r198 | robux4 | 2006-09-13 13:12:23 +0000 (Wed, 13 Sep 2006) | 4 lines -Changed paths: - M /trunk/src/libdvdcss.c - -fallback to USERPROFILE environment variable for caching CSS keys when -HOME is not set (for MinGW builds running outside of MinGW). -patch from MPlayer via Diego Biurrun (diego at biurrun dot de) - ------------------------------------------------------------------------- -r197 | robux4 | 2006-09-13 13:11:25 +0000 (Wed, 13 Sep 2006) | 2 lines -Changed paths: - M /trunk/src/device.c - -now accepts X:\ as a device name, as well as X: -patch from MPlayer via Diego Biurrun (diego at biurrun dot de) ------------------------------------------------------------------------- -r196 | sam | 2006-03-30 14:31:12 +0000 (Thu, 30 Mar 2006) | 2 lines -Changed paths: - M /trunk/configure.ac - - * Oops, forgot to commit configure.ac when removing the debian/ directory. - ------------------------------------------------------------------------- -r195 | sam | 2006-03-30 14:30:43 +0000 (Thu, 30 Mar 2006) | 3 lines -Changed paths: - M /trunk/Makefile.am - D /trunk/debian - - * Removed the debian/ directory. Debian packaging is now handled - separately, in the pkg-multimedia repository. - ------------------------------------------------------------------------- -r194 | sam | 2006-01-26 20:48:06 +0000 (Thu, 26 Jan 2006) | 3 lines -Changed paths: - M /trunk/src/device.c - - * src/device.c: reduced code duplication and fixed a pointer/integer - confusion in the OS X drive detection. - ------------------------------------------------------------------------- -r193 | sam | 2005-11-09 22:12:32 +0000 (Wed, 09 Nov 2005) | 3 lines -Changed paths: - M /trunk/src/common.h - - * src/common.h: do not override lseek on Cygwin, only on mingw32. Cygwin - provides its own 64-bit offset lseek. Patch courtesy of the MPlayer team. - ------------------------------------------------------------------------- -r192 | sam | 2005-10-26 16:58:08 +0000 (Wed, 26 Oct 2005) | 2 lines -Changed paths: - M /trunk/debian/control - - * debian/control: build-depend on tetex-extra (needed by doxygen). - ------------------------------------------------------------------------- -r191 | robux4 | 2005-09-04 08:49:23 +0000 (Sun, 04 Sep 2005) | 1 line -Changed paths: - M /trunk/src/dvdcss/dvdcss.h - -* libdvdcss: more fixes for DLL building ------------------------------------------------------------------------- -r190 | robux4 | 2005-09-04 08:31:58 +0000 (Sun, 04 Sep 2005) | 1 line -Changed paths: - M /trunk/msvc/config.h - -* libdvdcss: the current version is 1.2.9 ------------------------------------------------------------------------- -r189 | robux4 | 2005-09-04 08:31:26 +0000 (Sun, 04 Sep 2005) | 1 line -Changed paths: - M /trunk/src/device.c - -* libdvdcss: MSVC7 compilation fixes (shouldn't break mingw32) ------------------------------------------------------------------------- -r188 | robux4 | 2005-09-04 08:25:26 +0000 (Sun, 04 Sep 2005) | 1 line -Changed paths: - M /trunk/src/common.h - M /trunk/src/ioctl.h - M /trunk/src/libdvdcss.h - -* libdvdcss: MSVC7 compilation fixes (shouldn't break mingw32) ------------------------------------------------------------------------- -r187 | robux4 | 2005-09-04 07:54:41 +0000 (Sun, 04 Sep 2005) | 1 line -Changed paths: - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/libdvdcss.c - -* libdvdcss: oops mismatch #ifdef ------------------------------------------------------------------------- -r186 | robux4 | 2005-09-04 07:43:15 +0000 (Sun, 04 Sep 2005) | 1 line -Changed paths: - M /trunk/AUTHORS - M /trunk/COPYING - M /trunk/ChangeLog - M /trunk/INSTALL - M /trunk/Makefile.am - M /trunk/NEWS - M /trunk/README - M /trunk/debian/Makefile.am - M /trunk/doc/Makefile.am - M /trunk/doc/doxygen.cfg.in - M /trunk/doc/footer.html - M /trunk/doc/header.html - M /trunk/msvc/config.h - M /trunk/msvc/csstest.dsp - M /trunk/msvc/libdvdcss.dsp - M /trunk/msvc/workspace.dsw - M /trunk/src/Makefile.am - M /trunk/src/bsdi_dvd.h - M /trunk/src/bsdi_ioctl.c - M /trunk/src/common.h - M /trunk/src/css.c - M /trunk/src/css.h - M /trunk/src/csstables.h - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/dvdcss/Makefile.am - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/error.c - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - M /trunk/test/Makefile.am - M /trunk/test/csstest.c - M /trunk/test/dvd_region.c - -* libdvdcss: set EOL style in SVN ------------------------------------------------------------------------- -r185 | robux4 | 2005-09-04 07:39:37 +0000 (Sun, 04 Sep 2005) | 1 line -Changed paths: - M /trunk/src/dvdcss/dvdcss.h - -* libdvdcss: better DLL/library difference ------------------------------------------------------------------------- -r184 | robux4 | 2005-09-04 07:36:01 +0000 (Sun, 04 Sep 2005) | 1 line -Changed paths: - M /trunk/src/dvdcss/dvdcss.h - -* libdvdcss: allow building DLL exports ------------------------------------------------------------------------- -r183 | sam | 2005-09-03 13:17:55 +0000 (Sat, 03 Sep 2005) | 4 lines -Changed paths: - M /trunk/configure.ac - M /trunk/doc - M /trunk/test - - * configure.ac: patch from Diego Pettenò to let the user disable the - documentation build. - * test doc: added missing svn:ignore entries. - ------------------------------------------------------------------------- -r182 | massiot | 2005-09-01 17:12:42 +0000 (Thu, 01 Sep 2005) | 2 lines -Changed paths: - M /trunk/bootstrap - - * Revert [181] since it breaks on some OS X versions. - ------------------------------------------------------------------------- -r181 | massiot | 2005-09-01 12:40:25 +0000 (Thu, 01 Sep 2005) | 3 lines -Changed paths: - M /trunk/bootstrap - - * bootstrap: Use libtoolize instead of glibtoolize when it is available - because libtool under OS X sucks. - ------------------------------------------------------------------------- -r180 | massiot | 2005-08-31 19:07:00 +0000 (Wed, 31 Aug 2005) | 2 lines -Changed paths: - M /trunk/src/device.c - - * src/device.c: Under Windows remove the trailing backslash. - ------------------------------------------------------------------------- -r179 | sam | 2005-08-30 10:20:18 +0000 (Tue, 30 Aug 2005) | 2 lines -Changed paths: - M /trunk/configure.ac - M /trunk/src/Makefile.am - - * configure.ac: forward -framework options to the linker. - ------------------------------------------------------------------------- -r178 | massiot | 2005-08-30 09:48:19 +0000 (Tue, 30 Aug 2005) | 2 lines -Changed paths: - M /trunk/src/device.c - - * src/device.c: Fixed compilation under Darwin. - ------------------------------------------------------------------------- -r177 | sam | 2005-08-29 22:25:20 +0000 (Mon, 29 Aug 2005) | 2 lines -Changed paths: - M /trunk/src/device.c - - * src/device.c: tried to port the device autodetection to OS X. - ------------------------------------------------------------------------- -r176 | sam | 2005-08-29 22:02:55 +0000 (Mon, 29 Aug 2005) | 3 lines -Changed paths: - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/libdvdcss.c - - * src/device.c: if the target is the empty string, attempt to autodetect - the DVD drive instead of giving up. - ------------------------------------------------------------------------- -r175 | sam | 2005-08-23 16:15:38 +0000 (Tue, 23 Aug 2005) | 3 lines -Changed paths: - M /trunk/doc/Makefile.am - D /trunk/doc/doxygen.cfg - A /trunk/doc/doxygen.cfg.in (from /trunk/doc/doxygen.cfg:174) - - * doc/Makefile.am: fixed build in a separate directory. Patch courtesy - of Bernard Leak with a few additions. - ------------------------------------------------------------------------- -r173 | sam | 2005-07-11 12:32:57 +0000 (Mon, 11 Jul 2005) | 2 lines -Changed paths: - M /trunk/ChangeLog - - * Updated ChangeLog. - ------------------------------------------------------------------------- -r172 | sam | 2005-07-11 12:31:58 +0000 (Mon, 11 Jul 2005) | 2 lines -Changed paths: - M /trunk/src/Makefile.am - - * src/Makefile.am: bumped libtool version information. - ------------------------------------------------------------------------- -r171 | sam | 2005-07-11 12:25:18 +0000 (Mon, 11 Jul 2005) | 2 lines -Changed paths: - M /trunk/debian/changelog - M /trunk/debian/control - - * debian/*: updated Debian packaging information. - ------------------------------------------------------------------------- -r170 | sam | 2005-07-11 12:23:07 +0000 (Mon, 11 Jul 2005) | 2 lines -Changed paths: - M /trunk/src/css.c - - * src/css.c: grmbl, compile fix. - ------------------------------------------------------------------------- -r169 | massiot | 2005-07-11 12:15:10 +0000 (Mon, 11 Jul 2005) | 2 lines -Changed paths: - M /trunk/NEWS - M /trunk/configure.ac - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - - * Bumped up version number to 1.2.9. + If unsure, assume the drive is of RPC-I type + + This can happen when patched drives do not answer to ioctl_ReportRPC correctly ------------------------------------------------------------------------- -r168 | sam | 2005-07-11 12:10:43 +0000 (Mon, 11 Jul 2005) | 2 lines -Changed paths: - M /trunk/src/css.c - - * src/css.c: reworked my verbosity patch to fix a compilation issue. - ------------------------------------------------------------------------- -r167 | sam | 2005-07-11 11:58:58 +0000 (Mon, 11 Jul 2005) | 3 lines -Changed paths: - M /trunk/src/ioctl.c - - * src/ioctl.c: under Solaris, use libsmedia for ioctls when available. Code - reworked from a patch courtesy of the MPlayer team. - ------------------------------------------------------------------------- -r166 | sam | 2005-07-11 11:41:15 +0000 (Mon, 11 Jul 2005) | 3 lines -Changed paths: - M /trunk/src/bsdi_ioctl.c - - * src/bsdi_ioctl.c: use memset instead of bzero. Patch courtesy of the - MPlayer team. - ------------------------------------------------------------------------- -r165 | sam | 2005-07-11 11:32:33 +0000 (Mon, 11 Jul 2005) | 3 lines -Changed paths: - M /trunk/src/device.c - M /trunk/src/ioctl.h - - * src/device.c src/ioctl.h: cosmetic fix that uses real Win32 types for - dynamically loaded functions and gets rid of lvalue casts. - ------------------------------------------------------------------------- -r164 | sam | 2005-07-11 11:25:47 +0000 (Mon, 11 Jul 2005) | 2 lines -Changed paths: - M /trunk/src/css.c - - * src/css.c: be slightly more verbose in which keys we manipulate. - ------------------------------------------------------------------------- -r163 | sam | 2005-07-11 11:22:33 +0000 (Mon, 11 Jul 2005) | 2 lines -Changed paths: - M /trunk/bootstrap - - * bootstrap: allow to bootstrap with aclocal/automake version 1.9. - ------------------------------------------------------------------------- -r162 | gbazin | 2004-09-02 12:17:13 +0000 (Thu, 02 Sep 2004) | 1 line -Changed paths: - M /trunk/src/common.h - -* src/common.h: use lseeki64 for file seeking on win32 (works above the 2.1G boundary). ------------------------------------------------------------------------- -r161 | sam | 2004-08-13 13:53:27 +0000 (Fri, 13 Aug 2004) | 4 lines -Changed paths: - M /trunk/src/css.c - - * src/css.c: - + Save the cached key as ASCII in hexadecimal form. - + Overwrite cached files if the data was invalid. - ------------------------------------------------------------------------- -r160 | sam | 2004-08-13 13:40:44 +0000 (Fri, 13 Aug 2004) | 4 lines -Changed paths: - M /trunk/src/libdvdcss.c - - * src/libdvdcss.c: - + Recreate the cache dir information on each launch, in case the - information it contains ever changes. - ------------------------------------------------------------------------- -r159 | sam | 2004-08-11 23:26:35 +0000 (Wed, 11 Aug 2004) | 2 lines -Changed paths: - M /trunk - M /trunk/Makefile.am - D /trunk/autotools - M /trunk/bootstrap - M /trunk/configure.ac - - * Don't put autotools/ under revision control. - ------------------------------------------------------------------------- -r158 | sam | 2004-08-11 23:24:54 +0000 (Wed, 11 Aug 2004) | 2 lines -Changed paths: - D /trunk/autotools/Makefile.am - - * Don't put autotools/ under revision control. - ------------------------------------------------------------------------- -r157 | sam | 2004-08-11 23:04:39 +0000 (Wed, 11 Aug 2004) | 2 lines -Changed paths: - M /trunk/libdvdcss.spec - - * libdvdcss.spec: updated Red Hat rules for RH9. - ------------------------------------------------------------------------- -r156 | sam | 2004-08-11 22:59:42 +0000 (Wed, 11 Aug 2004) | 4 lines -Changed paths: - M /trunk/src/libdvdcss.c - - * src/libdvdcss.c: - + Support for cache directory tags, as proposed on - http://www.brynosaurus.com/cachedir/spec.html . - ------------------------------------------------------------------------- -r155 | sam | 2004-08-11 22:15:30 +0000 (Wed, 11 Aug 2004) | 6 lines -Changed paths: - M /trunk/AUTHORS - M /trunk/src/libdvdcss.c - - * src/libdvdcss.c: - + Append the disc key to the cache directory name to avoid issues with - identical discs which have different encryption keys, thanks to Sven - Heithecker. - + Use - instead of # as a separator in the cache filename. - ------------------------------------------------------------------------- -r154 | sam | 2004-07-05 09:17:20 +0000 (Mon, 05 Jul 2004) | 2 lines -Changed paths: - M /trunk/bootstrap - - * bootstrap: fixed a syntax error. - ------------------------------------------------------------------------- -r153 | sam | 2004-07-05 09:15:35 +0000 (Mon, 05 Jul 2004) | 4 lines -Changed paths: - M /trunk/bootstrap - - * bootstrap: - + Run libtoolize before aclocal. - + Support automake 1.8. - ------------------------------------------------------------------------- -r152 | sam | 2004-02-24 15:47:00 +0000 (Tue, 24 Feb 2004) | 2 lines -Changed paths: - M /trunk - D /trunk/.cvsignore - M /trunk/NEWS - M /trunk/README - M /trunk/autotools - D /trunk/autotools/.cvsignore - M /trunk/bootstrap - M /trunk/debian - D /trunk/debian/.cvsignore - M /trunk/doc - D /trunk/doc/.cvsignore - M /trunk/doc/footer.html - M /trunk/doc/header.html - M /trunk/msvc - D /trunk/msvc/.cvsignore - M /trunk/src - D /trunk/src/.cvsignore - M /trunk/src/bsdi_dvd.h - M /trunk/src/common.h - M /trunk/src/css.c - M /trunk/src/css.h - M /trunk/src/csstables.h - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/dvdcss - D /trunk/src/dvdcss/.cvsignore - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/error.c - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - M /trunk/test - D /trunk/test/.cvsignore - - * Added proper SVN keywords to files and directories (for $Id and ignores). - ------------------------------------------------------------------------- -r141 | sam | 2003-12-11 15:13:40 +0000 (Thu, 11 Dec 2003) | 3 lines -Changed paths: - M /trunk/doc/.cvsignore - M /trunk/doc/doxygen.cfg - - * doc/doxygen.cfg: Updated doxygen configuration. - * doc/.cvsignore: Ignore stamp files. - ------------------------------------------------------------------------- -r140 | sam | 2003-12-11 15:12:42 +0000 (Thu, 11 Dec 2003) | 5 lines -Changed paths: - M /trunk/src/device.c - - * src/device.c: - + Store the off_t values for seek and read in a temporary variable to - work around a strange gentoo gcc behaviour as seen here: - http://www.via.ecp.fr/via/ml/libdvdcss-devel/200312/msg00000.html - ------------------------------------------------------------------------- -r139 | sam | 2003-11-26 20:16:38 +0000 (Wed, 26 Nov 2003) | 2 lines -Changed paths: - M /trunk/libdvdcss.spec - - * libdvdcss.spec: Fixed a syntax error (#1488). - ------------------------------------------------------------------------- -r138 | sam | 2003-11-06 10:12:38 +0000 (Thu, 06 Nov 2003) | 2 lines -Changed paths: - M /trunk/bootstrap - - * bootstrap: remove autom4te.cache before running autoconf - ------------------------------------------------------------------------- -r137 | sam | 2003-09-15 17:12:46 +0000 (Mon, 15 Sep 2003) | 2 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/libdvdcss.c - - * libdvdcss.c: Added more debug messages. - ------------------------------------------------------------------------- -r136 | sam | 2003-09-09 13:17:24 +0000 (Tue, 09 Sep 2003) | 2 lines -Changed paths: - M /trunk/configure.ac - M /trunk/src/css.c - M /trunk/src/device.c - - * src/css.c, src/device.c: more meaningful error messages. - ------------------------------------------------------------------------- -r135 | sam | 2003-09-09 12:32:40 +0000 (Tue, 09 Sep 2003) | 4 lines -Changed paths: - M /trunk/.cvsignore - M /trunk/Makefile.am - M /trunk/NEWS - M /trunk/README - M /trunk/configure.ac - M /trunk/debian/Makefile.am - M /trunk/debian/changelog - A /trunk/debian/compat - M /trunk/debian/control - M /trunk/debian/rules - M /trunk/doc/Makefile.am - M /trunk/doc/footer.html - M /trunk/doc/header.html - M /trunk/test/csstest.c - - * configure.ac: check for doxygen and latex to build documentation. - * doc/Makefile.am: conditionally build documentation. - * debian/*: use debian/compat instead of DH_COMPAT. - ------------------------------------------------------------------------- -r134 | sam | 2003-09-09 12:05:44 +0000 (Tue, 09 Sep 2003) | 2 lines -Changed paths: - M /trunk/bootstrap - - * bootstrap: code clean-up. - ------------------------------------------------------------------------- -r133 | sam | 2003-09-09 10:03:48 +0000 (Tue, 09 Sep 2003) | 3 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/device.c - M /trunk/src/error.c - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - - * Changed _dvdcss_error and _dvdcss_debug to print_error and print_debug - because they aren't libdvdcss functions. - ------------------------------------------------------------------------- -r132 | gbazin | 2003-07-29 19:49:13 +0000 (Tue, 29 Jul 2003) | 3 lines -Changed paths: - M /trunk/NEWS - - -* NEWS: forgot to update this one for the release. - ------------------------------------------------------------------------- -r131 | gbazin | 2003-07-29 19:03:02 +0000 (Tue, 29 Jul 2003) | 3 lines -Changed paths: - M /trunk/libdvdcss.spec - - -* libdvdcss.spec: fixed typo. - ------------------------------------------------------------------------- -r130 | gbazin | 2003-07-28 23:41:52 +0000 (Mon, 28 Jul 2003) | 3 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/configure.ac - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - - -* ALL: bumped version number to 1.2.8 - ------------------------------------------------------------------------- -r129 | sam | 2003-07-16 21:40:01 +0000 (Wed, 16 Jul 2003) | 7 lines -Changed paths: - M /trunk/src/css.c - - * src/css.c: - + Workaround in CrackTitleKey for strange discs that report read errors - seemingly at random. Testcase was on Linux 2.4.20, with a region 2 RPC2 - drive, and the region 1 copy of "Chasing Amy". - + Used macros instead of numerals where appropriate. - + Fixed spelling here and there. - ------------------------------------------------------------------------- -r128 | gbazin | 2003-07-08 18:00:54 +0000 (Tue, 08 Jul 2003) | 3 lines -Changed paths: - M /trunk/src/device.c - - -* src/device.c: grmblgrmbl!! Fixed a bug that prevented encrypted dvds from working under win32. - ------------------------------------------------------------------------- -r127 | massiot | 2003-06-22 20:59:45 +0000 (Sun, 22 Jun 2003) | 2 lines -Changed paths: - M /trunk/src/Makefile.am - -* Updated library version. - ------------------------------------------------------------------------- -r126 | sam | 2003-06-18 17:23:55 +0000 (Wed, 18 Jun 2003) | 2 lines -Changed paths: - M /trunk/src/libdvdcss.c - - * ./src/libdvdcss.c: if DVDCSS_VERBOSE is greater than 2, do as if it was 2. - ------------------------------------------------------------------------- -r125 | sam | 2003-06-13 00:41:35 +0000 (Fri, 13 Jun 2003) | 12 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/NEWS - M /trunk/configure.ac - M /trunk/debian/changelog - M /trunk/debian/control - M /trunk/debian/rules - M /trunk/libdvdcss.spec - - * Everything is ready for a 1.2.7 release. - - * debian/control: - + Set policy to 3.5.10. - + Removed the leading "a" in the package description. - + Set the source section to libs. - + Set the -dev package section to libdevel. - + Changed the debhelper build dependency to (>=3.0). - * debian/rules: - + Added magic to avoid autotools timestamp skews on autobuilders (as if - libdvdcss was ever going to hit the Debian autobuilders anyway). +commit 2b899f3b337a6687bd7c3f12a5b015f48ffbcbf3 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Mon Nov 14 10:40:05 2011 +0000 ------------------------------------------------------------------------- -r124 | sam | 2003-06-12 23:22:34 +0000 (Thu, 12 Jun 2003) | 6 lines -Changed paths: - M /trunk/src/libdvdcss.c - - * ./src/libdvdcss.c: if DVDCSS_CACHE is not set, we force a default value. - - under Win32: C:\Documents and Settings\$USER\Application Data\dvdcss\ - - under Unix and everything else: ${HOME}/.dvdcss/ - - the special value DVDCSS_CACHE=off disables caching. - * ./src/libdvdcss.c: updated doxygen documentation accordingly. + Update Changelog ------------------------------------------------------------------------- -r123 | sam | 2003-06-12 23:15:18 +0000 (Thu, 12 Jun 2003) | 3 lines -Changed paths: - M /trunk/Makefile.am - M /trunk/configure.ac +commit b6fd1d71afa8c1a858f2b1b69a5b03544af623f6 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Mon Nov 14 10:27:32 2011 +0000 - * ./Makefile.am: put autotools/ in DIST_SUBDIRS instead of SUBDIRS. - * ./configure.ac: forgot to generate autotools/Makefile. + Bumping version to 1.2.11 ------------------------------------------------------------------------- -r122 | sam | 2003-06-10 22:50:31 +0000 (Tue, 10 Jun 2003) | 4 lines -Changed paths: - M /trunk/Makefile.am - A /trunk/autotools - A /trunk/autotools/.cvsignore - A /trunk/autotools/Makefile.am - M /trunk/bootstrap - M /trunk/configure.ac - - * ./configure.ac: make use of the autotools/ directory. - * ./bootstrap: libfool is a tool. Worked around its blatant ignorance of - the AC_CONFIG_AUX_DIR directive. - ------------------------------------------------------------------------- -r121 | sam | 2003-05-27 17:12:33 +0000 (Tue, 27 May 2003) | 4 lines -Changed paths: - M /trunk/debian/changelog - M /trunk/debian/control +commit d1052718b7d3f7394a0f3e15ff7131dfe63fd8b2 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Mon Nov 14 10:26:47 2011 +0000 - * ./debian/control: removed libc6-dev from libdvdcss2-dev's dependencies - because it is part of build-essential and it isn't even called libc6-dev - on all architectures. - ------------------------------------------------------------------------- -r120 | sam | 2003-05-16 22:12:48 +0000 (Fri, 16 May 2003) | 2 lines -Changed paths: - M /trunk/src/css.c - - * ./src/css.c: typos in comments. - ------------------------------------------------------------------------- -r119 | gbazin | 2003-04-11 10:00:29 +0000 (Fri, 11 Apr 2003) | 3 lines -Changed paths: - M /trunk/configure.ac - M /trunk/src/common.h - - -* configure.ac, src/common.h: fixes for the cygwin build using the mno-cygwin flag. - ------------------------------------------------------------------------- -r118 | yves | 2003-04-06 20:36:07 +0000 (Sun, 06 Apr 2003) | 2 lines -Changed paths: - M /trunk/libdvdcss.spec - -better RH part thx Kipp Cannon <kipp@sgl.crestech.ca> - ------------------------------------------------------------------------- -r117 | gbazin | 2003-03-27 18:57:12 +0000 (Thu, 27 Mar 2003) | 3 lines -Changed paths: - M /trunk/src/libdvdcss.c - - -* src/libdvdcss.c: CSS key cache collisions patch, courtesy of Michael Roitzsch. - ------------------------------------------------------------------------- -r116 | gbazin | 2003-03-22 16:37:37 +0000 (Sat, 22 Mar 2003) | 3 lines -Changed paths: - M /trunk/src/libdvdcss.c - - -* src/libdvdcss.c: fix for NetBSD's mkdir that doesn't like trailing "/" on its argument. (courtesy of Christopher Richards) - ------------------------------------------------------------------------- -r115 | sam | 2003-03-10 18:01:40 +0000 (Mon, 10 Mar 2003) | 3 lines -Changed paths: - M /trunk/debian/changelog - M /trunk/src/Makefile.am - - * ./debian/changelog: updated Debian changelog. - * ./src/Makefile.am: bumped version information. - ------------------------------------------------------------------------- -r114 | alexis | 2003-03-10 17:41:31 +0000 (Mon, 10 Mar 2003) | 2 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/libdvdcss.spec - -- preparing the 1.2.6 release... - ------------------------------------------------------------------------- -r113 | massiot | 2003-03-09 23:50:42 +0000 (Sun, 09 Mar 2003) | 2 lines -Changed paths: - M /trunk/NEWS - M /trunk/configure.ac - -Bumped up to 1.2.6. - ------------------------------------------------------------------------- -r112 | gbazin | 2003-03-09 23:34:18 +0000 (Sun, 09 Mar 2003) | 3 lines -Changed paths: - M /trunk/src/common.h - M /trunk/src/error.c - - -* src/common.h, src/error.c: fixed the PATH_MAX breakage on win32. - ------------------------------------------------------------------------- -r111 | massiot | 2003-02-04 11:54:36 +0000 (Tue, 04 Feb 2003) | 2 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/device.c - M /trunk/src/error.c - -Fixed compilation problems with PATH_MAX. - ------------------------------------------------------------------------- -r110 | massiot | 2003-01-29 22:59:35 +0000 (Wed, 29 Jan 2003) | 2 lines -Changed paths: - M /trunk/configure.ac - M /trunk/src/libdvdcss.c - -Fixed MAX_PATH on Darwin. - ------------------------------------------------------------------------- -r109 | yves | 2003-01-28 07:58:22 +0000 (Tue, 28 Jan 2003) | 3 lines -Changed paths: - M /trunk/libdvdcss.spec - -- release number is 1. do not forget to update it too, aka sam sux. -- fix a redhat "macro". - ------------------------------------------------------------------------- -r108 | sam | 2003-01-28 01:17:02 +0000 (Tue, 28 Jan 2003) | 6 lines -Changed paths: - M /trunk/ChangeLog - A /trunk/NEWS - M /trunk/configure.ac - M /trunk/debian/changelog - M /trunk/debian/rules - M /trunk/doc/doxygen.cfg - M /trunk/libdvdcss.spec - M /trunk/src/Makefile.am - M /trunk/test/Makefile.am - - * updated ChangeLog. - * updated version numbers and timestamps everywhere. - * created NEWS file. - * ./configure.ac: BSD/OS compilation fix when a local copy of libdvd is - found on the system, thanks to Steven M. Schultz. - ------------------------------------------------------------------------- -r107 | sam | 2003-01-28 00:41:10 +0000 (Tue, 28 Jan 2003) | 3 lines -Changed paths: - M /trunk/src/libdvdcss.c - M /trunk/test/csstest.c - - * ./test/csstest.c: we align our read buffer in case of raw device access. - * ./src/libdvdcss.c: updated documentation about raw devices. - ------------------------------------------------------------------------- -r106 | sam | 2003-01-27 16:57:19 +0000 (Mon, 27 Jan 2003) | 2 lines -Changed paths: - M /trunk/src/libdvdcss.c - - * ./src/libdvdcss.c: disabled key cache when reading VOBs. - ------------------------------------------------------------------------- -r105 | sam | 2003-01-16 22:58:29 +0000 (Thu, 16 Jan 2003) | 2 lines -Changed paths: - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - - * ./src/ioctl.c, ./src/ioctl.h: removed minor gcc-isms. - ------------------------------------------------------------------------- -r104 | yves | 2003-01-16 14:45:14 +0000 (Thu, 16 Jan 2003) | 3 lines -Changed paths: - M /trunk/libdvdcss.spec - -* macros to fix build on redhat system. put %define redhat80 to 1. -* few fixes. - ------------------------------------------------------------------------- -r103 | sam | 2002-12-19 16:50:50 +0000 (Thu, 19 Dec 2002) | 4 lines -Changed paths: - M /trunk/src/device.c - - * ./src/device.c: seek() calls don't do anything if we're already at the - right position. - * ./src/device.c: we now handle partial reads. - ------------------------------------------------------------------------- -r102 | sam | 2002-12-19 15:44:30 +0000 (Thu, 19 Dec 2002) | 2 lines -Changed paths: - M /trunk/configure.ac - M /trunk/src/css.c - M /trunk/src/libdvdcss.c - - * ./configure.ac: added warning flags whenever possible. - ------------------------------------------------------------------------- -r101 | sam | 2002-12-19 15:36:04 +0000 (Thu, 19 Dec 2002) | 3 lines -Changed paths: - M /trunk/configure.ac - M /trunk/src/device.c - M /trunk/src/libdvdcss.h - - * ./src/device.c: dvdcss->i_pos now gets updated on each seek and each - read. Partial reads are not handled yet, but it's a step. - ------------------------------------------------------------------------- -r100 | sam | 2002-12-19 15:29:53 +0000 (Thu, 19 Dec 2002) | 3 lines -Changed paths: - M /trunk/src/bsdi_dvd.h - M /trunk/src/bsdi_ioctl.c - - * ./src/bsdi_ioctl.c, ./src/bsdi_dvd.h: updated the bsdi libdvd with - Steven M. Schultz's latest changes. - ------------------------------------------------------------------------- -r99 | sam | 2002-12-19 12:37:30 +0000 (Thu, 19 Dec 2002) | 2 lines -Changed paths: - M /trunk/configure.ac - M /trunk/msvc/config.h - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - - * Ported the library build to Cygwin. - ------------------------------------------------------------------------- -r98 | sam | 2002-12-11 13:12:10 +0000 (Wed, 11 Dec 2002) | 2 lines -Changed paths: - M /trunk/src/bsdi_dvd.h - M /trunk/src/bsdi_ioctl.c - M /trunk/src/device.c - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/libdvdcss.c - - * minor coding style fixes. - ------------------------------------------------------------------------- -r97 | sam | 2002-12-10 10:43:25 +0000 (Tue, 10 Dec 2002) | 2 lines -Changed paths: - M /trunk/msvc/csstest.dsp - M /trunk/msvc/libdvdcss.dsp - M /trunk/msvc/workspace.dsw - - * ./msvc/*: grmbl, for some reason the project files were empty. - ------------------------------------------------------------------------- -r96 | sam | 2002-12-10 10:38:12 +0000 (Tue, 10 Dec 2002) | 2 lines -Changed paths: - M /trunk/configure.ac - A /trunk/msvc - A /trunk/msvc/.cvsignore - A /trunk/msvc/config.h - A /trunk/msvc/csstest.dsp - A /trunk/msvc/libdvdcss.dsp - A /trunk/msvc/workspace.dsw - M /trunk/src/device.c - M /trunk/src/libdvdcss.c - M /trunk/test/csstest.c - - * ./msvc/*: MS VC++ project files. - ------------------------------------------------------------------------- -r95 | babal | 2002-12-06 00:16:57 +0000 (Fri, 06 Dec 2002) | 3 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/device.c - M /trunk/src/error.c - M /trunk/src/libdvdcss.c - -- Early versions of Mingw32 (at least until 1.2) do not include - <limits.h> automatically, so PATH_MAX was undefined. - ------------------------------------------------------------------------- -r94 | sam | 2002-12-05 10:24:42 +0000 (Thu, 05 Dec 2002) | 4 lines -Changed paths: - M /trunk/configure.ac - M /trunk/src/common.h - M /trunk/src/css.c - M /trunk/src/css.h - M /trunk/src/csstables.h - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/error.c - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - - * ./src/libdvdcss.c: fixed Win32 mkdir() call. - * ALL: removed trailing spaces in files. - * ALL: moved everything to C99 integer types. - ------------------------------------------------------------------------- -r93 | sam | 2002-12-02 12:58:23 +0000 (Mon, 02 Dec 2002) | 2 lines -Changed paths: - M /trunk/bootstrap - - * ./bootstrap: we also look for glibtoolize (Closes: #37). - ------------------------------------------------------------------------- -r92 | jlj | 2002-12-02 07:38:21 +0000 (Mon, 02 Dec 2002) | 2 lines -Changed paths: - M /trunk/src/device.h - - ./src/device.h: Applied FreeBSD compile fix from Steven M. Schultz. - ------------------------------------------------------------------------- -r91 | jlj | 2002-11-25 18:44:31 +0000 (Mon, 25 Nov 2002) | 3 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - M /trunk/test/dvd_region.c - - * ./src/ioctl.[ch]: Implemented ioctl_SendRPC. - * ./test/dvd_region.c: enabled set_region. - ------------------------------------------------------------------------- -r90 | sam | 2002-11-24 17:34:23 +0000 (Sun, 24 Nov 2002) | 3 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/device.c - M /trunk/src/error.c - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - - * ./src/css.c, ./src/libdvdcss.c: applied a patch from the MPlayer folks - to cache title keys on disk. - ------------------------------------------------------------------------- -r89 | sam | 2002-11-21 12:13:20 +0000 (Thu, 21 Nov 2002) | 3 lines -Changed paths: - M /trunk/debian/control - - * ./debian/control: set the package sections to libs and devel instead of - graphics. - ------------------------------------------------------------------------- -r88 | alexis | 2002-11-17 23:46:44 +0000 (Sun, 17 Nov 2002) | 6 lines -Changed paths: - M /trunk/libdvdcss.spec - -Changes in order to support RedHat and RPM 4.1 (courtesy of Ryurick -Hristev and Kenton Groombridge). - -I have already uploaded new RPM packages on the FTP site (1.2.4-2) and -updated the download page. Please test and give feedback. - ------------------------------------------------------------------------- -r87 | jlj | 2002-11-15 18:39:08 +0000 (Fri, 15 Nov 2002) | 2 lines -Changed paths: - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - - * ./src/ioctl.[ch]: ReportRPC win32 changes. Needs testing. - ------------------------------------------------------------------------- -r86 | gbazin | 2002-11-14 15:12:34 +0000 (Thu, 14 Nov 2002) | 3 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - - -* updated the changelogs for the 1.2.4 release. - ------------------------------------------------------------------------- -r85 | sam | 2002-11-14 12:41:47 +0000 (Thu, 14 Nov 2002) | 6 lines -Changed paths: - M /trunk/bootstrap - M /trunk/configure.ac - M /trunk/libdvdcss.spec - - * ./configure.ac: explicitly set AC_CONFIG_AUX_DIR(.) so that people who - do bootstrap without paying attention to error messages don't screw up - packages :-) - * ./libdvdcss.spec: removed bootstrap from the build phase. - * ./bootstrap: we accept automake 1.7. + Update README and INSTALL to be a bit less out-of-date ------------------------------------------------------------------------- -r84 | gbazin | 2002-11-14 12:38:57 +0000 (Thu, 14 Nov 2002) | 9 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/ioctl.c +commit c80446a871b52d3d5b6137339da5d42b2eab5f8e +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Wed Oct 26 05:10:24 2011 +0000 + Fix "doc" Makefile target -* src/css.c src/ioctl.c, src/libdvdcss.c: changed the work-around to detect - if the dvd is encrypted on Win2K in non-administrator mode. - Because we cannot use an ioctl to get the copyright status of the DVD, - we try to get the disc key and if this succeed, we assume the DVD is - encrypted, otherwise we assume it to be unencrypted. - I hope this logic is not too much flawed... at least it seems to be working - with the few DVDs I've got. +commit d938212b4f010a6fd9cba4910981dcd2ca858c26 +Author: Diego Biurrun <diego@biurrun.de> +Date: Wed Oct 26 05:01:11 2011 +0000 ------------------------------------------------------------------------- -r83 | jlj | 2002-11-14 01:32:37 +0000 (Thu, 14 Nov 2002) | 2 lines -Changed paths: - M /trunk/src/ioctl.c + Win32: Drop #define of snprintf() to _snprintf() if the former is undefined. + + This workaround was added for MinGW originally, but nowadays MinGW supports + snprintf() directly so it has become unnecessary. + + Furthermore this can play havoc with Cygwin which does not have a _snprintf() + declaration and gives implicit function declaration warnings. Depending on + compiler flags, this can be a fatal error. - * ./src/ioctl.c: Broke OpenBSD port with my previous commit. Fixed. +commit 26a57f6d2bd5dc363850265f78371d05e1c554c3 +Author: Diego Biurrun <diego@biurrun.de> +Date: Wed Oct 26 04:59:23 2011 +0000 ------------------------------------------------------------------------- -r82 | alexis | 2002-11-13 23:43:01 +0000 (Wed, 13 Nov 2002) | 3 lines -Changed paths: - M /trunk/libdvdcss.spec + Win32: consistently use snprintf() instead of _snprintf() + + Both functions are available on Cygwin and MinGW nowadays so there is + no need to be inconsistent anymore. +commit 46558053bb3a77808b709cc932dd7e1acbb93671 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Tue Aug 16 10:41:24 2011 +0000 -Added ./bootstrap for the build target + Fix typos in README and INSTALL ------------------------------------------------------------------------- -r81 | gbazin | 2002-11-13 23:08:11 +0000 (Wed, 13 Nov 2002) | 3 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/debian/changelog - M /trunk/libdvdcss.spec +commit 2bcd77d8847d10f3e0b2a2354e7c0949d3132dd2 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Wed Mar 23 15:00:06 2011 +0000 + Remove excessive whitespace -* update changelogs. +commit 3c3553f2c613f207530c6e0a97854e5824e1b292 +Author: Thélesphonse Bigorneault <bigorneault@gmail.com> +Date: Wed Mar 23 14:59:36 2011 +0000 ------------------------------------------------------------------------- -r80 | jlj | 2002-11-13 22:45:05 +0000 (Wed, 13 Nov 2002) | 3 lines -Changed paths: - M /trunk/AUTHORS - M /trunk/src/ioctl.c + Fix a small memleak - * ./src/ioctl.c: cosmetic fixes. - * ./AUTHORS: updated my entry. +commit e97d03d78d77c8abeffd7c78e598c135e2b80efc +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Wed Feb 9 22:48:29 2011 +0000 ------------------------------------------------------------------------- -r79 | alexis | 2002-11-13 22:24:41 +0000 (Wed, 13 Nov 2002) | 3 lines -Changed paths: - M /trunk/configure.ac + Update documentation version +commit 8594af8c56bfcafd200ec6b26192d8d6941e1816 +Author: Reimar Döffinger <Reimar.Doeffinger@gmx.de> +Date: Sat Sep 25 14:21:47 2010 +0000 -Update version number to 1.2.4 + Ensure dvdcss->css.p_disc_key is always initialized + even if _dvdcss_disckey fails. ------------------------------------------------------------------------- -r78 | alexis | 2002-11-13 22:14:28 +0000 (Wed, 13 Nov 2002) | 2 lines -Changed paths: - M /trunk/libdvdcss.spec +commit 0833399b2fa6595bd9f64e8b787fd7b5d63bbf06 +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Aug 2 15:59:13 2010 +0000 -Update for 1.2.4 release. - ------------------------------------------------------------------------- -r77 | sam | 2002-11-13 22:11:38 +0000 (Wed, 13 Nov 2002) | 3 lines -Changed paths: - M /trunk/debian/changelog + Make libdvdcss headers self-sufficient + + This patch adds required #includes to libdvdcss headers so that they can be used + without other headers as prerequisites. + This leaves out limits.h and stdint.h, for the moment, since they aren't on all systems. - Updated Debian changelog (though there are no changes in this version - apart from Win32, so what's the point of building new packages :p) - ------------------------------------------------------------------------- -r76 | gbazin | 2002-11-13 21:23:08 +0000 (Wed, 13 Nov 2002) | 3 lines -Changed paths: - M /trunk/ChangeLog - - -* ChangeLog: updated changelog. - ------------------------------------------------------------------------- -r75 | gbazin | 2002-10-29 18:51:37 +0000 (Tue, 29 Oct 2002) | 4 lines -Changed paths: - M /trunk/src/ioctl.c - - -* src/ioctl.c: fixed typo that prevented unencrypted DVDs to work in - non-administrator mode. - ------------------------------------------------------------------------- -r74 | gbazin | 2002-10-19 09:53:33 +0000 (Sat, 19 Oct 2002) | 4 lines -Changed paths: - M /trunk/src/device.c - M /trunk/src/ioctl.h - - -* src/device.c, src/ioctl.h: on win9x, when using ASPI, make sure the drive - we are trying to open is actually a cdrom/dvdrom drive. - ------------------------------------------------------------------------- -r73 | sam | 2002-10-18 18:48:59 +0000 (Fri, 18 Oct 2002) | 5 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - - * ./src/device.c: split the open, read and seek functions so that we can - use function pointers instead of doing the if(WIN2K) test. - * ./src/device.c: if the target is not a drive name such as F:, we open - it with the standard libc functions, even under Win32. - ------------------------------------------------------------------------- -r72 | massiot | 2002-10-12 23:02:49 +0000 (Sat, 12 Oct 2002) | 2 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - -Updated changelog and release tag. - ------------------------------------------------------------------------- -r71 | gbazin | 2002-10-12 12:41:24 +0000 (Sat, 12 Oct 2002) | 4 lines -Changed paths: - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - - -* src/ioctl.c, src/ioctl.h: fix in ioctl_ReadCopyright to try to work around - the buggy IOCTL_DVD_READ_STRUCTURE on WinNT/2k/XP. - ------------------------------------------------------------------------- -r70 | sam | 2002-10-11 10:09:56 +0000 (Fri, 11 Oct 2002) | 2 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - - * Updated changelog and package files. - ------------------------------------------------------------------------- -r69 | sam | 2002-10-11 10:03:48 +0000 (Fri, 11 Oct 2002) | 6 lines -Changed paths: - M /trunk/.cvsignore - M /trunk/Makefile.am - D /trunk/NEWS - M /trunk/bootstrap - A /trunk/configure.ac - D /trunk/configure.in - M /trunk/src/.cvsignore - M /trunk/src/Makefile.am - D /trunk/src/config.h.in - - * ./configure.ac, ./bootstrap: used libdvbpsi's bootstrap, moved config.h - to ., renamed configure.in into configure.ac, removed useless files that - are autogenerated. - * ./src/Makefile.am: instead of using -no-undefined "only under BeOS" we - use it "never with MSVC". - ------------------------------------------------------------------------- -r68 | massiot | 2002-10-10 22:29:31 +0000 (Thu, 10 Oct 2002) | 2 lines -Changed paths: - M /trunk/bootstrap - -Exit cleanly in case of error. - ------------------------------------------------------------------------- -r67 | massiot | 2002-10-10 21:40:41 +0000 (Thu, 10 Oct 2002) | 4 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/configure.in - M /trunk/src/config.h.in - M /trunk/src/css.c - -* Bumped up version number to 1.2.3 (soleil !). -* Updated Changelog. -* Merged in hh's patch for broken DVD drives/kernel/whatever. - ------------------------------------------------------------------------- -r66 | gbazin | 2002-10-10 12:44:28 +0000 (Thu, 10 Oct 2002) | 7 lines -Changed paths: - M /trunk/AUTHORS - M /trunk/src/css.c - M /trunk/src/device.c - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - - -* src/css.c, src/device.c, src/ioctl.[ch]: We don't need to be in administrator mode -anymore to authenticate the drive on Windows NT/2k/XP. As a result any user can now -play a DVD on these OSs :) -* src/ioctl.c: fixed ioctl_ReadTitleKey which wasn't working on Windows NT/2k/XP. -Because of this bug, the disc and key methods for key decryption where not working. - ------------------------------------------------------------------------- -r65 | sam | 2002-10-07 16:37:15 +0000 (Mon, 07 Oct 2002) | 5 lines -Changed paths: - M /trunk/configure.in - M /trunk/src/Makefile.am - M /trunk/src/config.h.in - - * ./src/Makefile.am: -no-undefined is now only used under BeOS because it - causes the Win32 compilation to fail. - * ./configure.in, src/Makefile.am: used AM_CONDITIONAL to conditionally - build the BSDi stuff. - ------------------------------------------------------------------------- -r64 | sam | 2002-08-10 21:27:42 +0000 (Sat, 10 Aug 2002) | 2 lines -Changed paths: - M /trunk/src/Makefile.am - - * Bumped the revision number... thanks H�kan :-) - ------------------------------------------------------------------------- -r63 | sam | 2002-08-10 21:19:55 +0000 (Sat, 10 Aug 2002) | 2 lines -Changed paths: - M /trunk/src/css.c - - * ./src/css.c: removed useless debug messages on H�kan's advice. - ------------------------------------------------------------------------- -r62 | sam | 2002-08-10 20:21:54 +0000 (Sat, 10 Aug 2002) | 2 lines -Changed paths: - M /trunk/AUTHORS - M /trunk/ChangeLog - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - M /trunk/src/libdvdcss.c - - * Updated release-related files. - ------------------------------------------------------------------------- -r61 | sam | 2002-08-10 17:42:09 +0000 (Sat, 10 Aug 2002) | 3 lines -Changed paths: - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - - * ./src/ioctl.c: fixed ReportRPC for Win32. - * ./src/device.h: removed unneeded exported symbols. - ------------------------------------------------------------------------- -r60 | sam | 2002-08-10 14:27:26 +0000 (Sat, 10 Aug 2002) | 4 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/css.h - M /trunk/src/device.c - M /trunk/src/device.h - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/error.c - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - M /trunk/test/csstest.c - - * ./src/dvdcss/dvdcss.h: marked deprecated stuff. - * ./test/csstest.c: more documentation. - see http://www.videolan.org/libdvdcss/doc/ - ------------------------------------------------------------------------- -r59 | sam | 2002-08-10 12:56:04 +0000 (Sat, 10 Aug 2002) | 3 lines -Changed paths: - M /trunk/.cvsignore - M /trunk/Makefile.am - D /trunk/Makefile.in - D /trunk/aclocal.m4 - D /trunk/config.guess - D /trunk/config.sub - D /trunk/configure - M /trunk/configure.in - M /trunk/debian/.cvsignore - D /trunk/debian/Makefile.in - A /trunk/doc - A /trunk/doc/.cvsignore - A /trunk/doc/Makefile.am - A /trunk/doc/doxygen.cfg - A /trunk/doc/footer.html - A /trunk/doc/header.html - D /trunk/install-sh - D /trunk/ltmain.sh - D /trunk/missing - D /trunk/mkinstalldirs - M /trunk/src/.cvsignore - D /trunk/src/Makefile.in - M /trunk/src/dvdcss/.cvsignore - D /trunk/src/dvdcss/Makefile.in - M /trunk/src/libdvdcss.c - M /trunk/test/.cvsignore - D /trunk/test/Makefile.in - - * ALL: removed autotools files. - * ./doc/*: added doxygen files. - ------------------------------------------------------------------------- -r58 | sam | 2002-08-10 12:21:28 +0000 (Sat, 10 Aug 2002) | 2 lines -Changed paths: - M /trunk/src/dvdcss/dvdcss.h - M /trunk/src/libdvdcss.c - - * ./src/libdvdcss.c, ./src/dvdcss/dvdcss.h: documented the API. - ------------------------------------------------------------------------- -r57 | sam | 2002-08-09 22:03:34 +0000 (Fri, 09 Aug 2002) | 4 lines -Changed paths: - M /trunk/src/css.c - - * ./src/css.c: in case of a region mismatch and when the drive needs to - be reset, we read the first sector of the disc instead of closing and - reopening it. - ------------------------------------------------------------------------- -r56 | sam | 2002-08-09 14:19:46 +0000 (Fri, 09 Aug 2002) | 3 lines -Changed paths: - M /trunk/src/Makefile.am - M /trunk/src/Makefile.in - - * ./src/Makefile.am: tell libtool that libdvdcss does not have undefined - symbols. Fix for BeOS courtesy of Andrew Bachmann. - ------------------------------------------------------------------------- -r55 | sam | 2002-08-09 14:10:43 +0000 (Fri, 09 Aug 2002) | 23 lines -Changed paths: - M /trunk/Makefile.in - M /trunk/aclocal.m4 - M /trunk/configure - M /trunk/configure.in - M /trunk/debian/Makefile.in - M /trunk/src/Makefile.am - M /trunk/src/Makefile.in - M /trunk/src/bsdi_ioctl.c - M /trunk/src/common.h - M /trunk/src/config.h.in - M /trunk/src/css.c - M /trunk/src/css.h - A /trunk/src/device.c - A /trunk/src/device.h - M /trunk/src/dvdcss/Makefile.in - A /trunk/src/error.c - M /trunk/src/libdvdcss.c - M /trunk/src/libdvdcss.h - M /trunk/test/Makefile.in - M /trunk/test/csstest.c - - * ./src/css.c: when the ReadTitleKey ioctl failed, reopen the device before - falling back to the title method. - - Note: on my drive, this fixes the "ioctl_ReadTitleKey failed" error - many users have been reporting. Please test! - - Note 2: I could not find any other way to reset the drive after a failed - ReadTitleKey ioctl than closing and opening the device again. If - I don't do that, read() fails with an Input/output error after a - while (but not immediately). - - * ALL: libdvdcss builds with -ansi -pedantic. Yeah I like that :-) - * ./src/css.c: renamed a few functions so that they make more sense, added - debug messages here and there, fixed typos and speling. - * ./src/error.c: moved _dvdcss_error and _dvdcss_debug here. - * ./src/device.c: moved device reading functions from libdvdcss.c to here. - * ./src/device.c: errors from dvdcss_read are now properly handled; partial - reads still aren't though. - * ./src/libdvdcss.c: default verbosity is now 0, a library should not be - intrusive by default. - * ./test/csstest.c: additional error check. - * ./configure.in: removed the crap boolean_t detection. - ------------------------------------------------------------------------- -r54 | massiot | 2002-07-23 11:43:58 +0000 (Tue, 23 Jul 2002) | 2 lines -Changed paths: - M /trunk/README - -Default method is now "key" :p. - ------------------------------------------------------------------------- -r53 | sam | 2002-07-16 22:47:40 +0000 (Tue, 16 Jul 2002) | 4 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/Makefile.in - M /trunk/aclocal.m4 - M /trunk/config.guess - M /trunk/config.sub - M /trunk/configure - M /trunk/configure.in - M /trunk/debian/Makefile.in - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - M /trunk/ltmain.sh - M /trunk/src/Makefile.in - M /trunk/src/css.c - M /trunk/src/css.h - M /trunk/src/dvdcss/Makefile.in - M /trunk/src/libdvdcss.c - M /trunk/test/Makefile.am - M /trunk/test/Makefile.in - - * ./test/Makefile.am: disabled dvd_region. - * ./src/css.c: speling fixes. - * ALL: re-ran bootstrap with more recent autotools. - ------------------------------------------------------------------------- -r52 | hjort | 2002-07-14 11:44:57 +0000 (Sun, 14 Jul 2002) | 3 lines -Changed paths: - A /trunk/test/dvd_region.c - -New utility for querying (and eventualy setting) the region of a DVD drive -using the ioctl wrappers in libdvdcss. - ------------------------------------------------------------------------- -r51 | hjort | 2002-07-12 23:28:42 +0000 (Fri, 12 Jul 2002) | 3 lines -Changed paths: - M /trunk/configure.in - M /trunk/src/bsdi_ioctl.c - -Include config.h before testing defines in the BSDi ioctl code. Add a bug -fix from the author. Remove the now unused parts from configure.in. - ------------------------------------------------------------------------- -r50 | hjort | 2002-07-12 21:06:41 +0000 (Fri, 12 Jul 2002) | 3 lines -Changed paths: - M /trunk/src/Makefile.am - M /trunk/src/bsdi_ioctl.c - M /trunk/test/Makefile.am - -Fix so that the bsdi_*.[hc] files make it into the dist tar-ball. -Correct the include path for the programs in test/. - ------------------------------------------------------------------------- -r49 | hjort | 2002-07-01 13:40:33 +0000 (Mon, 01 Jul 2002) | 3 lines -Changed paths: - M /trunk/src/libdvdcss.c - -Typo fix and fix the linked list code to not drop the list when instering -at the head, from Adam Jones. - ------------------------------------------------------------------------- -r48 | hjort | 2002-07-01 10:36:37 +0000 (Mon, 01 Jul 2002) | 2 lines -Changed paths: - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - -Patch for OS/2 from Alex Strelnikov. - ------------------------------------------------------------------------- -r47 | hjort | 2002-07-01 09:59:09 +0000 (Mon, 01 Jul 2002) | 2 lines -Changed paths: - M /trunk/src/css.c - -Typo fix from Adam Jones. - ------------------------------------------------------------------------- -r46 | hjort | 2002-07-01 09:02:25 +0000 (Mon, 01 Jul 2002) | 2 lines -Changed paths: - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - -Getting ReportRPC for WIN32 a bit closer to working. - ------------------------------------------------------------------------- -r45 | sam | 2002-06-04 07:10:07 +0000 (Tue, 04 Jun 2002) | 2 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/src/ioctl.c - - * ./src/ioctl.c: implemented ioctl_ReportKey1 for HP-UX. - ------------------------------------------------------------------------- -r44 | sam | 2002-06-04 07:02:57 +0000 (Tue, 04 Jun 2002) | 2 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/src/libdvdcss.c - - * ./src/libdvdcss.c: Win32 compilation fix. - ------------------------------------------------------------------------- -r43 | sam | 2002-06-02 16:18:45 +0000 (Sun, 02 Jun 2002) | 2 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/configure - M /trunk/configure.in - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - - * ALL: changed version number to 1.2.1. - ------------------------------------------------------------------------- -r42 | sam | 2002-06-02 16:14:48 +0000 (Sun, 02 Jun 2002) | 2 lines -Changed paths: - M /trunk/AUTHORS - M /trunk/ChangeLog - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - - * ./src/ioctl.c, ./src/ioctl.h: QNX port, courtesy of Pascal Levesque. - ------------------------------------------------------------------------- -r41 | sam | 2002-06-02 16:05:34 +0000 (Sun, 02 Jun 2002) | 2 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/src/css.c - - * ./src/css.c: applied H�kan's fix for the failure on region mismatch. - ------------------------------------------------------------------------- -r40 | sam | 2002-06-02 15:54:10 +0000 (Sun, 02 Jun 2002) | 3 lines -Changed paths: - M /trunk/.cvsignore - M /trunk/ChangeLog - M /trunk/aclocal.m4 - M /trunk/configure - M /trunk/libdvdcss.spec - M /trunk/ltmain.sh - M /trunk/src/libdvdcss.c - - * ALL: switched to libtool 1.4.2a. - * ./src/libdvdcss.c: fixed an uninitialized variable. - ------------------------------------------------------------------------- -r39 | sam | 2002-05-26 14:22:23 +0000 (Sun, 26 May 2002) | 2 lines -Changed paths: - M /trunk/src/dvdcss/dvdcss.h +commit 077025bf61d99c66bab6cea4e89ed85c749e126b +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Aug 2 15:41:14 2010 +0000 - * ./src/dvdcss/dvdcss.h: C++ compliant public header. + Add multiple inclusion guards to header files + + Most header files in libdvdcss lack multiple inclusion guards, although they are + a sensible thing to have for header files. This adds them where currently missing. ------------------------------------------------------------------------- -r38 | sam | 2002-05-20 17:58:20 +0000 (Mon, 20 May 2002) | 4 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/configure - M /trunk/configure.in - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - D /trunk/libtool +commit bdd3f4c9571ce12e97a3fb35ceff80b26648aa35 +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Aug 2 15:38:08 2010 +0000 - * Everything should be ready for 1.2.0. - * Updated ChangeLog. - * Removed libtool. It seems to be created automatically anyway. + Use filename as multiple inclusion guard + + For some reason bsdi_dvd.h does not use the (full) filename as multiple + inclusion guard. ------------------------------------------------------------------------- -r37 | hjort | 2002-05-16 20:40:54 +0000 (Thu, 16 May 2002) | 4 lines -Changed paths: - M /trunk/src/libdvdcss.c +commit fa00691e5b3132ce622f52587d3008fa5d4ec3f8 +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Aug 2 14:04:16 2010 +0000 -New function _dvdcss_use_ioctls. Avoid using the ioctl calls when -they have no chans or working, this in turn avoids a spurious warning -when they fail. + Shut up doxygen run + + Doxygen is terribly verbose by default and spams the console with useless by + the metric ton. This patch makes its output more terse and thus more sensible. ------------------------------------------------------------------------- -r36 | hjort | 2002-05-16 20:12:04 +0000 (Thu, 16 May 2002) | 2 lines -Changed paths: - M /trunk/src/css.c +commit 034d9293bd0a87e13cae9163467c44d985422749 +Author: Jean-Baptiste Kempf <jb@videolan.org> +Date: Mon May 10 10:03:06 2010 +0000 -Update error message. + Try other methods also if GetBusKey fails instead of failing completely ------------------------------------------------------------------------- -r35 | hjort | 2002-05-16 12:10:29 +0000 (Thu, 16 May 2002) | 2 lines -Changed paths: - M /trunk/src/libdvdcss.c +commit 4d5c816be5424993e41a7cac52967f42907e6128 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Sep 2 22:07:32 2009 +0000 -Default to 'key', rather than 'title', method. + Remove the RPC-II sanity check and only issue a warning. Capable drives are + far too common. ------------------------------------------------------------------------- -r34 | sam | 2002-05-15 20:27:04 +0000 (Wed, 15 May 2002) | 2 lines -Changed paths: - M /trunk/libdvdcss.spec +commit badd91978ce04f611601e04fc17a3b14269e6362 +Author: KO Myung-Hun <komh@chollian.net> +Date: Wed Sep 2 22:01:07 2009 +0000 - * ./libdvdcss.spec: enhancements by Mandrakesoft. + Use 64-bit IO and binary mode on OS/2. ------------------------------------------------------------------------- -r33 | hjort | 2002-05-13 21:22:22 +0000 (Mon, 13 May 2002) | 3 lines -Changed paths: - M /trunk/src/libdvdcss.c +commit 25ebde2b7dce3735df7a279884105bf050633ec1 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed May 13 21:28:53 2009 +0000 -Correct serious bug in dvdcss_read for titles with all zero key (a unencrypted -title on a CSS protected disc). + Prepend 0x to the region mask for clarity. ------------------------------------------------------------------------- -r32 | jlj | 2002-05-05 22:21:51 +0000 (Sun, 05 May 2002) | 3 lines -Changed paths: - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h +commit 6725efb8bae177132071298d72b387193fb7efaf +Author: Sam Hocevar <sam@videolan.org> +Date: Wed May 13 21:00:31 2009 +0000 - * ./src/ioctl.[ch]: Darwin changes: Cleaned up the code, fixed - ReadTitleKey, and implemented ReportRPC. + Duh, typo in the RPC-II sanity check. ------------------------------------------------------------------------- -r31 | gbazin | 2002-04-26 20:47:08 +0000 (Fri, 26 Apr 2002) | 4 lines -Changed paths: - M /trunk/INSTALL +commit 6cd5094c9d8aef3e27dcf6783a818356dd79b83e +Author: Sam Hocevar <sam@videolan.org> +Date: Wed May 13 20:54:40 2009 +0000 + Add support for the DVDCSS_IGNORE_RPC environment variable in order to + bypass our new RPC-II sanity check. +commit e02b6b39da186c9ff25bcb093820f27fe105c6be +Author: Sam Hocevar <sam@videolan.org> +Date: Wed May 13 20:54:39 2009 +0000 -* updated win32 compilation instructions. + Add a debug message in the copyright information retrieval. ------------------------------------------------------------------------- -r30 | sam | 2002-04-06 01:27:43 +0000 (Sat, 06 Apr 2002) | 3 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/configure - M /trunk/configure.in - M /trunk/debian/changelog - M /trunk/libdvdcss.spec +commit f6ecade747d6cdd63df205186cb27de2af9f3c9f +Author: Sam Hocevar <sam@videolan.org> +Date: Wed May 13 20:54:37 2009 +0000 + Check drive's RPC status before trying to access a scrambled disc. Patch + provided by Ori Avtalion <ori@avtalion.name> and refactored by Sam Hocevar + <sam@hocevar.net>. - * libdvdcss-1.1.1 release. +commit a0f00ca3209ce13e38872f43010badbb6e568f83 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed May 13 20:54:35 2009 +0000 ------------------------------------------------------------------------- -r29 | sam | 2002-04-06 01:11:05 +0000 (Sat, 06 Apr 2002) | 3 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/src/ioctl.c + Fix a potential format string crash. +commit a898069bcd19498a0fea789943c423a2d0f61dc0 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Feb 9 00:45:44 2009 +0000 - * ./src/ioctl.c: OpenBSD compile fix. Thanks to ex0dus on #videolan. + Remove occurrences of "this program" from the license headers. ------------------------------------------------------------------------- -r28 | gbazin | 2002-04-05 00:26:25 +0000 (Fri, 05 Apr 2002) | 5 lines -Changed paths: - M /trunk/INSTALL - M /trunk/src/css.c +commit df8ce721b3c2fbd53107d2829f3bf50dadb8ee22 +Author: KO Myung-Hun <komh@chollian.net> +Date: Mon Feb 9 00:45:33 2009 +0000 + Adding OS/2 support, +commit e63008a10b3f48cc13820c111f463015e2fcd82e +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Feb 9 00:03:47 2009 +0000 -* updated INSTALL doc for the win32 build. -* added small win32 specific error message that was also in the vlc tree. + Update the FSF address. ------------------------------------------------------------------------- -r27 | gbazin | 2002-04-04 23:44:20 +0000 (Thu, 04 Apr 2002) | 10 lines -Changed paths: - M /trunk/src/ioctl.c - M /trunk/src/libdvdcss.c +commit bd002e7573d719a9aa4f0aa1df0bcac2a89eb9f7 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 29 19:00:14 2008 +0000 + * Bump version number to 1.2.10. + * Update NEWS and ChangeLog. +commit 096408a09e1ab227b4af5e09dc4b40c0e61845fe +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 29 18:57:52 2008 +0000 -* added two patches that have been forgot from the vlc tree. + * src/Makefile.am: bump the library minor version since we ship an extra + symbole (dvdcss_is_scrambled). - 1- Under NT/2K/XP try to open the dvd device in read only mode if we don't - have right access. With only read access we can't use ioctls but if the - disc has already been authenticated, then we can decrypt it with the - TITLE method. - 2- Small compilation fix for msvc. +commit 17d92492cd2e7148060c3b0ac50f98a1ad4e17b8 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 29 18:57:51 2008 +0000 ------------------------------------------------------------------------- -r26 | sam | 2002-04-04 14:21:25 +0000 (Thu, 04 Apr 2002) | 3 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/src/libdvdcss.h + * Ship a .pc file with the library. +commit 4b86763e9c0f9ae871b901b222396cae5570f590 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 29 18:57:48 2008 +0000 - * ./src/libdvdcss.h: IRIX compile fix by Michael Pruett <michael@68k.org>. + * Update copyeight information here and there. ------------------------------------------------------------------------- -r25 | sam | 2002-04-04 01:26:54 +0000 (Thu, 04 Apr 2002) | 4 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/configure - M /trunk/configure.in - M /trunk/src/config.h.in - M /trunk/src/ioctl.c +commit c909158f1f7064e60857e62d2c49e0d242f06db8 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 29 18:57:45 2008 +0000 + * bootstrap: update bootstrapping script. + * configure.ac: hide autotools files in .auto/. + * .gitignore: add an ignore file for git-svn users. - * ./configure.in: BeOS bug fix. I'm so lame. - * ./src/ioctl.c: refuse to build if DVD ioctls weren't found. +commit b925ffff053d2fc5b0f1cb8ef41f64ecf6182ec3 +Author: Diego Biurrun <diego@biurrun.de> +Date: Fri Aug 29 18:57:42 2008 +0000 ------------------------------------------------------------------------- -r24 | sam | 2002-04-03 23:34:30 +0000 (Wed, 03 Apr 2002) | 3 lines -Changed paths: - M /trunk/test/.cvsignore + * libdvdcss.c: ignore failure to get the disc key in case we have a + chance to decrypt anyway afterwards. +commit 502c6dbe21c613bb6d5b9c555df5aebd481b29d9 +Author: Sam Hocevar <sam@videolan.org> +Date: Sun Jul 13 12:52:22 2008 +0000 - * Forgot to change test/.cvsignore ... + * Convert all source code to UTF-8, or Doxygen will fail to generate proper + LaTeX documents. ------------------------------------------------------------------------- -r23 | sam | 2002-04-03 23:33:57 +0000 (Wed, 03 Apr 2002) | 6 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/test/Makefile.am - M /trunk/test/Makefile.in - A /trunk/test/csstest.c - D /trunk/test/test.c +commit da76746bcdd3620202cb68d5d438509f4d34f6c1 +Author: Sam Hocevar <sam@videolan.org> +Date: Sun Jul 13 12:52:19 2008 +0000 + * Update outdated Doxygen configuration file using doxygen -u. - * ./test/csstest.c: renamed test.c to csstest.c. +commit 0aa362efa587ce310ec81fa79bc0442b4eaceb5e +Author: Kirill Belokurov <kirill.belokurov@gmail.com> +Date: Sat Jul 12 12:19:57 2008 +0000 - I hereby declare libdvdcss 1.1.0 ready to ship; it was successfully tested - on Linux, FreeBSD, MacOS X and BeOS, and compiles on Solaris. + * src/libdvdcss.c: initialize p_disc_key in the case when DVD is encrypted + but no ioctl is available ; + * src/css.c: initialize p_disc_key in the case when key decryption fails. ------------------------------------------------------------------------- -r22 | jlj | 2002-04-03 23:02:20 +0000 (Wed, 03 Apr 2002) | 3 lines -Changed paths: - M /trunk/src/ioctl.c - - - * ./src/ioctl.c: Fixed a Darwin typo I recently introduced. - ------------------------------------------------------------------------- -r21 | sam | 2002-04-03 22:31:42 +0000 (Wed, 03 Apr 2002) | 3 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/Makefile.in - M /trunk/configure - M /trunk/debian/Makefile.in - M /trunk/src/Makefile.in - M /trunk/src/dvdcss/Makefile.in - M /trunk/test/Makefile.in - - - * Run ./bootstrap. - ------------------------------------------------------------------------- -r20 | jlj | 2002-04-03 22:17:00 +0000 (Wed, 03 Apr 2002) | 3 lines -Changed paths: - M /trunk/configure.in - - - * ./configure.in: Darwin compile fix (added -no-cpp-precomp) - ------------------------------------------------------------------------- -r19 | sam | 2002-04-03 21:31:52 +0000 (Wed, 03 Apr 2002) | 5 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/configure - M /trunk/debian/changelog - M /trunk/libdvdcss.spec - M /trunk/missing - - - * ./ChangeLog: everything should be ready for the 1.1.0 release. - * ./libdvdcss.spec: updated specfile for RPM generation. - * ./missing: commited libtool's latest version of this file. - ------------------------------------------------------------------------- -r18 | jlj | 2002-04-03 21:25:13 +0000 (Wed, 03 Apr 2002) | 3 lines -Changed paths: - M /trunk/configure.in - M /trunk/src/config.h.in - M /trunk/src/ioctl.c - - - * Fixed a Darwin define problem. - ------------------------------------------------------------------------- -r17 | sam | 2002-04-03 15:19:22 +0000 (Wed, 03 Apr 2002) | 5 lines -Changed paths: - M /trunk/ChangeLog - M /trunk/Makefile.am - M /trunk/config.guess - M /trunk/config.sub - M /trunk/configure - M /trunk/configure.in - M /trunk/src/Makefile.am - M /trunk/src/Makefile.in - M /trunk/src/css.c - A /trunk/src/dvdcss - A /trunk/src/dvdcss/.cvsignore - A /trunk/src/dvdcss/Makefile.am - A /trunk/src/dvdcss/Makefile.in - A /trunk/src/dvdcss/dvdcss.h - D /trunk/src/dvdcss.h - M /trunk/src/libdvdcss.c - M /trunk/test/Makefile.am - M /trunk/test/Makefile.in - M /trunk/test/test.c - - - * ./src/dvdcss/dvdcss.h: moved dvdcss.h in a subdirectory so that we can - include <dvdcss/dvdcss.h> without having to make install. - * ./test/test.c: removed #ifdef DVDCSS_DIST. - ------------------------------------------------------------------------- -r16 | sam | 2002-04-03 06:12:50 +0000 (Wed, 03 Apr 2002) | 9 lines -Changed paths: - M /trunk/AUTHORS - M /trunk/ChangeLog - M /trunk/Makefile.am - M /trunk/Makefile.in - M /trunk/configure - M /trunk/configure.in - M /trunk/debian/.cvsignore - A /trunk/debian/Makefile.am - A /trunk/debian/Makefile.in - M /trunk/debian/changelog - M /trunk/debian/rules - M /trunk/libtool - M /trunk/src/Makefile.am - M /trunk/src/Makefile.in - M /trunk/src/config.h.in - M /trunk/src/css.c - M /trunk/src/dvdcss.h - M /trunk/src/libdvdcss.c - M /trunk/test/Makefile.in - M /trunk/test/test.c - - - * ./ChangeLog: updated changelog. - * ./Makefile.am: added the debian dir to the targets. - * ./configure.in: switched to a more conventional versioning scheme. - * ./src/css.c: removed a useless #ifdef. - * ./src/dvdcss.h: added a versioned symbol to the API. - * ./src/Makefile.am: use <dvdcss/dvdcss.h> instead of <videolan/dvdcss.h>. - * ./test/test.c: test program is now up to date. - ------------------------------------------------------------------------- -r15 | hjort | 2002-03-09 17:57:53 +0000 (Sat, 09 Mar 2002) | 7 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/css.h - M /trunk/src/libdvdcss.c - -Split the code into more functions. The disc and title decryption / -cracking code is now each in it's own function. Also moved the code that -looks for a weak block in the VOB to crack the title key from out from -the loop that reads them. Added another crack method, it's disabled for -now though. Lowered some limits on the current 'weak' test. Added more -comments. - ------------------------------------------------------------------------- -r14 | hjort | 2002-03-09 17:35:49 +0000 (Sat, 09 Mar 2002) | 3 lines -Changed paths: - M /trunk/configure.in - -Add -D_FILE_OFFSET_BITS=64 to the compile line to make off_t / lseek and -other file access functions used in dvdcss be 64bit. - ------------------------------------------------------------------------- -r13 | hjort | 2002-03-09 17:24:28 +0000 (Sat, 09 Mar 2002) | 2 lines -Changed paths: - M /trunk/test/test.c - -Tell libdvdcss to get the key for the block before we decrypt it. - ------------------------------------------------------------------------- -r12 | hjort | 2002-03-09 17:23:05 +0000 (Sat, 09 Mar 2002) | 2 lines -Changed paths: - M /trunk/test/Makefile.am - -Don't link to libdl. - ------------------------------------------------------------------------- -r11 | sam | 2002-03-09 17:16:44 +0000 (Sat, 09 Mar 2002) | 3 lines -Changed paths: - M /trunk/configure - M /trunk/configure.in - M /trunk/test/test.c - - - * Fixed compilation of test/test.c. - ------------------------------------------------------------------------- -r10 | sam | 2002-03-06 00:06:17 +0000 (Wed, 06 Mar 2002) | 3 lines -Changed paths: - M /trunk/test/.cvsignore - A /trunk/test/test.c - - - * Updated misc control files and added the sample program. - ------------------------------------------------------------------------- -r9 | sam | 2002-03-06 00:04:41 +0000 (Wed, 06 Mar 2002) | 2 lines -Changed paths: - M /trunk/Makefile.am - M /trunk/Makefile.in - M /trunk/aclocal.m4 - M /trunk/config.guess - M /trunk/config.sub - M /trunk/configure - M /trunk/configure.in - M /trunk/debian/changelog - D /trunk/debian/libdvdcss2.shlibs - M /trunk/libtool - M /trunk/src/Makefile.am - M /trunk/src/Makefile.in - M /trunk/src/config.h.in - M /trunk/test/Makefile.am - M /trunk/test/Makefile.in - -*** empty log message *** - ------------------------------------------------------------------------- -r8 | hjort | 2002-02-25 18:21:57 +0000 (Mon, 25 Feb 2002) | 2 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/css.h - -Cleanup some formating, indentation and types and add a small comment. - ------------------------------------------------------------------------- -r7 | hjort | 2002-02-03 14:54:53 +0000 (Sun, 03 Feb 2002) | 2 lines -Changed paths: - M /trunk/src/ioctl.c - M /trunk/src/ioctl.h - -Add the WIN32 fix to GetTitleKey from the vlc/extra branch. - ------------------------------------------------------------------------- -r6 | hjort | 2002-02-03 14:53:10 +0000 (Sun, 03 Feb 2002) | 2 lines -Changed paths: - M /trunk/configure.in - -Do check for the unistd.h header file. - ------------------------------------------------------------------------- -r5 | hjort | 2002-01-20 17:04:54 +0000 (Sun, 20 Jan 2002) | 7 lines -Changed paths: - M /trunk/src/css.c - M /trunk/src/css.h - -Make CSSAuth more rubust, should now also work with drives that are not 100% -compliant to the SFF-8090 standard. AGID invalidation should now work, -allowing us to recover from hung / failed authentications. Corrected -CSSGetASF, it does not take an AGID argument. Move several data structures -from the dvdcss handle to local variables in CSSAuth. Remove CSSAuth as a -externaly visible function in css.c. - ------------------------------------------------------------------------- -r4 | sam | 2001-12-22 00:52:46 +0000 (Sat, 22 Dec 2001) | 3 lines -Changed paths: - M /trunk/configure - M /trunk/configure.in - M /trunk/libtool - A /trunk/src/.cvsignore - M /trunk/src/config.h.in - M /trunk/src/libdvdcss.c - - - * Win32 compilation fix. - ------------------------------------------------------------------------- -r3 | sam | 2001-12-22 00:26:17 +0000 (Sat, 22 Dec 2001) | 3 lines -Changed paths: - M /trunk/configure - M /trunk/configure.in - M /trunk/src/config.h.in - - - * Attempt at fixing the Solaris port. - ------------------------------------------------------------------------- -r2 | sam | 2001-12-22 00:10:31 +0000 (Sat, 22 Dec 2001) | 3 lines -Changed paths: - M /trunk/.cvsignore - A /trunk/Makefile.in - M /trunk/configure - M /trunk/configure.in - A /trunk/src/Makefile.in - M /trunk/test/.cvsignore - A /trunk/test/Makefile.in - - - * Forgot Makefile.in files. - ------------------------------------------------------------------------- -r1 | sam | 2001-12-22 00:08:13 +0000 (Sat, 22 Dec 2001) | 3 lines -Changed paths: - A /trunk - A /trunk/.cvsignore - A /trunk/AUTHORS - A /trunk/COPYING - A /trunk/ChangeLog - A /trunk/INSTALL - A /trunk/Makefile.am - A /trunk/NEWS - A /trunk/README - A /trunk/aclocal.m4 - A /trunk/bootstrap - A /trunk/config.guess - A /trunk/config.sub - A /trunk/configure - A /trunk/configure.in - A /trunk/debian - A /trunk/debian/.cvsignore - A /trunk/debian/changelog - A /trunk/debian/control - A /trunk/debian/libdvdcss2-dev.dirs - A /trunk/debian/libdvdcss2.copyright - A /trunk/debian/libdvdcss2.dirs - A /trunk/debian/libdvdcss2.shlibs - A /trunk/debian/rules - A /trunk/install-sh - A /trunk/libdvdcss.spec - A /trunk/libtool - A /trunk/ltmain.sh - A /trunk/missing - A /trunk/mkinstalldirs - A /trunk/src - A /trunk/src/Makefile.am - A /trunk/src/bsdi_dvd.h - A /trunk/src/bsdi_ioctl.c - A /trunk/src/common.h - A /trunk/src/config.h.in - A /trunk/src/css.c - A /trunk/src/css.h - A /trunk/src/csstables.h - A /trunk/src/dvdcss.h - A /trunk/src/ioctl.c - A /trunk/src/ioctl.h - A /trunk/src/libdvdcss.c - A /trunk/src/libdvdcss.h - A /trunk/test - A /trunk/test/.cvsignore - A /trunk/test/Makefile.am - - - * Initial commit. Hope it'll work. - ------------------------------------------------------------------------- +commit b3ef727c420cdd6ddb54c57f8c02b5871c3b36db +Author: Olivier Rolland <billl@users.sourceforge.net> +Date: Fri Jul 11 17:23:25 2008 +0000 + + * src/libdvdcss.c: add dvdcss_is_scrambled() function, + Olivier Rolland. + +commit 1c1f814cb73f791e4dc997a4b66f81a0b2f0beaf +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Jan 7 16:48:35 2008 +0000 + + Nicer comment + +commit 99febf7d3f6b71751a42930a3a01364c91e3fd83 +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Sep 17 12:10:20 2007 +0000 + + Identifiers starting with two underscores or an underscore and capital letters are reserved for the system in C. + +commit 73a1d090593af7bdb3756abf80e2bb6950635a15 +Author: Diego Biurrun <diego@biurrun.de> +Date: Mon Sep 17 12:07:41 2007 +0000 + + This patch removes the following warning when compiling MPlayer: + + libdvdcss.c:145: warning: redundant redeclaration of 'dvdcss_interface_2' + dvdcss/dvdcss.h:70: warning: previous declaration of 'dvdcss_interface_2' was here + +commit e0eb585a2591c45c3198c97a8fbd2ae1e4e85eea +Author: Ivan Kalvachev <ikalvachev@gmail.com> +Date: Sun Jul 29 10:14:53 2007 +0000 + + Fix crash on some DVDs + sprintf(tmp,"%.02x",(char)0xef); would print "ffffffef" instead of "ef" + in this case this leads to local array buffer overflow and hard to trace stack corruption. + The quick, easy & dirty solution is to use (unsigned char) or (uint8_t) + +commit 191f02b68793cff37fa3908098208d9a5421e52b +Author: Christophe Mutricy <xtophe@videolan.org> +Date: Sun Jul 15 22:23:39 2007 +0000 + + support automake 1.10 + +commit 2669f3af06e1f1eb47e8f26232ae48b060dd0a3b +Author: Diego Biurrun <diego@biurrun.de> +Date: Tue Nov 7 16:27:40 2006 +0000 + + fix cygwin compilation regarding the lseek change + +commit ba022acfaa68203c2e17cdf7f14f51dc0ddadf56 +Author: Diego Biurrun <diego@biurrun.de> +Date: Wed Nov 1 14:31:51 2006 +0000 + + fix compilation on MINGW + (lseek vs lseek64 typo) + +commit 495740089fc87dc105166f3b4fcc7cd5e27cb11d +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Sep 19 23:03:53 2006 +0000 + + * Fixed spelling in documentation. Also testing buildbot. + +commit 0602e82b4aba7da791a9eaaeb3e18bc34b0a8e51 +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Sep 19 22:28:06 2006 +0000 + + * Fix warnings due to signed / unsigned pointer targets. + +commit 72c5201bb08792fd0eb93e92be487b2afa2d13bd +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Sep 19 22:27:46 2006 +0000 + + * Update bootstrap script. + +commit e5208cfe7eb1e5f1dd38f5e4ed1d72a8f42a9cc9 +Author: Steve Lhomme <robux@videolan.org> +Date: Wed Sep 13 13:12:23 2006 +0000 + + fallback to USERPROFILE environment variable for caching CSS keys when + HOME is not set (for MinGW builds running outside of MinGW). + +commit 93ad73f7db62a40c2fa97298004d0509ddb8db6c +Author: Steve Lhomme <robux@videolan.org> +Date: Wed Sep 13 13:11:25 2006 +0000 + + now accepts X:\ as a device name, as well as X: + +commit 4b0fa47cb1e6e860bdf80015010869033ead73e1 +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Mar 30 14:31:12 2006 +0000 + + * Oops, forgot to commit configure.ac when removing the debian/ directory. + +commit 6d34e8e62d05d7d82583280e4f628799bf58d127 +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Mar 30 14:30:43 2006 +0000 + + * Removed the debian/ directory. Debian packaging is now handled + separately, in the pkg-multimedia repository. + +commit bbd221a848a91ad4ff4768daf7939f155aa0a1e4 +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Jan 26 20:48:06 2006 +0000 + + * src/device.c: reduced code duplication and fixed a pointer/integer + confusion in the OS X drive detection. + +commit 3ff0475329552066207a5b83ae014ddffc7b86a4 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Nov 9 22:12:32 2005 +0000 + + * src/common.h: do not override lseek on Cygwin, only on mingw32. Cygwin + provides its own 64-bit offset lseek. + +commit 2094820645b8689a700c64ed68b1c92f821e68a8 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Oct 26 16:58:08 2005 +0000 + + * debian/control: build-depend on tetex-extra (needed by doxygen). + +commit 1f2c5c1fc04d0caa3e2b6fb36047bd99251a5a9f +Author: Steve Lhomme <robux@videolan.org> +Date: Sun Sep 4 08:49:23 2005 +0000 + + * libdvdcss: more fixes for DLL building + +commit cd9be950885c2fd5b9086c9d39bfd54bf1826511 +Author: Steve Lhomme <robux@videolan.org> +Date: Sun Sep 4 08:31:58 2005 +0000 + + * libdvdcss: the current version is 1.2.9 + +commit 45f037d4544409de22d6534d9b9c0016863c2029 +Author: Steve Lhomme <robux@videolan.org> +Date: Sun Sep 4 08:31:26 2005 +0000 + + * libdvdcss: MSVC7 compilation fixes (shouldn't break mingw32) + +commit 618d5b8125a10c9a7e584a15f2cfac4ea12c7a7c +Author: Steve Lhomme <robux@videolan.org> +Date: Sun Sep 4 08:25:26 2005 +0000 + + * libdvdcss: MSVC7 compilation fixes (shouldn't break mingw32) + +commit fb0405ccb37a2f9bf9e78e734e15332013325c42 +Author: Steve Lhomme <robux@videolan.org> +Date: Sun Sep 4 07:54:41 2005 +0000 + + * libdvdcss: oops mismatch #ifdef + +commit d1b4617cddd389a4dd58c11d63d65ed9dfca71c8 +Author: Steve Lhomme <robux@videolan.org> +Date: Sun Sep 4 07:43:15 2005 +0000 + + * libdvdcss: set EOL style in SVN + +commit c3f7706729224b5c7affefac22af2876e0cb2cc3 +Author: Steve Lhomme <robux@videolan.org> +Date: Sun Sep 4 07:39:37 2005 +0000 + + * libdvdcss: better DLL/library difference + +commit a79d41d0732836555996d91bd254faf84492b783 +Author: Steve Lhomme <robux@videolan.org> +Date: Sun Sep 4 07:36:01 2005 +0000 + + * libdvdcss: allow building DLL exports + +commit 6e2d2c27f4569c38e4660f6285aa693be5e175e4 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Sep 3 13:17:55 2005 +0000 + + * configure.ac: + documentation build. + * test doc: added missing svn:ignore entries. + +commit c143e1462c9385bfcf328620987232051bb47ea5 +Author: Christophe Massiot <massiot@videolan.org> +Date: Thu Sep 1 17:12:42 2005 +0000 + + * Revert [181] since it breaks on some OS X versions. + +commit a6022a7fecf49abfb84e9c7b878bcad2d0893c48 +Author: Christophe Massiot <massiot@videolan.org> +Date: Thu Sep 1 12:40:25 2005 +0000 + + * bootstrap: Use libtoolize instead of glibtoolize when it is available + because libtool under OS X sucks. + +commit 02f6ff7dbba02695e244ab47e732f19d32c8071f +Author: Christophe Massiot <massiot@videolan.org> +Date: Wed Aug 31 19:07:00 2005 +0000 + + * src/device.c: Under Windows remove the trailing backslash. + +commit 1a0bb73f345c8a6e652b4c04ef9ea80fb870d4ea +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Aug 30 10:20:18 2005 +0000 + + * configure.ac: forward -framework options to the linker. + +commit a985b4c89b17af19910e3972759f9a2c5c3a67bb +Author: Christophe Massiot <massiot@videolan.org> +Date: Tue Aug 30 09:48:19 2005 +0000 + + * src/device.c: Fixed compilation under Darwin. + +commit 3b1e03fddcdc6bf40e472dd491fbb241b7dc6463 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Aug 29 22:25:20 2005 +0000 + + * src/device.c: tried to port the device autodetection to OS X. + +commit 13b4e10ccb98348e3e4b170373d74fbc062d2a6d +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Aug 29 22:02:55 2005 +0000 + + * src/device.c: if the target is the empty string, attempt to autodetect + the DVD drive instead of giving up. + +commit 0c4fd16c0e19b66ed0f3138fb2ceb8e063c8e8ad +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Aug 23 16:15:38 2005 +0000 + + * doc/Makefile.am: fixed build in a separate directory. + of Bernard Leak with a few additions. + +commit 3d721bb2323c99bb2f01d485d9b1e3e16eb1f4dd +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 12:32:57 2005 +0000 + + * Updated ChangeLog. + +commit a612b01c8e14583bb590a8bf32fe20418f68ec46 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 12:31:58 2005 +0000 + + * src/Makefile.am: bumped libtool version information. + +commit 3c807df5278e83ebba7522b30d21f1d22cf88d02 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 12:25:18 2005 +0000 + + * debian/*: updated Debian packaging information. + +commit 54d659860270fef27cffd5d76a13abb5a5a7542e +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 12:23:07 2005 +0000 + + * src/css.c: grmbl, compile fix. + +commit aff6ddcdebafea8c085f280808a732f1f1b76ec3 +Author: Christophe Massiot <massiot@videolan.org> +Date: Mon Jul 11 12:15:10 2005 +0000 + + * Bumped up version number to 1.2.9. + +commit f0e89dcf84cfae8cd6029b42d64a7f347fb02636 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 12:10:43 2005 +0000 + + * src/css.c: reworked my verbosity patch to fix a compilation issue. + +commit 1c7a44d2526fffcab4aef1376284bf80b53fb652 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 11:58:58 2005 +0000 + + * src/ioctl.c: under Solaris, use libsmedia for ioctls when available. Code + reworked from a + +commit cdd38de0e1113e141cd1988c7dfd43f9ee7f7a55 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 11:41:15 2005 +0000 + + * src/bsdi_ioctl.c: use memset instead of bzero. + MPlayer team. + +commit 30c2da59e16b6acc6afb42549b6dc799aad1b94a +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 11:32:33 2005 +0000 + + * src/device.c src/ioctl.h: cosmetic fix that uses real Win32 types for + dynamically loaded functions and gets rid of lvalue casts. + +commit 550db7cd68db23d12a21ce1512a692e9a7e7c882 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 11:25:47 2005 +0000 + + * src/css.c: be slightly more verbose in which keys we manipulate. + +commit 59e410e2c02b6f7c3c13c892401c48b1fefd63ca +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 11 11:22:33 2005 +0000 + + * bootstrap: allow to bootstrap with aclocal/automake version 1.9. + +commit 933f36763e17753b5ba1fefbe24620025852de7b +Author: Gildas Bazin <gbazin@videolan.org> +Date: Thu Sep 2 12:17:13 2004 +0000 + + * src/common.h: use lseeki64 for file seeking on win32 (works above the 2.1G boundary). + +commit b077da2918b1f24352dda95e92ee477359413345 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 13 13:53:27 2004 +0000 + + * src/css.c: + + Save the cached key as ASCII in hexadecimal form. + + Overwrite cached files if the data was invalid. + +commit 2f4e0edf3179a52f6f287188202c3cf68a9b61a4 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 13 13:40:44 2004 +0000 + + * src/libdvdcss.c: + + Recreate the cache dir information on each launch, in case the + information it contains ever changes. + +commit e33338ed892251f4b5f6fdc09662fe0a522f193a +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Aug 11 23:26:35 2004 +0000 + + * Don't put autotools/ under revision control. + +commit 9b1b0c2ee2b8d8fdf04a41f97c812e192a71bc64 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Aug 11 23:24:54 2004 +0000 + + * Don't put autotools/ under revision control. + +commit b3ab4e05fb469051f1f15d4deff3e61a06c2f2b0 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Aug 11 23:04:39 2004 +0000 + + * libdvdcss.spec: updated Red Hat rules for RH9. + +commit 5078a9cba248307a85cf3ba54590e6e3e20697c4 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Aug 11 22:59:42 2004 +0000 + + * src/libdvdcss.c: + + Support for cache directory tags, as proposed on + http://www.brynosaurus.com/cachedir/spec.html . + +commit 8b3ebecc097066cb94161c4427a6d76f3499c8da +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Aug 11 22:15:30 2004 +0000 + + * src/libdvdcss.c: + + Append the disc key to the cache directory name to avoid issues with + identical discs which have different encryption keys, thanks to Sven + Heithecker. + + Use - instead of # as a separator in the cache filename. + +commit c2a2a265ee490a9a59bed41d31cf65e5e23c4b82 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 5 09:17:20 2004 +0000 + + * bootstrap: fixed a syntax error. + +commit 0e8e26de1bab11ea514dea089f0a384983c27853 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jul 5 09:15:35 2004 +0000 + + * bootstrap: + + Run libtoolize before aclocal. + + Support automake 1.8. + +commit b5b08eea25b41a9cee3c1dbef2b949c92c4d2e11 +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Feb 24 15:47:00 2004 +0000 + + * Added proper SVN keywords to files and directories (for $Id and ignores). + +commit f446439d00aa005e23a9b76f9ea63db4a050b3fe +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Dec 11 15:13:40 2003 +0000 + + * doc/doxygen.cfg: Updated doxygen configuration. + * doc/.cvsignore: Ignore stamp files. + +commit 1487a6073ca8fc2d5a068ebc83a754979057496a +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Dec 11 15:12:42 2003 +0000 + + * src/device.c: + + Store the off_t values for seek and read in a temporary variable to + work around a strange gentoo gcc behaviour as seen here: + http://www.via.ecp.fr/via/ml/libdvdcss-devel/200312/msg00000.html + +commit 7a98f74594c310b793d7e855931b5f30ec3cbf58 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Nov 26 20:16:38 2003 +0000 + + * libdvdcss.spec: Fixed a syntax error (#1488). + +commit 63e441f9c4396f7109586ca25765dc39dd7bdb3e +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Nov 6 10:12:38 2003 +0000 + + * bootstrap: remove autom4te.cache before running autoconf + +commit e3a18cd7c55a261796bfab29845852481f7a08e5 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Sep 15 17:12:46 2003 +0000 + + * libdvdcss.c: Added more debug messages. + +commit eeaf7ef062e799d49c8d56db3c7938acfa81e8ce +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Sep 9 13:17:24 2003 +0000 + + * src/css.c, src/device.c: more meaningful error messages. + +commit 9ae8f9d21ccad4155c7d379e071b04cb9712041b +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Sep 9 12:32:40 2003 +0000 + + * configure.ac: check for doxygen and latex to build documentation. + * doc/Makefile.am: conditionally build documentation. + * debian/*: use debian/compat instead of DH_COMPAT. + +commit 01e2c942ccd52849e0bbddbf57bee67dda781898 +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Sep 9 12:05:44 2003 +0000 + + * bootstrap: code clean-up. + +commit ddfe2c316e0fd6819721f5e5ddb861f5df5e6ecf +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Sep 9 10:03:48 2003 +0000 + + * Changed _dvdcss_error and _dvdcss_debug to print_error and print_debug + because they aren't libdvdcss functions. + +commit 0104be9ede298780483f95736a7be2c619b766bb +Author: Gildas Bazin <gbazin@videolan.org> +Date: Tue Jul 29 19:49:13 2003 +0000 + + * NEWS: forgot to update this one for the release. + +commit 94aca59950ec9441bafa4dbd9889fd7b191002fc +Author: Gildas Bazin <gbazin@videolan.org> +Date: Tue Jul 29 19:03:02 2003 +0000 + + * libdvdcss.spec: fixed typo. + +commit a4ba0c9a4a12d7733f8f128d53a391833a440f77 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Mon Jul 28 23:41:52 2003 +0000 + + * ALL: bumped version number to 1.2.8 + +commit 200baa1b6bf8e808f88532c48bb875d61b2621dc +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Jul 16 21:40:01 2003 +0000 + + * src/css.c: + + Workaround in CrackTitleKey for strange discs that report read errors + seemingly at random. Testcase was on Linux 2.4.20, with a region 2 RPC2 + drive, and the region 1 copy of "Chasing Amy". + + Used macros instead of numerals where appropriate. + + Fixed spelling here and there. + +commit e128db913818655fb274750b597bb8ac7dd668c6 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Tue Jul 8 18:00:54 2003 +0000 + + * src/device.c: grmblgrmbl!! Fixed a bug that prevented encrypted dvds from working under win32. + +commit 3979509d01dfc9f969dee80cdb9d9d962b3cbc32 +Author: Christophe Massiot <massiot@videolan.org> +Date: Sun Jun 22 20:59:45 2003 +0000 + + * Updated library version. + +commit c2d6c5f6f862cbbdba032f4f8d89fc38324174fd +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Jun 18 17:23:55 2003 +0000 + + * ./src/libdvdcss.c: if DVDCSS_VERBOSE is greater than 2, do as if it was 2. + +commit 6d3c82cb01166d054ee8b83860b9b84cca6ab721 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Jun 13 00:41:35 2003 +0000 + + * Everything is ready for a 1.2.7 release. + + * debian/control: + + Set policy to 3.5.10. + + Removed the leading "a" in the package description. + + Set the source section to libs. + + Set the -dev package section to libdevel. + + Changed the debhelper build dependency to (>=3.0). + * debian/rules: + + Added magic to avoid autotools timestamp skews on autobuilders (as if + libdvdcss was ever going to hit the Debian autobuilders anyway). + +commit 990adc01b453c29557c7d6059cf2cefb397e014f +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Jun 12 23:22:34 2003 +0000 + + * ./src/libdvdcss.c: if DVDCSS_CACHE is not set, we force a default value. + - under Win32: C:\Documents and Settings\$USER\Application Data\dvdcss\ + - under Unix and everything else: ${HOME}/.dvdcss/ + - the special value DVDCSS_CACHE=off disables caching. + * ./src/libdvdcss.c: updated doxygen documentation accordingly. + +commit 01533ced72f6d115b24c29e9831c4f25d05afdbd +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Jun 12 23:15:18 2003 +0000 + + * ./Makefile.am: put autotools/ in DIST_SUBDIRS instead of SUBDIRS. + * ./configure.ac: forgot to generate autotools/Makefile. + +commit 65e94b3fc670ad9336788d9b264ef4bc1ebf7098 +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Jun 10 22:50:31 2003 +0000 + + * ./configure.ac: make use of the autotools/ directory. + * ./bootstrap: libfool is a tool. Worked around its blatant ignorance of + the AC_CONFIG_AUX_DIR directive. + +commit 526cc26f2a9149d186be8ec6cb614bae81ee87ea +Author: Sam Hocevar <sam@videolan.org> +Date: Tue May 27 17:12:33 2003 +0000 + + * ./debian/control: removed libc6-dev from libdvdcss2-dev's dependencies + because it is part of build-essential and it isn't even called libc6-dev + on all architectures. + +commit ae48e7a8b9f2035549264a9de0faf7169501a40b +Author: Sam Hocevar <sam@videolan.org> +Date: Fri May 16 22:12:48 2003 +0000 + + * ./src/css.c: typos in comments. + +commit 91e835e396ca1ca7b14a3125f208b91382743fe2 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Fri Apr 11 10:00:29 2003 +0000 + + * configure.ac, src/common.h: fixes for the cygwin build using the mno-cygwin flag. + +commit f023e43583229b3feb6595549b464e9a0e1ebff6 +Author: Kipp Cannon <kipp@sgl.crestech.ca> +Date: Sun Apr 6 20:36:07 2003 +0000 + + better RH part + +commit 48049c60d7efc40abe610e6ad66f59dfb9bf91bb +Author: Michael Roitzsch <mroi@users.sourceforge.net> +Date: Thu Mar 27 18:57:12 2003 +0000 + + * src/libdvdcss.c: CSS key cache collisions + +commit fbc894055ce61ae2f96fb9ed4bdfb8a749d4badf +Author: Christopher Richards <richards+netbsd@CS.Princeton.EDU> +Date: Sat Mar 22 16:37:37 2003 +0000 + + * src/libdvdcss.c: fix for NetBSD's mkdir that doesn't like trailing "/" on its argument. + +commit bf60ff1858beb4442f19e8748a6a7dd725b8f1ce +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Mar 10 18:01:40 2003 +0000 + + * ./debian/changelog: updated Debian changelog. + * ./src/Makefile.am: bumped version information. + +commit 876f392b742ef2a6b021bed6ca806b58db90f943 +Author: Alexis de Lattre <alexis@videolan.org> +Date: Mon Mar 10 17:41:31 2003 +0000 + + - preparing the 1.2.6 release... + +commit 780d82a9fcc47a4301b4a6e1aa592d677d07d3a9 +Author: Christophe Massiot <massiot@videolan.org> +Date: Sun Mar 9 23:50:42 2003 +0000 + + Bumped up to 1.2.6. + +commit dd59304d26c2a437f7b24fcbded4ea5cf342d055 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Sun Mar 9 23:34:18 2003 +0000 + + * src/common.h, src/error.c: fixed the PATH_MAX breakage on win32. + +commit e5ad296c482b5709673718cdadf75f36f7ce3fa3 +Author: Christophe Massiot <massiot@videolan.org> +Date: Tue Feb 4 11:54:36 2003 +0000 + + Fixed compilation problems with PATH_MAX. + +commit 459106fb9464578122e4e116f5f14ee845a8e445 +Author: Christophe Massiot <massiot@videolan.org> +Date: Wed Jan 29 22:59:35 2003 +0000 + + Fixed MAX_PATH on Darwin. + +commit 6bb02c1025f263d353df1c23e16ecf980e9cbcc0 +Author: Yves Duret <yves@videolan.org> +Date: Tue Jan 28 07:58:22 2003 +0000 + + - release number is 1. do not forget to update it too, aka sam sux. + - fix a redhat "macro". + +commit 677d07cc4a8db65add1de6ca2750bec98db1b92b +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Jan 28 01:17:02 2003 +0000 + + * updated ChangeLog. + * updated version numbers and timestamps everywhere. + * created NEWS file. + * ./configure.ac: BSD/OS compilation fix when a local copy of libdvd is + found on the system, thanks to Steven M. Schultz. + +commit a8cdb36570a3b28e116c75c3a5bd38d71a6f2ccc +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Jan 28 00:41:10 2003 +0000 + + * ./test/csstest.c: we align our read buffer in case of raw device access. + * ./src/libdvdcss.c: updated documentation about raw devices. + +commit ebbbe9db422d99f182f7e95055c248ea1757e0ec +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Jan 27 16:57:19 2003 +0000 + + * ./src/libdvdcss.c: disabled key cache when reading VOBs. + +commit ce9d6dfbd44915a29f2821adc3400e35cfd1f9ba +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Jan 16 22:58:29 2003 +0000 + + * ./src/ioctl.c, ./src/ioctl.h: removed minor gcc-isms. + +commit 9968f73fc2129873c1d01f6b6ed0b6dc2fcc11a8 +Author: Yves Duret <yves@videolan.org> +Date: Thu Jan 16 14:45:14 2003 +0000 + + * macros to fix build on redhat system. put %define redhat80 to 1. + * few fixes. + +commit 8ac62497bbcd7a64fdc94e062d5ccae18756c7df +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Dec 19 16:50:50 2002 +0000 + + * ./src/device.c: seek() calls don't do anything if we're already at the + right position. + * ./src/device.c: we now handle partial reads. + +commit ba862c3860586c3d7248b6bd665440fe791d6c1a +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Dec 19 15:44:30 2002 +0000 + + * ./configure.ac: added warning flags whenever possible. + +commit 0463d939434af887912396dcbaa8e45010c66a3a +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Dec 19 15:36:04 2002 +0000 + + * ./src/device.c: dvdcss->i_pos now gets updated on each seek and each + read. Partial reads are not handled yet, but it's a step. + +commit aa2a222868f993d893b1448461292e95940f3aca +Author: Steven M. Schultz <sms@2bsd.com> +Date: Thu Dec 19 15:29:53 2002 +0000 + + * ./src/bsdi_ioctl.c, ./src/bsdi_dvd.h: updated the bsdi libdvd with + Steven M. Schultz's latest changes. + +commit 50899042baa76832eeead4ab35fe0d49c4dd0b85 +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Dec 19 12:37:30 2002 +0000 + + * Ported the library build to Cygwin. + +commit 80e3a9ea47d8d5358e4012e830bc500f0a1bb45e +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Dec 11 13:12:10 2002 +0000 + + * minor coding style fixes. + +commit 92ccdd74aa3facb7675afdcc46609505129f2735 +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Dec 10 10:43:25 2002 +0000 + + * ./msvc/*: grmbl, for some reason the project files were empty. + +commit 66c539c3aa03aa8823c41e5698685a165fb30c7b +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Dec 10 10:38:12 2002 +0000 + + * ./msvc/*: MS VC++ project files. + +commit b1486f807e7429794eb1adf0b8427ff119e9d3f6 +Author: Boris Dorès <babal@videolan.org> +Date: Fri Dec 6 00:16:57 2002 +0000 + + - Early versions of Mingw32 (at least until 1.2) do not include + <limits.h> automatically, so PATH_MAX was undefined. + +commit d2edf451feb3e8762c4895665bc356f5f9bb12a9 +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Dec 5 10:24:42 2002 +0000 + + * ./src/libdvdcss.c: fixed Win32 mkdir() call. + * ALL: removed trailing spaces in files. + * ALL: moved everything to C99 integer types. + +commit f5c2c0ffec64c0c04085e2f33e08ce1b29e17869 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Dec 2 12:58:23 2002 +0000 + + * ./bootstrap: we also look for glibtoolize (Closes: #37). + +commit 6e54085ac98d922e0b4372c63f8e51b1aeb37308 +Author: Steven M. Schultz <sms@2bsd.com> +Date: Mon Dec 2 07:38:21 2002 +0000 + + ./src/device.h: Applied FreeBSD compile fix + +commit 74a14cf8b238c1efb540e3cc83d9ee4b71a4a70d +Author: Jon Lech Johansen <jlj@videolan.org> +Date: Mon Nov 25 18:44:31 2002 +0000 + + * ./src/ioctl.[ch]: Implemented ioctl_SendRPC. + * ./test/dvd_region.c: enabled set_region. + +commit ec1bd09bf4768c9641363c13af2248edd0e24c91 +Author: Sam Hocevar <sam@videolan.org> +Date: Sun Nov 24 17:34:23 2002 +0000 + + * ./src/css.c, ./src/libdvdcss.c: applied a + to cache title keys on disk. + +commit c8e2bf595185afd6835852e78e2318e9c9cbc049 +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Nov 21 12:13:20 2002 +0000 + + * ./debian/control: set the package sections to libs and devel instead of + graphics. + +commit 222512d55d332448635aafa5734e29c56e6f1411 +Author: Alexis de Lattre <alexis@videolan.org> +Date: Sun Nov 17 23:46:44 2002 +0000 + + Changes in order to support RedHat and RPM 4.1 + Hristev and Kenton Groombridge). + + I have already uploaded new RPM packages on the FTP site (1.2.4-2) and + updated the download page. Please test and give feedback. + +commit e24d72f5d84d7e1384544048f9befc987e68dc53 +Author: Jon Lech Johansen <jlj@videolan.org> +Date: Fri Nov 15 18:39:08 2002 +0000 + + * ./src/ioctl.[ch]: ReportRPC win32 changes. Needs testing. + +commit 00e3bb6ea62a6a5dace32cc43856ccd7a790a3c6 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Thu Nov 14 15:12:34 2002 +0000 + + * updated the changelogs for the 1.2.4 release. + +commit 26d4d93c453ace4533fdc6c9bce594ca7681dc46 +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Nov 14 12:41:47 2002 +0000 + + * ./configure.ac: explicitly set AC_CONFIG_AUX_DIR(.) so that people who + do bootstrap without paying attention to error messages don't screw up + packages :-) + * ./libdvdcss.spec: removed bootstrap from the build phase. + * ./bootstrap: we accept automake 1.7. + +commit a150a631e85f3ee338597e29b29f5460e7a8d45f +Author: Gildas Bazin <gbazin@videolan.org> +Date: Thu Nov 14 12:38:57 2002 +0000 + + * src/css.c src/ioctl.c, src/libdvdcss.c: changed the work-around to detect + if the dvd is encrypted on Win2K in non-administrator mode. + Because we cannot use an ioctl to get the copyright status of the DVD + we try to get the disc key and if this succeed, we assume the DVD is + encrypted, otherwise we assume it to be unencrypted. + I hope this logic is not too much flawed... at least it seems to be working + with the few DVDs I've got. + +commit 33e1fe0bac871b3edb9e40291460cc1ab6bf50b1 +Author: Jon Lech Johansen <jlj@videolan.org> +Date: Thu Nov 14 01:32:37 2002 +0000 + + * ./src/ioctl.c: Broke OpenBSD port with my previous commit. Fixed. + +commit 8bb2cde6c72247d91309d5c387751329992f96e9 +Author: Alexis de Lattre <alexis@videolan.org> +Date: Wed Nov 13 23:43:01 2002 +0000 + + Added ./bootstrap for the build target + +commit 02a207d4836ef4321abc07b07a1b8872ab298cda +Author: Gildas Bazin <gbazin@videolan.org> +Date: Wed Nov 13 23:08:11 2002 +0000 + + * update changelogs. + +commit 5262add4fd5fa180629ec7ac8e775336182fa247 +Author: Jon Lech Johansen <jlj@videolan.org> +Date: Wed Nov 13 22:45:05 2002 +0000 + + * ./src/ioctl.c: cosmetic fixes. + * ./AUTHORS: updated my entry. + +commit 75999adf10f6c02fa7ccb0646671e13316e8b49b +Author: Alexis de Lattre <alexis@videolan.org> +Date: Wed Nov 13 22:24:41 2002 +0000 + + Update version number to 1.2.4 + +commit 9fb3b8e419730e4d77490c74cee9130ad3cb189d +Author: Alexis de Lattre <alexis@videolan.org> +Date: Wed Nov 13 22:14:28 2002 +0000 + + Update for 1.2.4 release. + +commit b1905951e466d516bab39135e7409aa69b8663cf +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Nov 13 22:11:38 2002 +0000 + + Updated Debian changelog (though there are no changes in this version + apart from Win32, so what's the point of building new packages :p) + +commit c1f72ec02134082f74e1e9e4b0f1f88bdb70fd65 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Wed Nov 13 21:23:08 2002 +0000 + + * ChangeLog: updated changelog. + +commit a5a05b27dab063a9b6843f88a06b83dabbd5cb66 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Tue Oct 29 18:51:37 2002 +0000 + + * src/ioctl.c: fixed typo that prevented unencrypted DVDs to work in + non-administrator mode. + +commit 6b11d456299603869c7f87705c52b7aefff45a0b +Author: Gildas Bazin <gbazin@videolan.org> +Date: Sat Oct 19 09:53:33 2002 +0000 + + * src/device.c, src/ioctl.h: on win9x, when using ASPI, make sure the drive + we are trying to open is actually a cdrom/dvdrom drive. + +commit 06626375c5f96a98eabddcd928ba1c269665498f +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Oct 18 18:48:59 2002 +0000 + + * ./src/device.c: split the open, read and seek functions so that we can + use function pointers instead of doing the if(WIN2K) test. + * ./src/device.c: if the target is not a drive name such as F:, we open + it with the standard libc functions, even under Win32. + +commit 2b99a49bad03ee880d1a8a2ff65d9080be934f45 +Author: Christophe Massiot <massiot@videolan.org> +Date: Sat Oct 12 23:02:49 2002 +0000 + + Updated changelog and release tag. + +commit 7437133762469e397253814824ab38796f6ff017 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Sat Oct 12 12:41:24 2002 +0000 + + * src/ioctl.c, src/ioctl.h: fix in ioctl_ReadCopyright to try to work around + the buggy IOCTL_DVD_READ_STRUCTURE on WinNT/2k/XP. + +commit 36eaed48543affde3b3ee233901313d411625972 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Oct 11 10:09:56 2002 +0000 + + * Updated changelog and package files. + +commit fd8c3e8443673203b43c06292719a8a14792556f +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Oct 11 10:03:48 2002 +0000 + + * ./configure.ac, ./bootstrap: used libdvbpsi's bootstrap, moved config.h + to ., renamed configure.in into configure.ac, removed useless files that + are autogenerated. + * ./src/Makefile.am: instead of using -no-undefined "only under BeOS" we + use it "never with MSVC". + +commit f91c54a9ef1e65e9cecd9fa15f520d964e1f9f46 +Author: Christophe Massiot <massiot@videolan.org> +Date: Thu Oct 10 22:29:31 2002 +0000 + + Exit cleanly in case of error. + +commit 45abd81482068bfbccedc7a4eb5a555819cd443b +Author: Christophe Massiot <massiot@videolan.org> +Date: Thu Oct 10 21:40:41 2002 +0000 + + * Bumped up version number to 1.2.3 (soleil !). + * Updated Changelog. + * Merged in hh's patch for broken DVD drives/kernel/whatever. + +commit 95671de3719a6b0943d7c86766e29c5646d191d8 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Thu Oct 10 12:44:28 2002 +0000 + + * src/css.c, src/device.c, src/ioctl.[ch]: We don't need to be in administrator mode + anymore to authenticate the drive on Windows NT/2k/XP. As a result any user can now + play a DVD on these OSs :) + * src/ioctl.c: fixed ioctl_ReadTitleKey which wasn't working on Windows NT/2k/XP. + Because of this bug, the disc and key methods for key decryption where not working. + +commit 3adf615d8ed7c70804844131e808ffaec923cb10 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon Oct 7 16:37:15 2002 +0000 + + * ./src/Makefile.am: -no-undefined is now only used under BeOS because it + causes the Win32 compilation to fail. + * ./configure.in, src/Makefile.am: used AM_CONDITIONAL to conditionally + build the BSDi stuff. + +commit 39b65aab22b68d7fe0f12380044e1f2d16cc30e2 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Aug 10 21:27:42 2002 +0000 + + * Bumped the revision number... thanks HÃ¥kan :-) + +commit a9aa3b2f714aad8a5d47c20b2741a8e4d3455c2b +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Aug 10 21:19:55 2002 +0000 + + * ./src/css.c: removed useless debug messages on HÃ¥kan's advice. + +commit 046d391fc90c62aa0afec5eb7c383c29b13bc885 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Aug 10 20:21:54 2002 +0000 + + * Updated release-related files. + +commit cf2eb147875db33b8aa06245b47ccea49b621d58 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Aug 10 17:42:09 2002 +0000 + + * ./src/ioctl.c: fixed ReportRPC for Win32. + * ./src/device.h: removed unneeded exported symbols. + +commit 04675299a604238ec1d03cbfdb7e1067f2416c5d +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Aug 10 14:27:26 2002 +0000 + + * ./src/dvdcss/dvdcss.h: marked deprecated stuff. + * ./test/csstest.c: more documentation. + see http://www.videolan.org/libdvdcss/doc/ + +commit 03de9c0aca9a021f7c9137a530c22c39748acd5c +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Aug 10 12:56:04 2002 +0000 + + * ALL: removed autotools files. + * ./doc/*: added doxygen files. + +commit de6bee4f68f96174622a59de170b0b1edd071f33 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Aug 10 12:21:28 2002 +0000 + + * ./src/libdvdcss.c, ./src/dvdcss/dvdcss.h: documented the API. + +commit ba96985769d21f10d173aaed3f23cae051c8b610 +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 9 22:03:34 2002 +0000 + + * ./src/css.c: in case of a region mismatch and when the drive needs to + be reset, we read the first sector of the disc instead of closing and + reopening it. + +commit b45e2bc2d228c3b1ddadf2092af174f32f524280 +Author: Andrew Bachmann <bigorneault@gmail.com> +Date: Fri Aug 9 14:19:46 2002 +0000 + + * ./src/Makefile.am: tell libtool that libdvdcss does not have undefined + symbols. Fix for BeOS + +commit 068c36acd9849d770f1a263f06b6aa3d88fa176d +Author: Sam Hocevar <sam@videolan.org> +Date: Fri Aug 9 14:10:43 2002 +0000 + + * ./src/css.c: when the ReadTitleKey ioctl failed, reopen the device before + falling back to the title method. + + Note: on my drive, this fixes the "ioctl_ReadTitleKey failed" error + many users have been reporting. Please test! + + Note 2: I could not find any other way to reset the drive after a failed + ReadTitleKey ioctl than closing and opening the device again. If + I don't do that, read() fails with an Input/output error after a + while (but not immediately). + + * ALL: libdvdcss builds with -ansi -pedantic. Yeah I like that :-) + * ./src/css.c: renamed a few functions so that they make more sense, added + debug messages here and there, fixed typos and speling. + * ./src/error.c: moved _dvdcss_error and _dvdcss_debug here. + * ./src/device.c: moved device reading functions from libdvdcss.c to here. + * ./src/device.c: errors from dvdcss_read are now properly handled; partial + reads still aren't though. + * ./src/libdvdcss.c: default verbosity is now 0, a library should not be + intrusive by default. + * ./test/csstest.c: additional error check. + * ./configure.in: removed the crap boolean_t detection. + +commit 3e4c0bab24070a6ff4ae03dce631d74bc3a32133 +Author: Christophe Massiot <massiot@videolan.org> +Date: Tue Jul 23 11:43:58 2002 +0000 + + Default method is now "key" :p. + +commit d9b17d5db3a92b5425daf010617ed32dfe6b97b7 +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Jul 16 22:47:40 2002 +0000 + + * ./test/Makefile.am: disabled dvd_region. + * ./src/css.c: speling fixes. + * ALL: re-ran bootstrap with more recent autotools. + +commit 6aa0ad6b9871d206fc0e582883297e117d6f0c5d +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Sun Jul 14 11:44:57 2002 +0000 + + New utility for querying (and eventualy setting) the region of a DVD drive + using the ioctl wrappers in libdvdcss. + +commit 517fa8b08d106c800f01c4f042d2b68d7036abd2 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Fri Jul 12 23:28:42 2002 +0000 + + Include config.h before testing defines in the BSDi ioctl code. Add a bug + fix + +commit 7467476e5a7233cea3b639d8ae31a6882b4a7e7e +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Fri Jul 12 21:06:41 2002 +0000 + + Fix so that the bsdi_*.[hc] files make it into the dist tar-ball. + Correct the include path for the programs in test/. + +commit caf62fa7aa6cbf240e723a80031e0a0ece10c0ae +Author: Adam Jones <adam@yggdrasl.demon.co.uk> +Date: Mon Jul 1 13:40:33 2002 +0000 + + Typo fix and fix the linked list code to not drop the list when instering + at the head. + +commit 35589cea2e9e39e5d65d2a2b146ea11bd0e65da6 +Author: Alex Strelnikov <lelik@os2.ru> +Date: Mon Jul 1 10:36:37 2002 +0000 + + Patch for OS/2. + +commit 71f84cb0068cdb7da5576c51fccc68039f2d217f +Author: Adam Jones <adam@yggdrasl.demon.co.uk> +Date: Mon Jul 1 09:59:09 2002 +0000 + + Typo fix + +commit 763cb3c28ac91ae0b847a3b6913114c651d003ae +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Mon Jul 1 09:02:25 2002 +0000 + + Getting ReportRPC for WIN32 a bit closer to working. + +commit 75926842ab179c9354ff726532679b58c0fc7fb0 +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Jun 4 07:10:07 2002 +0000 + + * ./src/ioctl.c: implemented ioctl_ReportKey1 for HP-UX. + +commit 060c45697b9bfd1cb834738e8da55357202713a8 +Author: Sam Hocevar <sam@videolan.org> +Date: Tue Jun 4 07:02:57 2002 +0000 + + * ./src/libdvdcss.c: Win32 compilation fix. + +commit b2ee28c060e844ff81c23f0d5511d4a06ff62ec6 +Author: Sam Hocevar <sam@videolan.org> +Date: Sun Jun 2 16:18:45 2002 +0000 + + * ALL: changed version number to 1.2.1. + +commit d3e94a78bd73ebb34739c17d54290759aa0ae4d5 +Author: Pascal Levesque <bigorneault@gmail.com> +Date: Sun Jun 2 16:14:48 2002 +0000 + + * ./src/ioctl.c, ./src/ioctl.h: QNX port, + +commit 68b19d058bc17060167acf89a5650160aaf63610 +Author: Sam Hocevar <sam@videolan.org> +Date: Sun Jun 2 16:05:34 2002 +0000 + + * ./src/css.c: applied HÃ¥kan's fix for the failure on region mismatch. + +commit 5084f4c8bc77f27e1f3ae43bca348c9b7fcd82be +Author: Sam Hocevar <sam@videolan.org> +Date: Sun Jun 2 15:54:10 2002 +0000 + + * ALL: switched to libtool 1.4.2a. + * ./src/libdvdcss.c: fixed an uninitialized variable. + +commit 63e6505bf228055c48961a1c179a05134f332d9a +Author: Sam Hocevar <sam@videolan.org> +Date: Sun May 26 14:22:23 2002 +0000 + + * ./src/dvdcss/dvdcss.h: C++ compliant public header. + +commit bf99afa9ce226d011d11f997858fe83480e2ca30 +Author: Sam Hocevar <sam@videolan.org> +Date: Mon May 20 17:58:20 2002 +0000 + + * Everything should be ready for 1.2.0. + * Updated ChangeLog. + * Removed libtool. It seems to be created automatically anyway. + +commit 9b0ed5b53779bf900ceb2f7e67adf805f56558f5 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Thu May 16 20:40:54 2002 +0000 + + New function _dvdcss_use_ioctls. Avoid using the ioctl calls when + they have no chans or working, this in turn avoids a spurious warning + when they fail. + +commit 92de716371ea7782a6a50185ba9fe5666b054397 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Thu May 16 20:12:04 2002 +0000 + + Update error message. + +commit 4fb72bf9d49ff22be5970333517fdf46d91a2dd7 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Thu May 16 12:10:29 2002 +0000 + + Default to 'key', rather than 'title', method. + +commit aec848b3b897a553561f05f157ebb55a3326aa31 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed May 15 20:27:04 2002 +0000 + + * ./libdvdcss.spec: enhancements by Mandrakesoft. + +commit 92f445b1ca8d887d7e17aa56b988936e6f0af62e +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Mon May 13 21:22:22 2002 +0000 + + Correct serious bug in dvdcss_read for titles with all zero key (a unencrypted + title on a CSS protected disc). + +commit 2d49f15658d883dbbaf33b6506626096acaf4bf6 +Author: Jon Lech Johansen <jlj@videolan.org> +Date: Sun May 5 22:21:51 2002 +0000 + + * ./src/ioctl.[ch]: Darwin changes: Cleaned up the code, fixed + ReadTitleKey, and implemented ReportRPC. + +commit f8fb98585e75d726c4b8438a364a86da71ec5883 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Fri Apr 26 20:47:08 2002 +0000 + + * updated win32 compilation instructions. + +commit 5980793d8ef061203eb6fb995f328bb84483f1af +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Apr 6 01:27:43 2002 +0000 + + * libdvdcss-1.1.1 release. + +commit 4f917a3a9e234b5ddc40d21b690a13628ce35657 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Apr 6 01:11:05 2002 +0000 + + * ./src/ioctl.c: OpenBSD compile fix. Thanks to ex0dus on #videolan. + +commit 41fb39a4f483037f32a9a8d5abb491fd6a902739 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Fri Apr 5 00:26:25 2002 +0000 + + * updated INSTALL doc for the win32 build. + * added small win32 specific error message that was also in the vlc tree. + +commit 273ace3c9a24e0e2ef72c3892f67549c56ea25f6 +Author: Gildas Bazin <gbazin@videolan.org> +Date: Thu Apr 4 23:44:20 2002 +0000 + + * added two patches that have been forgot from the vlc tree. + + 1- Under NT/2K/XP try to open the dvd device in read only mode if we don't + have right access. With only read access we can't use ioctls but if the + disc has already been authenticated, then we can decrypt it with the + TITLE method. + 2- Small compilation fix for msvc. + +commit 0329c59f62eec519e8cfacf20d11398f67819e60 +Author: Michael Pruett <michael@68k.org> +Date: Thu Apr 4 14:21:25 2002 +0000 + + * ./src/libdvdcss.h: IRIX compile fix + +commit 7e6e6cf923890b0378725ca1cc0361708f33745d +Author: Sam Hocevar <sam@videolan.org> +Date: Thu Apr 4 01:26:54 2002 +0000 + + * ./configure.in: BeOS bug fix. I'm so lame. + * ./src/ioctl.c: refuse to build if DVD ioctls weren't found. + +commit 75ffe329686f9bce2c84def92d6ecaa1373e1821 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Apr 3 23:34:30 2002 +0000 + + * Forgot to change test/.cvsignore ... + +commit cabb30c8ff86a6e618567e92ceab8e768e025495 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Apr 3 23:33:57 2002 +0000 + + * ./test/csstest.c: renamed test.c to csstest.c. + + I hereby declare libdvdcss 1.1.0 ready to ship; it was successfully tested + on Linux, FreeBSD, MacOS X and BeOS, and compiles on Solaris. + +commit 80a8d0599946bfbe09074f6d0653350270ab01fb +Author: Jon Lech Johansen <jlj@videolan.org> +Date: Wed Apr 3 23:02:20 2002 +0000 + + * ./src/ioctl.c: Fixed a Darwin typo I recently introduced. + +commit f6b34d75b13106330213253856f354110efbb01c +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Apr 3 22:31:42 2002 +0000 + + * Run ./bootstrap. + +commit 217089d0d860a7535a2a947af271fc8d5773a63c +Author: Jon Lech Johansen <jlj@videolan.org> +Date: Wed Apr 3 22:17:00 2002 +0000 + + * ./configure.in: Darwin compile fix (added -no-cpp-precomp) + +commit 0d817799e4288afb6a7f9fe02f6c0aaca4175a79 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Apr 3 21:31:52 2002 +0000 + + * ./ChangeLog: everything should be ready for the 1.1.0 release. + * ./libdvdcss.spec: updated specfile for RPM generation. + * ./missing: commited libtool's latest version of this file. + +commit 6288be6892eea448b8d239e06bdff779f95cfe87 +Author: Jon Lech Johansen <jlj@videolan.org> +Date: Wed Apr 3 21:25:13 2002 +0000 + + * Fixed a Darwin define problem. + +commit 58ecf1ad0b9c4d6f180ccf38a1184d0a75b46e8c +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Apr 3 15:19:22 2002 +0000 + + * ./src/dvdcss/dvdcss.h: moved dvdcss.h in a subdirectory so that we can + include <dvdcss/dvdcss.h> without having to make install. + * ./test/test.c: removed #ifdef DVDCSS_DIST. + +commit 9eb1d9cbe1ef96fae5c11479da2d3656e956e36b +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Apr 3 06:12:50 2002 +0000 + + * ./ChangeLog: updated changelog. + * ./Makefile.am: added the debian dir to the targets. + * ./configure.in: switched to a more conventional versioning scheme. + * ./src/css.c: removed a useless #ifdef. + * ./src/dvdcss.h: added a versioned symbol to the API. + * ./src/Makefile.am: use <dvdcss/dvdcss.h> instead of <videolan/dvdcss.h>. + * ./test/test.c: test program is now up to date. + +commit 9d7698f671f51ec94efbce21040c37d7eef88e61 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Sat Mar 9 17:57:53 2002 +0000 + + Split the code into more functions. The disc and title decryption / + cracking code is now each in it's own function. Also moved the code that + looks for a weak block in the VOB to crack the title key from out from + the loop that reads them. Added another crack method, it's disabled for + now though. Lowered some limits on the current 'weak' test. Added more + comments. + +commit ce5ffc6fe913e0720a7c8fed716990a5af4ee4c3 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Sat Mar 9 17:35:49 2002 +0000 + + Add -D_FILE_OFFSET_BITS=64 to the compile line to make off_t / lseek and + other file access functions used in dvdcss be 64bit. + +commit 061ebba29b2c295d9a2c160077293e09ddd96c19 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Sat Mar 9 17:24:28 2002 +0000 + + Tell libdvdcss to get the key for the block before we decrypt it. + +commit 0a1535afb01a0b39b678575c509c91695bff0f06 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Sat Mar 9 17:23:05 2002 +0000 + + Don't link to libdl. + +commit 7ea7bf9864f3599e7255bcb981920305b8122b33 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Mar 9 17:16:44 2002 +0000 + + * Fixed compilation of test/test.c. + +commit 3db91bb4dae32e2f639dcab6e9844482434ce520 +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Mar 6 00:06:17 2002 +0000 + + * Updated misc control files and added the sample program. + +commit a68da5e6ae264f6f9d77bba4b08fae86473ddb4c +Author: Sam Hocevar <sam@videolan.org> +Date: Wed Mar 6 00:04:41 2002 +0000 + + * Enable test folder + +commit ad53e785b3558f82b50bb570f22187f46fee062b +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Mon Feb 25 18:21:57 2002 +0000 + + Cleanup some formating, indentation and types and add a small comment. + +commit 92cc4b7d1617d548a4a79895cfeccba10dcae92b +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Sun Feb 3 14:54:53 2002 +0000 + + Add the WIN32 fix to GetTitleKey from the vlc/extra branch. + +commit 1b06ce6cd351254c569c7718bce917f5e36767ac +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Sun Feb 3 14:53:10 2002 +0000 + + Do check for the unistd.h header file. + +commit 7c90c435f3841bb11872f2e88024dcfccaa30816 +Author: HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> +Date: Sun Jan 20 17:04:54 2002 +0000 + + Make CSSAuth more rubust, should now also work with drives that are not 100% + compliant to the SFF-8090 standard. AGID invalidation should now work + allowing us to recover from hung / failed authentications. Corrected + CSSGetASF, it does not take an AGID argument. Move several data structures + from the dvdcss handle to local variables in CSSAuth. Remove CSSAuth as a + externaly visible function in css.c. + +commit 88a0017365d6c15fc32021330d768bd52e520bc4 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Dec 22 00:52:46 2001 +0000 + + * Win32 compilation fix. + +commit cd0dbd363b2fcd6bab58b9e48bd1130b2a418a9e +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Dec 22 00:26:17 2001 +0000 + + * Attempt at fixing the Solaris port. + +commit 475bc8f7db5a163c8fe2ded0b2dd501396acabc7 +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Dec 22 00:10:31 2001 +0000 + + * Forgot Makefile.in files. + +commit dd20598e1c8038e8d75887ea843558c418fcd31f +Author: Sam Hocevar <sam@videolan.org> +Date: Sat Dec 22 00:08:13 2001 +0000 + + * Initial commit. Hope it'll work. diff --git a/lib/libdvd/libdvdcss/INSTALL b/lib/libdvd/libdvdcss/INSTALL index fa53b011f4..4da83dc2b4 100644 --- a/lib/libdvd/libdvdcss/INSTALL +++ b/lib/libdvd/libdvdcss/INSTALL @@ -12,8 +12,8 @@ See `./configure --help' for more information. If you got libdvdcss from its version control system, please bootstrap first: - - ./bootstrap + + autoreconf -i Building libdvdcss @@ -38,46 +38,27 @@ Building libdvdcss for Win32 You have two alternatives to build libdvdcss for Win32: -- natively on Windows, using MSYS + MINGW (www.mingw.org): - - (MSYS is a minimal build environment to compile unixish projects under - windoze. It provides all the common unix tools like sh, gmake...) - - You will need to download and install the latest MSYS (version 1.0.7 as - of now) and MINGW. - The installation is really easy. Begin with the MSYS auto-installer and once - this is done, extract MINGW into c:\msys\1.0\mingw. You also have to remember - to remove the make utility included with MINGW as it conflicts with the one - from MSYS (just rename or remove c:\msys\1.0\mingw\bin\make.exe). - - http://www.mingw.org/download.shtml - http://prdownloads.sourceforge.net/mingw/MSYS-1.0.7-i686-2002.04.24-1.exe - http://prdownloads.sourceforge.net/mingw/MinGW-1.1.tar.gz - - To build libdvdcss you just have to run the following commands: - ./configure - make - -- or on Linux, using the mingw32 cross-compiler: +- on Linux, using the mingw.org or mingw-w64 cross-compilers. - You can find a mingw32 cross-compiler on the videolan web site: - http://www.videolan.org/vlc/windows.html - Or if you are running Debian, there is a mingw32 package you can use. + If you are running Debian, there is are mingw32 packages you can use. If you are cross-compiling from the Debian package, you can use the following - commands: + commands, for example: ./configure --host=i586-mingw32msvc --target=i586-mingw32msvc \ --build=i386-linux make - If you are cross-compiling using the mingw32 package provided by - www.videolan.org, you have to use something along those lines: +- natively on Windows, using MSYS + MinGW (www.mingw.org): - CC=/usr/local/cross-tools/bin/i586-mingw32msvc-gcc \ - PATH=/usr/local/cross-tools/bin:$PATH \ - ./configure --host=i586-mingw32msvc --target=i586-mingw32msvc \ - --build=i386-linux + (MSYS is a minimal build environment to compile unixish projects under + Windows. It provides all the common Unix tools like sh, gmake...) + + You will need to download and install the latest MSYS and MINGW. + + To build libdvdcss you just have to run the following commands: + ./configure + make - PATH=/usr/local/cross-tools/bin:$PATH make + More on MSys on our wiki: http://wiki.videolan.org/Win32CompileMSYS diff --git a/lib/libdvd/libdvdcss/Makefile.am b/lib/libdvd/libdvdcss/Makefile.am index 8cfaef6ac3..8c979b62c5 100644 --- a/lib/libdvd/libdvdcss/Makefile.am +++ b/lib/libdvd/libdvdcss/Makefile.am @@ -1,12 +1,68 @@ -SUBDIRS = src test doc -DIST_SUBDIRS = $(SUBDIRS) +ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = libdvdcss.spec bootstrap +EXTRA_DIST = msvc libdvdcss.spec doc/header.html doc/footer.html INSTALL -AUTOMAKE_OPTIONS = foreign dist-bzip2 subdir-objects +dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog -doc-dummy: +DISTCLEANFILES = -doc: doc-dummy - $(MAKE) -C doc +lib_LTLIBRARIES = libdvdcss.la +EXTRA_PROGRAMS = csstest dvd_region +libdvdcss_la_SOURCES = \ + src/libdvdcss.c \ + src/libdvdcss.h \ + src/device.c \ + src/device.h \ + src/css.c \ + src/css.h \ + src/csstables.h \ + src/ioctl.c \ + src/ioctl.h \ + src/error.c \ + src/common.h + +libdvdcss_la_LDFLAGS = -version-info $(DVDCSS_LTVERSION) $(DVDCSS_LDFLAGS) +libdvdcss_la_LIBADD = + +if !SYS_MSVC +libdvdcss_la_LDFLAGS += = -no-undefined +endif + +csstest_SOURCES = test/csstest.c +csstest_LDADD = libdvdcss.la +csstest_CFLAGS = -I $(top_srcdir)/src + +dvd_region_SOURCES = test/dvd_region.c src/ioctl.c +dvd_region_LDADD = libdvdcss.la +dvd_region_CFLAGS = -I $(top_srcdir)/src + +pkgincludedir = $(includedir)/dvdcss +pkginclude_HEADERS = src/dvdcss/dvdcss.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = src/libdvdcss.pc + +if APIDOC +all-local: apidoc +install-data-local: install-apidoc +uninstall-hook: uninstall-apidoc +endif + +apidoc: stamp-doxygen + +stamp-doxygen: doc/doxygen.cfg + cd doc && doxygen doxygen.cfg + touch $@ + +clean-local: + -rm -Rf stamp-doxygen doc/html + +install-apidoc: + $(MKDIR_P) $(DESTDIR)$(htmldir) + for file in doc/html/*; do \ + $(INSTALL_DATA) $$file "$(DESTDIR)$(htmldir)" || exit 1; \ + done; + +uninstall-apidoc: + -rm -Rf $(DESTDIR)$(htmldir)/*.png $(DESTDIR)$(htmldir)/*.html $(DESTDIR)$(htmldir)/*.css $(DESTDIR)$(htmldir)/*.js diff --git a/lib/libdvd/libdvdcss/NEWS b/lib/libdvd/libdvdcss/NEWS index 2a3d429ea6..4fbdb1d169 100644 --- a/lib/libdvd/libdvdcss/NEWS +++ b/lib/libdvd/libdvdcss/NEWS @@ -1,4 +1,14 @@ -$Id: NEWS 251 2012-03-11 13:33:49Z jb $ +Changes between 1.2.12 and 1.2.13: +---------------------------------- + + * Drop BSD/OS and Windows 95 support. + * Rewrite most of the buildsystem, and simplify it + * System dependant code cleanup + * Move to git and rewrite of the history to get proper authorship + * Drop LaTeX documentation + * Fix build on various systems + * Fix compilation on MSVC + Changes between 1.2.11 and 1.2.12: ---------------------------------- @@ -11,7 +21,7 @@ Changes between 1.2.10 and 1.2.11: * improvements on RPC-II handling. * more robust key retrieval. - * fixes for MingW compilation. + * fixes for MinGW compilation. * fixes for OS/2 compilation. * various bug fixes for small issues, memleaks, crashes and build issues. @@ -50,7 +60,7 @@ Changes between 1.2.6 and 1.2.7: Changes between 1.2.5 and 1.2.6: -------------------------------- - * compilation fix for most UNIXes + * compilation fix for most Unixes Changes between 1.2.4 and 1.2.5: -------------------------------- @@ -68,7 +78,7 @@ Changes between 1.2.3 and 1.2.4: Changes between 1.2.2 and 1.2.3: -------------------------------- - * many Windows bugfixes + * many Windows bug fixes * workaround for drives which prevent key decryption Changes between 1.2.1 and 1.2.2: @@ -100,7 +110,7 @@ Changes between 1.0.0 and 1.1.0: -------------------------------- * merged all patches from the Ogle group - * lots of bugfixes + * lots of bug fixes * HP-UX port * better error recovery * third descrambling implementation diff --git a/lib/libdvd/libdvdcss/README b/lib/libdvd/libdvdcss/README index fbb60ad653..2de3069fec 100644 --- a/lib/libdvd/libdvdcss/README +++ b/lib/libdvd/libdvdcss/README @@ -1,5 +1,4 @@ README for libdvdcss, a portable abstraction library for DVD decryption -$Id: README 245 2011-11-14 10:26:47Z jb $ Introduction @@ -15,10 +14,10 @@ Building and Installing libdvdcss See the INSTALL or INSTALL.libdvdcss file for this. -Running lidvdcss -================ +Running libdvdcss +================= -The behaviourof the library can be affected by changing two environment +The behavior of the library can be affected by changing two environment variables: DVDCSS_METHOD={title|disc|key}: method for key decryption title: decrypted title key is guessed from the encrypted sectors of @@ -28,12 +27,11 @@ variables: at the beginning of each title, so it won't work if the key changes in the middle of a title. disc: the disc key is first cracked ; then all title keys can be - decrypted instantly, which allows us to check them often, + decrypted instantly, which allows us to check them often, key: the same as "disc" if you don't have a file with player keys at - compilation time. If you do, the decryption of the disc key - will be faster with this method. It is the one that was used by - libcss. - This is the default method. + compilation time. If you do, the decryption of the disc key will + be faster with this method. It is the one that was used by libcss. + This is the default method. DVDCSS_VERBOSE={0|1|2}: libdvdcss verbosity 0: no error messages, no debug messages (this is the default) 1: only error messages diff --git a/lib/libdvd/libdvdcss/bootstrap b/lib/libdvd/libdvdcss/bootstrap deleted file mode 100755 index 019ba9baff..0000000000 --- a/lib/libdvd/libdvdcss/bootstrap +++ /dev/null @@ -1,132 +0,0 @@ -#! /bin/sh -# $Id: bootstrap 214 2008-08-29 18:57:45Z sam $ - -# bootstrap: generic bootstrap/autogen.sh script for autotools projects -# -# Copyright (c) 2002-2008 Sam Hocevar <sam@zoy.org> -# -# This program is free software. It comes without any warranty, to -# the extent permitted by applicable law. You can redistribute it -# and/or modify it under the terms of the Do What The Fuck You Want -# To Public License, Version 2, as published by Sam Hocevar. See -# http://sam.zoy.org/wtfpl/COPYING for more details. -# -# The latest version of this script can be found at the following place: -# http://sam.zoy.org/autotools/ - -# Die if an error occurs -set -e - -# Guess whether we are using configure.ac or configure.in -if test -f configure.ac; then - conffile="configure.ac" -elif test -f configure.in; then - conffile="configure.in" -else - echo "$0: could not find configure.ac or configure.in" - exit 1 -fi - -# Check for needed features -auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *([[ ]*\([^] )]*\).*/\1/p' $conffile`" -libtool="`grep '^[ \t]*A._PROG_LIBTOOL' $conffile >/dev/null 2>&1 && echo yes || echo no`" -header="`grep '^[ \t]*A._CONFIG_HEADER' $conffile >/dev/null 2>&1 && echo yes || echo no`" -makefile="`[ -f Makefile.am ] && echo yes || echo no`" -aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am 2>/dev/null || :`" - -# Check for automake -amvers="no" -for v in 13 12 11 10 9 8 7 6 5; do - if automake-1.${v} --version >/dev/null 2>&1; then - amvers="-1.${v}" - break - elif automake1.${v} --version >/dev/null 2>&1; then - amvers="1.${v}" - break - fi -done - -if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then - amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`" - if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then - amvers="no" - else - amvers="" - fi -fi - -if test "$amvers" = "no"; then - echo "$0: you need automake version 1.5 or later" - exit 1 -fi - -# Check for autoconf -acvers="no" -for v in "" "259" "253"; do - if autoconf${v} --version >/dev/null 2>&1; then - acvers="${v}" - break - fi -done - -if test "$acvers" = "no"; then - echo "$0: you need autoconf" - exit 1 -fi - -# Check for libtool -if test "$libtool" = "yes"; then - libtoolize="no" - if glibtoolize --version >/dev/null 2>&1; then - libtoolize="glibtoolize" - else - for v in "16" "15" "" "14"; do - if libtoolize${v} --version >/dev/null 2>&1; then - libtoolize="libtoolize${v}" - break - fi - done - fi - - if test "$libtoolize" = "no"; then - echo "$0: you need libtool" - exit 1 - fi -fi - -# Remove old cruft -for x in aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh; do rm -f $x autotools/$x; if test -n "$auxdir"; then rm -f "$auxdir/$x"; fi; done -rm -Rf autom4te.cache -if test -n "$auxdir"; then - if test ! -d "$auxdir"; then - mkdir "$auxdir" - fi - aclocalflags="${aclocalflags} -I $auxdir -I ." -fi - -# Explain what we are doing from now -set -x - -# Bootstrap package -if test "$libtool" = "yes"; then - ${libtoolize} --copy --force - if test -n "$auxdir" -a ! "$auxdir" = "." -a -f "ltmain.sh"; then - echo "$0: working around a minor libtool issue" - mv ltmain.sh "$auxdir/" - fi -fi - -aclocal${amvers} ${aclocalflags} -autoconf${acvers} -if test "$header" = "yes"; then - autoheader${acvers} -fi -if test "$makefile" = "yes"; then - #add --include-deps if you want to bootstrap with any other compiler than gcc - #automake${amvers} --add-missing --copy --include-deps - automake${amvers} --foreign --add-missing --copy -fi - -# Remove cruft that we no longer want -rm -Rf autom4te.cache - diff --git a/lib/libdvd/libdvdcss/configure.ac b/lib/libdvd/libdvdcss/configure.ac index eadba7feef..6028af8cfc 100644 --- a/lib/libdvd/libdvdcss/configure.ac +++ b/lib/libdvd/libdvdcss/configure.ac @@ -1,49 +1,121 @@ -AC_INIT(src/libdvdcss.c) +AC_INIT(libdvdcss, 1.2.13) +AC_CONFIG_SRCDIR([src/libdvdcss.c]) AC_PREREQ(2.50) -AC_CONFIG_AUX_DIR(.auto) -AC_CANONICAL_SYSTEM +AC_CANONICAL_HOST -AM_INIT_AUTOMAKE(libdvdcss, 1.2.12) -AC_CONFIG_HEADERS(config.h) +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip subdir-objects]) +AM_MAINTAINER_MODE([enable]) +dnl Enable silent rules only when available (automake 1.11 or later). +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_PROG_CC -AC_STDC_HEADERS +LT_INIT([win32-dll]) -AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL +AC_CONFIG_HEADER(config.h) +AC_CONFIG_MACRO_DIR([m4]) + +dnl The libtool version numbers (DVDCSS_LT_*); Don't even think about faking this! +dnl +dnl immediately before every release do: +dnl =================================== +dnl if (the interface is totally unchanged from previous release) +dnl DVDCSS_LT_REVISION ++; +dnl else { /* interfaces have been added, removed or changed */ +dnl DVDCSS_LT_REVISION = 0; +dnl DVDCSS_LT_CURRENT ++; +dnl if (any interfaces have been _added_ since last release) +dnl AGE ++; +dnl if (any interfaces have been _removed_ or _incompatibly changed_) +dnl AGE = 0; +dnl } +dnl +dnl If you want to know more about what you are doing, here are some details: +dnl * DVDCSS_LT_CURRENT is the current API version +dnl * DVDCSS_LT_REVISION is an internal revision number which is increased when the API +dnl itself did not change +dnl * DVDCSS_LT_AGE is the number of previous API versions still supported by this library +dnl * libtool has its own numbering scheme, because local library numbering schemes +dnl are platform dependent +dnl * in Linux, the library will be named +dnl libname.so.(DVDCSS_LT_CURRENT - DVDCSS_LT_AGE).DVDCSS_LT_AGE.DVDCSS_LT_REVISION + +DVDCSS_LT_CURRENT=3 +DVDCSS_LT_AGE=0 +DVDCSS_LT_REVISION=1 + +AC_SUBST([DVDCSS_LTVERSION], [$DVDCSS_LT_CURRENT:$DVDCSS_LT_AGE:$DVDCSS_LT_REVISION]) + +AC_PROG_CC +AC_HEADER_STDC AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T -AC_CHECK_HEADERS(unistd.h sys/param.h limits.h pwd.h errno.h) +AC_CHECK_HEADERS([unistd.h sys/param.h sys/uio.h limits.h pwd.h]dnl + [errno.h sys/types.h sys/stat.h fcntl.h io.h]) + +AC_CHECK_DECL([O_BINARY], [], + [AC_DEFINE([O_BINARY], [0], [Define O_BINARY if missing])], + [ + #if HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #if HAVE_SYS_STAT_H + # include <sys/stat.h> + #endif + #if HAVE_FCNTL_H + # include <fcntl.h> + #endif + ]) + +AC_SYS_LARGEFILE + +AC_CACHE_CHECK( + [for posix mkdir()], + [css_cv_mkdir_posix], [ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ +#ifdef HAVE_IO_H +# include <io.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif + +int mkdir(const char *path, mode_t mode); + ]) + ], + [css_cv_mkdir_posix=yes], + [css_cv_mkdir_posix=no]) + ]) + +AS_IF([test "$css_cv_mkdir_posix" = "no"], [ + AC_DEFINE([HAVE_BROKEN_MKDIR], 1, [Define if you have a broken mkdir]) +]) dnl dnl Check the operating system dnl -case x"${target_os}" in + +case x"${host_os}" in xdarwin*) CFLAGS="${CFLAGS} -no-cpp-precomp" ;; x*cygwin*) - dnl Check if we are using the mno-cygwin mode in which case we are - dnl actually dealing with a mingw32 compiler. - AC_EGREP_CPP(yes, [#ifndef WIN32 - yes - #endif], - AC_DEFINE(SYS_CYGWIN, 1, Have a Cygwin system.)) - AC_DEFINE(WIN32, 1, Using Win32.) - ;; - xbeos*) - AC_DEFINE(SYS_BEOS, 1, Have a BeOS system.) + CFLAGS="${CFLAGS} -mwin32" ;; xos2*) LDFLAGS="-Zbin-files" - AC_DEFINE(SYS_OS2, 1, Have a OS/2 system.) ;; x*msvc*) SYS_MSVC=1 + AC_DEFINE([_WIN32_IE], 0x0401, [Define to '0x0401' for IE 4.01 (and shell) APIs.]) + ;; + x*mingw* | *wince* | *mingwce*) + AC_DEFINE([_WIN32_IE], 0x0401, [Define to '0x0401' for IE 4.01 (and shell) APIs.]) ;; x*) ;; @@ -58,9 +130,6 @@ CAN_BUILD_LIBDVDCSS=0 dnl for windoze AC_CHECK_HEADERS(windows.h,[ - AC_CHECK_HEADERS(direct.h,,,[ - #include <windows.h> - ]) AC_CHECK_HEADERS(winioctl.h,[ CAN_BUILD_LIBDVDCSS=1 ],,[ @@ -102,32 +171,14 @@ AC_CHECK_HEADERS(sys/ioctl.h,[ LINUX_DVD_STRUCT=1 ]) dnl - dnl BSDI: dvd.h - may require -ldvd IF a local copy of libdvd is installed - dnl - AC_EGREP_HEADER(dvd_struct,dvd.h,[ - AC_DEFINE(DVD_STRUCT_IN_DVD_H, 1, - Define if <dvd.h> defines DVD_STRUCT.) - SYS_BSDI_LIBDVD=1 - LINUX_DVD_STRUCT=1 - ],[ - dnl - dnl BSDI: /sys/dev/scsi/scsi_ioctl.h, using our own libdvd - dnl - AC_CHECK_HEADERS(/sys/dev/scsi/scsi_ioctl.h,[ - AC_DEFINE(DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H, 1, - Define if <extras/BSDI_dvdioctl/dvd.h> defines DVD_STRUCT.) - SYS_BSDI=1 - LINUX_DVD_STRUCT=1 - ]) - ]) - dnl dnl Solaris: sys/scsi/scsi_types.h, sys/scsi/impl/uscsi.h dnl - AC_CHECK_HEADER(sys/scsi/scsi_types.h,[ - AC_CHECK_HEADER(sys/scsi/impl/uscsi.h,[ + solaris_uscsi=yes + AC_CHECK_HEADERS([sys/scsi/scsi_types.h, sys/scsi/impl/uscsi.h], [], + [solaris_uscsi=no; break;]) + AS_IF([test "$solaris_uscsi" = "yes"], [ AC_DEFINE(SOLARIS_USCSI, 1, Have userspace SCSI headers.) ]) - ]) dnl dnl HP-UX: sys/scsi.h dnl @@ -161,59 +212,30 @@ AC_CHECK_HEADERS(sys/ioctl.h,[ fi ]) -dnl -dnl Check for available warning flags -dnl -CFLAGS_save="${CFLAGS}" - -AC_CACHE_CHECK([if \$CC accepts -Wall], - [ac_cv_c_Wall], - [CFLAGS="-Wall ${CFLAGS_save}" - AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)]) -if test "${ac_cv_c_Wall}" != "no"; then - CFLAGS_save="-Wall ${CFLAGS_save}" -fi - -AC_CACHE_CHECK([if \$CC accepts -Wsign-compare], - [ac_cv_c_Wsign_compare], - [CFLAGS="-Wsign-compare ${CFLAGS_save}" - AC_TRY_COMPILE([],,ac_cv_c_Wsign_compare=yes, ac_cv_c_Wsign_compare=no)]) -if test "${ac_cv_c_Wsign_compare}" != "no"; then - CFLAGS_save="-Wsign-compare ${CFLAGS_save}" -fi - -CFLAGS="${CFLAGS_save}" - -dnl -dnl Use 64 bits offsets -dnl -CFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DDVDCSS_DIST ${CFLAGS}" +CC_CHECK_CFLAGS_APPEND([-Wall -Wsign-compare]) +CC_FLAG_VISIBILITY([ + CC_ATTRIBUTE_VISIBILITY([default], [ + CFLAGS="${CFLAGS} -fvisibility=hidden" + ]) +]) -AM_CONDITIONAL(SYS_BSDI, test "${SYS_BSDI}" = "1") -AM_CONDITIONAL(SYS_BSDI_LIBDVD, test "${SYS_BSDI_LIBDVD}" = "1") AM_CONDITIONAL(SYS_MSVC, test "${SYS_MSVC}" = "1") -dnl -dnl Shall we build documentation? -dnl -AC_ARG_ENABLE([doc], AC_HELP_STRING([--disable-doc], [do not build API documentation with Doxygen])) -if test "$enable_doc" != "no"; then - AC_PATH_PROG(DOXYGEN, doxygen, no) - AC_PATH_PROG(LATEX, latex, no) -else - DOXYGEN="no" - LATEX="no" -fi -AM_CONDITIONAL(DOXYGEN, test "${DOXYGEN}" != "no") -AM_CONDITIONAL(LATEX, test "${LATEX}" != "no") +AC_ARG_ENABLE([doc], + AS_HELP_STRING([--disable-apidoc], [Disable building (with Doxygen) and intalling API documentation @<:@default=auto@:@>])) + +AC_PATH_PROG([DOXYGEN], [doxygen]) + +AS_IF([test "x$DOXYGEN" = "x"], [ + AS_IF([test "x$enable_apidoc" = "xyes"], [ + AC_MSG_ERROR([You need Doxygen to build API documentation]) + ]) +]) +AM_CONDITIONAL([APIDOC], [test "x$DOXYGEN" != "x"]) AC_SUBST(DVDCSS_LDFLAGS) AC_OUTPUT([ Makefile - doc/Makefile - src/Makefile - src/dvdcss/Makefile - test/Makefile + doc/doxygen.cfg src/libdvdcss.pc ]) - diff --git a/lib/libdvd/libdvdcss/doc/Makefile.am b/lib/libdvd/libdvdcss/doc/Makefile.am deleted file mode 100644 index 2e269b028a..0000000000 --- a/lib/libdvd/libdvdcss/doc/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -EXTRA_DIST = doxygen.cfg.in footer.html header.html -DISTCLEANFILES = doxygen.cfg - -all: stamp-doxygen stamp-latex - -doxygen.cfg: $(srcdir)/doxygen.cfg.in - -rm -f $@ - sed 's|@SRCDIR@|$(srcdir)|g; s|@TOP_SRCDIR@|$(top_srcdir)|g' $< > $@ - -stamp-doxygen: doxygen.cfg -if DOXYGEN - doxygen doxygen.cfg - touch stamp-doxygen -endif - -stamp-latex: stamp-doxygen -if DOXYGEN -if LATEX - cd latex && $(MAKE) $(AM_CFLAGS) ps - touch stamp-latex -endif -endif - -clean: clean-local -clean-local: - -rm -f stamp-latex stamp-doxygen - -rm -Rf html latex - diff --git a/lib/libdvd/libdvdcss/doc/doxygen.cfg.in b/lib/libdvd/libdvdcss/doc/doxygen.cfg.in index 45eb9ca718..34ee6306c9 100644 --- a/lib/libdvd/libdvdcss/doc/doxygen.cfg.in +++ b/lib/libdvd/libdvdcss/doc/doxygen.cfg.in @@ -25,20 +25,20 @@ DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = libdvdcss +PROJECT_NAME = @PACKAGE_NAME@ # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 1.2.12 +PROJECT_NUMBER = @PACKAGE_VERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = . +OUTPUT_DIRECTORY = @top_builddir@/doc # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -155,13 +155,6 @@ QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. @@ -446,12 +439,6 @@ MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. @@ -534,8 +521,8 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @TOP_SRCDIR@/src/dvdcss/dvdcss.h \ - @TOP_SRCDIR@/src/libdvdcss.c +INPUT = @top_srcdir@/src/dvdcss/dvdcss.h \ + @top_srcdir@/src/libdvdcss.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -565,7 +552,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = ../src/config.h +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded @@ -743,13 +730,13 @@ HTML_FILE_EXTENSION = .html # each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = @SRCDIR@/header.html +HTML_HEADER = @top_srcdir@/doc/header.html # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = @SRCDIR@/footer.html +HTML_FOOTER = @top_srcdir@/doc/footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to @@ -760,12 +747,6 @@ HTML_FOOTER = @SRCDIR@/footer.html HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) @@ -892,74 +873,7 @@ FORMULA_FONTSIZE = 10 # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO +GENERATE_LATEX = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output diff --git a/lib/libdvd/libdvdcss/doc/footer.html b/lib/libdvd/libdvdcss/doc/footer.html index b73335daf8..b605728ee2 100644 --- a/lib/libdvd/libdvdcss/doc/footer.html +++ b/lib/libdvd/libdvdcss/doc/footer.html @@ -1,3 +1,2 @@ -<!-- $Id: footer.html 186 2005-09-04 07:43:15Z robux4 $ --> </body> </html> diff --git a/lib/libdvd/libdvdcss/doc/header.html b/lib/libdvd/libdvdcss/doc/header.html index 08b048d669..4a43507a29 100644 --- a/lib/libdvd/libdvdcss/doc/header.html +++ b/lib/libdvd/libdvdcss/doc/header.html @@ -7,4 +7,3 @@ <link href="/doxygen.css" rel="stylesheet" type="text/css"> </head> <body> -<!-- $Id: header.html 186 2005-09-04 07:43:15Z robux4 $ --> diff --git a/lib/libdvd/libdvdcss/libdvdcss.spec b/lib/libdvd/libdvdcss/libdvdcss.spec index 4276333846..056738805d 100644 --- a/lib/libdvd/libdvdcss/libdvdcss.spec +++ b/lib/libdvd/libdvdcss/libdvdcss.spec @@ -12,7 +12,7 @@ %define configure2_5x %configure %define make %__make %define makeinstall_std %makeinstall -# adjust define for Redhat. +# adjust define for Red Hat. %endif @@ -32,8 +32,8 @@ Conflicts: libdvdcss0.0.1, libdvdcss0.0.2 libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption. The important features are: * Portability: currently supported platforms are GNU/Linux, FreeBSD, NetBSD, - OpenBSD, BSD/OS, BeOS, Windows 95/98/ME, Windows NT/2000/XP, MacOS X, - Solaris, HP-UX and OS/2. + OpenBSD, BeOS, Windows 98/ME, Windows NT/2000/XP, Mac OS X, Solaris, + HP-UX and OS/2. * Adaptability: unlike most similar projects, libdvdcss doesn't require the region of your drive to be set and will try its best to read from the disc even in the case of a region mismatch. @@ -49,8 +49,8 @@ Provides: %name = %version-%release libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption. The important features are: * Portability: currently supported platforms are GNU/Linux, FreeBSD, NetBSD, - OpenBSD, BSD/OS, BeOS, Windows 95/98/ME, Windows NT/2000/XP, MacOS X, - Solaris, HP-UX and OS/2. + OpenBSD, BeOS, Windows 98/ME, Windows NT/2000/XP, Mac OS X, Solaris, + HP-UX and OS/2. * Adaptability: unlike most similar projects, libdvdcss doesn't require the region of your drive to be set and will try its best to read from the disc even in the case of a region mismatch. @@ -121,10 +121,10 @@ package installed. - new upstream release - improved robustness in case of read errors - key cache support -- added more macros to fix RedHat build +- added more macros to fix Red Hat build * Mon Nov 18 2002 Alexis de Lattre <alexis@videolan.org> 1.2.4-2 -- Changes in .spec file for RedHat and RPM 4.1 +- Changes in .spec file for Red Hat and RPM 4.1 * Thu Nov 14 2002 Alexis de Lattre <alexis@videolan.org> 1.2.4-1 - new upstream release @@ -150,8 +150,8 @@ package installed. - major version is 2 (aka guillaume sux). - spec clean up: do not rm in %%prep, %%buildroot, %%makeinstall_std, %%provides %%version-%%release - added doc in devel -- sync with cvs's one (%%description,%%files, conflicts). -- fix url +- sync with CVS's one (%%description,%%files, conflicts). +- fix URL * Sat Apr 06 2002 Guillaume Rousse <rousse@ccr.jussieu.fr> 1.1.1-1plf - 1.1.1 diff --git a/lib/libdvd/libdvdcss/m4/attributes.m4 b/lib/libdvd/libdvdcss/m4/attributes.m4 new file mode 100644 index 0000000000..b8b33500ae --- /dev/null +++ b/lib/libdvd/libdvdcss/m4/attributes.m4 @@ -0,0 +1,296 @@ +dnl Macros to check the presence of generic (non-typed) symbols. +dnl Copyright (c) 2006-2007 Diego Pettenò <flameeyes@gmail.com> +dnl Copyright (c) 2006-2007 xine project +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2, or (at your option) +dnl any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +dnl 02110-1301, USA. +dnl +dnl As a special exception, the copyright owners of the +dnl macro gives unlimited permission to copy, distribute and modify the +dnl configure scripts that are the output of Autoconf when processing the +dnl Macro. You need not follow the terms of the GNU General Public +dnl License when using or distributing such scripts, even though portions +dnl of the text of the Macro appear in them. The GNU General Public +dnl License (GPL) does govern all other use of the material that +dnl constitutes the Autoconf Macro. +dnl +dnl This special exception to the GPL applies to versions of the +dnl Autoconf Macro released by this project. When you make and +dnl distribute a modified version of the Autoconf Macro, you may extend +dnl this special exception to the GPL to apply to your modified version as +dnl well. + +dnl Check if the flag is supported by compiler +dnl CC_CHECK_CFLAGS_SILENT([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) + +AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [ + AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]), + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $1" + AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])], + [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"], + [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"]) + CFLAGS="$ac_save_CFLAGS" + ]) + + AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], + [$2], [$3]) +]) + +dnl Check if the flag is supported by compiler (cacheable) +dnl CC_CHECK_CFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) + +AC_DEFUN([CC_CHECK_CFLAGS], [ + AC_CACHE_CHECK([if $CC supports $1 flag], + AS_TR_SH([cc_cv_cflags_$1]), + CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here! + ) + + AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], + [$2], [$3]) +]) + +dnl CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found]) +dnl Check for CFLAG and appends them to CFLAGS if supported +AC_DEFUN([CC_CHECK_CFLAG_APPEND], [ + AC_CACHE_CHECK([if $CC supports $1 flag], + AS_TR_SH([cc_cv_cflags_$1]), + CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here! + ) + + AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes], + [CFLAGS="$CFLAGS $1"; $2], [$3]) +]) + +dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not]) +AC_DEFUN([CC_CHECK_CFLAGS_APPEND], [ + for flag in $1; do + CC_CHECK_CFLAG_APPEND($flag, [$2], [$3]) + done +]) + +dnl Check if the flag is supported by linker (cacheable) +dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) + +AC_DEFUN([CC_CHECK_LDFLAGS], [ + AC_CACHE_CHECK([if $CC supports $1 flag], + AS_TR_SH([cc_cv_ldflags_$1]), + [ac_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $1" + AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])], + [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"], + [eval "AS_TR_SH([cc_cv_ldflags_$1])="]) + LDFLAGS="$ac_save_LDFLAGS" + ]) + + AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes], + [$2], [$3]) +]) + +dnl Check for a -Werror flag or equivalent. -Werror is the GCC +dnl and ICC flag that tells the compiler to treat all the warnings +dnl as fatal. We usually need this option to make sure that some +dnl constructs (like attributes) are not simply ignored. +dnl +dnl Other compilers don't support -Werror per se, but they support +dnl an equivalent flag: +dnl - Sun Studio compiler supports -errwarn=%all +AC_DEFUN([CC_CHECK_WERROR], [ + AC_CACHE_CHECK( + [for $CC way to treat warnings as errors], + [cc_cv_werror], + [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror], + [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) + ]) +]) + +AC_DEFUN([CC_CHECK_ATTRIBUTE], [ + AC_REQUIRE([CC_CHECK_WERROR]) + AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))], + AS_TR_SH([cc_cv_attribute_$1]), + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])], + [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"], + [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"]) + CFLAGS="$ac_save_CFLAGS" + ]) + + AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes], + [AC_DEFINE( + AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1, + [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))] + ) + $4], + [$5]) +]) + +AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [ + CC_CHECK_ATTRIBUTE( + [constructor],, + [extern void foo(); + void __attribute__((constructor)) ctor() { foo(); }], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_DESTRUCTOR], [ + CC_CHECK_ATTRIBUTE( + [destructor],, + [extern void foo(); + void __attribute__((destructor)) dtor() { foo(); }], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_FORMAT], [ + CC_CHECK_ATTRIBUTE( + [format], [format(printf, n, n)], + [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [ + CC_CHECK_ATTRIBUTE( + [format_arg], [format_arg(printf)], + [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [ + CC_CHECK_ATTRIBUTE( + [visibility_$1], [visibility("$1")], + [void __attribute__((visibility("$1"))) $1_function() { }], + [$2], [$3]) +]) + +AC_DEFUN([CC_ATTRIBUTE_NONNULL], [ + CC_CHECK_ATTRIBUTE( + [nonnull], [nonnull()], + [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_UNUSED], [ + CC_CHECK_ATTRIBUTE( + [unused], , + [void some_function(void *foo, __attribute__((unused)) void *bar);], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [ + CC_CHECK_ATTRIBUTE( + [sentinel], , + [void some_function(void *foo, ...) __attribute__((sentinel));], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [ + CC_CHECK_ATTRIBUTE( + [deprecated], , + [void some_function(void *foo, ...) __attribute__((deprecated));], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_ALIAS], [ + CC_CHECK_ATTRIBUTE( + [alias], [weak, alias], + [void other_function(void *foo) { } + void some_function(void *foo) __attribute__((weak, alias("other_function")));], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_MALLOC], [ + CC_CHECK_ATTRIBUTE( + [malloc], , + [void * __attribute__((malloc)) my_alloc(int n);], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_PACKED], [ + CC_CHECK_ATTRIBUTE( + [packed], , + [struct astructure { char a; int b; long c; void *d; } __attribute__((packed)); + char assert@<:@(sizeof(struct astructure) == (sizeof(char)+sizeof(int)+sizeof(long)+sizeof(void*)))-1@:>@;], + [$1], [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_CONST], [ + CC_CHECK_ATTRIBUTE( + [const], , + [int __attribute__((const)) twopow(int n) { return 1 << n; } ], + [$1], [$2]) +]) + +AC_DEFUN([CC_FLAG_VISIBILITY], [ + AC_REQUIRE([CC_CHECK_WERROR]) + AC_CACHE_CHECK([if $CC supports -fvisibility=hidden], + [cc_cv_flag_visibility], + [cc_flag_visibility_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden], + cc_cv_flag_visibility='yes', + cc_cv_flag_visibility='no') + CFLAGS="$cc_flag_visibility_save_CFLAGS"]) + + AS_IF([test "x$cc_cv_flag_visibility" = "xyes"], + [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1, + [Define this if the compiler supports the -fvisibility flag]) + $1], + [$2]) +]) + +AC_DEFUN([CC_FUNC_EXPECT], [ + AC_REQUIRE([CC_CHECK_WERROR]) + AC_CACHE_CHECK([if compiler has __builtin_expect function], + [cc_cv_func_expect], + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + AC_COMPILE_IFELSE( + [int some_function() { + int a = 3; + return (int)__builtin_expect(a, 3); + }], + [cc_cv_func_expect=yes], + [cc_cv_func_expect=no]) + CFLAGS="$ac_save_CFLAGS" + ]) + + AS_IF([test "x$cc_cv_func_expect" = "xyes"], + [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1, + [Define this if the compiler supports __builtin_expect() function]) + $1], + [$2]) +]) + +AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [ + AC_REQUIRE([CC_CHECK_WERROR]) + AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported], + [cc_cv_attribute_aligned], + [ac_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + for cc_attribute_align_try in 64 32 16 8 4 2; do + AC_COMPILE_IFELSE([ + int main() { + static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0; + return c; + }], [cc_cv_attribute_aligned=$cc_attribute_align_try; break]) + done + CFLAGS="$ac_save_CFLAGS" + ]) + + if test "x$cc_cv_attribute_aligned" != "x"; then + AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned], + [Define the highest alignment supported]) + fi +]) diff --git a/lib/libdvd/libdvdcss/src/Makefile.am b/lib/libdvd/libdvdcss/src/Makefile.am deleted file mode 100644 index 3823b501d8..0000000000 --- a/lib/libdvd/libdvdcss/src/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -SUBDIRS = dvdcss - -lib_LTLIBRARIES = libdvdcss.la - -libdvdcss_la_SOURCES = \ - libdvdcss.c libdvdcss.h \ - device.c device.h \ - css.c css.h csstables.h \ - ioctl.c ioctl.h \ - error.c \ - common.h \ - $(bsdi_sources) - -EXTRA_libdvdcss_la_SOURCES = \ - $(bsdi_extras) - -libdvdcss_la_LIBADD = $(bsdi_libadd) -libdvdcss_la_LDFLAGS = -version-info 3:0:1 $(libtool_flags) @DVDCSS_LDFLAGS@ - -bsdi_extras = bsdi_ioctl.c bsdi_dvd.h - -if SYS_BSDI -bsdi_sources = $(bsdi_extras) -endif - -if SYS_BSDI_LIBDVD -bsdi_libadd = -ldvd -endif - -if SYS_MSVC -else -libtool_flags = -no-undefined -endif - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libdvdcss.pc - diff --git a/lib/libdvd/libdvdcss/src/bsdi_dvd.h b/lib/libdvd/libdvdcss/src/bsdi_dvd.h deleted file mode 100644 index efc5248e7b..0000000000 --- a/lib/libdvd/libdvdcss/src/bsdi_dvd.h +++ /dev/null @@ -1,344 +0,0 @@ -/* - * $Id: bsdi_dvd.h 234 2010-08-02 15:38:08Z jb $ -*/ - -#ifndef DVDCSS_BSDI_DVD_H -#define DVDCSS_BSDI_DVD_H - -#include <sys/cdefs.h> -#include <machine/endian.h> -#include <sys/ioctl.h> - -__BEGIN_DECLS -int dvd_cdrom_ioctl(int, unsigned long, void *); -int cdrom_blocksize(int, int); -void dvd_cdrom_debug(int); -__END_DECLS - -#define ioctl(a,b,c) dvd_cdrom_ioctl((a),(b),(c)) - -typedef unsigned char __u8; -typedef unsigned short __u16; -typedef unsigned int __u32; - -#define DVD_READ_STRUCT 0x5390 /* Read structure */ -#define DVD_WRITE_STRUCT 0x5391 /* Write structure */ -#define DVD_AUTH 0x5392 /* Authentication */ - -#define DVD_STRUCT_PHYSICAL 0x00 -#define DVD_STRUCT_COPYRIGHT 0x01 -#define DVD_STRUCT_DISCKEY 0x02 -#define DVD_STRUCT_BCA 0x03 -#define DVD_STRUCT_MANUFACT 0x04 - -struct dvd_layer { - __u8 book_version : 4; - __u8 book_type : 4; - __u8 min_rate : 4; - __u8 disc_size : 4; - __u8 layer_type : 4; - __u8 track_path : 1; - __u8 nlayers : 2; - __u8 track_density : 4; - __u8 linear_density : 4; - __u8 bca : 1; - __u32 start_sector; - __u32 end_sector; - __u32 end_sector_l0; -}; - -struct dvd_physical { - __u8 type; - __u8 layer_num; - struct dvd_layer layer[4]; -}; - -struct dvd_copyright { - __u8 type; - - __u8 layer_num; - __u8 cpst; - __u8 rmi; -}; - -struct dvd_disckey { - __u8 type; - - unsigned agid : 2; - __u8 value[2048]; -}; - -struct dvd_bca { - __u8 type; - - int len; - __u8 value[188]; -}; - -struct dvd_manufact { - __u8 type; - - __u8 layer_num; - int len; - __u8 value[2048]; -}; - -typedef union { - __u8 type; - - struct dvd_physical physical; - struct dvd_copyright copyright; - struct dvd_disckey disckey; - struct dvd_bca bca; - struct dvd_manufact manufact; -} dvd_struct; - -/* - * DVD authentication ioctl - */ - -/* Authentication states */ -#define DVD_LU_SEND_AGID 0 -#define DVD_HOST_SEND_CHALLENGE 1 -#define DVD_LU_SEND_KEY1 2 -#define DVD_LU_SEND_CHALLENGE 3 -#define DVD_HOST_SEND_KEY2 4 - -/* Termination states */ -#define DVD_AUTH_ESTABLISHED 5 -#define DVD_AUTH_FAILURE 6 - -/* Other functions */ -#define DVD_LU_SEND_TITLE_KEY 7 -#define DVD_LU_SEND_ASF 8 -#define DVD_INVALIDATE_AGID 9 -#define DVD_LU_SEND_RPC_STATE 10 -#define DVD_HOST_SEND_RPC_STATE 11 - -/* State data */ -typedef __u8 dvd_key[5]; /* 40-bit value, MSB is first elem. */ -typedef __u8 dvd_challenge[10]; /* 80-bit value, MSB is first elem. */ - -struct dvd_lu_send_agid { - __u8 type; - unsigned agid : 2; -}; - -struct dvd_host_send_challenge { - __u8 type; - unsigned agid : 2; - - dvd_challenge chal; -}; - -struct dvd_send_key { - __u8 type; - unsigned agid : 2; - - dvd_key key; -}; - -struct dvd_lu_send_challenge { - __u8 type; - unsigned agid : 2; - - dvd_challenge chal; -}; - -#define DVD_CPM_NO_COPYRIGHT 0 -#define DVD_CPM_COPYRIGHTED 1 - -#define DVD_CP_SEC_NONE 0 -#define DVD_CP_SEC_EXIST 1 - -#define DVD_CGMS_UNRESTRICTED 0 -#define DVD_CGMS_SINGLE 2 -#define DVD_CGMS_RESTRICTED 3 - -struct dvd_lu_send_title_key { - __u8 type; - unsigned agid : 2; - - dvd_key title_key; - int lba; - unsigned cpm : 1; - unsigned cp_sec : 1; - unsigned cgms : 2; -}; - -struct dvd_lu_send_asf { - __u8 type; - unsigned agid : 2; - - unsigned asf : 1; -}; - -struct dvd_host_send_rpcstate { - __u8 type; - __u8 pdrc; -}; - -struct dvd_lu_send_rpcstate { - __u8 type : 2; - __u8 vra : 3; - __u8 ucca : 3; - __u8 region_mask; - __u8 rpc_scheme; -}; - -typedef union { - __u8 type; - - struct dvd_lu_send_agid lsa; - struct dvd_host_send_challenge hsc; - struct dvd_send_key lsk; - struct dvd_lu_send_challenge lsc; - struct dvd_send_key hsk; - struct dvd_lu_send_title_key lstk; - struct dvd_lu_send_asf lsasf; - struct dvd_host_send_rpcstate hrpcs; - struct dvd_lu_send_rpcstate lrpcs; -} dvd_authinfo; - - -typedef struct { - __u16 report_key_length; - __u8 reserved1; - __u8 reserved2; -#if BYTE_ORDER == BIG_ENDIAN - __u8 type_code : 2; - __u8 vra : 3; - __u8 ucca : 3; -#elif BYTE_ORDER == LITTLE_ENDIAN - __u8 ucca : 3; - __u8 vra : 3; - __u8 type_code : 2; -#endif - __u8 region_mask; - __u8 rpc_scheme; - __u8 reserved3; -} rpc_state_t; - -/* - * Stuff for the CDROM ioctls -*/ - -#define CDROMREADTOCHDR 0x5305 /* Read TOC header (cdrom_tochdr) */ -#define CDROMREADTOCENTRY 0x5306 /* Read TOC entry (cdrom_tocentry) */ -#define CDROMEJECT 0x5309 /* Ejects the cdrom media */ -#define CDROMCLOSETRAY 0x5319 /* Reverse of CDROMEJECT */ -#define CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */ -#define CDROM_DISC_STATUS 0x5327 /* Get disc type, etc. */ -#define CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes) */ -#define CDROMREADMODE1 0x530d /* Read CDROM mode 1 data (2048 Bytes) */ -#define CDROMREADRAW 0x5314 /* read data in raw mode (2352 bytes) */ - -#define CD_MINS 74 /* max. minutes per CD, not really a limit */ -#define CD_SECS 60 /* seconds per minute */ -#define CD_FRAMES 75 /* frames per second */ -#define CD_MSF_OFFSET 150 /* MSF numbering offset of first frame */ - -#define CD_HEAD_SIZE 4 /* header (address) bytes per raw data frame */ -#define CD_SYNC_SIZE 12 /* 12 sync bytes per raw data frame */ -#define CD_FRAMESIZE 2048 /* bytes per frame, "cooked" mode */ -#define CD_FRAMESIZE_RAW 2352 /* bytes per frame, "raw" mode */ -#define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE) /*2336*/ -#define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE) /*2340*/ - -/* CD-ROM address types (cdrom_tocentry.cdte_format) */ -#define CDROM_LBA 0x01 /* logical block: first frame is #0 */ -#define CDROM_MSF 0x02 /* minute-second-frame: binary. not bcd here!*/ - -/* bit to tell whether track is data or audio (cdrom_tocentry.cdte_ctrl) */ -#define CDROM_DATA_TRACK 0x04 - -/* The leadout track is always 0xAA, regardless of # of tracks on disc */ -#define CDROM_LEADOUT 0xAA - -/* drive status returned by CDROM_DRIVE_STATUS ioctl */ -#define CDS_NO_INFO 0 /* if not implemented */ -#define CDS_NO_DISC 1 -#define CDS_TRAY_OPEN 2 -#define CDS_DRIVE_NOT_READY 3 -#define CDS_DISC_OK 4 - -/* - * Return values for CDROM_DISC_STATUS ioctl. - * Can also return CDS_NO_INFO and CDS_NO_DISC from above -*/ -#define CDS_AUDIO 100 -#define CDS_DATA_1 101 -#define CDS_DATA_2 102 -#define CDS_XA_2_1 103 -#define CDS_XA_2_2 104 -#define CDS_MIXED 105 - -/* For compile compatibility only - we don't support changers */ -#define CDSL_NONE ((int) (~0U>>1)-1) -#define CDSL_CURRENT ((int) (~0U>>1)) - -struct cdrom_msf -{ - __u8 cdmsf_min0; /* start minute */ - __u8 cdmsf_sec0; /* start second */ - __u8 cdmsf_frame0; /* start frame */ - __u8 cdmsf_min1; /* end minute */ - __u8 cdmsf_sec1; /* end second */ - __u8 cdmsf_frame1; /* end frame */ -}; - -struct cdrom_tochdr - { - __u8 cdth_trk0; /* start track */ - __u8 cdth_trk1; /* end track */ - }; - -struct cdrom_msf0 -{ - __u8 minute; - __u8 second; - __u8 frame; -}; - -union cdrom_addr -{ - struct cdrom_msf0 msf; - int lba; -}; - -struct cdrom_tocentry -{ - __u8 cdte_track; - __u8 cdte_adr :4; - __u8 cdte_ctrl :4; - __u8 cdte_format; - union cdrom_addr cdte_addr; - __u8 cdte_datamode; -}; - -struct modesel_head -{ - __u8 reserved1; - __u8 medium; - __u8 reserved2; - __u8 block_desc_length; - __u8 density; - __u8 number_of_blocks_hi; - __u8 number_of_blocks_med; - __u8 number_of_blocks_lo; - __u8 reserved3; - __u8 block_length_hi; - __u8 block_length_med; - __u8 block_length_lo; -}; - -typedef struct -{ - int data; - int audio; - int cdi; - int xa; - int error; -} tracktype; - -#endif /* DVDCSS_BSDI_DVD_H */ diff --git a/lib/libdvd/libdvdcss/src/bsdi_ioctl.c b/lib/libdvd/libdvdcss/src/bsdi_ioctl.c deleted file mode 100644 index ef4c56c30e..0000000000 --- a/lib/libdvd/libdvdcss/src/bsdi_ioctl.c +++ /dev/null @@ -1,770 +0,0 @@ -#include "config.h" - -/* - * Hacked version of the linux cdrom.c kernel module - everything except the - * DVD handling ripped out and the rest rewritten to use raw SCSI commands - * on BSD/OS 4.2 (but should work with earlier versions as well). -*/ - -#include <sys/types.h> -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> -#include <unistd.h> -#include <sys/ioctl.h> -#include </sys/dev/scsi/scsi.h> -#include </sys/dev/scsi/scsi_ioctl.h> - -#include "bsdi_dvd.h" - -/* - * Now get rid of the override/intercept macro so we can call the real ioctl() - * routine! -*/ -#undef ioctl - -#define CMD_READ_10 0x28 -#define CMD_READ_TOC_PMA_ATIP 0x43 -#define CMD_READ_CD 0xbe -#define CMD_START_STOP_UNIT 0x1b - -#define CMD_SEND_KEY 0xa3 -#define CMD_REPORT_KEY 0xa4 -#define CMD_READ_DVD_STRUCTURE 0xad - -#define copy_key(dest,src) memcpy((dest), (src), sizeof(dvd_key)) -#define copy_chal(dest,src) memcpy((dest), (src), sizeof(dvd_challenge)) - -/* Define the Cdrom Generic Command structure */ -typedef struct cgc - { - u_char cdb[12]; - u_char *buf; - int buflen; - int rw; - int timeout; - scsi_user_sense_t *sus; - } cgc_t; - -static int scsi_cmd(int, cgc_t *); -static int cdrom_ioctl(int, u_long, void *); -static int cdrom_tray_move(int, int); -static void cdrom_count_tracks(int, tracktype *); -static int dvd_ioctl(int, u_long, void *); -static int debug = 0; - -void dvd_cdrom_debug(int flag) - { - debug = flag; - } - -/* - * This is the published entry point. Actually applications should simply - * include <dvd.h> and not refer to this at all. -*/ -int dvd_cdrom_ioctl(int fd, unsigned long cmd, void *arg) - { - switch (cmd) - { - case DVD_AUTH: - case DVD_READ_STRUCT: - return(dvd_ioctl(fd, cmd, arg)); - case CDROMREADTOCHDR: - case CDROMREADTOCENTRY: - case CDROMEJECT: - case CDROMREADRAW: - case CDROMREADMODE1: - case CDROMREADMODE2: - case CDROMCLOSETRAY: - case CDROM_DRIVE_STATUS: - case CDROM_DISC_STATUS: - return(cdrom_ioctl(fd, cmd, arg)); - default: - return(ioctl(fd, cmd, arg)); - } - } - -static void setup_report_key(cgc_t *cgc, u_int agid, u_int type) - { - - cgc->cdb[0] = CMD_REPORT_KEY; - cgc->cdb[10] = type | (agid << 6); - switch (type) - { - case 0: - case 5: - case 8: - cgc->buflen = 8; - break; - case 1: - cgc->buflen = 16; - break; - case 2: - case 4: - cgc->buflen = 12; - break; - } - cgc->cdb[9] = cgc->buflen; - cgc->rw = SUC_READ;; - } - -static void setup_send_key(cgc_t *cgc, u_int agid, u_int type) - { - - cgc->cdb[0] = CMD_SEND_KEY; - cgc->cdb[10] = type | (agid << 6); - switch (type) - { - case 1: - cgc->buflen = 16; - break; - case 3: - cgc->buflen = 12; - break; - case 6: - cgc->buflen = 8; - break; - } - cgc->cdb[9] = cgc->buflen; - cgc->rw = SUC_WRITE; - } - -static void cgc_init(cgc_t *cgc, void *buf, int len, int type) - { - - memset(cgc, 0, sizeof (*cgc)); - if (buf) - memset(buf, 0, len); - cgc->buf = (u_char *)buf; - cgc->buflen = len; - cgc->rw = type; - cgc->timeout = 5; /* 5 second timeout */ - } - -static int dvd_do_auth(int fd, dvd_authinfo *ai) - { - int ret; - u_char buf[20]; - cgc_t cgc; - rpc_state_t rpc_state; - - memset(buf, 0, sizeof(buf)); - cgc_init(&cgc, buf, 0, SUC_READ); - - switch (ai->type) - { - case DVD_LU_SEND_AGID: /* LU data send */ - setup_report_key(&cgc, ai->lsa.agid, 0); - if (ret = scsi_cmd(fd, &cgc)) - return ret; - ai->lsa.agid = buf[7] >> 6; - break; - case DVD_LU_SEND_KEY1: - setup_report_key(&cgc, ai->lsk.agid, 2); - if (ret = scsi_cmd(fd, &cgc)) - return ret; - copy_key(ai->lsk.key, &buf[4]); - break; - case DVD_LU_SEND_CHALLENGE: - setup_report_key(&cgc, ai->lsc.agid, 1); - if (ret = scsi_cmd(fd, &cgc)) - return ret; - copy_chal(ai->lsc.chal, &buf[4]); - break; - case DVD_LU_SEND_TITLE_KEY: /* Post-auth key */ - setup_report_key(&cgc, ai->lstk.agid, 4); - cgc.cdb[5] = ai->lstk.lba; - cgc.cdb[4] = ai->lstk.lba >> 8; - cgc.cdb[3] = ai->lstk.lba >> 16; - cgc.cdb[2] = ai->lstk.lba >> 24; - if (ret = scsi_cmd(fd, &cgc)) - return ret; - ai->lstk.cpm = (buf[4] >> 7) & 1; - ai->lstk.cp_sec = (buf[4] >> 6) & 1; - ai->lstk.cgms = (buf[4] >> 4) & 3; - copy_key(ai->lstk.title_key, &buf[5]); - break; - case DVD_LU_SEND_ASF: - setup_report_key(&cgc, ai->lsasf.agid, 5); - if (ret = scsi_cmd(fd, &cgc)) - return ret; - ai->lsasf.asf = buf[7] & 1; - break; - case DVD_HOST_SEND_CHALLENGE: /* LU data receive (LU changes state) */ - setup_send_key(&cgc, ai->hsc.agid, 1); - buf[1] = 0xe; - copy_chal(&buf[4], ai->hsc.chal); - if (ret = scsi_cmd(fd, &cgc)) - return ret; - ai->type = DVD_LU_SEND_KEY1; - break; - case DVD_HOST_SEND_KEY2: - setup_send_key(&cgc, ai->hsk.agid, 3); - buf[1] = 0xa; - copy_key(&buf[4], ai->hsk.key); - if (ret = scsi_cmd(fd, &cgc)) - { - ai->type = DVD_AUTH_FAILURE; - return ret; - } - ai->type = DVD_AUTH_ESTABLISHED; - break; - case DVD_INVALIDATE_AGID: - setup_report_key(&cgc, ai->lsa.agid, 0x3f); - if (ret = scsi_cmd(fd, &cgc)) - return ret; - break; - case DVD_LU_SEND_RPC_STATE: /* Get region settings */ - setup_report_key(&cgc, 0, 8); - memset(&rpc_state, 0, sizeof(rpc_state_t)); - cgc.buf = (char *) &rpc_state; - if (ret = scsi_cmd(fd, &cgc)) - { - ai->lrpcs.type = 0; - ai->lrpcs.rpc_scheme = 0; - } - else - { - ai->lrpcs.type = rpc_state.type_code; - ai->lrpcs.vra = rpc_state.vra; - ai->lrpcs.ucca = rpc_state.ucca; - ai->lrpcs.region_mask = rpc_state.region_mask; - ai->lrpcs.rpc_scheme = rpc_state.rpc_scheme; - } - break; - case DVD_HOST_SEND_RPC_STATE: /* Set region settings */ - setup_send_key(&cgc, 0, 6); - buf[1] = 6; - buf[4] = ai->hrpcs.pdrc; - if (ret = scsi_cmd(fd, &cgc)) - return ret; - break; - default: - return EINVAL; - } - return 0; - } - -static int dvd_read_physical(int fd, dvd_struct *s) - { - int ret, i; - u_char buf[4 + 4 * 20], *base; - struct dvd_layer *layer; - cgc_t cgc; - - cgc_init(&cgc, buf, sizeof(buf), SUC_READ); - cgc.cdb[0] = CMD_READ_DVD_STRUCTURE; - cgc.cdb[6] = s->physical.layer_num; - cgc.cdb[7] = s->type; - cgc.cdb[9] = cgc.buflen & 0xff; - - if (ret = scsi_cmd(fd, &cgc)) - return ret; - - base = &buf[4]; - layer = &s->physical.layer[0]; - - /* place the data... really ugly, but at least we won't have to - worry about endianess in userspace or here. */ - for (i = 0; i < 4; ++i, base += 20, ++layer) - { - memset(layer, 0, sizeof(*layer)); - layer->book_version = base[0] & 0xf; - layer->book_type = base[0] >> 4; - layer->min_rate = base[1] & 0xf; - layer->disc_size = base[1] >> 4; - layer->layer_type = base[2] & 0xf; - layer->track_path = (base[2] >> 4) & 1; - layer->nlayers = (base[2] >> 5) & 3; - layer->track_density = base[3] & 0xf; - layer->linear_density = base[3] >> 4; - layer->start_sector = base[5] << 16 | base[6] << 8 | base[7]; - layer->end_sector = base[9] << 16 | base[10] << 8 | base[11]; - layer->end_sector_l0 = base[13] << 16 | base[14] << 8 | base[15]; - layer->bca = base[16] >> 7; - } - return 0; - } - -static int dvd_read_copyright(int fd, dvd_struct *s) - { - int ret; - u_char buf[8]; - cgc_t cgc; - - cgc_init(&cgc, buf, sizeof(buf), SUC_READ); - cgc.cdb[0] = CMD_READ_DVD_STRUCTURE; - cgc.cdb[6] = s->copyright.layer_num; - cgc.cdb[7] = s->type; - cgc.cdb[8] = cgc.buflen >> 8; - cgc.cdb[9] = cgc.buflen & 0xff; - - if (ret = scsi_cmd(fd, &cgc)) - return ret; - s->copyright.cpst = buf[4]; - s->copyright.rmi = buf[5]; - return 0; - } - -static int dvd_read_disckey(int fd, dvd_struct *s) - { - int ret, size; - u_char *buf; - cgc_t cgc; - - size = sizeof(s->disckey.value) + 4; - - if ((buf = (u_char *) malloc(size)) == NULL) - return ENOMEM; - - cgc_init(&cgc, buf, size, SUC_READ); - cgc.cdb[0] = CMD_READ_DVD_STRUCTURE; - cgc.cdb[7] = s->type; - cgc.cdb[8] = size >> 8; - cgc.cdb[9] = size & 0xff; - cgc.cdb[10] = s->disckey.agid << 6; - - if (!(ret = scsi_cmd(fd, &cgc))) - memcpy(s->disckey.value, &buf[4], sizeof(s->disckey.value)); - free(buf); - return ret; - } - -static int dvd_read_bca(int fd, dvd_struct *s) - { - int ret; - u_char buf[4 + 188]; - cgc_t cgc; - - cgc_init(&cgc, buf, sizeof(buf), SUC_READ); - cgc.cdb[0] = CMD_READ_DVD_STRUCTURE; - cgc.cdb[7] = s->type; - cgc.cdb[9] = cgc.buflen = 0xff; - - if (ret = scsi_cmd(fd, &cgc)) - return ret; - s->bca.len = buf[0] << 8 | buf[1]; - if (s->bca.len < 12 || s->bca.len > 188) - return EIO; - memcpy(s->bca.value, &buf[4], s->bca.len); - return 0; - } - -static int dvd_read_manufact(int fd, dvd_struct *s) - { - int ret = 0, size; - u_char *buf; - cgc_t cgc; - - size = sizeof(s->manufact.value) + 4; - - if ((buf = (u_char *) malloc(size)) == NULL) - return ENOMEM; - - cgc_init(&cgc, buf, size, SUC_READ); - cgc.cdb[0] = CMD_READ_DVD_STRUCTURE; - cgc.cdb[7] = s->type; - cgc.cdb[8] = size >> 8; - cgc.cdb[9] = size & 0xff; - - if (ret = scsi_cmd(fd, &cgc)) - { - free(buf); - return ret; - } - s->manufact.len = buf[0] << 8 | buf[1]; - if (s->manufact.len < 0 || s->manufact.len > 2048) - ret = -EIO; - else - memcpy(s->manufact.value, &buf[4], s->manufact.len); - free(buf); - return ret; - } - -static int dvd_read_struct(int fd, dvd_struct *s) - { - switch (s->type) - { - case DVD_STRUCT_PHYSICAL: - return dvd_read_physical(fd, s); - case DVD_STRUCT_COPYRIGHT: - return dvd_read_copyright(fd, s); - case DVD_STRUCT_DISCKEY: - return dvd_read_disckey(fd, s); - case DVD_STRUCT_BCA: - return dvd_read_bca(fd, s); - case DVD_STRUCT_MANUFACT: - return dvd_read_manufact(fd, s); - default: - return EINVAL; - } - } - -static u_char scsi_cdblen[8] = {6, 10, 10, 12, 12, 12, 10, 10}; - -static int scsi_cmd(int fd, cgc_t *cgc) - { - int i, scsistatus, cdblen; - unsigned char *cp; - struct scsi_user_cdb suc; - - /* safety checks */ - if (cgc->rw != SUC_READ && cgc->rw != SUC_WRITE) - return(EINVAL); - - suc.suc_flags = cgc->rw; - cdblen = scsi_cdblen[(cgc->cdb[0] >> 5) & 7]; - suc.suc_cdblen = cdblen; - bcopy(cgc->cdb, suc.suc_cdb, cdblen); - suc.suc_data = cgc->buf; - suc.suc_datalen = cgc->buflen; - suc.suc_timeout = cgc->timeout; - if (ioctl(fd, SCSIRAWCDB, &suc) == -1) - return(errno); - scsistatus = suc.suc_sus.sus_status; - -/* - * If the device returns a scsi sense error and debugging is enabled print - * some hopefully useful information on stderr. -*/ - if (scsistatus && debug) - { - cp = suc.suc_sus.sus_sense; - fprintf(stderr,"scsistatus = %x cdb =", - scsistatus); - for (i = 0; i < cdblen; i++) - fprintf(stderr, " %x", cgc->cdb[i]); - fprintf(stderr, "\nsense ="); - for (i = 0; i < 16; i++) - fprintf(stderr, " %x", cp[i]); - fprintf(stderr, "\n"); - } - if (cgc->sus) - bcopy(&suc.suc_sus, cgc->sus, sizeof (struct scsi_user_sense)); - if (scsistatus) - return(EIO); /* generic i/o error for unsuccessful status */ - return(0); - } - -/* - * The entry point for the DVDioctls for BSD/OS. -*/ -static int dvd_ioctl(int fd, u_long cmd, void *arg) - { - int ret; - - switch (cmd) - { - case DVD_READ_STRUCT: - ret = dvd_read_struct(fd, (dvd_struct *)arg); - if (ret) - errno = ret; - return(ret ? -1 : 0); - case DVD_AUTH: - ret = dvd_do_auth(fd, (dvd_authinfo *)arg); - if (ret) - errno = ret; - return(ret ? -1 : 0); - default: - errno = EINVAL; - return(-1); - } - } - -/* - * The entry point for the CDROMioctls for BSD/OS -*/ -static int cdrom_read_block(int, cgc_t *, int, int, int, int); -static int cdrom_read_cd(int, cgc_t *, int, int, int ); - int cdrom_blocksize(int, int ); - -static inline -int msf_to_lba(char m, char s, char f) -{ - return (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET; -} - -cdrom_ioctl(int fd, u_long cmd, void *arg) - { - int ret; - cgc_t cgc; - - switch (cmd) - { - case CDROMREADRAW: - case CDROMREADMODE1: - case CDROMREADMODE2: - { - struct cdrom_msf *msf; - int blocksize = 0, format = 0, lba; - - switch (cmd) - { - case CDROMREADRAW: - blocksize = CD_FRAMESIZE_RAW; - break; - case CDROMREADMODE1: - blocksize = CD_FRAMESIZE; - format = 2; - break; - case CDROMREADMODE2: - blocksize = CD_FRAMESIZE_RAW0; - break; - } - msf = (struct cdrom_msf *)arg; - lba = msf_to_lba(msf->cdmsf_min0,msf->cdmsf_sec0, - msf->cdmsf_frame0); - ret = EINVAL; - if (lba < 0) - break; - - cgc_init(&cgc, arg, blocksize, SUC_READ); - ret = cdrom_read_block(fd, &cgc, lba, 1, format, blocksize); - if (ret) - { -/* - * SCSI-II devices are not required to support CMD_READ_CD (which specifies - * the blocksize to read) so try switching the block size with a mode select, - * doing the normal read sector command and then changing the sector size back - * to 2048. - * - * If the program dies before changing the blocksize back sdopen() - * in the kernel will fail opens with a message that looks something like: - * - * "sr1: blksize 2336 not multiple of 512: cannot use" - * - * At that point the drive has to be power cycled (or reset in some other way). -*/ - if (ret = cdrom_blocksize(fd, blocksize)) - break; - ret = cdrom_read_cd(fd, &cgc, lba, blocksize, 1); - ret |= cdrom_blocksize(fd, 2048); - } - break; - } - case CDROMREADTOCHDR: - { - struct cdrom_tochdr *tochdr = (struct cdrom_tochdr *) arg; - u_char buffer[12]; - - cgc_init(&cgc, buffer, sizeof (buffer), SUC_READ); - cgc.cdb[0] = CMD_READ_TOC_PMA_ATIP; - cgc.cdb[1] = 0x2; /* MSF */ - cgc.cdb[8] = 12; /* LSB of length */ - - ret = scsi_cmd(fd, &cgc); - if (!ret) - { - tochdr->cdth_trk0 = buffer[2]; - tochdr->cdth_trk1 = buffer[3]; - } - break; - } - case CDROMREADTOCENTRY: - { - struct cdrom_tocentry *tocentry = (struct cdrom_tocentry *) arg; - u_char buffer[12]; - - cgc_init(&cgc, buffer, sizeof (buffer), SUC_READ); - cgc.cdb[0] = CMD_READ_TOC_PMA_ATIP; - cgc.cdb[1] = (tocentry->cdte_format == CDROM_MSF) ? 0x02 : 0; - cgc.cdb[6] = tocentry->cdte_track; - cgc.cdb[8] = 12; /* LSB of length */ - - ret = scsi_cmd(fd, &cgc); - if (ret) - break; - - tocentry->cdte_ctrl = buffer[5] & 0xf; - tocentry->cdte_adr = buffer[5] >> 4; - tocentry->cdte_datamode = (tocentry->cdte_ctrl & 0x04) ? 1 : 0; - if (tocentry->cdte_format == CDROM_MSF) - { - tocentry->cdte_addr.msf.minute = buffer[9]; - tocentry->cdte_addr.msf.second = buffer[10]; - tocentry->cdte_addr.msf.frame = buffer[11]; - } - else - tocentry->cdte_addr.lba = (((((buffer[8] << 8) - + buffer[9]) << 8) - + buffer[10]) << 8) - + buffer[11]; - break; - } - case CDROMEJECT: /* NO-OP for now */ - ret = cdrom_tray_move(fd, 1); - break; - case CDROMCLOSETRAY: - ret = cdrom_tray_move(fd, 0); - break; -/* - * This sucks but emulates the expected behaviour. Instead of the return - * value being the actual status a success/fail indicator should have been - * returned and the 3rd arg to the ioctl should have been an 'int *' to update - * with the actual status. Both the drive and disc status ioctl calls are - * similarily braindamaged. -*/ - case CDROM_DRIVE_STATUS: - return(CDS_NO_INFO); /* XXX */ - case CDROM_DISC_STATUS: - { - tracktype tracks; - int cnt; - - cdrom_count_tracks(fd, &tracks); - if (tracks.error) - return(tracks.error); - if (tracks.audio > 0) - { - cnt = tracks.data + tracks.cdi + tracks.xa; - if (cnt == 0) - return(CDS_AUDIO); - else - return(CDS_MIXED); - } - if (tracks.cdi) - return(CDS_XA_2_2); - if (tracks.xa) - return(CDS_XA_2_1); - if (tracks.data) - return(CDS_DATA_1); - return(CDS_NO_INFO); - } - } - errno = ret; - return(ret ? -1 : 0); - } - -static int cdrom_read_cd(int fd, cgc_t *cgc, int lba, int blocksize, int nblocks) - { - - memset(&cgc->cdb, 0, sizeof(cgc->cdb)); - cgc->cdb[0] = CMD_READ_10; - cgc->cdb[2] = (lba >> 24) & 0xff; - cgc->cdb[3] = (lba >> 16) & 0xff; - cgc->cdb[4] = (lba >> 8) & 0xff; - cgc->cdb[5] = lba & 0xff; - cgc->cdb[6] = (nblocks >> 16) & 0xff; - cgc->cdb[7] = (nblocks >> 8) & 0xff; - cgc->cdb[8] = nblocks & 0xff; - cgc->buflen = blocksize * nblocks; - return(scsi_cmd(fd, cgc)); - } - -static int cdrom_read_block(int fd, cgc_t *cgc, - int lba, int nblocks, int format, int blksize) - { - - memset(&cgc->cdb, 0, sizeof(cgc->cdb)); - cgc->cdb[0] = CMD_READ_CD; - /* expected sector size - cdda,mode1,etc. */ - cgc->cdb[1] = format << 2; - /* starting address */ - cgc->cdb[2] = (lba >> 24) & 0xff; - cgc->cdb[3] = (lba >> 16) & 0xff; - cgc->cdb[4] = (lba >> 8) & 0xff; - cgc->cdb[5] = lba & 0xff; - /* number of blocks */ - cgc->cdb[6] = (nblocks >> 16) & 0xff; - cgc->cdb[7] = (nblocks >> 8) & 0xff; - cgc->cdb[8] = nblocks & 0xff; - cgc->buflen = blksize * nblocks; - - /* set the header info returned */ - switch (blksize) - { - case CD_FRAMESIZE_RAW0: - cgc->cdb[9] = 0x58; - break; - case CD_FRAMESIZE_RAW1: - cgc->cdb[9] = 0x78; - break; - case CD_FRAMESIZE_RAW: - cgc->cdb[9] = 0xf8; - break; - default: - cgc->cdb[9] = 0x10; - } - return(scsi_cmd(fd, cgc)); - } - -static void cdrom_count_tracks(int fd, tracktype *tracks) - { - struct cdrom_tochdr header; - struct cdrom_tocentry entry; - int ret, i; - - memset(tracks, 0, sizeof (*tracks)); - ret = cdrom_ioctl(fd, CDROMREADTOCHDR, &header); -/* - * This whole business is a crock anyhow so we don't bother distinguishing - * between no media, drive not ready, etc and on any error just say we have - * no info. -*/ - if (ret) - { - tracks->error = CDS_NO_INFO; - return; - } - - entry.cdte_format = CDROM_MSF; - for (i = header.cdth_trk0; i <= header.cdth_trk1; i++) - { - entry.cdte_track = i; - if (cdrom_ioctl(fd, CDROMREADTOCENTRY, &entry)) - { - tracks->error = CDS_NO_INFO; - return; - } - if (entry.cdte_ctrl & CDROM_DATA_TRACK) - { - if (entry.cdte_format == 0x10) - tracks->cdi++; - else if (entry.cdte_format == 0x20) - tracks->xa++; - else - tracks->data++; - } - else - tracks->audio++; - } - return; - } - -static int cdrom_tray_move(int fd, int flag) - { - cgc_t cgc; - - cgc_init(&cgc, NULL, 0, SUC_READ); - cgc.cdb[0] = CMD_START_STOP_UNIT; - cgc.cdb[1] = 1; /* immediate */ - cgc.cdb[4] = flag ? 0x2 : 0x3; /* eject : close */ - return(scsi_cmd(fd, &cgc)); - } - -/* - * Required when we need to use READ_10 to issue other than 2048 block - * reads - */ -int cdrom_blocksize(int fd, int size) - { - cgc_t cgc; - struct modesel_head mh; - - memset(&mh, 0, sizeof(mh)); - mh.block_desc_length = 0x08; - mh.block_length_med = (size >> 8) & 0xff; - mh.block_length_lo = size & 0xff; - - memset(&cgc, 0, sizeof(cgc)); - cgc.cdb[0] = 0x15; - cgc.cdb[1] = 1 << 4; - cgc.cdb[4] = 12; - cgc.buflen = sizeof(mh); - cgc.buf = (u_char *) &mh; - cgc.rw = SUC_WRITE; - mh.block_desc_length = 0x08; - mh.block_length_med = (size >> 8) & 0xff; - mh.block_length_lo = size & 0xff; - return(scsi_cmd(fd, &cgc)); - } diff --git a/lib/libdvd/libdvdcss/src/common.h b/lib/libdvd/libdvdcss/src/common.h index cf9f966754..95d4452201 100644 --- a/lib/libdvd/libdvdcss/src/common.h +++ b/lib/libdvd/libdvdcss/src/common.h @@ -3,7 +3,6 @@ * Collection of useful common types and macros definitions ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: common.h 243 2011-10-26 05:01:11Z jb $ * * Authors: Sam Hocevar <sam@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr> @@ -34,11 +33,6 @@ # include <stdint.h> #elif defined( HAVE_INTTYPES_H ) # include <inttypes.h> -#elif defined( SYS_CYGWIN ) -# include <sys/types.h> - /* Cygwin only defines half of these... */ - typedef u_int8_t uint8_t; - typedef u_int32_t uint32_t; #else /* Fallback types (very x86-centric, sorry) */ typedef unsigned char uint8_t; @@ -48,6 +42,7 @@ #endif #if defined( WIN32 ) +# include <io.h> /* _lseeki64 */ # ifndef PATH_MAX # define PATH_MAX MAX_PATH @@ -74,6 +69,7 @@ typedef __int64 off_t; # define off_t __int64 # endif # define stat _stati64 +# define snprintf _snprintf # endif #endif diff --git a/lib/libdvd/libdvdcss/src/css.c b/lib/libdvd/libdvdcss/src/css.c index 3a1c225976..935b7b2af9 100644 --- a/lib/libdvd/libdvdcss/src/css.c +++ b/lib/libdvd/libdvdcss/src/css.c @@ -2,7 +2,6 @@ * css.c: Functions for DVD authentication and descrambling ***************************************************************************** * Copyright (C) 1999-2008 VideoLAN - * $Id: css.c 249 2012-02-18 16:22:03Z jb $ * * Authors: Stéphane Borel <stef@via.ecp.fr> * HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> @@ -87,6 +86,8 @@ static int AttackPattern ( uint8_t const[], int, uint8_t * ); static int AttackPadding ( uint8_t const[], int, uint8_t * ); #endif +static int _dvdcss_titlekey ( dvdcss_t, int , dvd_key_t ); + /***************************************************************************** * _dvdcss_test: check if the disc is encrypted or not ***************************************************************************** @@ -248,7 +249,7 @@ int _dvdcss_title ( dvdcss_t dvdcss, int i_block ) if( i_ret < 0 ) { - print_error( dvdcss, "fatal error in vts css key" ); + print_error( dvdcss, "fatal error in VTS CSS key" ); return i_ret; } @@ -338,7 +339,7 @@ int _dvdcss_disckey( dvdcss_t dvdcss ) return -1; } - /* This should have invaidated the AGID and got us ASF=1. */ + /* This should have invalidated the AGID and got us ASF=1. */ if( GetASF( dvdcss ) != 1 ) { /* Region mismatch (or region not set) is the most likely source. */ @@ -406,7 +407,7 @@ int _dvdcss_disckey( dvdcss_t dvdcss ) /***************************************************************************** * _dvdcss_titlekey: get title key. *****************************************************************************/ -int _dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key_t p_title_key ) +static int _dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key_t p_title_key ) { static uint8_t p_garbage[ DVDCSS_BLOCK_SIZE ]; /* we never read it back */ uint8_t p_key[ KEY_SIZE ]; @@ -454,9 +455,9 @@ int _dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key_t p_title_key ) break; case 1: - /* Drive status is ok. */ + /* Drive status is OK. */ /* If the title key request failed, but we did not loose ASF, - * we might stil have the AGID. Other code assume that we + * we might still have the AGID. Other code assumes that we * will not after this so invalidate it(?). */ if( i_ret < 0 ) { @@ -509,7 +510,7 @@ int _dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key_t p_title_key ) /* METHOD is TITLE, we can't use the ioctls or requesting the title key * failed above. For these cases we try to crack the key instead. */ - /* For now, the read limit is 9Gb / 2048 = 4718592 sectors. */ + /* For now, the read limit is 9GB / 2048 = 4718592 sectors. */ i_ret = CrackTitleKey( dvdcss, i_pos, 4718592, p_key ); memcpy( p_title_key, p_key, KEY_SIZE ); @@ -572,7 +573,7 @@ int _dvdcss_unscramble( dvd_key_t p_key, uint8_t *p_sec ) * It simulates the mutual authentication between logical unit and host, * and stops when a session key (called bus key) has been established. * Always do the full auth sequence. Some drives seem to lie and always - * respond with ASF=1. For instance the old DVD roms on Compaq Armada says + * respond with ASF=1. For instance the old DVD-ROMs on Compaq Armada says * that ASF=1 from the start and then later fail with a 'read of scrambled * block without authentication' error. *****************************************************************************/ @@ -754,7 +755,7 @@ static int GetASF( dvdcss_t dvdcss ) /***************************************************************************** * CryptKey : shuffles bits and unencrypt keys. ***************************************************************************** - * Used during authentication and disc key negociation in GetBusKey. + * Used during authentication and disc key negotiation in GetBusKey. * i_key_type : 0->key1, 1->key2, 2->buskey. * i_variant : between 0 and 31. *****************************************************************************/ @@ -762,13 +763,13 @@ static void CryptKey( int i_key_type, int i_variant, uint8_t const *p_challenge, uint8_t *p_key ) { /* Permutation table for challenge */ - uint8_t pp_perm_challenge[3][10] = + static const uint8_t pp_perm_challenge[3][10] = { { 1, 3, 0, 7, 5, 2, 9, 6, 4, 8 }, { 6, 1, 9, 3, 8, 5, 7, 4, 0, 2 }, { 4, 0, 3, 5, 7, 2, 8, 6, 1, 9 } }; /* Permutation table for variant table for key2 and buskey */ - uint8_t pp_perm_variant[2][32] = + static const uint8_t pp_perm_variant[2][32] = { { 0x0a, 0x08, 0x0e, 0x0c, 0x0b, 0x09, 0x0f, 0x0d, 0x1a, 0x18, 0x1e, 0x1c, 0x1b, 0x19, 0x1f, 0x1d, 0x02, 0x00, 0x06, 0x04, 0x03, 0x01, 0x07, 0x05, @@ -778,14 +779,14 @@ static void CryptKey( int i_key_type, int i_variant, 0x13, 0x1b, 0x17, 0x1f, 0x03, 0x0b, 0x07, 0x0f, 0x11, 0x19, 0x15, 0x1d, 0x01, 0x09, 0x05, 0x0d } }; - uint8_t p_variants[32] = + static const uint8_t p_variants[32] = { 0xB7, 0x74, 0x85, 0xD0, 0xCC, 0xDB, 0xCA, 0x73, 0x03, 0xFE, 0x31, 0x03, 0x52, 0xE0, 0xB7, 0x42, 0x63, 0x16, 0xF2, 0x2A, 0x79, 0x52, 0xFF, 0x1B, 0x7A, 0x11, 0xCA, 0x1A, 0x9B, 0x40, 0xAD, 0x01 }; /* The "secret" key */ - uint8_t p_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 }; + static const uint8_t p_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 }; uint8_t p_bits[30], p_scratch[10], p_tmp1[5], p_tmp2[5]; uint8_t i_lfsr0_o; /* 1 bit used */ @@ -835,7 +836,7 @@ static void CryptKey( int i_key_type, int i_variant, * The first LFSR is of degree 25, and has a polynomial of: * x^13 + x^5 + x^4 + x^1 + 1 * - * The second LSFR is of degree 17, and has a (primitive) polynomial of: + * The second LFSR is of degree 17, and has a (primitive) polynomial of: * x^15 + x^1 + 1 * * I don't know if these polynomials are primitive modulo 2, and thus @@ -849,7 +850,7 @@ static void CryptKey( int i_key_type, int i_variant, */ /* In order to ensure that the LFSR works we need to ensure that the - * initial values are non-zero. Thus when we initialise them from + * initial values are non-zero. Thus when we initialize them from * the seed, we ensure that a bit is set. */ i_lfsr0 = ( p_tmp1[0] << 17 ) | ( p_tmp1[1] << 9 ) | @@ -958,7 +959,7 @@ static void CryptKey( int i_key_type, int i_variant, * in _dvdcss_titlekey. * The player keys and the resulting disc key are only used as KEKs * (key encryption keys). - * Decryption is slightly dependant on the type of key: + * Decryption is slightly dependent on the type of key: * -for disc key, invert is 0x00, * -for title key, invert if 0xff. *****************************************************************************/ @@ -1163,8 +1164,7 @@ static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key ) */ /* initialize lookup tables for k[1] */ - K1table = malloc( 65536 * K1TABLEWIDTH ); - memset( K1table, 0 , 65536 * K1TABLEWIDTH ); + K1table = calloc( 65536, K1TABLEWIDTH ); if( K1table == NULL ) { return -1; @@ -1194,9 +1194,8 @@ static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key ) } } - /* Initing our Really big table */ - BigTable = malloc( 16777216 * sizeof(int) ); - memset( BigTable, 0 , 16777216 * sizeof(int) ); + /* Initializing our really big table */ + BigTable = calloc( 16777216, sizeof(int) ); if( BigTable == NULL ) { free( K1table ); @@ -1224,7 +1223,7 @@ static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key ) } /* - * We are done initing, now reverse hash + * We are done initializing, now reverse hash */ tmp5 = p_disc_key[0] ^ p_css_tab1[ p_disc_key[1] ]; @@ -1242,7 +1241,7 @@ static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key ) out1[ i ] = p_css_tab4[ tmp ]; } - /* cumpute and cache some variables */ + /* compute and cache some variables */ C[0] = nStepA >> 8; C[1] = nStepA & 0xff; tmp = p_disc_key[3] ^ p_css_tab1[ p_disc_key[4] ]; @@ -1358,7 +1357,7 @@ static int RecoverTitleKey( int i_start, uint8_t const *p_crypted, /* iterate cipher 4 times to reconstruct LFSR2 */ for( i = 0 ; i < 4 ; i++ ) { - /* advance LFSR1 normaly */ + /* advance LFSR1 normally */ i_t4 = p_css_tab2[i_t2] ^ p_css_tab3[i_t1]; i_t2 = i_t1 >> 1; i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4; @@ -1411,7 +1410,7 @@ static int RecoverTitleKey( int i_start, uint8_t const *p_crypted, { i_t1 = i_t3 & 0xff; i_t3 = ( i_t3 >> 8 ); - /* easy to code, and fast enough bruteforce + /* easy to code, and fast enough brute-force * search for byte shifted in */ for( j = 0 ; j < 256 ; j++ ) { @@ -1459,11 +1458,11 @@ static int RecoverTitleKey( int i_start, uint8_t const *p_crypted, * Various pieces for the title crack engine. ****************************************************************************** * The length of the PES packet is located at 0x12-0x13. - * The the copyrigth protection bits are located at 0x14 (bits 0x20 and 0x10). + * The the copyright protection bits are located at 0x14 (bits 0x20 and 0x10). * The data of the PES packet begins at 0x15 (if there isn't any PTS/DTS) * or at 0x?? if there are both PTS and DTS's. * The seed value used with the unscrambling key is the 5 bytes at 0x54-0x58. - * The scrabled part of a sector begins at 0x80. + * The scrambled part of a sector begins at 0x80. *****************************************************************************/ /* Statistics */ @@ -1607,7 +1606,7 @@ static int CrackTitleKey( dvdcss_t dvdcss, int i_pos, int i_len, ****************************************************************************** * Tries to find a repeating pattern just before the encrypted part starts. * Then it guesses that the plain text for first encrypted bytes are - * a contiuation of that pattern. + * a continuation of that pattern. *****************************************************************************/ static int AttackPattern( uint8_t const p_sec[ DVDCSS_BLOCK_SIZE ], int i_pos, uint8_t *p_key ) @@ -1668,7 +1667,7 @@ static int AttackPattern( uint8_t const p_sec[ DVDCSS_BLOCK_SIZE ], ****************************************************************************** * DVD specifies that there must only be one type of data in every sector. * Every sector is one pack and so must obviously be 2048 bytes long. - * For the last pice of video data before a VOBU boundary there might not + * For the last piece of video data before a VOBU boundary there might not * be exactly the right amount of data to fill a sector. Then one has to * pad the pack to 2048 bytes. For just a few bytes this is done in the * header but for any large amount you insert a PES packet from the @@ -1683,7 +1682,7 @@ static int AttackPadding( uint8_t const p_sec[ DVDCSS_BLOCK_SIZE ], i_pes_length = (p_sec[0x12]<<8) | p_sec[0x13]; - /* Coverd by the test below but usfull for debuging. */ + /* Covered by the test below but useful for debugging. */ if( i_pes_length == DVDCSS_BLOCK_SIZE - 0x14 ) return 0; /* There must be room for at least 4? bytes of padding stream, @@ -1712,7 +1711,7 @@ static int AttackPadding( uint8_t const p_sec[ DVDCSS_BLOCK_SIZE ], are also known. */ /* An encrypted SPU PES packet with another encrypted PES packet following. - Normaly if the following was a padding stream that would be in plain + Normally if the following was a padding stream that would be in plain text. So it will be another SPU PES packet. */ if( p_sec[0x11] == 0xbd && p_sec[0x17 + p_sec[0x16]] >= 0x20 && @@ -1722,7 +1721,7 @@ static int AttackPadding( uint8_t const p_sec[ DVDCSS_BLOCK_SIZE ], } /* A Video PES packet with another encrypted PES packet following. - * No reason execpt for time stamps to break the data into two packets. + * No reason except for time stamps to break the data into two packets. * So it's likely that the following PES packet is a padding stream. */ if( p_sec[0x11] == 0xe0 ) { diff --git a/lib/libdvd/libdvdcss/src/css.h b/lib/libdvd/libdvdcss/src/css.h index 26ad6996a2..54b5a4f4d8 100644 --- a/lib/libdvd/libdvdcss/src/css.h +++ b/lib/libdvd/libdvdcss/src/css.h @@ -2,7 +2,6 @@ * css.h: Structures for DVD authentication and unscrambling ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: css.h 236 2010-08-02 15:59:13Z jb $ * * Author: Stéphane Borel <stef@via.ecp.fr> * @@ -45,7 +44,7 @@ typedef struct dvd_title_s typedef struct css_s { - int i_agid; /* Current Authenication Grant ID. */ + int i_agid; /* Current Authentication Grant ID. */ dvd_key_t p_bus_key; /* Current session key. */ dvd_key_t p_disc_key; /* This DVD disc's key. */ dvd_key_t p_title_key; /* Current title key. */ @@ -57,7 +56,6 @@ typedef struct css_s int _dvdcss_test ( dvdcss_t ); int _dvdcss_title ( dvdcss_t, int ); int _dvdcss_disckey ( dvdcss_t ); -int _dvdcss_titlekey ( dvdcss_t, int , dvd_key_t ); int _dvdcss_unscramble ( uint8_t *, uint8_t * ); #endif /* DVDCSS_CSS_H */ diff --git a/lib/libdvd/libdvdcss/src/csstables.h b/lib/libdvd/libdvdcss/src/csstables.h index d8dfa98ee5..10b0fafa37 100644 --- a/lib/libdvd/libdvdcss/src/csstables.h +++ b/lib/libdvd/libdvdcss/src/csstables.h @@ -2,7 +2,6 @@ * csstables.h: CSS Tables for DVD unscrambling ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: csstables.h 235 2010-08-02 15:41:14Z jb $ * * Author: Stéphane Borel <stef@via.ecp.fr> * @@ -32,7 +31,7 @@ #ifndef DVDCSS_CSSTABLES_H #define DVDCSS_CSSTABLES_H -static uint8_t p_css_tab1[ 256 ] = +static const uint8_t p_css_tab1[ 256 ] = { 0x33, 0x73, 0x3b, 0x26, 0x63, 0x23, 0x6b, 0x76, 0x3e, 0x7e, 0x36, 0x2b, 0x6e, 0x2e, 0x66, 0x7b, @@ -68,7 +67,7 @@ static uint8_t p_css_tab1[ 256 ] = 0xba, 0xfa, 0xb2, 0xaf, 0xea, 0xaa, 0xe2, 0xff }; -static uint8_t p_css_tab2[ 256 ] = +static const uint8_t p_css_tab2[ 256 ] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, @@ -104,7 +103,7 @@ static uint8_t p_css_tab2[ 256 ] = 0xe4, 0xe5, 0xe6, 0xe7, 0xe0, 0xe1, 0xe2, 0xe3 }; -static uint8_t p_css_tab3[ 512 ] = +static const uint8_t p_css_tab3[ 512 ] = { 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff, @@ -172,7 +171,7 @@ static uint8_t p_css_tab3[ 512 ] = 0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff }; -static uint8_t p_css_tab4[ 256 ] = +static const uint8_t p_css_tab4[ 256 ] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, @@ -208,7 +207,7 @@ static uint8_t p_css_tab4[ 256 ] = 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff }; -static uint8_t p_css_tab5[ 256 ] = +static const uint8_t p_css_tab5[ 256 ] = { 0xff, 0x7f, 0xbf, 0x3f, 0xdf, 0x5f, 0x9f, 0x1f, 0xef, 0x6f, 0xaf, 0x2f, 0xcf, 0x4f, 0x8f, 0x0f, @@ -244,7 +243,7 @@ static uint8_t p_css_tab5[ 256 ] = 0xe0, 0x60, 0xa0, 0x20, 0xc0, 0x40, 0x80, 0x00 }; -static uint8_t p_crypt_tab0[ 256 ] = +static const uint8_t p_crypt_tab0[ 256 ] = { 0xB7, 0xF4, 0x82, 0x57, 0xDA, 0x4D, 0xDB, 0xE2, 0x2F, 0x52, 0x1A, 0xA8, 0x68, 0x5A, 0x8A, 0xFF, @@ -280,7 +279,7 @@ static uint8_t p_crypt_tab0[ 256 ] = 0xAD, 0x94, 0x77, 0x04, 0x9A, 0x39, 0xCF, 0x7C }; -static uint8_t p_crypt_tab1[ 256 ] = +static const uint8_t p_crypt_tab1[ 256 ] = { 0x8C, 0x47, 0xB0, 0xE1, 0xEB, 0xFC, 0xEB, 0x56, 0x10, 0xE5, 0x2C, 0x1A, 0x5D, 0xEF, 0xBE, 0x4F, @@ -316,7 +315,7 @@ static uint8_t p_crypt_tab1[ 256 ] = 0xAA, 0x1B, 0x79, 0x8E, 0x97, 0xB4, 0xC3, 0xF4 }; -static uint8_t p_crypt_tab2[ 256 ] = +static const uint8_t p_crypt_tab2[ 256 ] = { 0xB7, 0x75, 0x81, 0xD5, 0xDC, 0xCA, 0xDE, 0x66, 0x23, 0xDF, 0x15, 0x26, 0x62, 0xD1, 0x83, 0x77, @@ -352,7 +351,7 @@ static uint8_t p_crypt_tab2[ 256 ] = 0x29, 0x91, 0xF0, 0x02, 0x18, 0x3A, 0x4E, 0x7C }; -static uint8_t p_crypt_tab3[ 288 ] = +static const uint8_t p_crypt_tab3[ 288 ] = { 0x73, 0x51, 0x95, 0xE1, 0x12, 0xE4, 0xC0, 0x58, 0xEE, 0xF2, 0x08, 0x1B, 0xA9, 0xFA, 0x98, 0x4C, diff --git a/lib/libdvd/libdvdcss/src/device.c b/lib/libdvd/libdvdcss/src/device.c index cfd3504b5a..2395ab512c 100644 --- a/lib/libdvd/libdvdcss/src/device.c +++ b/lib/libdvd/libdvdcss/src/device.c @@ -2,7 +2,6 @@ * device.h: DVD device access ***************************************************************************** * Copyright (C) 1998-2006 VideoLAN - * $Id: device.c 242 2011-10-26 04:59:23Z jb $ * * Authors: Stéphane Borel <stef@via.ecp.fr> * Sam Hocevar <sam@zoy.org> @@ -24,7 +23,7 @@ *****************************************************************************/ /* - Modifications for XBMC are all contained within _XBOX (real xbox hardware) or WITH_CACHE + Modifications for XBMC are all contained within WITH_CACHE */ /***************************************************************************** @@ -53,12 +52,6 @@ # include <limits.h> #endif -#if defined( WIN32 ) && !defined( SYS_CYGWIN ) -# include <io.h> /* read() */ -#else -# include <sys/uio.h> /* struct iovec */ -#endif - #ifdef DARWIN_DVD_IOCTL # include <paths.h> # include <CoreFoundation/CoreFoundation.h> @@ -69,7 +62,7 @@ # include <IOKit/storage/IODVDMedia.h> #endif -#ifdef SYS_OS2 +#ifdef __OS2__ # define INCL_DOS # define INCL_DOSDEVIOCTL # include <os2.h> @@ -103,7 +96,7 @@ static int aspi_read ( dvdcss_t, void *, int ); static int win_readv ( dvdcss_t, struct iovec *, int ); static int aspi_read_internal ( int, void *, int ); -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) static int os2_open ( dvdcss_t, char const * ); /* just use macros for libc */ # define os2_seek libc_seek @@ -128,7 +121,7 @@ int _dvdcss_use_ioctls( dvdcss_t dvdcss ) { return 1; } -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) ULONG ulMode; if( DosQueryFHState( dvdcss->i_fd, &ulMode ) != 0 ) @@ -158,7 +151,6 @@ int _dvdcss_use_ioctls( dvdcss_t dvdcss ) * OpenBSD needs a char device * NetBSD needs a char device * FreeBSD can use either the block or the char device - * BSD/OS can use either the block or the char device */ /* Check if this is a block/char device */ @@ -185,7 +177,7 @@ void _dvdcss_check ( dvdcss_t dvdcss ) kern_return_t kern_result; io_iterator_t media_iterator; CFMutableDictionaryRef classes_to_match; -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) #pragma pack( 1 ) struct { @@ -243,7 +235,7 @@ void _dvdcss_check ( dvdcss_t dvdcss ) /* Remove trailing backslash */ psz_device[2] = '\0'; - /* FIXME: we want to differenciate between CD and DVD drives + /* FIXME: we want to differentiate between CD and DVD drives * using DeviceIoControl() */ print_debug( dvdcss, "defaulting to drive `%s'", psz_device ); free( dvdcss->psz_device ); @@ -320,7 +312,7 @@ void _dvdcss_check ( dvdcss_t dvdcss ) } IOObjectRelease( media_iterator ); -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) for( i = 0; i < 26; i++ ) { param.bCmdInfo = 0; @@ -372,20 +364,11 @@ int _dvdcss_open ( dvdcss_t dvdcss ) #if defined( WIN32 ) dvdcss->b_file = 1; -#if defined( _XBOX ) - // If we've passed over the device string make sure we don't try - // to use file based handling (libc) - we want Win2k routines ... - if (!stricmp(psz_device, "\\Device\\Cdrom0")) - dvdcss->b_file = 0; - else - dvdcss->b_file = stricmp(psz_device, "D:"); -#else /* If device is "X:" or "X:\", we are not actually opening a file. */ if (psz_device[0] && psz_device[1] == ':' && (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3]))) dvdcss->b_file = 0; -#endif // _XBOX /* Initialize readv temporary buffer */ dvdcss->p_readv_buffer = NULL; dvdcss->i_readv_buf_size = 0; @@ -407,7 +390,7 @@ int _dvdcss_open ( dvdcss_t dvdcss ) return aspi_open( dvdcss, psz_device ); } else -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) /* If device is "X:" or "X:\", we are not actually opening a file. */ if( psz_device[0] && psz_device[1] == ':' && ( !psz_device[2] || ( psz_device[2] == '\\' && !psz_device[3] ) ) ) @@ -429,7 +412,7 @@ int _dvdcss_open ( dvdcss_t dvdcss ) } } -#if !defined(WIN32) && !defined(SYS_OS2) +#ifdef DVDCSS_RAW_OPEN int _dvdcss_raw_open ( dvdcss_t dvdcss, char const *psz_device ) { dvdcss->i_raw_fd = open( psz_device, 0 ); @@ -463,13 +446,11 @@ int _dvdcss_close ( dvdcss_t dvdcss ) } else /* ASPI */ { -#if !defined(_XBOX) struct w32_aspidev *fd = (struct w32_aspidev *) dvdcss->i_fd; - /* Unload aspi and free w32_aspidev structure */ + /* Unload ASPI and free w32_aspidev structure */ FreeLibrary( (HMODULE) fd->hASPI ); free( (void*) dvdcss->i_fd ); -#endif // !_XBOX } /* Free readv temporary buffer */ @@ -484,7 +465,7 @@ int _dvdcss_close ( dvdcss_t dvdcss ) #else close( dvdcss->i_fd ); -#ifndef SYS_OS2 +#ifdef DVDCSS_RAW_OPEN if( dvdcss->i_raw_fd >= 0 ) { close( dvdcss->i_raw_fd ); @@ -503,11 +484,7 @@ int _dvdcss_close ( dvdcss_t dvdcss ) *****************************************************************************/ static int libc_open ( dvdcss_t dvdcss, char const *psz_device ) { -#if !defined( WIN32 ) && !defined( SYS_OS2 ) - dvdcss->i_fd = dvdcss->i_read_fd = open( psz_device, 0 ); -#else dvdcss->i_fd = dvdcss->i_read_fd = open( psz_device, O_BINARY ); -#endif if( dvdcss->i_fd == -1 ) { @@ -525,18 +502,13 @@ static int libc_open ( dvdcss_t dvdcss, char const *psz_device ) #if defined( WIN32 ) static int win2k_open ( dvdcss_t dvdcss, char const *psz_device ) { -#ifdef _XBOX - char psz_dvd[70]; - strcpy(psz_dvd, "cdrom0:"); -#else char psz_dvd[7]; snprintf( psz_dvd, 7, "\\\\.\\%c:", psz_device[0] ); -#endif /* To work around an M$ bug in IOCTL_DVD_READ_STRUCTURE, we need read * _and_ write access to the device (so we can make SCSI Pass Through * Requests). Unfortunately this is only allowed if you have - * administrator priviledges so we allow for a fallback method with + * administrator privileges so we allow for a fallback method with * only read access to the device (in this case ioctl_ReadCopyright() * won't send back the right result). * (See Microsoft Q241374: Read and Write Access Required for SCSI @@ -546,7 +518,7 @@ static int win2k_open ( dvdcss_t dvdcss, char const *psz_device ) DWORD flags = FILE_FLAG_NO_BUFFERING; /* we handle buffering ourself */ #else DWORD flags = FILE_FLAG_RANDOM_ACCESS; -#endif //!_XBOX +#endif //!WITH_CACHE dvdcss->i_fd = (int) CreateFile( psz_dvd, GENERIC_READ | GENERIC_WRITE, @@ -581,7 +553,7 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device ) SENDASPI32COMMAND lpSendCommand; char c_drive = psz_device[0]; - /* load aspi and init w32_aspidev structure */ + /* load ASPI and init w32_aspidev structure */ hASPI = LoadLibrary( "wnaspi32.dll" ); if( hASPI == NULL ) { @@ -594,7 +566,7 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device ) if(lpGetSupport == NULL || lpSendCommand == NULL ) { - print_error( dvdcss, "unable to get aspi function pointers" ); + print_error( dvdcss, "unable to get ASPI function pointers" ); FreeLibrary( hASPI ); return -1; } @@ -610,7 +582,7 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device ) if( HIBYTE( LOWORD ( dwSupportInfo ) ) != SS_COMP ) { - print_error( dvdcss, "unable to initalize aspi layer" ); + print_error( dvdcss, "unable to initialize ASPI layer" ); FreeLibrary( hASPI ); return -1; } @@ -655,10 +627,9 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device ) if( (srbDiskInfo.SRB_Status == SS_COMP) && (srbDiskInfo.SRB_Int13HDriveInfo == c_drive) ) { - /* Make sure this is a cdrom device */ - struct SRB_GDEVBlock srbGDEVBlock; + /* Make sure this is a CD-ROM device */ + struct SRB_GDEVBlock srbGDEVBlock = { 0 }; - memset( &srbGDEVBlock, 0, sizeof(struct SRB_GDEVBlock) ); srbGDEVBlock.SRB_Cmd = SC_GET_DEV_TYPE; srbGDEVBlock.SRB_HaId = i; srbGDEVBlock.SRB_Target = j; @@ -677,7 +648,7 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device ) { free( (void*) fd ); FreeLibrary( hASPI ); - print_error( dvdcss,"this is not a cdrom drive" ); + print_error( dvdcss,"this is not a CD-ROM drive" ); return -1; } } @@ -686,12 +657,12 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device ) free( (void*) fd ); FreeLibrary( hASPI ); - print_error( dvdcss, "unable to get haid and target (aspi)" ); + print_error( dvdcss, "unable to get haid and target (ASPI)" ); return -1; } #endif -#ifdef SYS_OS2 +#ifdef __OS2__ static int os2_open ( dvdcss_t dvdcss, char const *psz_device ) { char psz_dvd[] = "X:"; @@ -949,7 +920,7 @@ static int win2k_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks ) dvdcss->i_pos += i_bytes / DVDCSS_BLOCK_SIZE; return i_bytes / DVDCSS_BLOCK_SIZE; -#endif // WITH_CACHE +#endif // WITH_CACHE } static int aspi_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks ) @@ -994,8 +965,8 @@ static int libc_readv ( dvdcss_t dvdcss, struct iovec *p_iovec, int i_blocks ) if( i_bytes < 0 ) { /* One of the reads failed, too bad. - * We won't even bother returning the reads that went ok, - * and as in the posix spec the file postition is left + * We won't even bother returning the reads that went OK, + * and as in the POSIX spec the file position is left * unspecified after a failure */ dvdcss->i_pos = -1; return -1; @@ -1081,7 +1052,7 @@ static int win_readv ( dvdcss_t dvdcss, struct iovec *p_iovec, int i_blocks ) i_blocks_total * DVDCSS_BLOCK_SIZE, &i_bytes, NULL ) ) { /* The read failed... too bad. - * As in the posix spec the file postition is left + * As in the POSIX spec the file position is left * unspecified after a failure */ dvdcss->i_pos = -1; return -1; @@ -1123,7 +1094,7 @@ static int win_readv ( dvdcss_t dvdcss, struct iovec *p_iovec, int i_blocks ) static int aspi_read_internal( int i_fd, void *p_data, int i_blocks ) { HANDLE hEvent; - struct SRB_ExecSCSICmd ssc; + struct SRB_ExecSCSICmd ssc = { 0 }; struct w32_aspidev *fd = (struct w32_aspidev *) i_fd; /* Create the transfer completion event */ @@ -1133,8 +1104,6 @@ static int aspi_read_internal( int i_fd, void *p_data, int i_blocks ) return -1; } - memset( &ssc, 0, sizeof( ssc ) ); - ssc.SRB_Cmd = SC_EXEC_SCSI_CMD; ssc.SRB_Flags = SRB_DIR_IN | SRB_EVENT_NOTIFY; ssc.SRB_HaId = LOBYTE( fd->i_sid ); @@ -1151,7 +1120,7 @@ static int aspi_read_internal( int i_fd, void *p_data, int i_blocks ) ssc.CDBByte[4] = (UCHAR) (fd->i_blocks >> 8) & 0xff; ssc.CDBByte[5] = (UCHAR) (fd->i_blocks) & 0xff; - /* We have to break down the reads into 64kb pieces (ASPI restriction) */ + /* We have to break down the reads into 64KB pieces (ASPI restriction) */ if( i_blocks > 32 ) { ssc.SRB_BufLen = 32 * DVDCSS_BLOCK_SIZE; @@ -1162,7 +1131,7 @@ static int aspi_read_internal( int i_fd, void *p_data, int i_blocks ) ResetEvent( hEvent ); fd->lpSendCommand( (void*) &ssc ); - /* transfer the next 64kb (aspi_read_internal is called recursively) + /* transfer the next 64KB (aspi_read_internal is called recursively) * We need to check the status of the read on return */ if( aspi_read_internal( i_fd, (uint8_t*) p_data + 32 * DVDCSS_BLOCK_SIZE, diff --git a/lib/libdvd/libdvdcss/src/device.h b/lib/libdvd/libdvdcss/src/device.h index 8511ad3c15..4119b7075c 100644 --- a/lib/libdvd/libdvdcss/src/device.h +++ b/lib/libdvd/libdvdcss/src/device.h @@ -2,7 +2,6 @@ * device.h: DVD device access ***************************************************************************** * Copyright (C) 1998-2002 VideoLAN - * $Id: device.h 236 2010-08-02 15:59:13Z jb $ * * Authors: Stéphane Borel <stef@via.ecp.fr> * Sam Hocevar <sam@zoy.org> @@ -26,11 +25,18 @@ #ifndef DVDCSS_DEVICE_H #define DVDCSS_DEVICE_H +#include "config.h" + /***************************************************************************** * iovec structure: vectored data entry *****************************************************************************/ -#if defined( WIN32 ) && !defined( SYS_CYGWIN ) +#ifndef HAVE_SYS_UIO_H # include <io.h> /* read() */ +struct iovec +{ + void *iov_base; /* Pointer to data. */ + size_t iov_len; /* Length of data. */ +}; #else # include <sys/types.h> # include <sys/uio.h> /* struct iovec */ @@ -38,14 +44,11 @@ #include "dvdcss/dvdcss.h" -#if defined( WIN32 ) && !defined( SYS_CYGWIN ) -struct iovec -{ - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ -}; +#if !defined(WIN32) && !defined(__OS2__) +# define DVDCSS_RAW_OPEN #endif + /***************************************************************************** * Device reading prototypes *****************************************************************************/ @@ -57,8 +60,6 @@ int _dvdcss_close ( dvdcss_t ); /***************************************************************************** * Device reading prototypes, raw-device specific *****************************************************************************/ -#if !defined(WIN32) && !defined(SYS_OS2) int _dvdcss_raw_open ( dvdcss_t, char const * ); -#endif #endif /* DVDCSS_DEVICE_H */ diff --git a/lib/libdvd/libdvdcss/src/dvdcss/Makefile.am b/lib/libdvd/libdvdcss/src/dvdcss/Makefile.am deleted file mode 100644 index 46746964cb..0000000000 --- a/lib/libdvd/libdvdcss/src/dvdcss/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -pkgincludedir = $(includedir)/dvdcss - -pkginclude_HEADERS = dvdcss.h diff --git a/lib/libdvd/libdvdcss/src/dvdcss/dvdcss.h b/lib/libdvd/libdvdcss/src/dvdcss/dvdcss.h index 0323329a33..e010c31fa9 100644 --- a/lib/libdvd/libdvdcss/src/dvdcss/dvdcss.h +++ b/lib/libdvd/libdvdcss/src/dvdcss/dvdcss.h @@ -10,7 +10,6 @@ /* * Copyright (C) 1998-2008 VideoLAN - * $Id: dvdcss.h 219 2009-02-09 00:03:47Z jb $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,6 +59,8 @@ typedef struct dvdcss_s* dvdcss_t; #define LIBDVDCSS_EXPORT __declspec(dllexport) extern #elif defined(LIBDVDCSS_IMPORTS) #define LIBDVDCSS_EXPORT __declspec(dllimport) extern +#elif defined(SUPPORT_ATTRIBUTE_VISIBILITY_DEFAULT) +#define LIBDVDCSS_EXPORT __attribute__((visibility("default"))) extern #else #define LIBDVDCSS_EXPORT extern #endif diff --git a/lib/libdvd/libdvdcss/src/error.c b/lib/libdvd/libdvdcss/src/error.c index ac190e4256..e7127b68ea 100644 --- a/lib/libdvd/libdvdcss/src/error.c +++ b/lib/libdvd/libdvdcss/src/error.c @@ -2,7 +2,6 @@ * error.c: error management functions ***************************************************************************** * Copyright (C) 1998-2002 VideoLAN - * $Id: error.c 221 2009-02-09 00:45:44Z sam $ * * Author: Sam Hocevar <sam@zoy.org> * diff --git a/lib/libdvd/libdvdcss/src/ioctl.c b/lib/libdvd/libdvdcss/src/ioctl.c index 3fcffa2567..61a924ea76 100644 --- a/lib/libdvd/libdvdcss/src/ioctl.c +++ b/lib/libdvd/libdvdcss/src/ioctl.c @@ -2,7 +2,6 @@ * ioctl.c: DVD ioctl replacement function ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ioctl.c 221 2009-02-09 00:45:44Z sam $ * * Authors: Markus Kuespert <ltlBeBoy@beosmail.com> * Sam Hocevar <sam@zoy.org> @@ -41,7 +40,7 @@ #if defined( WIN32 ) # include <windows.h> # include <winioctl.h> -#elif defined ( SYS_OS2 ) +#elif defined ( __OS2__ ) # define INCL_DOSFILEMGR # define INCL_DOSDEVICES # define INCL_DOSDEVIOCTL @@ -65,10 +64,7 @@ #ifdef DVD_STRUCT_IN_DVD_H # include <dvd.h> #endif -#ifdef DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H -# include "bsdi_dvd.h" -#endif -#ifdef SYS_BEOS +#ifdef __BEOS__ # include <malloc.h> # include <scsi.h> #endif @@ -97,7 +93,7 @@ /***************************************************************************** * Local prototypes, BeOS specific *****************************************************************************/ -#if defined( SYS_BEOS ) +#if defined( __BEOS__ ) static void BeInitRDC ( raw_device_command *, int ); #endif @@ -135,7 +131,7 @@ static void QNXInitCPT ( CAM_PASS_THRU *, int ); /***************************************************************************** * Local prototypes, OS2 specific *****************************************************************************/ -#if defined( SYS_OS2 ) +#if defined( __OS2__ ) static void OS2InitSDC( struct OS2_ExecSCSICmd *, int ); #endif @@ -147,9 +143,8 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_struct dvd; + dvd_struct dvd = { 0 }; - memset( &dvd, 0, sizeof( dvd ) ); dvd.type = DVD_STRUCT_COPYRIGHT; dvd.copyright.layer_num = i_layer; @@ -158,9 +153,8 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright ) *pi_copyright = dvd.copyright.cpst; #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_struct dvd; + struct dvd_struct dvd = { 0 }; - memset( &dvd, 0, sizeof( dvd ) ); dvd.format = DVD_STRUCT_COPYRIGHT; dvd.layer_num = i_layer; @@ -168,7 +162,7 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright ) *pi_copyright = dvd.cpst; -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_READ_DVD_STRUCTURE, 8 ); rdc.command[ 6 ] = i_layer; @@ -221,7 +215,7 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright ) /* When using IOCTL_DVD_READ_STRUCTURE and DVD_COPYRIGHT_DESCRIPTOR, CopyrightProtectionType seems to be always 6 ??? - To work around this MS bug we try to send a raw scsi command + To work around this MS bug we try to send a raw SCSI command instead (if we've got enough privileges to do so). */ sptd.Cdb[ 6 ] = i_layer; @@ -257,7 +251,7 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright ) *pi_copyright = p_buffer[4]; -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_READ_DVD_STRUCTURE, 8 ); sdc.command[ 6 ] = i_layer; @@ -284,12 +278,10 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_struct dvd; + dvd_struct dvd = { 0 }; - memset( &dvd, 0, sizeof( dvd ) ); dvd.type = DVD_STRUCT_DISCKEY; dvd.disckey.agid = *pi_agid; - memset( dvd.disckey.value, 0, DVD_DISCKEY_SIZE ); i_ret = ioctl( i_fd, DVD_READ_STRUCT, &dvd ); @@ -301,12 +293,10 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key ) memcpy( p_key, dvd.disckey.value, DVD_DISCKEY_SIZE ); #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_struct dvd; + struct dvd_struct dvd = { 0 }; - memset( &dvd, 0, sizeof( dvd ) ); dvd.format = DVD_STRUCT_DISCKEY; dvd.agid = *pi_agid; - memset( dvd.data, 0, DVD_DISCKEY_SIZE ); i_ret = ioctl( i_fd, DVDIOCREADSTRUCTURE, &dvd ); @@ -317,7 +307,7 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key ) memcpy( p_key, dvd.data, DVD_DISCKEY_SIZE ); -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 ); rdc.command[ 7 ] = DVD_STRUCT_DISCKEY; @@ -373,46 +363,13 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key ) memcpy( p_key, dvdbs.discKeyStructures, DVD_DISCKEY_SIZE ); -#elif defined( _XBOX ) - // the next piece of code will read the disc key on the xbox for all drives (samsung included) - // but for some reason it takes 15 - 20 seconds longer to load a dvd if mplayer has the dvd key - // so we let this part fail and will only use the modified ioctl_ReadTitleKey code. - // don't get this delay, and i'm surprised it worked as the ReadTitleKey function didn't work. - - DWORD dwBytesRead; - DVD_READ_STRUCTURE st; - char buffer[DVD_DISCKEY_SIZE]; - - memset( &buffer, 0, sizeof( buffer ) ); - memset( &st, 0, sizeof( st ) ); - - st.BlockByteOffset.QuadPart = 0; - st.SessionId = *pi_agid; - st.Format = DvdDiskKeyDescriptor; - - i_ret = DeviceIoControl((HANDLE) i_fd, IOCTL_DVD_READ_STRUCTURE, &st, - sizeof(st), buffer, DVD_DISCKEY_SIZE, &dwBytesRead, NULL ) ? 0 : -1; - - if (i_ret < 0) // didn't work - { - printf("Failed to read disc key\n"); - return i_ret; - } - - // copy the returned key into our key buffer - int i; - for (i = 0; i < DVD_DISCKEY_SIZE; i++) - p_key[i] = buffer[i+4]; - #elif defined( WIN32 ) if( WIN2K ) /* NT/2k/XP */ { DWORD tmp; - uint8_t buffer[DVD_DISK_KEY_LENGTH]; + uint8_t buffer[DVD_DISK_KEY_LENGTH] = { 0 }; PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer; - memset( &buffer, 0, sizeof( buffer ) ); - key->KeyLength = DVD_DISK_KEY_LENGTH; key->SessionId = *pi_agid; key->KeyType = DvdDiskKey; @@ -456,7 +413,7 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key ) memcpy( p_key, p_buffer + 4, DVD_DISCKEY_SIZE ); -#elif defined ( SYS_OS2 ) +#elif defined ( __OS2__ ) INIT_SSC( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 ); sdc.command[ 7 ] = DVD_STRUCT_DISCKEY; @@ -488,9 +445,8 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_LU_SEND_TITLE_KEY; auth_info.lstk.agid = *pi_agid; auth_info.lstk.lba = i_pos; @@ -500,9 +456,8 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key ) memcpy( p_key, auth_info.lstk.title_key, DVD_KEY_SIZE ); #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.format = DVD_REPORT_TITLE_KEY; auth_info.agid = *pi_agid; auth_info.lba = i_pos; @@ -511,7 +466,7 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key ) memcpy( p_key, auth_info.keychal, DVD_KEY_SIZE ); -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_REPORT_KEY, 12 ); rdc.command[ 2 ] = ( i_pos >> 24 ) & 0xff; @@ -572,34 +527,13 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key ) memcpy( p_key, dvdbs.titleKeyValue, DVD_KEY_SIZE ); -#elif defined( _XBOX ) && 0 //Faulty wrong key returned, original for WIN32 works thou so use it instead - DWORD dwBytesRead; - DVD_READ_STRUCTURE st; - char buffer[2048+4]; - - memset( &buffer, 0, sizeof( buffer ) ); - - st.BlockByteOffset.QuadPart = (LONGLONG) i_pos * 2048 /*DVDCSS_BLOCK_SIZE*/; - st.SessionId = *pi_agid; - st.Format = DvdDiskKeyDescriptor; - - i_ret = DeviceIoControl((HANDLE) i_fd, IOCTL_DVD_READ_STRUCTURE, &st, sizeof(st), buffer, 2048+4, &dwBytesRead, NULL ) ? 0 : -1; - if( i_ret < 0 ) - { - return i_ret; - } - - memcpy( p_key, &(buffer[4]), 2048); - #elif defined( WIN32 ) if( WIN2K ) /* NT/2k/XP */ { DWORD tmp; - uint8_t buffer[DVD_TITLE_KEY_LENGTH]; + uint8_t buffer[DVD_TITLE_KEY_LENGTH] = { 0 }; PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer; - memset( &buffer, 0, sizeof( buffer ) ); - key->KeyLength = DVD_TITLE_KEY_LENGTH; key->SessionId = *pi_agid; key->KeyType = DvdTitleKey; @@ -641,7 +575,7 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key ) memcpy( p_key, p_buffer + 5, DVD_KEY_SIZE ); -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_REPORT_KEY, 12 ); sdc.command[ 2 ] = ( i_pos >> 24 ) & 0xff; @@ -673,9 +607,8 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_LU_SEND_AGID; auth_info.lsa.agid = *pi_agid; @@ -684,9 +617,8 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid ) *pi_agid = auth_info.lsa.agid; #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.format = DVD_REPORT_AGID; auth_info.agid = *pi_agid; @@ -694,7 +626,7 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid ) *pi_agid = auth_info.agid; -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_REPORT_KEY, 8 ); rdc.command[ 10 ] = DVD_REPORT_AGID | (*pi_agid << 6); @@ -743,13 +675,8 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid ) ULONG id; DWORD tmp; -#if defined( _XBOX) - i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_START_SESSION, - NULL, 0, &id, sizeof(id), &tmp, NULL ) ? 0 : -1; -#else i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_START_SESSION, &tmp, 4, &id, sizeof( id ), &tmp, NULL ) ? 0 : -1; -#endif *pi_agid = id; } @@ -774,7 +701,7 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid ) *pi_agid = p_buffer[ 7 ] >> 6; -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_REPORT_KEY, 8 ); sdc.command[ 10 ] = DVD_REPORT_AGID | (*pi_agid << 6); @@ -800,9 +727,8 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_LU_SEND_CHALLENGE; auth_info.lsc.agid = *pi_agid; @@ -811,9 +737,8 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) memcpy( p_challenge, auth_info.lsc.chal, DVD_CHALLENGE_SIZE ); #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.format = DVD_REPORT_CHALLENGE; auth_info.agid = *pi_agid; @@ -821,7 +746,7 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) memcpy( p_challenge, auth_info.keychal, DVD_CHALLENGE_SIZE ); -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_REPORT_KEY, 16 ); rdc.command[ 10 ] = DVD_REPORT_CHALLENGE | (*pi_agid << 6); @@ -867,11 +792,9 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) if( WIN2K ) /* NT/2k/XP */ { DWORD tmp; - uint8_t buffer[DVD_CHALLENGE_KEY_LENGTH]; + uint8_t buffer[DVD_CHALLENGE_KEY_LENGTH] = { 0 }; PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer; - memset( &buffer, 0, sizeof( buffer ) ); - key->KeyLength = DVD_CHALLENGE_KEY_LENGTH; key->SessionId = *pi_agid; key->KeyType = DvdChallengeKey; @@ -908,7 +831,7 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) memcpy( p_challenge, p_buffer + 4, DVD_CHALLENGE_SIZE ); -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_REPORT_KEY, 16 ); sdc.command[ 10 ] = DVD_REPORT_CHALLENGE | (*pi_agid << 6); @@ -934,9 +857,8 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_LU_SEND_ASF; auth_info.lsasf.asf = *pi_asf; @@ -945,9 +867,8 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf ) *pi_asf = auth_info.lsasf.asf; #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.format = DVD_REPORT_ASF; auth_info.asf = *pi_asf; @@ -955,7 +876,7 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf ) *pi_asf = auth_info.asf; -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_REPORT_KEY, 8 ); rdc.command[ 10 ] = DVD_REPORT_ASF; @@ -999,11 +920,9 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf ) if( WIN2K ) /* NT/2k/XP */ { DWORD tmp; - uint8_t buffer[DVD_ASF_LENGTH]; + uint8_t buffer[DVD_ASF_LENGTH] = { 0 }; PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer; - memset( &buffer, 0, sizeof( buffer ) ); - key->KeyLength = DVD_ASF_LENGTH; key->KeyType = DvdAsf; key->KeyFlags = 0; @@ -1041,7 +960,7 @@ int ioctl_ReportASF( int i_fd, int *pi_remove_me, int *pi_asf ) *pi_asf = p_buffer[ 7 ] & 1; -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_REPORT_KEY, 8 ); sdc.command[ 10 ] = DVD_REPORT_ASF; @@ -1067,9 +986,8 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_LU_SEND_KEY1; auth_info.lsk.agid = *pi_agid; @@ -1078,9 +996,8 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key ) memcpy( p_key, auth_info.lsk.key, DVD_KEY_SIZE ); #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.format = DVD_REPORT_KEY1; auth_info.agid = *pi_agid; @@ -1088,7 +1005,7 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key ) memcpy( p_key, auth_info.keychal, DVD_KEY_SIZE ); -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_REPORT_KEY, 12 ); rdc.command[ 10 ] = DVD_REPORT_KEY1 | (*pi_agid << 6); @@ -1134,11 +1051,9 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key ) if( WIN2K ) /* NT/2k/XP */ { DWORD tmp; - uint8_t buffer[DVD_BUS_KEY_LENGTH]; + uint8_t buffer[DVD_BUS_KEY_LENGTH] = { 0 }; PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer; - memset( &buffer, 0, sizeof( buffer ) ); - key->KeyLength = DVD_BUS_KEY_LENGTH; key->SessionId = *pi_agid; key->KeyType = DvdBusKey1; @@ -1170,7 +1085,7 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key ) memcpy( p_key, p_buffer + 4, DVD_KEY_SIZE ); -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_REPORT_KEY, 12 ); sdc.command[ 10 ] = DVD_REPORT_KEY1 | (*pi_agid << 6); @@ -1196,41 +1111,39 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); - auth_info.type = DVD_INVALIDATE_AGID; + auth_info.type = DVDCSS_INVALIDATE_AGID; auth_info.lsa.agid = *pi_agid; i_ret = ioctl( i_fd, DVD_AUTH, &auth_info ); #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); - auth_info.format = DVD_INVALIDATE_AGID; + auth_info.format = DVDCSS_INVALIDATE_AGID; auth_info.agid = *pi_agid; i_ret = ioctl( i_fd, DVDIOCREPORTKEY, &auth_info ); -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_REPORT_KEY, 0 ); - rdc.command[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6); + rdc.command[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6); i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) ); #elif defined( HPUX_SCTL_IO ) INIT_SCTL_IO( GPCMD_REPORT_KEY, 0 ); - sctl_io.cdb[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6); + sctl_io.cdb[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6); i_ret = ioctl( i_fd, SIOC_IO, &sctl_io ); #elif defined( SOLARIS_USCSI ) INIT_USCSI( GPCMD_REPORT_KEY, 0 ); - rs_cdb.cdb_opaque[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6); + rs_cdb.cdb_opaque[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6); i_ret = SolarisSendUSCSI( i_fd, &sc ); @@ -1267,7 +1180,7 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid ) ssc.CDBByte[ 9 ] = 0; #endif - ssc.CDBByte[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6); + ssc.CDBByte[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6); i_ret = WinSendSSC( i_fd, &ssc ); } @@ -1276,18 +1189,18 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid ) INIT_CPT( GPCMD_REPORT_KEY, 0 ); - p_cpt->cam_cdb[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6); + p_cpt->cam_cdb[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6); i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL); -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_REPORT_KEY, 1 ); sdc.data_length = 0; sdc.command[ 8 ] = 0; sdc.command[ 9 ] = 0; - sdc.command[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6); + sdc.command[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6); i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD, &sdc, sizeof(sdc), &ulParamLen, @@ -1307,9 +1220,8 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_HOST_SEND_CHALLENGE; auth_info.hsc.agid = *pi_agid; @@ -1318,9 +1230,8 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) i_ret = ioctl( i_fd, DVD_AUTH, &auth_info ); #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.format = DVD_SEND_CHALLENGE; auth_info.agid = *pi_agid; @@ -1328,7 +1239,7 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info ); -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_SEND_KEY, 16 ); rdc.command[ 10 ] = DVD_SEND_CHALLENGE | (*pi_agid << 6); @@ -1379,11 +1290,9 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) if( WIN2K ) /* NT/2k/XP */ { DWORD tmp; - uint8_t buffer[DVD_CHALLENGE_KEY_LENGTH]; + uint8_t buffer[DVD_CHALLENGE_KEY_LENGTH] = { 0 }; PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer; - memset( &buffer, 0, sizeof( buffer ) ); - key->KeyLength = DVD_CHALLENGE_KEY_LENGTH; key->SessionId = *pi_agid; key->KeyType = DvdChallengeKey; @@ -1391,13 +1300,8 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) memcpy( key->KeyData, p_challenge, DVD_CHALLENGE_SIZE ); -#if defined(_XBOX) - i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_SEND_KEY, key, - key->KeyLength, NULL, 0, &tmp, NULL ) ? 0 : -1; -#else i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_SEND_KEY, key, key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1; -#endif } else { @@ -1422,7 +1326,7 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge ) i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL); -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_SEND_KEY, 16 ); sdc.command[ 10 ] = DVD_SEND_CHALLENGE | (*pi_agid << 6); @@ -1449,9 +1353,8 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_HOST_SEND_KEY2; auth_info.hsk.agid = *pi_agid; @@ -1460,9 +1363,8 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key ) i_ret = ioctl( i_fd, DVD_AUTH, &auth_info ); #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.format = DVD_SEND_KEY2; auth_info.agid = *pi_agid; @@ -1470,7 +1372,7 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key ) i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info ); -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_SEND_KEY, 12 ); rdc.command[ 10 ] = DVD_SEND_KEY2 | (*pi_agid << 6); @@ -1521,11 +1423,9 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key ) if( WIN2K ) /* NT/2k/XP */ { DWORD tmp; - uint8_t buffer[DVD_BUS_KEY_LENGTH]; + uint8_t buffer[DVD_BUS_KEY_LENGTH] = { 0 }; PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer; - memset( &buffer, 0, sizeof( buffer ) ); - key->KeyLength = DVD_BUS_KEY_LENGTH; key->SessionId = *pi_agid; key->KeyType = DvdBusKey2; @@ -1559,7 +1459,7 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key ) i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL); -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_SEND_KEY, 12 ); sdc.command[ 10 ] = DVD_SEND_KEY2 | (*pi_agid << 6); @@ -1586,9 +1486,8 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme ) int i_ret; #if defined( HAVE_LINUX_DVD_STRUCT ) && defined( DVD_LU_SEND_RPC_STATE ) - dvd_authinfo auth_info; + dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.type = DVD_LU_SEND_RPC_STATE; i_ret = ioctl( i_fd, DVD_AUTH, &auth_info ); @@ -1602,9 +1501,8 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme ) i_ret = -1; #elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; + struct dvd_authinfo auth_info = { 0 }; - memset( &auth_info, 0, sizeof( auth_info ) ); auth_info.format = DVD_REPORT_RPC; i_ret = ioctl( i_fd, DVDIOCREPORTKEY, &auth_info ); @@ -1613,7 +1511,7 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme ) *p_mask = auth_info.region; // ?? *p_scheme = auth_info.rpc_scheme; -#elif defined( SYS_BEOS ) +#elif defined( __BEOS__ ) INIT_RDC( GPCMD_REPORT_KEY, 8 ); rdc.command[ 10 ] = DVD_REPORT_RPC; @@ -1667,11 +1565,9 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme ) if( WIN2K ) /* NT/2k/XP */ { DWORD tmp; - uint8_t buffer[DVD_RPC_KEY_LENGTH]; + uint8_t buffer[DVD_RPC_KEY_LENGTH] = { 0 }; PDVD_COPY_PROTECT_KEY key = (PDVD_COPY_PROTECT_KEY) &buffer; - memset( &buffer, 0, sizeof( buffer ) ); - key->KeyLength = DVD_RPC_KEY_LENGTH; key->KeyType = DvdGetRpcKey; key->KeyFlags = 0; @@ -1713,7 +1609,7 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme ) *p_mask = p_buffer[ 5 ]; *p_scheme = p_buffer[ 6 ]; -#elif defined( SYS_OS2 ) +#elif defined( __OS2__ ) INIT_SSC( GPCMD_REPORT_KEY, 8 ); sdc.command[ 10 ] = DVD_REPORT_RPC; @@ -1733,136 +1629,9 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme ) return i_ret; } -/***************************************************************************** - * ioctl_SendRPC: set RPC status for the drive - *****************************************************************************/ -int ioctl_SendRPC( int i_fd, int i_pdrc ) -{ - int i_ret; - -#if defined( HAVE_LINUX_DVD_STRUCT ) && defined( DVD_HOST_SEND_RPC_STATE ) - dvd_authinfo auth_info; - - memset( &auth_info, 0, sizeof( auth_info ) ); - auth_info.type = DVD_HOST_SEND_RPC_STATE; - auth_info.hrpcs.pdrc = i_pdrc; - - i_ret = ioctl( i_fd, DVD_AUTH, &auth_info ); - -#elif defined( HAVE_LINUX_DVD_STRUCT ) - /* FIXME: OpenBSD doesn't know this */ - i_ret = -1; - -#elif defined( HAVE_BSD_DVD_STRUCT ) - struct dvd_authinfo auth_info; - - memset( &auth_info, 0, sizeof( auth_info ) ); - auth_info.format = DVD_SEND_RPC; - auth_info.region = i_pdrc; - - i_ret = ioctl( i_fd, DVDIOCSENDKEY, &auth_info ); - -#elif defined( SYS_BEOS ) - INIT_RDC( GPCMD_SEND_KEY, 8 ); - - rdc.command[ 10 ] = DVD_SEND_RPC; - - p_buffer[ 1 ] = 6; - p_buffer[ 4 ] = i_pdrc; - - i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) ); - -#elif defined( HPUX_SCTL_IO ) - INIT_SCTL_IO( GPCMD_SEND_KEY, 8 ); - - sctl_io.cdb[ 10 ] = DVD_SEND_RPC; - - p_buffer[ 1 ] = 6; - p_buffer[ 4 ] = i_pdrc; - - i_ret = ioctl( i_fd, SIOC_IO, &sctl_io ); - -#elif defined( SOLARIS_USCSI ) - INIT_USCSI( GPCMD_SEND_KEY, 8 ); - - rs_cdb.cdb_opaque[ 10 ] = DVD_SEND_RPC; - - p_buffer[ 1 ] = 6; - p_buffer[ 4 ] = i_pdrc; - - i_ret = SolarisSendUSCSI( i_fd, &sc ); - - if( i_ret < 0 || sc.uscsi_status ) - { - i_ret = -1; - } - -#elif defined( DARWIN_DVD_IOCTL ) - INIT_DVDIOCTL( dk_dvd_send_key_t, DVDRegionPlaybackControlInfo, - kDVDKeyFormatSetRegion ); - - dvd.keyClass = kDVDKeyClassCSS_CPPM_CPRM; - dvdbs.driveRegion = i_pdrc; - - i_ret = ioctl( i_fd, DKIOCDVDSENDKEY, &dvd ); - -#elif defined( WIN32 ) - if( WIN2K ) /* NT/2k/XP */ - { - INIT_SPTD( GPCMD_SEND_KEY, 8 ); - - sptd.Cdb[ 10 ] = DVD_SEND_RPC; - - p_buffer[ 1 ] = 6; - p_buffer[ 4 ] = i_pdrc; - - i_ret = SEND_SPTD( i_fd, &sptd, &tmp ); - } - else - { - INIT_SSC( GPCMD_SEND_KEY, 8 ); - - ssc.CDBByte[ 10 ] = DVD_SEND_RPC; - - p_buffer[ 1 ] = 6; - p_buffer[ 4 ] = i_pdrc; - - i_ret = WinSendSSC( i_fd, &ssc ); - } - -#elif defined( __QNXNTO__ ) - - INIT_CPT( GPCMD_SEND_KEY, 8 ); - - p_cpt->cam_cdb[ 10 ] = DVD_SEND_RPC; - - p_buffer[ 1 ] = 6; - p_buffer[ 4 ] = i_pdrc; - - i_ret = devctl(i_fd, DCMD_CAM_PASS_THRU, p_cpt, structSize, NULL); - -#elif defined( SYS_OS2 ) - INIT_SSC( GPCMD_SEND_KEY, 8 ); - - sdc.command[ 10 ] = DVD_SEND_RPC; - - p_buffer[ 1 ] = 6; - p_buffer[ 4 ] = i_pdrc; - - i_ret = DosDevIOCtl( i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD, - &sdc, sizeof(sdc), &ulParamLen, - p_buffer, sizeof(p_buffer), &ulDataLen ); - -#else -# error "DVD ioctls are unavailable on this system" - -#endif - return i_ret; -} - /* Local prototypes */ -#if defined( SYS_BEOS ) +#if defined( __BEOS__ ) /***************************************************************************** * BeInitRDC: initialize a RDC structure for the BeOS kernel ***************************************************************************** @@ -1932,7 +1701,7 @@ static void HPUXInitSCTL( struct sctl_io *sctl_io, int i_type ) /***************************************************************************** * SolarisInitUSCSI: initialize a USCSICMD structure for the Solaris kernel ***************************************************************************** - * This function initializes a Solaris userspace scsi command structure for + * This function initializes a Solaris userspace SCSI command structure for * future use, either a read command or a write command. *****************************************************************************/ static void SolarisInitUSCSI( struct uscsi_cmd *p_sc, int i_type ) @@ -1977,8 +1746,8 @@ static void SolarisInitUSCSI( struct uscsi_cmd *p_sc, int i_type ) * * The code will fall back to the USCSICMD ioctl method, when * libsmedia.so is not available or does not export the - * smedia_uscsi_cmd() function (on Solaris releases upto and including - * Solaris 8). Fortunatelly, on these old releases non-root users are + * smedia_uscsi_cmd() function (on Solaris releases up to and including + * Solaris 8). Fortunately, on these old releases non-root users are * allowed to perform USCSICMD ioctls on removable media devices. *****************************************************************************/ static int SolarisSendUSCSI( int i_fd, struct uscsi_cmd *p_sc ) @@ -2153,7 +1922,7 @@ static void QNXInitCPT( CAM_PASS_THRU * p_cpt, int i_type ) } #endif -#if defined( SYS_OS2 ) +#if defined( __OS2__ ) /***************************************************************************** * OS2InitSDC: initialize a SDC structure for the Execute SCSI-command ***************************************************************************** diff --git a/lib/libdvd/libdvdcss/src/ioctl.h b/lib/libdvd/libdvdcss/src/ioctl.h index fa1361efc8..8533833eca 100644 --- a/lib/libdvd/libdvdcss/src/ioctl.h +++ b/lib/libdvd/libdvdcss/src/ioctl.h @@ -2,7 +2,6 @@ * ioctl.h: DVD ioctl replacement function ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ioctl.h 235 2010-08-02 15:41:14Z jb $ * * Authors: Sam Hocevar <sam@zoy.org> * @@ -35,7 +34,6 @@ int ioctl_InvalidateAgid ( int, int * ); int ioctl_SendChallenge ( int, int *, uint8_t * ); int ioctl_SendKey2 ( int, int *, uint8_t * ); int ioctl_ReportRPC ( int, int *, int *, int * ); -int ioctl_SendRPC ( int, int ); #define DVD_KEY_SIZE 5 #define DVD_CHALLENGE_SIZE 10 @@ -44,11 +42,10 @@ int ioctl_SendRPC ( int, int ); /***************************************************************************** * Common macro, BeOS specific *****************************************************************************/ -#if defined( SYS_BEOS ) +#if defined( __BEOS__ ) #define INIT_RDC( TYPE, SIZE ) \ - raw_device_command rdc; \ + raw_device_command rdc = { 0 }; \ uint8_t p_buffer[ (SIZE)+1 ]; \ - memset( &rdc, 0, sizeof( raw_device_command ) ); \ rdc.data = (char *)p_buffer; \ rdc.data_length = (SIZE); \ BeInitRDC( &rdc, (TYPE) ); @@ -59,9 +56,8 @@ int ioctl_SendRPC ( int, int ); *****************************************************************************/ #if defined( HPUX_SCTL_IO ) #define INIT_SCTL_IO( TYPE, SIZE ) \ - struct sctl_io sctl_io; \ + struct sctl_io sctl_io = { 0 }; \ uint8_t p_buffer[ (SIZE)+1 ]; \ - memset( &sctl_io, 0, sizeof( sctl_io ) ); \ sctl_io.data = (void *)p_buffer; \ sctl_io.data_length = (SIZE); \ HPUXInitSCTL( &sctl_io, (TYPE) ); @@ -74,10 +70,9 @@ int ioctl_SendRPC ( int, int ); #define USCSI_TIMEOUT( SC, TO ) ( (SC)->uscsi_timeout = (TO) ) #define USCSI_RESID( SC ) ( (SC)->uscsi_resid ) #define INIT_USCSI( TYPE, SIZE ) \ - struct uscsi_cmd sc; \ + struct uscsi_cmd sc = { 0 }; \ union scsi_cdb rs_cdb; \ uint8_t p_buffer[ (SIZE)+1 ]; \ - memset( &sc, 0, sizeof( struct uscsi_cmd ) ); \ sc.uscsi_cdb = (caddr_t)&rs_cdb; \ sc.uscsi_bufaddr = (caddr_t)p_buffer; \ sc.uscsi_buflen = (SIZE); \ @@ -89,10 +84,8 @@ int ioctl_SendRPC ( int, int ); *****************************************************************************/ #if defined( DARWIN_DVD_IOCTL ) #define INIT_DVDIOCTL( DKDVD_TYPE, BUFFER_TYPE, FORMAT ) \ - DKDVD_TYPE dvd; \ - BUFFER_TYPE dvdbs; \ - memset( &dvd, 0, sizeof(dvd) ); \ - memset( &dvdbs, 0, sizeof(dvdbs) ); \ + DKDVD_TYPE dvd = { 0 }; \ + BUFFER_TYPE dvdbs = { 0 }; \ dvd.format = FORMAT; \ dvd.buffer = &dvdbs; \ dvd.bufferLength = sizeof(dvdbs); @@ -104,9 +97,8 @@ int ioctl_SendRPC ( int, int ); #if defined( WIN32 ) #define INIT_SPTD( TYPE, SIZE ) \ DWORD tmp; \ - SCSI_PASS_THROUGH_DIRECT sptd; \ + SCSI_PASS_THROUGH_DIRECT sptd = { 0 }; \ uint8_t p_buffer[ (SIZE) ]; \ - memset( &sptd, 0, sizeof( SCSI_PASS_THROUGH_DIRECT ) ); \ sptd.Length = sizeof( SCSI_PASS_THROUGH_DIRECT ); \ sptd.DataBuffer = p_buffer; \ sptd.DataTransferLength = (SIZE); \ @@ -117,10 +109,9 @@ int ioctl_SendRPC ( int, int ); (SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \ (TMP), NULL ) ? 0 : -1) #define INIT_SSC( TYPE, SIZE ) \ - struct SRB_ExecSCSICmd ssc; \ + struct SRB_ExecSCSICmd ssc = { 0 }; \ uint8_t p_buffer[ (SIZE)+1 ]; \ - memset( &ssc, 0, sizeof( struct SRB_ExecSCSICmd ) ); \ - ssc.SRB_BufPointer = (char *)p_buffer; \ + ssc.SRB_BufPointer = (unsigned char *)p_buffer; \ ssc.SRB_BufLen = (SIZE); \ WinInitSSC( &ssc, (TYPE) ); #endif @@ -130,12 +121,11 @@ int ioctl_SendRPC ( int, int ); *****************************************************************************/ #if defined( __QNXNTO__ ) #define INIT_CPT( TYPE, SIZE ) \ - CAM_PASS_THRU * p_cpt; \ + CAM_PASS_THRU * p_cpt = { 0 }; \ uint8_t * p_buffer; \ int structSize = sizeof( CAM_PASS_THRU ) + (SIZE); \ p_cpt = (CAM_PASS_THRU *) malloc ( structSize ); \ p_buffer = (uint8_t *) p_cpt + sizeof( CAM_PASS_THRU ); \ - memset( p_cpt, 0, structSize ); \ p_cpt->cam_data_ptr = sizeof( CAM_PASS_THRU ); \ p_cpt->cam_dxfer_len = (SIZE); \ QNXInitCPT( p_cpt, (TYPE) ); @@ -144,14 +134,12 @@ int ioctl_SendRPC ( int, int ); /***************************************************************************** * Common macro, OS2 specific *****************************************************************************/ -#if defined( SYS_OS2 ) +#if defined( __OS2__ ) #define INIT_SSC( TYPE, SIZE ) \ - struct OS2_ExecSCSICmd sdc; \ - uint8_t p_buffer[ (SIZE)+1 ]; \ + struct OS2_ExecSCSICmd sdc = { 0 }; \ + uint8_t p_buffer[ (SIZE) + 1 ] = { 0 }; \ unsigned long ulParamLen; \ unsigned long ulDataLen; \ - memset( &sdc, 0, sizeof( OS2_ExecSCSICmd ) ); \ - memset( &p_buffer, 0, SIZE ); \ sdc.data_length = (SIZE); \ ulParamLen = sizeof(sdc); \ OS2InitSDC( &sdc, (TYPE) ) @@ -168,30 +156,28 @@ typedef union dvd_authinfo dvd_authinfo; /***************************************************************************** * Various DVD I/O tables *****************************************************************************/ -#if defined( SYS_BEOS ) || defined( WIN32 ) || defined ( SOLARIS_USCSI ) || defined ( HPUX_SCTL_IO ) || defined ( __QNXNTO__ ) || defined ( SYS_OS2 ) - /* The generic packet command opcodes for CD/DVD Logical Units, - * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */ -# define GPCMD_READ_DVD_STRUCTURE 0xad -# define GPCMD_REPORT_KEY 0xa4 -# define GPCMD_SEND_KEY 0xa3 - /* DVD struct types */ -# define DVD_STRUCT_PHYSICAL 0x00 -# define DVD_STRUCT_COPYRIGHT 0x01 -# define DVD_STRUCT_DISCKEY 0x02 -# define DVD_STRUCT_BCA 0x03 -# define DVD_STRUCT_MANUFACT 0x04 - /* Key formats */ -# define DVD_REPORT_AGID 0x00 -# define DVD_REPORT_CHALLENGE 0x01 -# define DVD_SEND_CHALLENGE 0x01 -# define DVD_REPORT_KEY1 0x02 -# define DVD_SEND_KEY2 0x03 -# define DVD_REPORT_TITLE_KEY 0x04 -# define DVD_REPORT_ASF 0x05 -# define DVD_SEND_RPC 0x06 -# define DVD_REPORT_RPC 0x08 -# define DVD_INVALIDATE_AGID 0x3f -#endif +/* The generic packet command opcodes for CD/DVD Logical Units, + * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */ +#define GPCMD_READ_DVD_STRUCTURE 0xad +#define GPCMD_REPORT_KEY 0xa4 +#define GPCMD_SEND_KEY 0xa3 + /* DVD struct types */ +#define DVD_STRUCT_PHYSICAL 0x00 +#define DVD_STRUCT_COPYRIGHT 0x01 +#define DVD_STRUCT_DISCKEY 0x02 +#define DVD_STRUCT_BCA 0x03 +#define DVD_STRUCT_MANUFACT 0x04 + /* Key formats */ +#define DVD_REPORT_AGID 0x00 +#define DVD_REPORT_CHALLENGE 0x01 +#define DVD_SEND_CHALLENGE 0x01 +#define DVD_REPORT_KEY1 0x02 +#define DVD_SEND_KEY2 0x03 +#define DVD_REPORT_TITLE_KEY 0x04 +#define DVD_REPORT_ASF 0x05 +#define DVD_SEND_RPC 0x06 +#define DVD_REPORT_RPC 0x08 +#define DVDCSS_INVALIDATE_AGID 0x3f /***************************************************************************** * win32 ioctl specific @@ -324,11 +310,7 @@ typedef struct SCSI_PASS_THROUGH_DIRECT typedef DWORD (CALLBACK *GETASPI32SUPPORTINFO)(VOID); typedef DWORD (CALLBACK *SENDASPI32COMMAND)(LPVOID); -#if defined(_XBOX) -#define WIN2K 1 -#else #define WIN2K ( GetVersion() < 0x80000000 ) -#endif // _XBOX #define ASPI_HAID 0 #define ASPI_TARGET 0 #define DTYPE_CDROM 0x05 @@ -412,7 +394,7 @@ struct SRB_ExecSCSICmd /***************************************************************************** * OS2 ioctl specific *****************************************************************************/ -#if defined( SYS_OS2 ) +#if defined( __OS2__ ) #define CDROMDISK_EXECMD 0x7A diff --git a/lib/libdvd/libdvdcss/src/libdvdcss.c b/lib/libdvd/libdvdcss/src/libdvdcss.c index 8ae9111f60..2996fc574a 100644 --- a/lib/libdvd/libdvdcss/src/libdvdcss.c +++ b/lib/libdvd/libdvdcss/src/libdvdcss.c @@ -5,7 +5,6 @@ * HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> * * Copyright (C) 1998-2008 VideoLAN - * $Id: libdvdcss.c 237 2010-09-25 14:21:47Z reimar $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,7 +30,7 @@ * device without having to bother about the decryption. The important features * are: * \li portability: currently supported platforms are GNU/Linux, FreeBSD, - * NetBSD, OpenBSD, BSD/OS, BeOS, Windows 95/98, Windows NT/2000, MacOS X, + * NetBSD, OpenBSD, BeOS, Windows 98/ME, Windows NT/2000/XP, Mac OS X, * Solaris, HP-UX and OS/2. * \li adaptability: unlike most similar projects, libdvdcss doesn't require * the region of your drive to be set and will try its best to read from @@ -50,7 +49,7 @@ * * \section env Environment variables * - * Some environment variables can be used to change the behaviour of + * Some environment variables can be used to change the behavior of * \e libdvdcss without having to modify the program which uses it. These * variables are: * @@ -120,10 +119,6 @@ # include <limits.h> #endif -#ifdef HAVE_DIRECT_H -# include <direct.h> -#endif - #include "dvdcss/dvdcss.h" #include "common.h" @@ -132,6 +127,11 @@ #include "ioctl.h" #include "device.h" +#ifdef HAVE_BROKEN_MKDIR +#include <direct.h> +#define mkdir(a, b) _mkdir(a) +#endif + /** * \brief Symbol for version checks. * @@ -166,7 +166,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) char *psz_method = getenv( "DVDCSS_METHOD" ); char *psz_verbose = getenv( "DVDCSS_VERBOSE" ); char *psz_cache = getenv( "DVDCSS_CACHE" ); -#if !defined(WIN32) && !defined(SYS_OS2) +#ifdef DVDCSS_RAW_OPEN char *psz_raw_device = getenv( "DVDCSS_RAW_DEVICE" ); #endif @@ -184,7 +184,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) /* * Initialize structure with default values */ -#if !defined(WIN32) && !defined(SYS_OS2) +#ifdef DVDCSS_RAW_OPEN dvdcss->i_raw_fd = -1; #endif dvdcss->p_titles = NULL; @@ -242,7 +242,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) */ if( psz_cache == NULL || psz_cache[0] == '\0' ) { -#ifdef HAVE_DIRECT_H +#if defined(_WIN32_IE) && _WIN32_IE >= 0x401 typedef HRESULT( WINAPI *SHGETFOLDERPATH ) ( HWND, int, HANDLE, DWORD, LPTSTR ); @@ -256,7 +256,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) *psz_home = '\0'; - /* Load the shfolder dll to retrieve SHGetFolderPath */ + /* Load the shfolder DLL to retrieve SHGetFolderPath */ p_dll = LoadLibrary( "shfolder.dll" ); if( p_dll ) { @@ -312,7 +312,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) { int home_pos = 0; -#ifdef SYS_OS2 +#ifdef __OS2__ if( *psz_home == '/' || *psz_home == '\\') { char *psz_unixroot = getenv("UNIXROOT"); @@ -408,7 +408,8 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) /* If the cache is enabled, write the cache directory tag */ if( psz_cache ) { - char *psz_tag = "Signature: 8a477f597d28d172789f06886806bc55\r\n" + static const char psz_tag[] = + "Signature: 8a477f597d28d172789f06886806bc55\r\n" "# This file is a cache directory tag created by libdvdcss.\r\n" "# For information about cache directory tags, see:\r\n" "# http://www.brynosaurus.com/cachedir/\r\n"; @@ -525,11 +526,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) /* We have a disc name or ID, we can create the cache dir */ i = sprintf( dvdcss->psz_cachefile, "%s", psz_cache ); -#if !defined( WIN32 ) || defined( SYS_CYGWIN ) i_ret = mkdir( dvdcss->psz_cachefile, 0755 ); -#else - i_ret = mkdir( dvdcss->psz_cachefile ); -#endif if( i_ret < 0 && errno != EEXIST ) { print_error( dvdcss, "failed creating cache directory" ); @@ -537,31 +534,9 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) goto nocache; } -#ifdef _XBOX - //due to xbox file system having a limited length on folders/files, - //make separate folder for disk name first - if(psz_title[0] == '\0') - strcat(psz_title, "NONAME"); - - i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_title); - - i_ret = mkdir( dvdcss->psz_cachefile ); - if( i_ret < 0 && errno != EEXIST ) - { - print_error( dvdcss, "failed creating cache titledirectory" ); - dvdcss->psz_cachefile[0] = '\0'; - goto nocache; - } - i += sprintf( dvdcss->psz_cachefile + i, "/%s%s", psz_serial, psz_key ); -#else i += sprintf( dvdcss->psz_cachefile + i, "/%s-%s%s", psz_title, psz_serial, psz_key ); -#endif -#if !defined( WIN32 ) || defined( SYS_CYGWIN ) i_ret = mkdir( dvdcss->psz_cachefile, 0755 ); -#else - i_ret = mkdir( dvdcss->psz_cachefile ); -#endif if( i_ret < 0 && errno != EEXIST ) { print_error( dvdcss, "failed creating cache subdirectory" ); @@ -578,7 +553,7 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target ) } nocache: -#if !defined(WIN32) && !defined(SYS_OS2) +#ifdef DVDCSS_RAW_OPEN if( psz_raw_device != NULL ) { _dvdcss_raw_open( dvdcss, psz_raw_device ); @@ -612,7 +587,7 @@ LIBDVDCSS_EXPORT char * dvdcss_error ( dvdcss_t dvdcss ) * * \param dvdcss a \e libdvdcss instance. * \param i_blocks an absolute block offset to seek to. - * \param i_flags #DVDCSS_NOFLAGS, optionally ored with one of #DVDCSS_SEEK_KEY + * \param i_flags #DVDCSS_NOFLAGS, optionally ORed with one of #DVDCSS_SEEK_KEY * or #DVDCSS_SEEK_MPEG. * \return the new position in blocks, or a negative value in case an error * happened. @@ -622,7 +597,7 @@ LIBDVDCSS_EXPORT char * dvdcss_error ( dvdcss_t dvdcss ) * You typically set \p i_flags to #DVDCSS_NOFLAGS when seeking in a .IFO. * * If #DVDCSS_SEEK_MPEG is specified in \p i_flags and if \e libdvdcss finds it - * reasonable to do so (ie, if the dvdcss method is not "title"), the current + * reasonable to do so (i.e., if the dvdcss method is not "title"), the current * title key will be checked and a new one will be calculated if necessary. * This flag is typically used when reading data from a VOB. * @@ -654,7 +629,7 @@ LIBDVDCSS_EXPORT int dvdcss_seek ( dvdcss_t dvdcss, int i_blocks, int i_flags ) * \param dvdcss a \e libdvdcss instance. * \param p_buffer a buffer that will contain the data read from the disc. * \param i_blocks the amount of blocks to read. - * \param i_flags #DVDCSS_NOFLAGS, optionally ored with #DVDCSS_READ_DECRYPT. + * \param i_flags #DVDCSS_NOFLAGS, optionally ORed with #DVDCSS_READ_DECRYPT. * \return the amount of blocks read, or a negative value in case an * error happened. * @@ -724,7 +699,7 @@ LIBDVDCSS_EXPORT int dvdcss_read ( dvdcss_t dvdcss, void *p_buffer, * \param p_iovec a pointer to an array of iovec structures that will contain * the data read from the disc. * \param i_blocks the amount of blocks to read. - * \param i_flags #DVDCSS_NOFLAGS, optionally ored with #DVDCSS_READ_DECRYPT. + * \param i_flags #DVDCSS_NOFLAGS, optionally ORed with #DVDCSS_READ_DECRYPT. * \return the amount of blocks read, or a negative value in case an * error happened. * diff --git a/lib/libdvd/libdvdcss/src/libdvdcss.h b/lib/libdvd/libdvdcss/src/libdvdcss.h index 6171c35e75..605d065e34 100644 --- a/lib/libdvd/libdvdcss/src/libdvdcss.h +++ b/lib/libdvd/libdvdcss/src/libdvdcss.h @@ -2,7 +2,6 @@ * libdvdcss.h: private DVD reading library data ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: libdvdcss.h 240 2011-03-23 15:00:06Z jb $ * * Authors: Stéphane Borel <stef@via.ecp.fr> * Sam Hocevar <sam@zoy.org> @@ -27,8 +26,7 @@ #include "dvdcss/dvdcss.h" #include "css.h" - -struct iovec; +#include "device.h" /***************************************************************************** * The libdvdcss structure @@ -68,7 +66,7 @@ struct dvdcss_s int i_readv_buf_size; #endif -#if !defined(WIN32) && !defined(SYS_OS2) +#ifdef DVDCSS_RAW_OPEN int i_raw_fd; #endif }; diff --git a/lib/libdvd/libdvdcss/src/libdvdcss.pc.in b/lib/libdvd/libdvdcss/src/libdvdcss.pc.in index 9d2516787f..517e861b66 100644 --- a/lib/libdvd/libdvdcss/src/libdvdcss.pc.in +++ b/lib/libdvd/libdvdcss/src/libdvdcss.pc.in @@ -7,4 +7,4 @@ Name: libdvdcss Description: DVD access and decryption library. Version: @VERSION@ Libs: -L${libdir} -ldvdcss -Cflags: -I{includedir} -I${includedir}/@PACKAGE@ +Cflags: -I${includedir} -I${includedir}/dvdcss diff --git a/lib/libdvd/libdvdcss/test/Makefile.am b/lib/libdvd/libdvdcss/test/Makefile.am deleted file mode 100644 index f1c5a631e0..0000000000 --- a/lib/libdvd/libdvdcss/test/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ - -noinst_PROGRAMS = csstest #dvd_region - -csstest_SOURCES = csstest.c -csstest_LDADD = $(top_builddir)/src/libdvdcss.la $(bsdi_libadd) -csstest_CFLAGS = -I$(top_srcdir)/src - -#dvd_region_SOURCES = dvd_region.c -#dvd_region_LDADD = $(top_builddir)/src/libdvdcss.la -#dvd_region_CFLAGS = -I$(top_srcdir)/src - -if SYS_BSDI_LIBDVD -bsdi_libadd = -ldvd -endif - diff --git a/lib/libdvd/libdvdnav/ChangeLog b/lib/libdvd/libdvdnav/ChangeLog index c038ef11be..470b3941c1 100644 --- a/lib/libdvd/libdvdnav/ChangeLog +++ b/lib/libdvd/libdvdnav/ChangeLog @@ -1,3 +1,11 @@ +libdvdnav (4.2.1) + * fixed failed assertion on menu-less DVDs + * fixed playback issues on multi-angle DVDs + * fixed crash when playing a DVD from different region than currently set + in the DVD drive + * fixed segfaults when reading certain DVDs (including "Jack Reacher", + "Ghost Protocol", "Inside Man", "Tangled" and "The Dictator") + libdvdnav (4.2.0) * OS/2 support * added dvdnav_get_serial_string() function diff --git a/lib/libdvd/libdvdnav/configure.ac b/lib/libdvd/libdvdnav/configure.ac index 20acae17e8..8c5bafdaf2 100644 --- a/lib/libdvd/libdvdnav/configure.ac +++ b/lib/libdvd/libdvdnav/configure.ac @@ -14,7 +14,7 @@ dnl These are defined in m4 so they can be passed to AC_INIT dnl -------------------------------------------------------------- m4_define([dvdnav_major], [4]) m4_define([dvdnav_minor], [2]) -m4_define([dvdnav_sub], [0]) +m4_define([dvdnav_sub], [1]) m4_define([dvdnav_pre], []) AC_INIT([libdvdnav], [dvdnav_major.dvdnav_minor.dvdnav_sub[]dvdnav_pre]) diff --git a/lib/libdvd/libdvdnav/configure2 b/lib/libdvd/libdvdnav/configure2 index 8c3b917c2b..298b0f8093 100755 --- a/lib/libdvd/libdvdnav/configure2 +++ b/lib/libdvd/libdvdnav/configure2 @@ -1,6 +1,6 @@ #!/bin/sh -dvdnav_sh_version=4.2.0 +dvdnav_sh_version=4.2.1 dvdnav_sh_major=`echo $dvdnav_sh_version | awk -F. '{print $1}'` cc=gcc diff --git a/lib/libdvd/libdvdnav/src/dvdnav.c b/lib/libdvd/libdvdnav/src/dvdnav.c index 6009b37f6c..7b2ff892a4 100644 --- a/lib/libdvd/libdvdnav/src/dvdnav.c +++ b/lib/libdvd/libdvdnav/src/dvdnav.c @@ -203,7 +203,7 @@ int64_t dvdnav_convert_time(dvd_time_t *time) { int64_t result; int64_t frames; - result = (time->hour >> 4 ) * 10 * 60 * 60 * 90000; + result = (time->hour >> 4 ) * 10 * 60 * 60 * 90000ull; result += (time->hour & 0x0f) * 60 * 60 * 90000; result += (time->minute >> 4 ) * 10 * 60 * 90000; result += (time->minute & 0x0f) * 60 * 90000; @@ -336,10 +336,9 @@ static int32_t dvdnav_get_vobu(dvdnav_t *this, dsi_t *nav_dsi, pci_t *nav_pci, d dvdnav_angle_change(this, 1); } #endif - /* only use ILVU information if we are at the last vobunit in ILVU */ /* otherwise we will miss nav packets from vobunits inbetween */ - if(num_angle != 0 && (nav_dsi->sml_pbi.category & 0x5000) == 0x5000 ) { + if(num_angle != 0 && (nav_dsi->sml_pbi.category & DSI_ILVU_MASK) == (DSI_ILVU_BLOCK | DSI_ILVU_LAST)) { if((next = nav_pci->nsml_agli.nsml_agl_dsta[angle-1]) != 0) { if((next & 0x3fffffff) != 0) { @@ -1163,7 +1162,7 @@ user_ops_t dvdnav_get_restrictions(dvdnav_t* this) { union { user_ops_t ops_struct; uint32_t ops_int; - } ops; + } ops, tmp; ops.ops_int = 0; @@ -1171,16 +1170,19 @@ user_ops_t dvdnav_get_restrictions(dvdnav_t* this) { printerr("Passed a NULL pointer."); return ops.ops_struct; } + if(!this->started) { printerr("Virtual DVD machine not started."); return ops.ops_struct; } pthread_mutex_lock(&this->vm_lock); - ops.ops_int |= *(uint32_t*)&this->pci.pci_gi.vobu_uop_ctl; + ops.ops_struct = this->pci.pci_gi.vobu_uop_ctl; - if(this->vm && this->vm->state.pgc) - ops.ops_int |= *(uint32_t*)&this->vm->state.pgc->prohibited_ops; + if(this->vm && this->vm->state.pgc) { + tmp.ops_struct = this->vm->state.pgc->prohibited_ops; + ops.ops_int |= tmp.ops_int; + } pthread_mutex_unlock(&this->vm_lock); return ops.ops_struct; @@ -1193,68 +1195,6 @@ vm_t* dvdnav_get_vm(dvdnav_t *this) { return this->vm; } -int dvdnav_get_nr_of_subtitle_streams(dvdnav_t *this) -{ - int i; - int count = 0; - - if (this && this->vm && this->vm->state.pgc) - { - for (i = 0; i < 32; i++) - { - if (this->vm->state.pgc->subp_control[i] & (1<<31)) count++; - } - } - return count; - - /* old code - if(!this || !this->vm || !this->vm->vtsi || !this->vm->vtsi->vtsi_mat) return 0; - - switch ((this->vm->state).domain) { - case VTS_DOMAIN: - return this->vm->vtsi->vtsi_mat->nr_of_vts_subp_streams; - case VTSM_DOMAIN: - return this->vm->vtsi->vtsi_mat->nr_of_vtsm_subp_streams; // 1 - case VMGM_DOMAIN: - case FP_DOMAIN: - return this->vm->vmgi->vmgi_mat->nr_of_vmgm_subp_streams; // 1 - } - - return 0; - */ -} - -int dvdnav_get_nr_of_audio_streams(dvdnav_t *this) -{ - int i; - int count = 0; - - if (this && this->vm && this->vm->state.pgc) - { - for (i = 0; i < 8; i++) - { - if (this->vm->state.pgc->audio_control[i] & (1<<15)) count++; - } - } - return count; - - /* old code - if(!this || !this->vm || !this->vm->vtsi || !this->vm->vtsi->vtsi_mat) return 0; - - switch ((this->vm->state).domain) { - case VTS_DOMAIN: - return this->vm->vtsi->vtsi_mat->nr_of_vts_audio_streams; - case VTSM_DOMAIN: - return this->vm->vtsi->vtsi_mat->nr_of_vtsm_audio_streams; // 1 - case VMGM_DOMAIN: - case FP_DOMAIN: - return this->vm->vmgi->vmgi_mat->nr_of_vmgm_audio_streams; // 1 - } - - return 0; - */ -} - /* return the alpha and color for the current active button * color, alpha [0][] = selection * color, alpha = color @@ -1290,158 +1230,7 @@ int dvdnav_get_button_info(dvdnav_t* this, int alpha[2][4], int color[2][4]) return 0; } -/* - * the next stuff is taken from ratdvd - */ - #undef printerr #define printerr(str) strncpy(self->err_str, str, MAX_ERR_LEN); -dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes) -{ - if(!self) { - printerr("Passed a NULL pointer."); - return -1; - } - if(!self->started) { - printerr("Virtual DVD machine not started."); - return -1; - } - - pthread_mutex_lock(&self->vm_lock); - audio_attr_t attributes = vm_get_audio_attr(self->vm,streamid); - pthread_mutex_unlock(&self->vm_lock); - audio_attributes->audio_format = attributes.audio_format; - audio_attributes->multichannel_extension = attributes.multichannel_extension; - audio_attributes->lang_type = attributes.lang_type; - audio_attributes->application_mode = attributes.application_mode; - audio_attributes->quantization = attributes.quantization; - audio_attributes->sample_frequency = attributes.sample_frequency; - audio_attributes->channels = attributes.channels; - audio_attributes->lang_code = attributes.lang_code; - audio_attributes->lang_extension = attributes.lang_extension; - audio_attributes->code_extension = attributes.code_extension; - audio_attributes->unknown3 = attributes.unknown3; - audio_attributes->app_info = attributes.app_info; - return DVDNAV_STATUS_OK; -} - -dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self - , int32_t streamid, subp_attr_t* stitle_attributes) -{ - if(!self) { - printerr("Passed a NULL pointer."); - return -1; - } - if(!self->started) { - printerr("Virtual DVD machine not started."); - return -1; - } - - pthread_mutex_lock(&self->vm_lock); - subp_attr_t attributes = vm_get_subp_attr(self->vm,streamid); - pthread_mutex_unlock(&self->vm_lock); - stitle_attributes->code_mode = attributes.code_mode; - stitle_attributes->zero1 = attributes.zero1; - stitle_attributes->type = attributes.type; - stitle_attributes->zero2 = attributes.zero2; - stitle_attributes->lang_code = attributes.lang_code; - stitle_attributes->lang_extension = attributes.lang_extension; - stitle_attributes->code_extension = attributes.code_extension; - return DVDNAV_STATUS_OK; -} - -dvdnav_status_t dvdnav_get_video_info(dvdnav_t * self, video_attr_t* video_attributes) -{ - if(!self) { - printerr("Passed a NULL pointer."); - return -1; - } - if(!self->started) { - printerr("Virtual DVD machine not started."); - return -1; - } - - pthread_mutex_lock(&self->vm_lock); - video_attr_t attributes = vm_get_video_attr(self->vm); - pthread_mutex_unlock(&self->vm_lock); - - video_attributes->video_format = attributes.video_format; - video_attributes->permitted_df = attributes.permitted_df; - video_attributes->display_aspect_ratio = attributes.display_aspect_ratio; - video_attributes->mpeg_version = attributes.mpeg_version; - video_attributes->film_mode = attributes.film_mode; - video_attributes->letterboxed = attributes.letterboxed; - video_attributes->picture_size = attributes.picture_size; - video_attributes->bit_rate = attributes.bit_rate; - video_attributes->unknown1 = attributes.unknown1; - video_attributes->line21_cc_2 = attributes.line21_cc_2; - video_attributes->line21_cc_1 = attributes.line21_cc_1; - return DVDNAV_STATUS_OK; -} - -dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio) -{ - int32_t num; - - if(!self) { - printerr("Passed a NULL pointer."); - return DVDNAV_STATUS_ERR; - } - - num = dvdnav_get_nr_of_audio_streams(self); - pthread_mutex_lock(&self->vm_lock); - /* Set subp AUDIO if valid */ - if((audio >= 0) && (audio <= num)) { - self->vm->state.AST_REG = audio; - } else { - //printerr("Passed an invalid audio number."); - pthread_mutex_unlock(&self->vm_lock); - return DVDNAV_STATUS_ERR; - } - pthread_mutex_unlock(&self->vm_lock); - - return DVDNAV_STATUS_OK; -} - -dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture) -{ - int32_t num; - - if(!self) { - printerr("Passed a NULL pointer."); - return DVDNAV_STATUS_ERR; - } - - num = dvdnav_get_nr_of_subtitle_streams(self); - pthread_mutex_lock(&self->vm_lock); - /* Set subp SPRM if valid */ - if((subpicture >= 0) && (subpicture <= num)) { - self->vm->state.SPST_REG = subpicture | 0x40; - } else if (subpicture & 0x80) { - self->vm->state.SPST_REG = subpicture & ~0x80; - } else { - self->vm->state.SPST_REG = subpicture; - //printerr("Passed an invalid subpicture number."); - //pthread_mutex_unlock(&self->vm_lock); - //return DVDNAV_STATUS_ERR; - } - pthread_mutex_unlock(&self->vm_lock); - - return DVDNAV_STATUS_OK; -} - -void dvdnav_lock(dvdnav_t *self) -{ - // we do not check for null pointer problems - pthread_mutex_lock(&self->vm_lock); -} - -void dvdnav_unlock(dvdnav_t *self) -{ - // we do not check for null pointer problems - pthread_mutex_unlock(&self->vm_lock); -} - #endif // _XBMC - diff --git a/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h b/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h index 506a2867d3..bf6aae9d2a 100644 --- a/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h +++ b/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h @@ -275,7 +275,7 @@ dvdnav_status_t dvdnav_part_play(dvdnav_t *self, int32_t title, int32_t part); /* * Plays the specified title, starting from the specified program */ -dvdnav_status_t dvdnav_program_play(dvdnav_t *this, int32_t title, int32_t pgcn, int32_t pgn); +dvdnav_status_t dvdnav_program_play(dvdnav_t *self, int32_t title, int32_t pgcn, int32_t pgn); /* * Stores in *times an array (that the application *must* free) of @@ -384,7 +384,7 @@ dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this, * Stop playing the current position and start playback of the title * from the specified timecode. * - * Currently unimplemented! + * Currently implemented using interpolation, which is slightly inaccurate. */ dvdnav_status_t dvdnav_time_search(dvdnav_t *self, uint64_t time); @@ -697,42 +697,6 @@ int8_t dvdnav_is_domain_vtsm(dvdnav_t *self); */ int8_t dvdnav_is_domain_vts(dvdnav_t *self); -////////// RATDVD stuff /////////////// - -/* - * Get the number of audio streams. - */ -int32_t dvdnav_get_audio_stream_count(dvdnav_t * self); - -/* - * Get the number of subpicture streams. - */ -int32_t dvdnav_get_subpicture_stream_count(dvdnav_t * self); - -/* - * Get attributes of the current audio stream. - */ -dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes); - -/* - * Get attributes of the current subpicture stream. - */ -dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self, int32_t streamid, subp_attr_t* stitle_attributes); - -/* - * Get information about the current video stream - */ -dvdnav_status_t dvdnav_get_video_info(dvdnav_t * self, video_attr_t* video_attributes); - -/* - * Select the audio stream to be played - */ -dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio); - -/* - * Select the spu stream to be displayed - */ -dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture); #ifdef __cplusplus } diff --git a/lib/libdvd/libdvdnav/src/dvdnav_internal.h b/lib/libdvd/libdvdnav/src/dvdnav_internal.h index df26014d8d..8fdd1f0904 100644 --- a/lib/libdvd/libdvdnav/src/dvdnav_internal.h +++ b/lib/libdvd/libdvdnav/src/dvdnav_internal.h @@ -76,6 +76,14 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz ) #define DVD_VIDEO_LB_LEN 2048 #endif +typedef enum { + DSI_ILVU_PRE = 1 << 15, /* set during the last 3 VOBU preceeding an interleaved block. */ + DSI_ILVU_BLOCK = 1 << 14, /* set for all VOBU in an interleaved block */ + DSI_ILVU_FIRST = 1 << 13, /* set for the first VOBU for a given angle or scene within a ILVU, or the first VOBU in the preparation (PREU) sequence */ + DSI_ILVU_LAST = 1 << 12, /* set for the last VOBU for a given angle or scene within a ILVU, or the last VOBU in the preparation (PREU) sequence */ + DSI_ILVU_MASK = 0xf000 +} DSI_ILVU; + typedef struct read_cache_s read_cache_t; /* diff --git a/lib/libdvd/libdvdnav/src/navigation.c b/lib/libdvd/libdvdnav/src/navigation.c index efce45e102..6f8a080b06 100644 --- a/lib/libdvd/libdvdnav/src/navigation.c +++ b/lib/libdvd/libdvdnav/src/navigation.c @@ -268,9 +268,11 @@ dvdnav_status_t dvdnav_stop(dvdnav_t *this) { dvdnav_status_t dvdnav_go_up(dvdnav_t *this) { /* A nice easy function... delegate to the VM */ + int32_t retval; + pthread_mutex_lock(&this->vm_lock); - vm_jump_up(this->vm); + retval = vm_jump_up(this->vm); pthread_mutex_unlock(&this->vm_lock); - return DVDNAV_STATUS_OK; + return retval ? DVDNAV_STATUS_OK : DVDNAV_STATUS_ERR; } diff --git a/lib/libdvd/libdvdnav/src/remap.c b/lib/libdvd/libdvdnav/src/remap.c index f1dea937c4..4632a49dab 100644 --- a/lib/libdvd/libdvdnav/src/remap.c +++ b/lib/libdvd/libdvdnav/src/remap.c @@ -22,6 +22,7 @@ #include <stdlib.h> #include <string.h> +#include <strings.h> #include <stdio.h> #ifndef _MSC_VER diff --git a/lib/libdvd/libdvdnav/src/searching.c b/lib/libdvd/libdvdnav/src/searching.c index 0115e2fa21..3f4a6df1e4 100644 --- a/lib/libdvd/libdvdnav/src/searching.c +++ b/lib/libdvd/libdvdnav/src/searching.c @@ -709,13 +709,41 @@ uint32_t dvdnav_describe_title_chapters(dvdnav_t *this, int32_t title, uint64_t length = 0; for(i=0; i<parts; i++) { uint32_t cellnr, endcellnr; + if (ptt[i].pgcn == 0 || ptt[i].pgcn > ifo->vts_pgcit->nr_of_pgci_srp) { + printerr("PGCN out of bounds."); + continue; + } + if (ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc_start_byte >= ifo->vts_pgcit->last_byte) { + printerr("PGC start out of bounds"); + continue; + } pgc = ifo->vts_pgcit->pgci_srp[ptt[i].pgcn-1].pgc; - if(ptt[i].pgn > pgc->nr_of_programs) { + if (pgc == NULL) { + printerr("PGC missing."); + continue; + } + if (pgc->program_map == NULL) { + printerr("Program map missing."); + continue; + } + if(ptt[i].pgn == 0 || ptt[i].pgn > pgc->nr_of_programs) { printerr("WRONG part number."); goto fail; } - cellnr = pgc->program_map[ptt[i].pgn-1]; + if (pgc->nr_of_cells == 0) { + printerr("Number of cells cannot be 0"); + continue; + } + if ((cellnr = pgc->program_map[ptt[i].pgn-1]) == 0) { + printerr("Cell new row cannot be 0"); + continue; + } + if (pgc->cell_playback == NULL) { + printerr("Cell missing"); + continue; + } + if(ptt[i].pgn < pgc->nr_of_programs) endcellnr = pgc->program_map[ptt[i].pgn]; else diff --git a/lib/libdvd/libdvdnav/src/vm/vm.c b/lib/libdvd/libdvdnav/src/vm/vm.c index a14e6750af..6040a6fd15 100644 --- a/lib/libdvd/libdvdnav/src/vm/vm.c +++ b/lib/libdvd/libdvdnav/src/vm/vm.c @@ -59,7 +59,7 @@ #endif /* -#define STRICT +#define DVDNAV_STRICT */ /* Local prototypes */ @@ -272,7 +272,7 @@ static int ifoOpenNewVTSI(vm_t *vm, dvd_reader_t *dvd, int vtsN) { /* Initialisation & Destruction */ vm_t* vm_new_vm() { - return (vm_t*)calloc(sizeof(vm_t), sizeof(char)); + return (vm_t*)calloc(1, sizeof(vm_t)); } void vm_free_vm(vm_t *vm) { @@ -358,6 +358,8 @@ int vm_reset(vm_t *vm, const char *dvdroot) { (vm->state).vtsN = -1; + vm->hop_channel = 0; + if (vm->dvd && dvdroot) { /* a new dvd device has been requested */ vm_stop(vm); @@ -861,7 +863,7 @@ void vm_get_angle_info(vm_t *vm, int *current, int *num_avail) { } } -// XBMC #if 0 +#if 0 /* currently unused */ void vm_get_audio_info(vm_t *vm, int *current, int *num_avail) { switch ((vm->state).domain) { @@ -899,7 +901,7 @@ void vm_get_subp_info(vm_t *vm, int *current, int *num_avail) { break; } } -// XBMC #endif +#endif void vm_get_video_res(vm_t *vm, int *width, int *height) { video_attr_t attr = vm_get_video_attr(vm); @@ -1144,7 +1146,7 @@ static link_t play_Cell(vm_t *vm) { case 1: /* Angle block */ /* Loop and check each cell instead? So we don't get outside the block? */ (vm->state).cellN += (vm->state).AGL_REG - 1; -#ifdef STRICT +#ifdef DVDNAV_STRICT assert((vm->state).cellN <= (vm->state).pgc->nr_of_cells); assert((vm->state).pgc->cell_playback[(vm->state).cellN - 1].block_mode != 0); assert((vm->state).pgc->cell_playback[(vm->state).cellN - 1].block_type == 1); @@ -1777,7 +1779,8 @@ static int set_PGCN(vm_t *vm, int pgcN) { pgcit_t *pgcit; pgcit = get_PGCIT(vm); - assert(pgcit != NULL); /* ?? Make this return -1 instead */ + if (pgcit == NULL) + return 0; if(pgcN < 1 || pgcN > pgcit->nr_of_pgci_srp) { #ifdef TRACE diff --git a/lib/libdvd/libdvdnav/src/vm/vm.h b/lib/libdvd/libdvdnav/src/vm/vm.h index 2405489c69..3e754ab74d 100644 --- a/lib/libdvd/libdvdnav/src/vm/vm.h +++ b/lib/libdvd/libdvdnav/src/vm/vm.h @@ -156,11 +156,11 @@ int vm_get_subp_stream(vm_t *vm, int subpN, int mode); int vm_get_audio_active_stream(vm_t *vm); int vm_get_subp_active_stream(vm_t *vm, int mode); void vm_get_angle_info(vm_t *vm, int *current, int *num_avail); -// _XBMC #if 0 +#if 0 /* currently unused */ void vm_get_audio_info(vm_t *vm, int *current, int *num_avail); void vm_get_subp_info(vm_t *vm, int *current, int *num_avail); -// _XBMC #endif +#endif void vm_get_video_res(vm_t *vm, int *width, int *height); int vm_get_video_aspect(vm_t *vm); int vm_get_video_scale_permission(vm_t *vm); diff --git a/lib/libdvd/libdvdnav/version.h b/lib/libdvd/libdvdnav/version.h index 8a8730651b..ddbe066ef1 100644 --- a/lib/libdvd/libdvdnav/version.h +++ b/lib/libdvd/libdvdnav/version.h @@ -1 +1 @@ -#define VERSION "4.2.0" +#define VERSION "4.2.1" diff --git a/lib/libdvd/libdvdread/ChangeLog b/lib/libdvd/libdvdread/ChangeLog index ab8eaaeceb..5d074bfe20 100644 --- a/lib/libdvd/libdvdread/ChangeLog +++ b/lib/libdvd/libdvdread/ChangeLog @@ -1,3 +1,9 @@ +libdvdread (4.2.1) + * fix huge memory consumption when reading DVDs: "Up" and "Dark Knight" + * fix segfault when reading DVDs: "The Express", "Transformers 3" + and "Cars 2" + * fix packed structures with mingw gcc >= 4.7 + libdvdread (4.2.0) * added OS/2 support * fixed ARM memory alignment issue diff --git a/lib/libdvd/libdvdread/configure.ac b/lib/libdvd/libdvdread/configure.ac index 596a752c7c..79da93f855 100644 --- a/lib/libdvd/libdvdread/configure.ac +++ b/lib/libdvd/libdvdread/configure.ac @@ -14,11 +14,12 @@ dnl These are defined in m4 so they can be passed to AC_INIT dnl -------------------------------------------------------------- m4_define([dvdread_major], [4]) m4_define([dvdread_minor], [2]) -m4_define([dvdread_sub], [0]) +m4_define([dvdread_sub], [1]) m4_define([dvdread_pre], []) AC_INIT([libdvdread], [dvdread_major.dvdread_minor.dvdread_sub[]dvdread_pre]) AC_CONFIG_SRCDIR([src/dvdread/dvd_reader.h]) +m4_include([m4/ax_check_compile_flag.m4]) AM_INIT_AUTOMAKE([1.6]) dnl create a config.h file (Automake will add -DHAVE_CONFIG_H) @@ -168,6 +169,11 @@ DEBUG_CFLAGS="-g -DDEBUG $CFLAGS" AC_SUBST(DEBUG_CFLAGS) dnl --------------------------------------------- +dnl Check for bitfield compiler flag +dnl --------------------------------------------- +AX_CHECK_COMPILE_FLAG([-mno-ms-bitfields], [CFLAGS="-mno-ms-bitfields $CFLAGS"]) + +dnl --------------------------------------------- dnl Check for doxygen (dynamic documentation generator) dnl --------------------------------------------- AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, no) diff --git a/lib/libdvd/libdvdread/configure2 b/lib/libdvd/libdvdread/configure2 index f9facbee7d..e2cdb9e0c1 100755 --- a/lib/libdvd/libdvdread/configure2 +++ b/lib/libdvd/libdvdread/configure2 @@ -1,6 +1,6 @@ #!/bin/sh -dvdread_sh_version=4.2.0 +dvdread_sh_version=4.2.1 dvdread_sh_major=`echo $dvdread_sh_version | awk -F. '{print $1}'` cc=gcc @@ -121,6 +121,18 @@ od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && bigendian=yes rm -rf $TMPD echo "$bigendian" +echo -n "Checking for -mno-ms-bitfields flag support... " +no_ms_bitfields=no +TMPD=`mktemp -d` +TMPC=$TMPD/no_ms_bitfields.c +TMPO=$TMPD/no_ms_bitfields.o +cat > $TMPC <<EOF +int main(void) { return 0; } +EOF +$cc $optimizations $cflags -mno-ms-bitfields -c -o $TMPO $TMPC && no_ms_bitfields=yes && cflags="$cflags -mno-ms-bitfields" +rm -rf $TMPD +echo "$no_ms_bitfields" + cat > config.mak << EOF # Automatically generated by configure, do not edit PREFIX=$PREFIX @@ -149,7 +161,7 @@ cat > config.h << EOF /* Automatically generated by configure, do not edit */ #include "version.h" EOF -test "$bigendian" = "yes" && echo "#define WORDS_BIGENDIAN" || echo "#undef WORDS_BIGENDIAN" >> config.h +test "$bigendian" = "yes" && echo "#define WORDS_BIGENDIAN" >> config.h || echo "#undef WORDS_BIGENDIAN" >> config.h # build tree in object directory if source path is different from current one if test "$source_path_used" != "no"; then diff --git a/lib/libdvd/libdvdread/m4/ax_check_compile_flag.m4 b/lib/libdvd/libdvdread/m4/ax_check_compile_flag.m4 new file mode 100644 index 0000000000..c3a8d695a1 --- /dev/null +++ b/lib/libdvd/libdvdread/m4/ax_check_compile_flag.m4 @@ -0,0 +1,72 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> +# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program. If not, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 2 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS diff --git a/lib/libdvd/libdvdread/src/dvd_input.c b/lib/libdvd/libdvdread/src/dvd_input.c index 43b8292afa..4a0252431a 100644 --- a/lib/libdvd/libdvdread/src/dvd_input.c +++ b/lib/libdvd/libdvdread/src/dvd_input.c @@ -43,7 +43,6 @@ char * (*dvdinput_error) (dvd_input_t); #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 @@ -56,19 +55,19 @@ char * (*dvdinput_error) (dvd_input_t); #include "../../msvc/contrib/dlfcn.c" #endif -typedef struct dvdcss_s *dvdcss_handle; -static dvdcss_handle (*DVDcss_open) (const char *); -static int (*DVDcss_close) (dvdcss_handle); -static int (*DVDcss_seek) (dvdcss_handle, int, int); -static int (*DVDcss_title) (dvdcss_handle, int); -static int (*DVDcss_read) (dvdcss_handle, void *, int, int); -static char * (*DVDcss_error) (dvdcss_handle); +typedef struct dvdcss_s *dvdcss_t; +static dvdcss_t (*DVDcss_open) (const char *); +static int (*DVDcss_close) (dvdcss_t); +static int (*DVDcss_seek) (dvdcss_t, int, int); +static int (*DVDcss_read) (dvdcss_t, void *, int, int); +static char * (*DVDcss_error) (dvdcss_t); +#define DVDCSS_SEEK_KEY (1 << 1) #endif /* The DVDinput handle, add stuff here for new input methods. */ struct dvd_input_s { /* libdvdcss handle */ - dvdcss_handle dvdcss; + dvdcss_t dvdcss; /* dummy file input */ int fd; @@ -122,7 +121,7 @@ static int css_seek(dvd_input_t dev, int blocks) */ static int css_title(dvd_input_t dev, int block) { - return DVDcss_title(dev->dvdcss, block); + return DVDcss_seek(dev->dvdcss, block, DVDCSS_SEEK_KEY); } /** @@ -272,13 +271,10 @@ static int file_close(dvd_input_t dev) int dvdinput_setup(void) { void *dvdcss_library = NULL; - char **dvdcss_version = NULL; #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 /* dlopening libdvdcss */ @@ -286,7 +282,7 @@ int dvdinput_setup(void) #ifdef __APPLE__ #define CSS_LIB "libdvdcss.2.dylib" #elif defined(WIN32) - #define CSS_LIB "libdvdcss.dll" + #define CSS_LIB "libdvdcss-2.dll" #elif defined(__OS2__) #define CSS_LIB "dvdcss.dll" #else @@ -300,21 +296,17 @@ int dvdinput_setup(void) #else #define U_S #endif - DVDcss_open = (dvdcss_handle (*)(const char*)) + DVDcss_open = (dvdcss_t (*)(const char*)) dlsym(dvdcss_library, U_S "dvdcss_open"); - DVDcss_close = (int (*)(dvdcss_handle)) + DVDcss_close = (int (*)(dvdcss_t)) 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)) + DVDcss_seek = (int (*)(dvdcss_t, int, int)) dlsym(dvdcss_library, U_S "dvdcss_seek"); - DVDcss_read = (int (*)(dvdcss_handle, void*, int, int)) + DVDcss_read = (int (*)(dvdcss_t, void*, int, int)) dlsym(dvdcss_library, U_S "dvdcss_read"); - DVDcss_error = (char* (*)(dvdcss_handle)) + DVDcss_error = (char* (*)(dvdcss_t)) 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")) { fprintf(stderr, "libdvdread: Old (pre-0.0.2) version of libdvdcss found.\n" @@ -322,8 +314,8 @@ int dvdinput_setup(void) "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) { + } else if(!DVDcss_open || !DVDcss_close || !DVDcss_seek + || !DVDcss_read || !DVDcss_error) { fprintf(stderr, "libdvdread: Missing symbols in %s, " "this shouldn't happen !\n", CSS_LIB); dlclose(dvdcss_library); @@ -338,8 +330,6 @@ int dvdinput_setup(void) fprintf(stderr, "DVDCSS_METHOD %s\n", psz_method); fprintf(stderr, "DVDCSS_VERBOSE %s\n", psz_verbose); */ - fprintf(stderr, "libdvdread: Using libdvdcss version %s for DVD access\n", - dvdcss_version ? *dvdcss_version : ""); /* libdvdcss wrapper functions */ dvdinput_open = css_open; diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c index 57dd2d0fe2..f8df635797 100644 --- a/lib/libdvd/libdvdread/src/dvd_reader.c +++ b/lib/libdvd/libdvdread/src/dvd_reader.c @@ -28,6 +28,7 @@ #include <stdio.h> #include <errno.h> #include <string.h> +#include <strings.h> #include <ctype.h> #include <unistd.h> #include <limits.h> diff --git a/lib/libdvd/libdvdread/src/dvd_udf.c b/lib/libdvd/libdvdread/src/dvd_udf.c index 81491d8b38..9d1976dbb7 100644 --- a/lib/libdvd/libdvdread/src/dvd_udf.c +++ b/lib/libdvd/libdvdread/src/dvd_udf.c @@ -31,6 +31,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <sys/types.h> #include <sys/stat.h> @@ -593,8 +594,10 @@ static int UDFScanDir( dvd_reader_t *device, struct AD Dir, char *FileName, } else in_cache = 1; - if(cached_dir == NULL) + if(cached_dir == NULL) { + free(cached_dir_base); return 0; + } p = 0; diff --git a/lib/libdvd/libdvdread/src/dvdread/ifo_types.h b/lib/libdvd/libdvdread/src/dvdread/ifo_types.h index 7db7d34dbb..aa4c9d3393 100644 --- a/lib/libdvd/libdvdread/src/dvdread/ifo_types.h +++ b/lib/libdvd/libdvdread/src/dvdread/ifo_types.h @@ -301,6 +301,7 @@ typedef struct { pgc_program_map_t *program_map; cell_playback_t *cell_playback; cell_position_t *cell_position; + int ref_count; } ATTRIBUTE_PACKED pgc_t; #define PGC_SIZE 236U @@ -326,6 +327,7 @@ typedef struct { uint16_t zero_1; uint32_t last_byte; pgci_srp_t *pgci_srp; + int ref_count; } ATTRIBUTE_PACKED pgcit_t; #define PGCIT_SIZE 8U diff --git a/lib/libdvd/libdvdread/src/ifo_print.c b/lib/libdvd/libdvdread/src/ifo_print.c index 4d4eb885b9..38b1b75c4d 100644 --- a/lib/libdvd/libdvdread/src/ifo_print.c +++ b/lib/libdvd/libdvdread/src/ifo_print.c @@ -1189,10 +1189,10 @@ void ifo_print(dvd_reader_t *dvd, int title) { if(ifohandle->menu_vobu_admap) { ifoPrint_VOBU_ADMAP(ifohandle->menu_vobu_admap); } else { - printf("No Menu VOBU address map present\n"); + printf("No Menu VOBU Address map present\n"); } - printf("\nCell Adress table\n"); + printf("\nCell Address table\n"); printf( "-----------------\n"); ifoPrint_C_ADT(ifohandle->vts_c_adt); diff --git a/lib/libdvd/libdvdread/src/ifo_read.c b/lib/libdvd/libdvdread/src/ifo_read.c index 1bf1d6702d..76c9fafcb9 100644 --- a/lib/libdvd/libdvdread/src/ifo_read.c +++ b/lib/libdvd/libdvdread/src/ifo_read.c @@ -87,9 +87,9 @@ static int ifoRead_VOBU_ADMAP_internal(ifo_handle_t *ifofile, static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit, unsigned int offset); -static void ifoFree_PGC(pgc_t *pgc); +static void ifoFree_PGC(pgc_t **pgc); static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl); -static void ifoFree_PGCIT_internal(pgcit_t *pgcit); +static void ifoFree_PGCIT_internal(pgcit_t **pgcit); static inline int DVDFileSeekForce_( dvd_file_t *dvd_file, uint32_t offset, int force_size ) { return (DVDFileSeekForce(dvd_file, (int)offset, force_size) == (int)offset); @@ -568,6 +568,8 @@ static int ifoRead_VMG(ifo_handle_t *ifofile) { CHECK_ZERO(vmgi_mat->zero_1); CHECK_ZERO(vmgi_mat->zero_2); + /* DVDs created by VDR-to-DVD device LG RC590M violate the following check with + * vmgi_mat->zero_3 = 0x00000000010000000000000000000000000000. */ CHECK_ZERO(vmgi_mat->zero_3); CHECK_ZERO(vmgi_mat->zero_4); CHECK_ZERO(vmgi_mat->zero_5); @@ -923,7 +925,6 @@ static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int offset) { if(!ifoRead_PGC_COMMAND_TBL(ifofile, pgc->command_tbl, offset + pgc->command_tbl_offset)) { - free(pgc->command_tbl); return 0; } } else { @@ -933,13 +934,10 @@ static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int offset) { if(pgc->program_map_offset != 0 && pgc->nr_of_programs>0) { pgc->program_map = malloc(pgc->nr_of_programs * sizeof(pgc_program_map_t)); if(!pgc->program_map) { - ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); return 0; } if(!ifoRead_PGC_PROGRAM_MAP(ifofile, pgc->program_map,pgc->nr_of_programs, offset + pgc->program_map_offset)) { - ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); - free(pgc->program_map); return 0; } } else { @@ -949,18 +947,11 @@ static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int offset) { if(pgc->cell_playback_offset != 0 && pgc->nr_of_cells>0) { pgc->cell_playback = malloc(pgc->nr_of_cells * sizeof(cell_playback_t)); if(!pgc->cell_playback) { - ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); - if(pgc->program_map) - free(pgc->program_map); return 0; } if(!ifoRead_CELL_PLAYBACK_TBL(ifofile, pgc->cell_playback, pgc->nr_of_cells, offset + pgc->cell_playback_offset)) { - ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); - if(pgc->program_map) - free(pgc->program_map); - free(pgc->cell_playback); return 0; } } else { @@ -970,13 +961,11 @@ static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int offset) { if(pgc->cell_position_offset != 0 && pgc->nr_of_cells>0) { pgc->cell_position = malloc(pgc->nr_of_cells * sizeof(cell_position_t)); if(!pgc->cell_position) { - ifoFree_PGC(pgc); return 0; } if(!ifoRead_CELL_POSITION_TBL(ifofile, pgc->cell_position, pgc->nr_of_cells, offset + pgc->cell_position_offset)) { - ifoFree_PGC(pgc); return 0; } } else { @@ -999,29 +988,33 @@ int ifoRead_FP_PGC(ifo_handle_t *ifofile) { if(ifofile->vmgi_mat->first_play_pgc == 0) return 1; - ifofile->first_play_pgc = (pgc_t *)malloc(sizeof(pgc_t)); + ifofile->first_play_pgc = (pgc_t *)calloc(1, sizeof(pgc_t)); if(!ifofile->first_play_pgc) return 0; + ifofile->first_play_pgc->ref_count = 1; if(!ifoRead_PGC(ifofile, ifofile->first_play_pgc, ifofile->vmgi_mat->first_play_pgc)) { - free(ifofile->first_play_pgc); - ifofile->first_play_pgc = 0; + ifoFree_PGC(&ifofile->first_play_pgc); return 0; } return 1; } -static void ifoFree_PGC(pgc_t *pgc) { - if(pgc) { - ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); - if(pgc->program_map) - free(pgc->program_map); - if(pgc->cell_playback) - free(pgc->cell_playback); - if(pgc->cell_position) - free(pgc->cell_position); +static void ifoFree_PGC(pgc_t **pgc) { + if(pgc && *pgc && (--(*pgc)->ref_count) <= 0) { + ifoFree_PGC_COMMAND_TBL((*pgc)->command_tbl); + if((*pgc)->program_map) + free((*pgc)->program_map); + if((*pgc)->cell_playback) + free((*pgc)->cell_playback); + if((*pgc)->cell_position) + free((*pgc)->cell_position); + free(*pgc); + } + if (pgc) { + *pgc = NULL; } } @@ -1030,9 +1023,7 @@ void ifoFree_FP_PGC(ifo_handle_t *ifofile) { return; if(ifofile->first_play_pgc) { - ifoFree_PGC(ifofile->first_play_pgc); - free(ifofile->first_play_pgc); - ifofile->first_play_pgc = 0; + ifoFree_PGC(&ifofile->first_play_pgc); } } @@ -1082,6 +1073,12 @@ int ifoRead_TT_SRPT(ifo_handle_t *ifofile) { return 0; } + if(tt_srpt->nr_of_srpts>info_length/sizeof(title_info_t)){ + fprintf(stderr,"libdvdread: data mismatch: info_length (%ld)!= nr_of_srpts (%d). Truncating.\n", + info_length/sizeof(title_info_t),tt_srpt->nr_of_srpts); + tt_srpt->nr_of_srpts=info_length/sizeof(title_info_t); + } + for(i = 0; i < tt_srpt->nr_of_srpts; i++) { B2N_16(tt_srpt->title[i].nr_of_ptts); B2N_16(tt_srpt->title[i].parental_id); @@ -1189,8 +1186,22 @@ int ifoRead_VTS_PTT_SRPT(ifo_handle_t *ifofile) { fprintf(stderr, "libdvdread: PTT search table too small.\n"); goto fail; } + + if(vts_ptt_srpt->nr_of_srpts == 0) { + fprintf(stderr, "libdvdread: Zero entries in PTT search table.\n"); + goto fail; + } + for(i = 0; i < vts_ptt_srpt->nr_of_srpts; i++) { - B2N_32(data[i]); + /* Transformers 3 has PTT start bytes that point outside the SRPT PTT */ + uint32_t start = data[i]; + B2N_32(start); + if(start + sizeof(ptt_info_t) > vts_ptt_srpt->last_byte + 1) { + /* don't mess with any bytes beyond the end of the allocation */ + vts_ptt_srpt->nr_of_srpts = i; + break; + } + data[i] = start; /* assert(data[i] + sizeof(ptt_info_t) <= vts_ptt_srpt->last_byte + 1); Magic Knight Rayearth Daybreak is mastered very strange and has Titles with 0 PTTs. They all have a data[i] offsets beyond the end of @@ -1216,6 +1227,7 @@ int ifoRead_VTS_PTT_SRPT(ifo_handle_t *ifofile) { Titles with 0 PTTs. */ if(n < 0) n = 0; + /* DVDs created by the VDR-to-DVD device LG RC590M violate the following requirement */ CHECK_VALUE(n % 4 == 0); vts_ptt_srpt->title[i].nr_of_ptts = n / 4; @@ -1250,6 +1262,13 @@ int ifoRead_VTS_PTT_SRPT(ifo_handle_t *ifofile) { CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgcn < 1000); /* ?? */ CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgn != 0); CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgn < 100); /* ?? */ + if (vts_ptt_srpt->title[i].ptt[j].pgcn == 0 || + vts_ptt_srpt->title[i].ptt[j].pgcn >= 1000 || + vts_ptt_srpt->title[i].ptt[j].pgn == 0 || + vts_ptt_srpt->title[i].ptt[j].pgn >= 100) { + return 0; + } + } } @@ -1291,7 +1310,7 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofile) { if(!ifofile->vmgi_mat) return 0; - if(ifofile->vmgi_mat->ptl_mait == NULL) + if(ifofile->vmgi_mat->ptl_mait == 0) return 1; if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN)) @@ -1372,6 +1391,7 @@ int ifoRead_PTL_MAIT(ifo_handle_t *ifofile) { ifofile->ptl_mait = NULL; return 0; } + memset(pf_temp, 0, info_length); if(!(DVDReadBytes(ifofile->file, pf_temp, info_length))) { fprintf(stderr, "libdvdread: Unable to read PTL_MAIT table at index %d.\n",i); free(pf_temp); @@ -1434,7 +1454,7 @@ int ifoRead_VTS_TMAPT(ifo_handle_t *ifofile) { if(ifofile->vtsi_mat->vts_tmapt == 0) { /* optional(?) */ ifofile->vts_tmapt = NULL; - fprintf(stderr,"Please send bug report - no VTS_TMAPT ?? \n"); + fprintf(stderr,"libdvdread: No VTS_TMAPT available - skipping.\n"); return 1; } @@ -1818,10 +1838,11 @@ int ifoRead_PGCIT(ifo_handle_t *ifofile) { if(ifofile->vtsi_mat->vts_pgcit == 0) /* mandatory */ return 0; - ifofile->vts_pgcit = (pgcit_t *)malloc(sizeof(pgcit_t)); + ifofile->vts_pgcit = (pgcit_t *)calloc(1, sizeof(pgcit_t)); if(!ifofile->vts_pgcit) return 0; + ifofile->vts_pgcit->ref_count = 1; if(!ifoRead_PGCIT_internal(ifofile, ifofile->vts_pgcit, ifofile->vtsi_mat->vts_pgcit * DVD_BLOCK_LEN)) { free(ifofile->vts_pgcit); @@ -1832,6 +1853,17 @@ int ifoRead_PGCIT(ifo_handle_t *ifofile) { return 1; } +static int find_dup_pgc(pgci_srp_t *pgci_srp, uint32_t start_byte, int count) { + int i; + + for(i = 0; i < count; i++) { + if(pgci_srp[i].pgc_start_byte == start_byte) { + return i; + } + } + return -1; +} + static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit, unsigned int offset) { int i, info_length; @@ -1880,21 +1912,26 @@ static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit, CHECK_VALUE(pgcit->pgci_srp[i].pgc_start_byte + PGC_SIZE <= pgcit->last_byte+1); for(i = 0; i < pgcit->nr_of_pgci_srp; i++) { - pgcit->pgci_srp[i].pgc = malloc(sizeof(pgc_t)); + int dup; + if((dup = find_dup_pgc(pgcit->pgci_srp, pgcit->pgci_srp[i].pgc_start_byte, i)) >= 0) { + pgcit->pgci_srp[i].pgc = pgcit->pgci_srp[dup].pgc; + pgcit->pgci_srp[i].pgc->ref_count++; + continue; + } + pgcit->pgci_srp[i].pgc = calloc(1, sizeof(pgc_t)); if(!pgcit->pgci_srp[i].pgc) { int j; for(j = 0; j < i; j++) { - ifoFree_PGC(pgcit->pgci_srp[j].pgc); - free(pgcit->pgci_srp[j].pgc); + ifoFree_PGC(&pgcit->pgci_srp[j].pgc); } goto fail; } + pgcit->pgci_srp[i].pgc->ref_count = 1; if(!ifoRead_PGC(ifofile, pgcit->pgci_srp[i].pgc, offset + pgcit->pgci_srp[i].pgc_start_byte)) { int j; - for(j = 0; j < i; j++) { - ifoFree_PGC(pgcit->pgci_srp[j].pgc); - free(pgcit->pgci_srp[j].pgc); + for(j = 0; j <= i; j++) { + ifoFree_PGC(&pgcit->pgci_srp[j].pgc); } free(pgcit->pgci_srp[i].pgc); goto fail; @@ -1908,16 +1945,18 @@ fail: return 0; } -static void ifoFree_PGCIT_internal(pgcit_t *pgcit) { - if(pgcit) { +static void ifoFree_PGCIT_internal(pgcit_t **pgcit) { + if(pgcit && *pgcit && (--(*pgcit)->ref_count <= 0)) { int i; - for(i = 0; i < pgcit->nr_of_pgci_srp; i++) + for(i = 0; i < (*pgcit)->nr_of_pgci_srp; i++) { - ifoFree_PGC(pgcit->pgci_srp[i].pgc); - free(pgcit->pgci_srp[i].pgc); + ifoFree_PGC(&(*pgcit)->pgci_srp[i].pgc); } - free(pgcit->pgci_srp); + free((*pgcit)->pgci_srp); + free(*pgcit); } + if (pgcit) + *pgcit = NULL; } void ifoFree_PGCIT(ifo_handle_t *ifofile) { @@ -1925,12 +1964,20 @@ void ifoFree_PGCIT(ifo_handle_t *ifofile) { return; if(ifofile->vts_pgcit) { - ifoFree_PGCIT_internal(ifofile->vts_pgcit); - free(ifofile->vts_pgcit); - ifofile->vts_pgcit = 0; + ifoFree_PGCIT_internal(&ifofile->vts_pgcit); } } +static int find_dup_lut(pgci_lu_t *lu, uint32_t start_byte, int count) { + int i; + + for(i = 0; i < count; i++) { + if(lu[i].lang_start_byte == start_byte) { + return i; + } + } + return -1; +} int ifoRead_PGCI_UT(ifo_handle_t *ifofile) { pgci_ut_t *pgci_ut; @@ -2024,27 +2071,31 @@ int ifoRead_PGCI_UT(ifo_handle_t *ifofile) { } for(i = 0; i < pgci_ut->nr_of_lus; i++) { + int dup; + if((dup = find_dup_lut(pgci_ut->lu, pgci_ut->lu[i].lang_start_byte, i)) >= 0) { + pgci_ut->lu[i].pgcit = pgci_ut->lu[dup].pgcit; + pgci_ut->lu[i].pgcit->ref_count++; + continue; + } pgci_ut->lu[i].pgcit = malloc(sizeof(pgcit_t)); if(!pgci_ut->lu[i].pgcit) { unsigned int j; for(j = 0; j < i; j++) { - ifoFree_PGCIT_internal(pgci_ut->lu[j].pgcit); - free(pgci_ut->lu[j].pgcit); + ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); } free(pgci_ut->lu); free(pgci_ut); ifofile->pgci_ut = 0; return 0; } + pgci_ut->lu[i].pgcit->ref_count = 1; if(!ifoRead_PGCIT_internal(ifofile, pgci_ut->lu[i].pgcit, sector * DVD_BLOCK_LEN + pgci_ut->lu[i].lang_start_byte)) { unsigned int j; - for(j = 0; j < i; j++) { - ifoFree_PGCIT_internal(pgci_ut->lu[j].pgcit); - free(pgci_ut->lu[j].pgcit); + for(j = 0; j <= i; j++) { + ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); } - free(pgci_ut->lu[i].pgcit); free(pgci_ut->lu); free(pgci_ut); ifofile->pgci_ut = 0; @@ -2066,8 +2117,7 @@ void ifoFree_PGCI_UT(ifo_handle_t *ifofile) { if(ifofile->pgci_ut) { for(i = 0; i < ifofile->pgci_ut->nr_of_lus; i++) { - ifoFree_PGCIT_internal(ifofile->pgci_ut->lu[i].pgcit); - free(ifofile->pgci_ut->lu[i].pgcit); + ifoFree_PGCIT_internal(&ifofile->pgci_ut->lu[i].pgcit); } free(ifofile->pgci_ut->lu); free(ifofile->pgci_ut); diff --git a/lib/libdvd/libdvdread/src/md5.h b/lib/libdvd/libdvdread/src/md5.h index 810113dd82..1e5311f922 100644 --- a/lib/libdvd/libdvdread/src/md5.h +++ b/lib/libdvd/libdvdread/src/md5.h @@ -23,7 +23,7 @@ #include <stdio.h> -#if defined HAVE_LIMITS_H || _LIBC +#if defined HAVE_LIMITS_H || defined _LIBC # include <limits.h> #endif diff --git a/lib/libdvd/libdvdread/version.h b/lib/libdvd/libdvdread/version.h index 8a8730651b..ddbe066ef1 100644 --- a/lib/libdvd/libdvdread/version.h +++ b/lib/libdvd/libdvdread/version.h @@ -1 +1 @@ -#define VERSION "4.2.0" +#define VERSION "4.2.1" diff --git a/lib/libdvd/patches/01-libdvdread.diff b/lib/libdvd/patches/01-libdvdread.diff index fbf185f0dd..d31c566053 100644 --- a/lib/libdvd/patches/01-libdvdread.diff +++ b/lib/libdvd/patches/01-libdvdread.diff @@ -1,6 +1,6 @@ -diff -uwr libdvdread-4.2.0/Makefile xbmc/lib/libdvd/libdvdread/Makefile ---- libdvdread-4.2.0/Makefile 2008-12-31 09:43:04 +0100 -+++ xbmc/lib/libdvd/libdvdread/Makefile 2013-02-07 14:42:34 +0100 +diff -uwr libdvdread-4.2.1/Makefile xbmc/lib/libdvd/libdvdread/Makefile +--- libdvdread-4.2.1/Makefile Wed Dec 31 08:43:04 2008 ++++ xbmc/lib/libdvd/libdvdread/Makefile Wed Jan 29 20:43:09 2014 @@ -121,7 +121,7 @@ # Clean targets @@ -10,9 +10,12 @@ diff -uwr libdvdread-4.2.0/Makefile xbmc/lib/libdvd/libdvdread/Makefile distclean: clean -diff -uwr libdvdread-4.2.0/src/dvd_input.h xbmc/lib/libdvd/libdvdread/src/dvd_input.h ---- libdvdread-4.2.0/src/dvd_input.h 2010-06-01 19:07:14 +0200 -+++ xbmc/lib/libdvd/libdvdread/src/dvd_input.h 2013-02-07 14:42:34 +0100 +Only in xbmc/lib/libdvd/libdvdread/: config.h +Only in xbmc/lib/libdvd/libdvdread/: config.mak +Only in xbmc/lib/libdvd/libdvdread/: obj +diff -uwr libdvdread-4.2.1/src/dvd_input.h xbmc/lib/libdvd/libdvdread/src/dvd_input.h +--- libdvdread-4.2.1/src/dvd_input.h Tue Jun 1 18:07:14 2010 ++++ xbmc/lib/libdvd/libdvdread/src/dvd_input.h Sun Jan 26 18:36:38 2014 @@ -34,6 +34,13 @@ #if defined( __MINGW32__ ) # undef lseek @@ -27,10 +30,10 @@ diff -uwr libdvdread-4.2.0/src/dvd_input.h xbmc/lib/libdvd/libdvdread/src/dvd_in # undef off_t # define off_t off64_t # undef stat -diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_reader.c ---- libdvdread-4.2.0/src/dvd_reader.c 2011-06-15 20:09:16 +0200 -+++ xbmc/lib/libdvd/libdvdread/src/dvd_reader.c 2013-02-07 14:42:34 +0100 -@@ -32,6 +32,11 @@ +diff -uwr libdvdread-4.2.1/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_reader.c +--- libdvdread-4.2.1/src/dvd_reader.c Sun Mar 17 14:08:06 2013 ++++ xbmc/lib/libdvd/libdvdread/src/dvd_reader.c Wed Jan 29 20:48:38 2014 +@@ -33,6 +33,11 @@ #include <unistd.h> #include <limits.h> #include <dirent.h> @@ -42,7 +45,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r /* misc win32 helpers */ #ifdef WIN32 -@@ -105,6 +110,10 @@ +@@ -106,6 +111,10 @@ uint32_t lb_start; uint32_t seek_pos; @@ -53,7 +56,18 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r /* Information required for a directory path drive. */ size_t title_sizes[ TITLES_MAX ]; dvd_input_t title_devs[ TITLES_MAX ]; -@@ -617,6 +626,10 @@ +@@ -417,8 +426,9 @@ + if( !(path_copy = strdup( path ) ) ) + goto DVDOpen_error; + +-#ifndef WIN32 /* don't have fchdir, and getcwd( NULL, ... ) is strange */ ++#if !defined(WIN32) && !defined(_XBMC) /* don't have fchdir, and getcwd( NULL, ... ) is strange */ + /* Also WIN32 does not have symlinks, so we don't need this bit of code. */ ++ /* XBMC also doesn't need symlink resolution */ + + /* Resolve any symlinks and get the absolute dir name. */ + { +@@ -618,6 +628,10 @@ memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) ); dvd_file->filesize = len / DVD_VIDEO_LB_LEN; @@ -64,7 +78,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r return dvd_file; } -@@ -628,6 +641,18 @@ +@@ -629,6 +643,18 @@ */ static int findDirFile( const char *path, const char *file, char *filename ) { @@ -83,7 +97,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r DIR *dir; struct dirent *ent; -@@ -644,6 +669,7 @@ +@@ -645,6 +671,7 @@ } } closedir(dir); @@ -91,7 +105,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r return -1; } -@@ -722,6 +748,9 @@ +@@ -723,6 +750,9 @@ dvd_file->title_devs[ 0 ] = dev; dvd_file->filesize = dvd_file->title_sizes[ 0 ]; @@ -101,7 +115,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r return dvd_file; } -@@ -749,6 +778,9 @@ +@@ -750,6 +780,9 @@ memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) ); dvd_file->filesize = len / DVD_VIDEO_LB_LEN; @@ -111,7 +125,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r /* Calculate the complete file size for every file in the VOBS */ if( !menu ) { int cur; -@@ -792,6 +824,10 @@ +@@ -793,6 +826,10 @@ memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) ); dvd_file->filesize = 0; @@ -122,7 +136,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r if( menu ) { dvd_input_t dev; -@@ -1203,6 +1239,100 @@ +@@ -1204,6 +1241,100 @@ return ret + ret2; } @@ -223,7 +237,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r /* This is broken reading more than 2Gb at a time is ssize_t is 32-bit. */ ssize_t DVDReadBlocks( dvd_file_t *dvd_file, int offset, size_t block_count, unsigned char *data ) -@@ -1213,6 +1343,10 @@ +@@ -1214,6 +1345,10 @@ if( dvd_file == NULL || offset < 0 || data == NULL ) return -1; @@ -234,7 +248,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r /* Hack, and it will still fail for multiple opens in a threaded app ! */ if( dvd_file->dvd->css_title != dvd_file->css_title ) { dvd_file->dvd->css_title = dvd_file->css_title; -@@ -1295,6 +1429,10 @@ +@@ -1296,6 +1431,10 @@ return 0; } @@ -245,7 +259,7 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r if( dvd_file->dvd->isImageFile ) { ret = DVDReadBlocksUDF( dvd_file, (uint32_t) seek_sector, (size_t) numsec, secbuf, DVDINPUT_NOFLAGS ); -@@ -1302,6 +1440,7 @@ +@@ -1303,6 +1442,7 @@ ret = DVDReadBlocksPath( dvd_file, seek_sector, (size_t) numsec, secbuf, DVDINPUT_NOFLAGS ); } @@ -253,10 +267,10 @@ diff -uwr libdvdread-4.2.0/src/dvd_reader.c xbmc/lib/libdvd/libdvdread/src/dvd_r if( ret != (int) numsec ) { free( secbuf_base ); -Only in xbmc/lib/libdvd/libdvdread: version.h -diff -uwr libdvdread-4.2.0/version.sh xbmc/lib/libdvd/libdvdread/version.sh ---- libdvdread-4.2.0/version.sh 2008-05-01 11:27:16 +0200 -+++ xbmc/lib/libdvd/libdvdread/version.sh 2013-02-07 14:42:34 +0100 +Only in xbmc/lib/libdvd/libdvdread/: version.h +diff -uwr libdvdread-4.2.1/version.sh xbmc/lib/libdvd/libdvdread/version.sh +--- libdvdread-4.2.1/version.sh Thu May 1 10:27:16 2008 ++++ xbmc/lib/libdvd/libdvdread/version.sh Sun Jan 26 19:00:58 2014 @@ -1,18 +1,18 @@ -#!/bin/sh - diff --git a/lib/libdvd/patches/02-libdvdread_fix_symlinks_resolution_vfs.diff b/lib/libdvd/patches/02-libdvdread_fix_symlinks_resolution_vfs.diff deleted file mode 100644 index 016387b831..0000000000 --- a/lib/libdvd/patches/02-libdvdread_fix_symlinks_resolution_vfs.diff +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/lib/libdvd/libdvdread/src/dvd_reader.c b/lib/libdvd/libdvdread/src/dvd_reader.c -index d9544b3..57dd2d0 100644 ---- a/lib/libdvd/libdvdread/src/dvd_reader.c -+++ b/lib/libdvd/libdvdread/src/dvd_reader.c -@@ -425,8 +425,9 @@ dvd_reader_t *DVDOpen( const char *ppath ) - if( !(path_copy = strdup( path ) ) ) - goto DVDOpen_error; - --#ifndef WIN32 /* don't have fchdir, and getcwd( NULL, ... ) is strange */ -+#if !defined(WIN32) && !defined(_XBMC) /* don't have fchdir, and getcwd( NULL, ... ) is strange */ - /* Also WIN32 does not have symlinks, so we don't need this bit of code. */ -+ /* XBMC also doesn't need symlink resolution */ - - /* Resolve any symlinks and get the absolute dir name. */ - { diff --git a/lib/libdvd/patches/cores.diff b/lib/libdvd/patches/cores.diff index 6ebb8bc4fe..72463226ae 100644 --- a/lib/libdvd/patches/cores.diff +++ b/lib/libdvd/patches/cores.diff @@ -1,6 +1,6 @@ -diff -uw dvdnav_diff/config.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/config.h ---- dvdnav_diff/config.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/config.h 2013-01-26 23:33:20 +0100 +diff -uwr ../../dvdnav_diff/config.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/config.h +--- ../../dvdnav_diff/config.h Sun Sep 14 22:02:38 2008 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/config.h Sat Oct 19 06:29:41 2013 @@ -1,56 +1,95 @@ -/* config.h. Generated by hand. */ +#pragma once @@ -29,7 +29,7 @@ diff -uw dvdnav_diff/config.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/c -#define HAVE_DLFCN_H 1 +/* config.h. Generated by hand. */ -+#if defined(_LINUX) ++#if defined(TARGET_POSIX) +#include "PlatformInclude.h" +#else +#include <windows.h> @@ -116,25 +116,22 @@ diff -uw dvdnav_diff/config.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/c - -#endif /* LIBDVDREAD_CONFIG_H */ +#endif -diff -uw dvdnav_diff/decoder.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h ---- dvdnav_diff/decoder.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h 2013-02-04 14:58:00 +0100 -@@ -22,6 +22,12 @@ +diff -uwr ../../dvdnav_diff/decoder.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h +--- ../../dvdnav_diff/decoder.h Sun Sep 14 21:31:44 2008 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h Fri Feb 7 19:51:38 2014 +@@ -22,6 +22,9 @@ #ifndef LIBDVDNAV_DECODER_H #define LIBDVDNAV_DECODER_H -+//#include <inttypes.h> -+//#include <sys/time.h> -+ +#include "ifo_types.h" /* vm_cmd_t */ +#include "dvdnav_internal.h" + /* link command types */ typedef enum { LinkNoLink = 0, -diff -uw dvdnav_diff/dvd_reader.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_reader.h ---- dvdnav_diff/dvd_reader.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_reader.h 2013-02-04 14:58:00 +0100 +diff -uwr ../../dvdnav_diff/dvd_reader.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_reader.h +--- ../../dvdnav_diff/dvd_reader.h Mon Dec 7 03:50:20 2009 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_reader.h Thu Feb 7 18:22:32 2013 @@ -24,14 +24,14 @@ #define LIBDVDREAD_DVD_READER_H @@ -152,19 +149,10 @@ diff -uw dvdnav_diff/dvd_reader.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdn /** * The DVD access interface. -diff -uw dvdnav_diff/dvd_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h ---- dvdnav_diff/dvd_types.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h 2013-02-04 14:58:00 +0100 -@@ -26,6 +26,8 @@ - #ifndef LIBDVDNAV_DVD_TYPES_H - #define LIBDVDNAV_DVD_TYPES_H - -+//#include <inttypes.h> -+ - /* - * DVD Menu ID - * (see dvdnav_menu_call()) -@@ -60,7 +62,8 @@ +diff -uwr ../../dvdnav_diff/dvd_types.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h +--- ../../dvdnav_diff/dvd_types.h Tue Dec 30 14:48:46 2008 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h Fri Feb 7 20:03:34 2014 +@@ -60,7 +60,8 @@ /* the following types are currently unused */ @@ -174,7 +162,28 @@ diff -uw dvdnav_diff/dvd_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdna /* Domain */ typedef enum { -@@ -222,6 +225,10 @@ +@@ -161,14 +162,13 @@ + /* The audio format */ + typedef enum { + DVD_AUDIO_FORMAT_AC3 = 0, +- DVD_AUDIO_FORMAT_MPEG1 = 1, +- DVD_AUDIO_FORMAT_MPEG1_DRC = 2, +- DVD_AUDIO_FORMAT_MPEG2 = 3, +- DVD_AUDIO_FORMAT_MPEG2_DRC = 4, +- DVD_AUDIO_FORMAT_LPCM = 5, ++ DVD_AUDIO_FORMAT_UNKNOWN_1 = 1, ++ DVD_AUDIO_FORMAT_MPEG = 2, ++ DVD_AUDIO_FORMAT_MPEG2_EXT = 3, ++ DVD_AUDIO_FORMAT_LPCM = 4, ++ DVD_AUDIO_FORMAT_UNKNOWN_5 = 5, + DVD_AUDIO_FORMAT_DTS = 6, +- DVD_AUDIO_FORMAT_SDDS = 7, +- DVD_AUDIO_FORMAT_Other = 8 ++ DVD_AUDIO_FORMAT_SDDS = 7 + } DVDAudioFormat_t; + + /* Audio language extension */ +@@ -222,6 +222,10 @@ DVD_DISPLAY_MODE_4x3Letterboxed = 3 } DVDDisplayMode_t; @@ -185,7 +194,7 @@ diff -uw dvdnav_diff/dvd_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdna /* Audio attributes */ typedef struct { DVDAudioAppMode_t AppMode; -@@ -233,9 +240,6 @@ +@@ -233,9 +237,6 @@ DVDAudioSampleQuant_t SampleQuantization; DVDChannelNumber_t NumberOfChannels; } DVDAudioAttributes_t; @@ -195,7 +204,7 @@ diff -uw dvdnav_diff/dvd_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdna /* Subpicture attributes */ typedef enum { -@@ -255,6 +259,8 @@ +@@ -255,6 +256,8 @@ DVDSubpictureLangExt_t LanguageExtension; } DVDSubpictureAttributes_t; @@ -204,7 +213,7 @@ diff -uw dvdnav_diff/dvd_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdna /* Video attributes */ typedef struct { DVDBool_t PanscanPermitted; -@@ -268,7 +274,6 @@ +@@ -268,7 +271,6 @@ DVDBool_t Line21Field2InGop; int more_to_come; } DVDVideoAttributes_t; @@ -212,69 +221,40 @@ diff -uw dvdnav_diff/dvd_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdna #endif -diff -uw dvdnav_diff/dvdnav.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h ---- dvdnav_diff/dvdnav.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h 2013-02-04 14:58:00 +0100 -@@ -32,11 +32,14 @@ +diff -uwr ../../dvdnav_diff/dvdnav.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h +--- ../../dvdnav_diff/dvdnav.h Sun Oct 6 21:47:20 2013 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h Fri Feb 7 19:58:51 2014 +@@ -32,11 +32,11 @@ extern "C" { #endif --# include <dvdnav/dvd_types.h> --# include <dvdread/dvd_reader.h> --# include <dvdread/nav_types.h> --# include <dvdread/ifo_types.h> /* For vm_cmd_t */ --# include <dvdnav/dvdnav_events.h> +-#include <dvdnav/dvd_types.h> +-#include <dvdread/dvd_reader.h> +-#include <dvdread/nav_types.h> +-#include <dvdread/ifo_types.h> /* For vm_cmd_t */ +-#include <dvdnav/dvdnav_events.h> +# include "dvd_types.h" +# include "dvd_reader.h" +# include "nav_types.h" +# include "ifo_types.h" /* For vm_cmd_t */ +# include "dvdnav_events.h" -+# include "dvd_types.h" -+# include "dvd_reader.h" -+# include "ifo_types.h" /* For vm_cmd_t */ - - -@@ -63,11 +66,6 @@ - #define DVDNAV_STATUS_ERR 0 - #define DVDNAV_STATUS_OK 1 --#define DVDNAV_FORMAT_AC3 0 --#define DVDNAV_FORMAT_MPEGAUDIO 3 --#define DVDNAV_FORMAT_LPCM 4 --#define DVDNAV_FORMAT_DTS 5 --#define DVDNAV_FORMAT_SDDS 6 - - /********************************************************************* - * initialisation & housekeeping functions * -@@ -281,7 +279,7 @@ - /* - * Plays the specified title, starting from the specified program - */ --dvdnav_status_t dvdnav_program_play(dvdnav_t *this, int32_t title, int32_t pgcn, int32_t pgn); -+dvdnav_status_t dvdnav_program_play(dvdnav_t *self, int32_t title, int32_t pgcn, int32_t pgn); - /* - * Stores in *times an array (that the application *must* free) of -@@ -695,6 +693,15 @@ +@@ -695,6 +695,10 @@ */ int8_t dvdnav_is_domain_vts(dvdnav_t *self); +/* XBMC added functions */ -+int dvdnav_get_nr_of_subtitle_streams(dvdnav_t *self); -+ -+int dvdnav_get_nr_of_audio_streams(dvdnav_t *self); -+ +int dvdnav_get_button_info(dvdnav_t* self, int alpha[2][4], int color[2][4]); + +int64_t dvdnav_convert_time(dvd_time_t *time); -+ - ////////// RATDVD stuff /////////////// - /* -diff -uw dvdnav_diff/dvdnav_events.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_events.h ---- dvdnav_diff/dvdnav_events.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_events.h 2013-02-04 14:58:00 +0100 + #ifdef __cplusplus + } +diff -uwr ../../dvdnav_diff/dvdnav_events.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_events.h +--- ../../dvdnav_diff/dvdnav_events.h Tue Dec 30 14:48:46 2008 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_events.h Sat Feb 9 11:12:51 2013 @@ -25,6 +25,10 @@ #ifndef LIBDVDNAV_DVDNAV_EVENTS_H #define LIBDVDNAV_DVDNAV_EVENTS_H @@ -286,117 +266,64 @@ diff -uw dvdnav_diff/dvdnav_events.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/d /* * DVDNAV_BLOCK_OK * -diff -uw dvdnav_diff/dvdnav_internal.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h ---- dvdnav_diff/dvdnav_internal.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h 2013-02-07 14:33:08 +0100 -@@ -1,6 +1,5 @@ --/* !! DO NO EDIT THIS FILE, it is automatically generated */ - /* -- * Copyright (C) 2001 Rich Wareham <richwareham@users.sourceforge.net> -+ * Copyright (C) 2001-2004 Rich Wareham <richwareham@users.sourceforge.net> - * - * This file is part of libdvdnav, a DVD navigation library. - * -@@ -19,8 +18,8 @@ - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - --#ifndef LIBDVDREAD_DVDNAV_INTERNAL_H --#define LIBDVDREAD_DVDNAV_INTERNAL_H -+#ifndef LIBDVDNAV_DVDNAV_INTERNAL_H -+#define LIBDVDNAV_DVDNAV_INTERNAL_H - - #ifdef HAVE_CONFIG_H +diff -uwr ../../dvdnav_diff/dvdnav_internal.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h +--- ../../dvdnav_diff/dvdnav_internal.h Sun Dec 9 21:22:16 2012 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h Fri Feb 7 20:06:27 2014 +@@ -25,9 +25,15 @@ #include "config.h" -@@ -28,16 +27,47 @@ + #endif - #include <stdlib.h> - #include <stdio.h> --#include <unistd.h> -+//#include <unistd.h> - #include <limits.h> - #include <string.h> --#include <pthread.h> - --#undef WORDS_BIGENDIAN -+#ifdef WIN32 -+ -+/* pthread_mutex_* wrapper for win32 */ -+#ifndef _LINUX -+#include <windows.h> -+#include <process.h> -+typedef CRITICAL_SECTION pthread_mutex_t; -+#define pthread_mutex_init(a, b) InitializeCriticalSection(a) -+#define pthread_mutex_lock(a) EnterCriticalSection(a) -+#define pthread_mutex_unlock(a) LeaveCriticalSection(a) -+#define pthread_mutex_destroy(a) DeleteCriticalSection(a) -+#endif // !_LINUX -+ -+#ifndef HAVE_GETTIMEOFDAY -+/* replacement gettimeofday implementation */ -+#include <sys/timeb.h> -+static inline int _private_gettimeofday( struct timeval *tv, void *tz ) -+{ -+ struct timeb t; -+ ftime( &t ); -+ tv->tv_sec = t.time; -+ tv->tv_usec = t.millitm * 1000; -+ return 0; -+} -+#define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ)) -+#endif -+ -+#ifndef _LINUX -+#include <io.h> /* read() */ -+#define lseek64 _lseeki64 -+#endif // !_LINUX - --#include "dvd_reader.h" --#include "ifo_read.h" --#include "ifo_types.h" -+#else -+ -+#include <pthread.h> +-#ifdef WIN32 ++#include <stdlib.h> ++#include <stdio.h> ++#include <limits.h> ++#include <string.h> + -+#endif /* WIN32 */ ++#ifdef TARGET_WINDOWS + + /* pthread_mutex_* wrapper for win32 */ ++#ifndef TARGET_POSIX + #include <windows.h> + #include <process.h> + typedef CRITICAL_SECTION pthread_mutex_t; +@@ -35,6 +41,7 @@ + #define pthread_mutex_lock(a) EnterCriticalSection(a) + #define pthread_mutex_unlock(a) LeaveCriticalSection(a) + #define pthread_mutex_destroy(a) DeleteCriticalSection(a) ++#endif // !TARGET_POSIX + + #ifndef HAVE_GETTIMEOFDAY + /* replacement gettimeofday implementation */ +@@ -50,14 +57,24 @@ + #define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ)) + #endif - /* Uncomment for VM command tracing */ - /* #define TRACE */ -@@ -48,7 +78,7 @@ - #include "vmcmd.h" ++#ifndef TARGET_POSIX + #include <io.h> /* read() */ + #define lseek64 _lseeki64 ++#endif // !TARGET_POSIX - /* where should libdvdnav write its messages (stdout/stderr) */ --#define MSG_OUT stdout -+#define MSG_OUT stderr - - /* Maximum length of an error string */ - #define MAX_ERR_LEN 255 -@@ -126,8 +156,6 @@ - /* General data */ - char path[MAX_PATH_LEN]; /* Path to DVD device/dir */ - dvd_file_t *file; /* Currently opened file */ -- int open_vtsN; /* The domain and number of the... */ -- int open_domain; /* ..currently opened VOB */ - - /* Position data */ - vm_position_t position_next; -@@ -147,6 +175,7 @@ - int started; /* vm_start has been called? */ - int use_read_ahead; /* 1 - use read-ahead cache, 0 - don't */ - int pgc_based; /* positioning works PGC based instead of PG based */ -+ int cur_cell_time; /* time expired since the beginning of the current cell, read from the dsi */ - - /* VM */ - vm_t *vm; -@@ -159,24 +188,38 @@ - char err_str[MAX_ERR_LEN]; - }; - -+/** HELPER FUNCTIONS **/ + #else + + #include <pthread.h> + +-#endif /* WIN32 */ ++#endif /* TARGET_WINDOWS */ + -+/* converts a dvd_time_t to PTS ticks */ -+int64_t dvdnav_convert_time(dvd_time_t *time); ++/* Uncomment for VM command tracing */ ++/* #define TRACE */ + ++#include "decoder.h" ++#include "dvdnav.h" ++#include "vm.h" ++#include "vmcmd.h" + + /* where should libdvdnav write its messages (stdout/stderr) */ + #define MSG_OUT stderr +@@ -183,6 +200,18 @@ + /* converts a dvd_time_t to PTS ticks */ + int64_t dvdnav_convert_time(dvd_time_t *time); + +/* XBMC added functions */ +/* + * Get current playback state @@ -412,36 +339,18 @@ diff -uw dvdnav_diff/dvdnav_internal.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams /** USEFUL MACROS **/ #ifdef __GNUC__ --#define printerrf(format, args...) snprintf(this->err_str, MAX_ERR_LEN, format, ## args); -+#define printerrf(format, args...) \ -+ do { if (this) snprintf(this->err_str, MAX_ERR_LEN, format, ## args); } while (0) - #else - #ifdef _MSC_VER --#define printerrf(str) snprintf(this->err_str, MAX_ERR_LEN, str); -+#define printerrf(str) \ -+ do { if (this) snprintf(this->err_str, MAX_ERR_LEN, str); } while (0) +@@ -195,7 +224,7 @@ #else --#define printerrf(...) snprintf(this->err_str, MAX_ERR_LEN, __VA_ARGS__); -+#define printerrf(...) \ -+ do { if (this) snprintf(this->err_str, MAX_ERR_LEN, __VA_ARGS__); } while (0) - #endif /* WIN32 */ + #define printerrf(...) \ + do { if (this) snprintf(this->err_str, MAX_ERR_LEN, __VA_ARGS__); } while (0) +-#endif /* WIN32 */ ++#endif /* TARGET_WINDOWS */ #endif --#define printerr(str) strncpy(this->err_str, str, MAX_ERR_LEN); -- --/* Save my typing */ --#define S_ERR DVDNAV_STATUS_ERR -- --#ifndef _MSC_VER --#define S_OK DVDNAV_STATUS_OK --#endif /* MSC_VER */ -+#define printerr(str) \ -+ do { if (this) strncpy(this->err_str, str, MAX_ERR_LEN - 1); } while (0) - --#endif /* LIBDVDREAD_DVDNAV_INTERNAL_H */ -+#endif /* LIBDVDNAV_DVDNAV_INTERNAL_H */ -diff -uw dvdnav_diff/ifo_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h ---- dvdnav_diff/ifo_types.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h 2013-02-04 14:58:00 +0100 + #define printerr(str) \ + do { if (this) strncpy(this->err_str, str, MAX_ERR_LEN - 1); } while (0) +diff -uwr ../../dvdnav_diff/ifo_types.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h +--- ../../dvdnav_diff/ifo_types.h Sun Dec 9 21:08:00 2012 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h Fri Feb 7 19:24:37 2014 @@ -22,8 +22,8 @@ #ifndef LIBDVDREAD_IFO_TYPES_H #define LIBDVDREAD_IFO_TYPES_H @@ -453,9 +362,9 @@ diff -uw dvdnav_diff/ifo_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdna #undef ATTRIBUTE_PACKED -diff -uw dvdnav_diff/nav_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/nav_types.h ---- dvdnav_diff/nav_types.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/nav_types.h 2013-02-04 14:58:00 +0100 +diff -uwr ../../dvdnav_diff/nav_types.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/nav_types.h +--- ../../dvdnav_diff/nav_types.h Sun Aug 8 23:49:28 2010 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/nav_types.h Thu Feb 7 18:22:32 2013 @@ -28,9 +28,27 @@ #ifndef LIBDVDREAD_NAV_TYPES_H #define LIBDVDREAD_NAV_TYPES_H @@ -498,9 +407,10 @@ diff -uw dvdnav_diff/nav_types.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdna /** * PCI General Information */ -diff -uw dvdnav_diff/vm.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h ---- dvdnav_diff/vm.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h 2013-02-07 14:33:08 +0100 +Only in xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/: remap.h +diff -uwr ../../dvdnav_diff/vm.h xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h +--- ../../dvdnav_diff/vm.h Sat Jul 31 00:34:16 2010 ++++ xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h Fri Feb 7 19:37:55 2014 @@ -23,6 +23,9 @@ #ifndef LIBDVDNAV_VM_H #define LIBDVDNAV_VM_H @@ -511,19 +421,17 @@ diff -uw dvdnav_diff/vm.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h /* DOMAIN enum */ typedef enum { -@@ -156,11 +159,8 @@ - int vm_get_audio_active_stream(vm_t *vm); - int vm_get_subp_active_stream(vm_t *vm, int mode); - void vm_get_angle_info(vm_t *vm, int *current, int *num_avail); --// _XBMC #if 0 --/* currently unused */ - void vm_get_audio_info(vm_t *vm, int *current, int *num_avail); - void vm_get_subp_info(vm_t *vm, int *current, int *num_avail); --// _XBMC #endif - void vm_get_video_res(vm_t *vm, int *width, int *height); - int vm_get_video_aspect(vm_t *vm); - int vm_get_video_scale_permission(vm_t *vm); -@@ -180,5 +180,7 @@ +@@ -170,6 +173,9 @@ + ifo_handle_t *vm_get_title_ifo(vm_t *vm, uint32_t title); + void vm_ifo_close(ifo_handle_t *ifo); + ++int vm_get_state(vm_t *vm, dvd_state_t *save_state); ++int vm_set_state(vm_t *vm, dvd_state_t *save_state); ++ + /* Uncomment for VM command tracing */ + /* #define TRACE */ + #ifdef TRACE +@@ -177,5 +183,7 @@ void vm_position_print(vm_t *vm, vm_position_t *position); #endif @@ -531,15 +439,3 @@ diff -uw dvdnav_diff/vm.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h +vm_t* dvdnav_get_vm(dvdnav_t *self); #endif /* LIBDVDNAV_VM_H */ -diff -uw dvdnav_diff/vmcmd.h xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vmcmd.h ---- dvdnav_diff/vmcmd.h 2013-02-07 14:42:34 +0100 -+++ xbmc/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vmcmd.h 2013-02-04 14:58:00 +0100 -@@ -22,6 +22,8 @@ - #ifndef LIBDVDNAV_VMCMD_H - #define LIBDVDNAV_VMCMD_H - -+//#include <inttypes.h> -+ - void vm_print_mnemonic(vm_cmd_t *command); - void vm_print_cmd(int row, vm_cmd_t *command); - diff --git a/lib/libdvd/patches/libdvdcss.diff b/lib/libdvd/patches/libdvdcss.diff index 2f0caf5389..4e181091b9 100644 --- a/lib/libdvd/patches/libdvdcss.diff +++ b/lib/libdvd/patches/libdvdcss.diff @@ -1,329 +1,194 @@ -diff -uwr libdvdcss-1.2.12/src/device.c xbmc/lib/libdvd/libdvdcss/src/device.c ---- libdvdcss-1.2.12/src/device.c 2012-03-12 00:07:48 +0100 -+++ xbmc/lib/libdvd/libdvdcss/src/device.c 2013-02-07 14:42:34 +0100 -@@ -23,6 +23,10 @@ - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *****************************************************************************/ - -+/* -+ Modifications for XBMC are all contained within _XBOX (real xbox hardware) or WITH_CACHE -+*/ -+ - /***************************************************************************** - * Preamble - *****************************************************************************/ -@@ -368,11 +372,20 @@ - - #if defined( WIN32 ) - dvdcss->b_file = 1; -+#if defined( _XBOX ) -+ // If we've passed over the device string make sure we don't try -+ // to use file based handling (libc) - we want Win2k routines ... -+ if (!stricmp(psz_device, "\\Device\\Cdrom0")) -+ dvdcss->b_file = 0; -+ else -+ dvdcss->b_file = stricmp(psz_device, "D:"); -+#else - /* If device is "X:" or "X:\", we are not actually opening a file. */ - if (psz_device[0] && psz_device[1] == ':' && - (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3]))) - dvdcss->b_file = 0; - -+#endif // _XBOX - /* Initialize readv temporary buffer */ - dvdcss->p_readv_buffer = NULL; - dvdcss->i_readv_buf_size = 0; -@@ -450,11 +463,13 @@ - } - else /* ASPI */ - { -+#if !defined(_XBOX) - struct w32_aspidev *fd = (struct w32_aspidev *) dvdcss->i_fd; - - /* Unload aspi and free w32_aspidev structure */ - FreeLibrary( (HMODULE) fd->hASPI ); - free( (void*) dvdcss->i_fd ); -+#endif // !_XBOX - } - - /* Free readv temporary buffer */ -@@ -510,9 +525,14 @@ - #if defined( WIN32 ) - static int win2k_open ( dvdcss_t dvdcss, char const *psz_device ) - { -+#ifdef _XBOX -+ char psz_dvd[70]; -+ strcpy(psz_dvd, "cdrom0:"); -+#else - char psz_dvd[7]; - snprintf( psz_dvd, 7, "\\\\.\\%c:", psz_device[0] ); - -+#endif - /* To work around an M$ bug in IOCTL_DVD_READ_STRUCTURE, we need read - * _and_ write access to the device (so we can make SCSI Pass Through - * Requests). Unfortunately this is only allowed if you have -@@ -521,17 +541,24 @@ - * won't send back the right result). - * (See Microsoft Q241374: Read and Write Access Required for SCSI - * Pass Through Requests) */ -+ -+#ifdef WITH_CACHE -+ DWORD flags = FILE_FLAG_NO_BUFFERING; /* we handle buffering ourself */ -+#else -+ DWORD flags = FILE_FLAG_RANDOM_ACCESS; -+#endif //!_XBOX -+ - dvdcss->i_fd = (int) - CreateFile( psz_dvd, GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, -- FILE_FLAG_RANDOM_ACCESS, NULL ); -+ flags, NULL ); - - if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE ) - dvdcss->i_fd = (int) - CreateFile( psz_dvd, GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, -- FILE_FLAG_RANDOM_ACCESS, NULL ); -+ flags, NULL ); - - if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE ) - { -@@ -727,6 +754,9 @@ - static int win2k_seek( dvdcss_t dvdcss, int i_blocks ) - { - LARGE_INTEGER li_seek; -+#ifdef WITH_CACHE -+ int iBytesToSkip; -+#endif - - #ifndef INVALID_SET_FILE_POINTER - # define INVALID_SET_FILE_POINTER ((DWORD)-1) -@@ -738,6 +768,28 @@ - return i_blocks; - } - -+#ifdef WITH_CACHE -+ -+ // if our buffer contains the position which we want to seek too, we can -+ // just decrease dwCacheBufferSize -+ iBytesToSkip = (i_blocks - dvdcss->i_pos) * DVDCSS_BLOCK_SIZE; -+ if (iBytesToSkip > 0 && iBytesToSkip < dvdcss->buffer_size) -+ { -+ dvdcss->buffer_size -= iBytesToSkip; -+ dvdcss->i_pos = i_blocks; -+ return dvdcss->i_pos; -+ } -+ else if (iBytesToSkip < 0 && (DISC_CACHE_SIZE - dvdcss->buffer_size) >= -iBytesToSkip) -+ { -+ // we want to seek backwards, and we have enough old data in our buffer -+ dvdcss->buffer_size -= iBytesToSkip; // since iBytesToSkip is negative, dwCacheBufferSize will get bigger -+ dvdcss->i_pos = i_blocks; -+ return dvdcss->i_pos; -+ } -+ else dvdcss->buffer_size = 0; -+ -+#endif -+ - li_seek.QuadPart = (LONGLONG)i_blocks * DVDCSS_BLOCK_SIZE; - - li_seek.LowPart = SetFilePointer( (HANDLE) dvdcss->i_fd, -@@ -827,6 +879,66 @@ - { - int i_bytes; - -+#ifdef WITH_CACHE -+ -+ if (dvdcss->buffer_size < i_blocks * DVDCSS_BLOCK_SIZE) -+ { -+ // we don't have enough data in our buffer -+ int iRemaining = i_blocks * DVDCSS_BLOCK_SIZE; -+ int iCopied = 0; -+ // copy data we already have and read again into the cache -+ if (dvdcss->buffer_size > 0) memcpy(p_buffer, dvdcss->buffer + (DISC_CACHE_SIZE - dvdcss->buffer_size), dvdcss->buffer_size); -+ iCopied = dvdcss->buffer_size; -+ iRemaining -= dvdcss->buffer_size; -+ (BYTE*)p_buffer += iCopied; -+ dvdcss->buffer_size = 0; -+ -+ // if remaining size is bigger >= DISC_CACHE_SIZE, don't cache it. Just read -+ if (iRemaining >= DISC_CACHE_SIZE) -+ { -+ if (!ReadFile((HANDLE)dvdcss->i_fd, p_buffer, iRemaining, (LPDWORD)&i_bytes, NULL)) -+ { -+ dvdcss->i_pos = -1; -+ return -1; -+ } -+ dvdcss->i_pos += (i_bytes + iCopied) / DVDCSS_BLOCK_SIZE; -+ return (i_bytes + iCopied) / DVDCSS_BLOCK_SIZE; -+ } -+ else -+ { -+ // read a chunk into the cache and copy the needed bytes into p_buffer -+ if (!ReadFile((HANDLE)dvdcss->i_fd, dvdcss->buffer, DISC_CACHE_SIZE, &dvdcss->buffer_size, NULL)) -+ { -+ // read error, maybe we tried to read to much. Try again but now without cache -+ if (!ReadFile((HANDLE)dvdcss->i_fd, p_buffer, iRemaining, (LPDWORD)&i_bytes, NULL)) -+ { -+ dvdcss->i_pos = -1; -+ return -1; -+ } -+ dvdcss->i_pos += (i_bytes + iCopied) / DVDCSS_BLOCK_SIZE; -+ return (i_bytes + iCopied) / DVDCSS_BLOCK_SIZE; -+ } -+ // copy bytes into the buffer -+ memcpy(p_buffer, dvdcss->buffer, iRemaining); -+ dvdcss->buffer_size -= iRemaining; -+ dvdcss->i_pos += (iRemaining + iCopied) / DVDCSS_BLOCK_SIZE; -+ return (iRemaining + iCopied) / DVDCSS_BLOCK_SIZE; -+ } -+ } -+ else -+ { -+ // we have enough data in our cache, just copy it -+ memcpy(p_buffer, dvdcss->buffer + (DISC_CACHE_SIZE - dvdcss->buffer_size), i_blocks * DVDCSS_BLOCK_SIZE); -+ dvdcss->buffer_size -= i_blocks * DVDCSS_BLOCK_SIZE; -+ dvdcss->i_pos += i_blocks; -+ return i_blocks; -+ } -+ -+ dvdcss->i_pos = -1; -+ return -1; -+ -+#else // WITH_CACHE -+ - if( !ReadFile( (HANDLE) dvdcss->i_fd, p_buffer, - i_blocks * DVDCSS_BLOCK_SIZE, - (LPDWORD)&i_bytes, NULL ) ) -@@ -837,6 +949,7 @@ - - dvdcss->i_pos += i_bytes / DVDCSS_BLOCK_SIZE; - return i_bytes / DVDCSS_BLOCK_SIZE; -+#endif // WITH_CACHE - } - - static int aspi_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks ) -diff -uwr libdvdcss-1.2.12/src/ioctl.c xbmc/lib/libdvd/libdvdcss/src/ioctl.c ---- libdvdcss-1.2.12/src/ioctl.c 2012-03-12 00:07:48 +0100 -+++ xbmc/lib/libdvd/libdvdcss/src/ioctl.c 2013-02-07 14:42:34 +0100 -@@ -373,6 +373,37 @@ - - memcpy( p_key, dvdbs.discKeyStructures, DVD_DISCKEY_SIZE ); - -+#elif defined( _XBOX ) -+ // the next piece of code will read the disc key on the xbox for all drives (samsung included) -+ // but for some reason it takes 15 - 20 seconds longer to load a dvd if mplayer has the dvd key -+ // so we let this part fail and will only use the modified ioctl_ReadTitleKey code. -+ // don't get this delay, and i'm surprised it worked as the ReadTitleKey function didn't work. -+ -+ DWORD dwBytesRead; -+ DVD_READ_STRUCTURE st; -+ char buffer[DVD_DISCKEY_SIZE]; -+ -+ memset( &buffer, 0, sizeof( buffer ) ); -+ memset( &st, 0, sizeof( st ) ); -+ -+ st.BlockByteOffset.QuadPart = 0; -+ st.SessionId = *pi_agid; -+ st.Format = DvdDiskKeyDescriptor; -+ -+ i_ret = DeviceIoControl((HANDLE) i_fd, IOCTL_DVD_READ_STRUCTURE, &st, -+ sizeof(st), buffer, DVD_DISCKEY_SIZE, &dwBytesRead, NULL ) ? 0 : -1; -+ -+ if (i_ret < 0) // didn't work -+ { -+ printf("Failed to read disc key\n"); -+ return i_ret; -+ } -+ -+ // copy the returned key into our key buffer -+ int i; -+ for (i = 0; i < DVD_DISCKEY_SIZE; i++) -+ p_key[i] = buffer[i+4]; -+ - #elif defined( WIN32 ) - if( WIN2K ) /* NT/2k/XP */ - { -@@ -541,6 +572,25 @@ - - memcpy( p_key, dvdbs.titleKeyValue, DVD_KEY_SIZE ); - -+#elif defined( _XBOX ) && 0 //Faulty wrong key returned, original for WIN32 works thou so use it instead -+ DWORD dwBytesRead; -+ DVD_READ_STRUCTURE st; -+ char buffer[2048+4]; -+ -+ memset( &buffer, 0, sizeof( buffer ) ); -+ -+ st.BlockByteOffset.QuadPart = (LONGLONG) i_pos * 2048 /*DVDCSS_BLOCK_SIZE*/; -+ st.SessionId = *pi_agid; -+ st.Format = DvdDiskKeyDescriptor; -+ -+ i_ret = DeviceIoControl((HANDLE) i_fd, IOCTL_DVD_READ_STRUCTURE, &st, sizeof(st), buffer, 2048+4, &dwBytesRead, NULL ) ? 0 : -1; -+ if( i_ret < 0 ) -+ { -+ return i_ret; -+ } -+ -+ memcpy( p_key, &(buffer[4]), 2048); -+ - #elif defined( WIN32 ) - if( WIN2K ) /* NT/2k/XP */ - { -@@ -693,8 +743,13 @@ - ULONG id; - DWORD tmp; - -+#if defined( _XBOX) -+ i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_START_SESSION, -+ NULL, 0, &id, sizeof(id), &tmp, NULL ) ? 0 : -1; -+#else - i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_START_SESSION, - &tmp, 4, &id, sizeof( id ), &tmp, NULL ) ? 0 : -1; -+#endif - - *pi_agid = id; - } -@@ -1336,8 +1391,13 @@ - - memcpy( key->KeyData, p_challenge, DVD_CHALLENGE_SIZE ); - -+#if defined(_XBOX) -+ i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_SEND_KEY, key, -+ key->KeyLength, NULL, 0, &tmp, NULL ) ? 0 : -1; -+#else - i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_SEND_KEY, key, - key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1; -+#endif - } - else - { -diff -uwr libdvdcss-1.2.12/src/ioctl.h xbmc/lib/libdvd/libdvdcss/src/ioctl.h ---- libdvdcss-1.2.12/src/ioctl.h 2012-03-12 00:07:48 +0100 -+++ xbmc/lib/libdvd/libdvdcss/src/ioctl.h 2013-02-07 14:42:34 +0100 -@@ -324,7 +324,11 @@ - typedef DWORD (CALLBACK *GETASPI32SUPPORTINFO)(VOID); - typedef DWORD (CALLBACK *SENDASPI32COMMAND)(LPVOID); - -+#if defined(_XBOX) -+#define WIN2K 1 -+#else - #define WIN2K ( GetVersion() < 0x80000000 ) -+#endif // _XBOX - #define ASPI_HAID 0 - #define ASPI_TARGET 0 - #define DTYPE_CDROM 0x05 -diff -uwr libdvdcss-1.2.12/src/libdvdcss.c xbmc/lib/libdvd/libdvdcss/src/libdvdcss.c ---- libdvdcss-1.2.12/src/libdvdcss.c 2012-03-12 00:07:48 +0100 -+++ xbmc/lib/libdvd/libdvdcss/src/libdvdcss.c 2013-02-07 14:42:34 +0100 +Only in lib/libdvd/libdvdcss/: .libs +diff -uwr ../libdvdcss-1.2.13/Makefile.am lib/libdvd/libdvdcss/Makefile.am +--- ../libdvdcss-1.2.13/Makefile.am Wed Feb 27 10:05:36 2013 ++++ lib/libdvd/libdvdcss/Makefile.am Sat Feb 1 22:41:19 2014 +@@ -4,13 +4,7 @@ +
+ dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog
+
+-DISTCLEANFILES = ChangeLog
+-
+-ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
+- -cd $(srcdir) && git log > $(abs_builddir)/$(@)-tmp
+- test -s $(@)-tmp && mv $(@)-tmp $(@)
+- -rm -f $(@)-tmp
+- test -e $(@) || touch $(@)
++DISTCLEANFILES =
+
+ lib_LTLIBRARIES = libdvdcss.la
+ EXTRA_PROGRAMS = csstest dvd_region
+diff -uwr ../libdvdcss-1.2.13/src/device.c lib/libdvd/libdvdcss/src/device.c +--- ../libdvdcss-1.2.13/src/device.c Wed Feb 27 10:05:36 2013 ++++ lib/libdvd/libdvdcss/src/device.c Sat Feb 1 19:41:54 2014 +@@ -22,6 +22,10 @@ + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *****************************************************************************/
+
++/*
++ Modifications for XBMC are all contained within WITH_CACHE
++*/
++
+ /*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+@@ -509,17 +513,24 @@ + * won't send back the right result).
+ * (See Microsoft Q241374: Read and Write Access Required for SCSI
+ * Pass Through Requests) */
++
++#ifdef WITH_CACHE
++ DWORD flags = FILE_FLAG_NO_BUFFERING; /* we handle buffering ourself */
++#else
++ DWORD flags = FILE_FLAG_RANDOM_ACCESS;
++#endif //!WITH_CACHE
++
+ dvdcss->i_fd = (int)
+ CreateFile( psz_dvd, GENERIC_READ | GENERIC_WRITE,
+ FILE_SHARE_READ | FILE_SHARE_WRITE,
+ NULL, OPEN_EXISTING,
+- FILE_FLAG_RANDOM_ACCESS, NULL );
++ flags, NULL );
+
+ if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE )
+ dvdcss->i_fd = (int)
+ CreateFile( psz_dvd, GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING,
+- FILE_FLAG_RANDOM_ACCESS, NULL );
++ flags, NULL );
+
+ if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE )
+ {
+@@ -714,6 +725,9 @@ + static int win2k_seek( dvdcss_t dvdcss, int i_blocks )
+ {
+ LARGE_INTEGER li_seek;
++#ifdef WITH_CACHE
++ int iBytesToSkip;
++#endif
+
+ #ifndef INVALID_SET_FILE_POINTER
+ # define INVALID_SET_FILE_POINTER ((DWORD)-1)
+@@ -725,6 +739,28 @@ + return i_blocks;
+ }
+
++#ifdef WITH_CACHE
++
++ // if our buffer contains the position which we want to seek too, we can
++ // just decrease dwCacheBufferSize
++ iBytesToSkip = (i_blocks - dvdcss->i_pos) * DVDCSS_BLOCK_SIZE;
++ if (iBytesToSkip > 0 && iBytesToSkip < dvdcss->buffer_size)
++ {
++ dvdcss->buffer_size -= iBytesToSkip;
++ dvdcss->i_pos = i_blocks;
++ return dvdcss->i_pos;
++ }
++ else if (iBytesToSkip < 0 && (DISC_CACHE_SIZE - dvdcss->buffer_size) >= -iBytesToSkip)
++ {
++ // we want to seek backwards, and we have enough old data in our buffer
++ dvdcss->buffer_size -= iBytesToSkip; // since iBytesToSkip is negative, dwCacheBufferSize will get bigger
++ dvdcss->i_pos = i_blocks;
++ return dvdcss->i_pos;
++ }
++ else dvdcss->buffer_size = 0;
++
++#endif
++
+ li_seek.QuadPart = (LONGLONG)i_blocks * DVDCSS_BLOCK_SIZE;
+
+ li_seek.LowPart = SetFilePointer( (HANDLE) dvdcss->i_fd,
+@@ -814,6 +850,66 @@ + {
+ int i_bytes;
+
++#ifdef WITH_CACHE
++
++ if (dvdcss->buffer_size < i_blocks * DVDCSS_BLOCK_SIZE)
++ {
++ // we don't have enough data in our buffer
++ int iRemaining = i_blocks * DVDCSS_BLOCK_SIZE;
++ int iCopied = 0;
++ // copy data we already have and read again into the cache
++ if (dvdcss->buffer_size > 0) memcpy(p_buffer, dvdcss->buffer + (DISC_CACHE_SIZE - dvdcss->buffer_size), dvdcss->buffer_size);
++ iCopied = dvdcss->buffer_size;
++ iRemaining -= dvdcss->buffer_size;
++ (BYTE*)p_buffer += iCopied;
++ dvdcss->buffer_size = 0;
++
++ // if remaining size is bigger >= DISC_CACHE_SIZE, don't cache it. Just read
++ if (iRemaining >= DISC_CACHE_SIZE)
++ {
++ if (!ReadFile((HANDLE)dvdcss->i_fd, p_buffer, iRemaining, (LPDWORD)&i_bytes, NULL))
++ {
++ dvdcss->i_pos = -1;
++ return -1;
++ }
++ dvdcss->i_pos += (i_bytes + iCopied) / DVDCSS_BLOCK_SIZE;
++ return (i_bytes + iCopied) / DVDCSS_BLOCK_SIZE;
++ }
++ else
++ {
++ // read a chunk into the cache and copy the needed bytes into p_buffer
++ if (!ReadFile((HANDLE)dvdcss->i_fd, dvdcss->buffer, DISC_CACHE_SIZE, &dvdcss->buffer_size, NULL))
++ {
++ // read error, maybe we tried to read to much. Try again but now without cache
++ if (!ReadFile((HANDLE)dvdcss->i_fd, p_buffer, iRemaining, (LPDWORD)&i_bytes, NULL))
++ {
++ dvdcss->i_pos = -1;
++ return -1;
++ }
++ dvdcss->i_pos += (i_bytes + iCopied) / DVDCSS_BLOCK_SIZE;
++ return (i_bytes + iCopied) / DVDCSS_BLOCK_SIZE;
++ }
++ // copy bytes into the buffer
++ memcpy(p_buffer, dvdcss->buffer, iRemaining);
++ dvdcss->buffer_size -= iRemaining;
++ dvdcss->i_pos += (iRemaining + iCopied) / DVDCSS_BLOCK_SIZE;
++ return (iRemaining + iCopied) / DVDCSS_BLOCK_SIZE;
++ }
++ }
++ else
++ {
++ // we have enough data in our cache, just copy it
++ memcpy(p_buffer, dvdcss->buffer + (DISC_CACHE_SIZE - dvdcss->buffer_size), i_blocks * DVDCSS_BLOCK_SIZE);
++ dvdcss->buffer_size -= i_blocks * DVDCSS_BLOCK_SIZE;
++ dvdcss->i_pos += i_blocks;
++ return i_blocks;
++ }
++
++ dvdcss->i_pos = -1;
++ return -1;
++
++#else // WITH_CACHE
++
+ if( !ReadFile( (HANDLE) dvdcss->i_fd, p_buffer,
+ i_blocks * DVDCSS_BLOCK_SIZE,
+ (LPDWORD)&i_bytes, NULL ) )
+@@ -824,6 +920,7 @@ +
+ dvdcss->i_pos += i_bytes / DVDCSS_BLOCK_SIZE;
+ return i_bytes / DVDCSS_BLOCK_SIZE;
++#endif // WITH_CACHE
+ }
+
+ static int aspi_read ( dvdcss_t dvdcss, void *p_buffer, int i_blocks )
+Only in lib/libdvd/libdvdcss/src: device.lo +Only in lib/libdvd/libdvdcss/src: device.o +Only in lib/libdvd/libdvdcss/src: error.lo +Only in lib/libdvd/libdvdcss/src: error.o +Only in lib/libdvd/libdvdcss/src: ioctl.lo +Only in lib/libdvd/libdvdcss/src: ioctl.o +diff -uwr ../libdvdcss-1.2.13/src/libdvdcss.c lib/libdvd/libdvdcss/src/libdvdcss.c +--- ../libdvdcss-1.2.13/src/libdvdcss.c Tue Feb 26 08:08:36 2013 ++++ lib/libdvd/libdvdcss/src/libdvdcss.c Sat Feb 1 18:37:25 2014 @@ -195,6 +195,10 @@ dvdcss->b_debug = 0; dvdcss->b_errors = 0; -+#ifdef WITH_CACHE -+ dvdcss->buffer_size = 0; -+#endif -+ ++#ifdef WITH_CACHE
++ dvdcss->buffer_size = 0;
++#endif
++
/* * Find verbosity from DVDCSS_VERBOSE environment variable */ @@ -332,34 +197,8 @@ diff -uwr libdvdcss-1.2.12/src/libdvdcss.c xbmc/lib/libdvd/libdvdcss/src/libdvdc } } - -+ /* if wo don't have b_ioctls, we don't have a disk key, make sure area is nulled */ ++ /* if wo don't have b_ioctls, we don't have a disk key, make sure area is nulled */
memset( dvdcss->css.p_disc_key, 0, KEY_SIZE ); /* If disc is CSS protected and the ioctls work, authenticate the drive */ if( dvdcss->b_scrambled && dvdcss->b_ioctls ) -@@ -533,8 +537,26 @@ - goto nocache; - } - -+#ifdef _XBOX -+ //due to xbox file system having a limited length on folders/files, -+ //make separate folder for disk name first -+ if(psz_title[0] == '\0') -+ strcat(psz_title, "NONAME"); -+ -+ i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_title); -+ -+ i_ret = mkdir( dvdcss->psz_cachefile ); -+ if( i_ret < 0 && errno != EEXIST ) -+ { -+ print_error( dvdcss, "failed creating cache titledirectory" ); -+ dvdcss->psz_cachefile[0] = '\0'; -+ goto nocache; -+ } -+ i += sprintf( dvdcss->psz_cachefile + i, "/%s%s", psz_serial, psz_key ); -+#else - i += sprintf( dvdcss->psz_cachefile + i, "/%s-%s%s", psz_title, - psz_serial, psz_key ); -+#endif - #if !defined( WIN32 ) || defined( SYS_CYGWIN ) - i_ret = mkdir( dvdcss->psz_cachefile, 0755 ); - #else + diff --git a/lib/libdvd/patches/libdvdnav-accurate_seek.diff b/lib/libdvd/patches/libdvdnav-accurate_seek.diff deleted file mode 100644 index efcda5f8d3..0000000000 --- a/lib/libdvd/patches/libdvdnav-accurate_seek.diff +++ /dev/null @@ -1,689 +0,0 @@ -More accurate seeking with libdvdnav - -applied to current codebase from: - http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/2012-December/001837.html - -full credit goes to gnosygnu, see - http://forum.videolan.org/viewtopic.php?f=32&t=76308&start=20#p316583 - https://github.com/xbmc/xbmc/pull/2957#issuecomment-20855719 - -related tickets: - http://trac.xbmc.org/ticket/12212 - http://trac.xbmc.org/ticket/14493 - - -diff --git a/libdvdnav/src/dvdnav/dvdnav.h b/libdvdnav/src/dvdnav/dvdnav.h -index 359b951..506a286 100644 ---- a/libdvdnav/src/dvdnav/dvdnav.h -+++ b/libdvdnav/src/dvdnav/dvdnav.h -@@ -373,6 +373,14 @@ dvdnav_status_t dvdnav_sector_search(dvdnav_t *self, - int64_t dvdnav_get_current_time(dvdnav_t *self); - - /* -+ * Find the nearest vobu and jump to it -+ * -+ * Alternative to dvdnav_time_search -+ */ -+dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this, -+ uint64_t time_in_pts_ticks, int32_t mode); -+ -+/* - * Stop playing the current position and start playback of the title - * from the specified timecode. - * -diff --git a/libdvdnav/src/dvdnav_internal.h b/libdvdnav/src/dvdnav_internal.h -index d64a5ba..df26014 100644 ---- a/libdvdnav/src/dvdnav_internal.h -+++ b/libdvdnav/src/dvdnav_internal.h -@@ -125,6 +125,45 @@ typedef struct { - } ATTRIBUTE_PACKED spu_status_t; - #endif - -+/* -+ * Describes a given time, and the closest sector, vobu and tmap index -+ */ -+typedef struct { -+ uint64_t time; -+ uint32_t sector; -+ uint32_t vobu_idx; -+ int32_t tmap_idx; -+} dvdnav_pos_data_t; -+ -+/* -+ * Encapsulates cell data -+ */ -+typedef struct { -+ int32_t idx; -+ dvdnav_pos_data_t *bgn; -+ dvdnav_pos_data_t *end; -+} dvdnav_cell_data_t; -+ -+/* -+ * Encapsulates common variables used by internal functions of jump_to_time -+ */ -+typedef struct { -+ vobu_admap_t *admap; -+ int32_t admap_len; -+ vts_tmap_t *tmap; -+ int32_t tmap_len; -+ int32_t tmap_interval; -+} dvdnav_jump_args_t; -+ -+/* -+ * Utility constants for jump_to_time -+ */ -+#define TMAP_IDX_EDGE_BGN -1 -+#define TMAP_IDX_EDGE_END -2 -+#define JUMP_MODE_TIME_AFTER 1 -+#define JUMP_MODE_TIME_DEFAULT 0 -+#define JUMP_MODE_TIME_BEFORE -1 -+ - typedef struct dvdnav_vobu_s { - int32_t vobu_start; /* Logical Absolute. MAX needed is 0x300000 */ - int32_t vobu_length; -diff --git a/libdvdnav/src/searching.c b/libdvdnav/src/searching.c -index a5e48fe..0115e2f 100644 ---- a/libdvdnav/src/searching.c -+++ b/libdvdnav/src/searching.c -@@ -36,6 +36,7 @@ - #include "vm/decoder.h" - #include "vm/vm.h" - #include "dvdnav_internal.h" -+#include <dvdread/ifo_read.h> - - /* - #define LOG_DEBUG -@@ -805,3 +806,593 @@ dvdnav_status_t dvdnav_set_state(dvdnav_t *this, dvd_state_t *save_state) - pthread_mutex_unlock(&this->vm_lock); - return DVDNAV_STATUS_OK; - } -+ -+ -+ -+/* Get an admap and admap_len */ -+static vobu_admap_t* dvdnav_admap_get(dvdnav_t *this, dvd_state_t *state, -+ int32_t *admap_len) { -+ vobu_admap_t *admap = NULL; -+ switch(state->domain) { -+ case FP_DOMAIN: -+ case VMGM_DOMAIN: -+ admap = this->vm->vmgi->menu_vobu_admap; -+ break; -+ case VTSM_DOMAIN: -+ admap = this->vm->vtsi->menu_vobu_admap; -+ break; -+ case VTS_DOMAIN: -+ admap = this->vm->vtsi->vts_vobu_admap; -+ break; -+ default: { -+ fprintf(MSG_OUT, "Unknown domain"); -+ return NULL; -+ } -+ } -+ if (admap == NULL) return NULL; -+ -+ *admap_len = (admap->last_byte + 1 - VOBU_ADMAP_SIZE) / VOBU_ADMAP_SIZE; -+ if (*admap_len <= 0) { -+ fprintf(MSG_OUT, "admap_len <= 0"); -+ return NULL; -+ } -+ return admap; -+} -+ -+/* Get a tmap, tmap_len and tmap_interval */ -+static vts_tmap_t* dvdnav_tmap_get(dvdnav_t *this, dvd_state_t *state, -+ int32_t *tmap_len, int32_t *tmap_interval) { -+ int32_t vts_idx = 0; -+ domain_t domain; -+ ifo_handle_t *ifo = NULL; -+ vts_tmapt_t *tmapt = NULL; -+ uint16_t tmap_count = 0; -+ int32_t pgcN = 0; -+ vts_tmap_t *tmap = NULL; -+ int32_t result = 0; -+ -+ vts_idx = state->vtsN; -+ domain = state->domain; -+ switch(domain) { -+ case FP_DOMAIN: -+ case VTSM_DOMAIN: -+ case VMGM_DOMAIN: { -+ ifo = this->vm->vmgi; -+ break; -+ } -+ case VTS_DOMAIN: { -+ ifo = this->vm->vtsi; -+ break; -+ } -+ default: { -+ fprintf(MSG_OUT, "unknown domain for tmap"); -+ return NULL; -+ } -+ } -+ if (ifo == NULL) return NULL; -+ tmapt = ifo->vts_tmapt; -+ /* HACK: ifo->vts_tmapt is NULL b/c ifo_read.c never loads it -+ * load ifo->vts_tmapt directly*/ -+ if (tmapt == NULL) { -+ result = ifoRead_VTS_TMAPT(ifo); -+ if (!result) { -+ return NULL; -+ } -+ tmapt = ifo->vts_tmapt; -+ if (tmapt == NULL) return NULL; -+ } -+ -+ tmap_count = tmapt->nr_of_tmaps; -+ pgcN = state->pgcN - 1; /* -1 b/c pgcN is base1 */ -+ if (pgcN < 0) { -+ fprintf(MSG_OUT, "pgcN < 0"); -+ return NULL; -+ } -+ -+ /* get tmap */ -+ switch(domain) { -+ case FP_DOMAIN: -+ case VMGM_DOMAIN: -+ case VTSM_DOMAIN: { -+ if (tmap_count == 0) { -+ fprintf(MSG_OUT, "tmap_count == 0"); -+ return NULL; -+ } -+ tmap = &tmapt->tmap[0]; /* ASSUME: vmgi only has one time map */ -+ break; -+ } -+ case VTS_DOMAIN: { -+ if (pgcN >= tmap_count) { -+ fprintf(MSG_OUT, "pgcN >= tmap_count; pgcN=%i tmap_count=%i", -+ pgcN, tmap_count); -+ return NULL; -+ } -+ tmap = &tmapt->tmap[pgcN]; -+ break; -+ } -+ } -+ if (tmap == NULL) return NULL; -+ -+ /* tmap->tmu is in seconds; convert to millisecs */ -+ *tmap_interval = tmap->tmu * 1000; -+ if (*tmap_interval == 0) { -+ fprintf(MSG_OUT, "tmap_interval == 0"); -+ return NULL; -+ } -+ *tmap_len = tmap->nr_of_entries; -+ if (*tmap_len == 0) { -+ fprintf(MSG_OUT, "tmap_len == 0"); -+ return NULL; -+ } -+ return tmap; -+} -+ -+/* Get a sector from a tmap */ -+static int32_t dvdnav_tmap_get_entry(vts_tmap_t *tmap, uint16_t tmap_len, -+ int32_t idx, uint32_t *sector) { -+ /* tmaps start at idx 0 which represents a sector at time 1 * tmap_interval -+ * this creates a "fake" tmap index at idx -1 for sector 0 */ -+ if (idx == TMAP_IDX_EDGE_BGN) { -+ *sector = 0; -+ return 1; -+ } -+ if (idx < TMAP_IDX_EDGE_BGN || idx >= tmap_len) { -+ fprintf(MSG_OUT, "idx out of bounds idx=%i %i", idx, tmap_len); -+ return 0; -+ } -+ /* 0x7fffffff unsets discontinuity bit if present */ -+ *sector = tmap->map_ent[idx] & 0x7fffffff; -+ return 1; -+} -+ -+/* Do a binary search for earlier admap index near find_sector */ -+static int32_t dvdnav_admap_search(vobu_admap_t *admap, uint32_t admap_len, -+ uint32_t find_sector, uint32_t *vobu) { -+ int32_t adj = 1; -+ int32_t prv_pos = 0; -+ int32_t prv_len = admap_len; -+ int32_t cur_len = 0; -+ int32_t cur_idx = 0; -+ uint32_t cur_sector = 0; -+ while (1) { -+ cur_len = prv_len / 2; -+ /* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */ -+ if (prv_len % 2 == 1) ++cur_len; -+ cur_idx = prv_pos + (cur_len * adj); -+ if (cur_idx < 0) cur_idx = 0; -+ else if (cur_idx >= admap_len) cur_idx = admap_len - 1; -+ -+ cur_sector = admap->vobu_start_sectors[cur_idx]; -+ if (find_sector < cur_sector) adj = -1; -+ else if (find_sector > cur_sector) adj = 1; -+ else if (find_sector == cur_sector) { -+ *vobu = cur_idx; -+ return 1; -+ } -+ if (cur_len == 1) {/* no smaller intervals left */ -+ if (adj == -1) {/* last comparison was greater; take lesser */ -+ cur_idx -= 1; -+ cur_sector = admap->vobu_start_sectors[cur_idx]; -+ } -+ *vobu = cur_idx; -+ return 1; -+ } -+ prv_len = cur_len; -+ prv_pos = cur_idx; -+ } -+} -+ -+/* Do a binary search for the earlier tmap entry near find_sector */ -+static int32_t dvdnav_tmap_search(vts_tmap_t *tmap, uint32_t tmap_len, -+ uint32_t find_sector, int32_t *tmap_idx, uint32_t *sector) { -+ int32_t adj = 1; -+ int32_t prv_pos = 0; -+ int32_t prv_len = tmap_len; -+ int32_t result = 0; -+ int32_t cur_len = 0; -+ int32_t cur_idx = 0; -+ uint32_t cur_sector = 0; -+ while (1) { -+ cur_len = prv_len / 2; -+ /* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */ -+ if (prv_len % 2 == 1) ++cur_len; -+ cur_idx = prv_pos + (cur_len * adj); -+ if (cur_idx < 0) cur_idx = 0; -+ else if (cur_idx >= tmap_len) cur_idx = tmap_len - 1; -+ cur_sector = 0; -+ result = dvdnav_tmap_get_entry(tmap, tmap_len, cur_idx, &cur_sector); -+ if (!result) return 0; -+ if (find_sector < cur_sector) adj = -1; -+ else if (find_sector > cur_sector) adj = 1; -+ else if (find_sector == cur_sector) { -+ *tmap_idx = cur_idx; -+ *sector = cur_sector; -+ return 1; -+ } -+ if (cur_len == 1) {/* no smaller intervals left */ -+ if (adj == -1) {/* last comparison was greater; take lesser */ -+ if (cur_idx == 0) { /* fake tmap index for sector 0 */ -+ cur_idx = TMAP_IDX_EDGE_BGN; -+ cur_sector = 0; -+ } -+ else { -+ cur_idx -= 1; -+ result = dvdnav_tmap_get_entry(tmap, tmap_len, cur_idx, &cur_sector); -+ if (!result) return 0; -+ } -+ } -+ *tmap_idx = cur_idx; -+ *sector = cur_sector; -+ return 1; -+ } -+ prv_len = cur_len; -+ prv_pos = cur_idx; -+ } -+} -+ -+/* Find the cell for a given time */ -+static int32_t dvdnav_cell_find(dvdnav_t *this, dvd_state_t *state, -+ uint64_t find_val, dvdnav_cell_data_t *cell_data) { -+ uint32_t cells_len = 0; -+ uint32_t cells_bgn = 0; -+ uint32_t cells_end = 0; -+ uint32_t cell_idx = 0; -+ pgc_t *pgc = NULL; -+ int pgN = 0; -+ cell_playback_t *cell = NULL; -+ int found = 0; -+ -+ pgc = state->pgc; -+ if (pgc == NULL) return 0; -+ cells_len = pgc->nr_of_cells; -+ if (cells_len == 0) { -+ fprintf(MSG_OUT, "cells_len == 0"); -+ return 0; -+ } -+ -+ /* get cells_bgn, cells_end */ -+ if (this->pgc_based) { -+ cells_bgn = 1; -+ cells_end = cells_len; -+ } -+ else { -+ pgN = state->pgN; -+ cells_bgn = pgc->program_map[pgN - 1]; /* -1 b/c pgN is 1 based? */ -+ if (pgN < pgc->nr_of_programs) { -+ cells_end = pgc->program_map[pgN] - 1; -+ } -+ else { -+ cells_end = cells_len; -+ } -+ } -+ -+ /* search cells */ -+ for (cell_idx = cells_bgn; cell_idx <= cells_end; cell_idx++) { -+ cell = &(pgc->cell_playback[cell_idx - 1]); /* -1 b/c cell is base1 */ -+ /* if angle block, only consider first angleBlock -+ * (others are "redundant" for purpose of search) */ -+ if ( cell->block_type == BLOCK_TYPE_ANGLE_BLOCK -+ && cell->block_mode != BLOCK_MODE_FIRST_CELL) { -+ continue; -+ } -+ cell_data->bgn->sector = cell->first_sector; -+ cell_data->end->sector = cell->last_sector; -+ -+ /* 90 pts to ms */ -+ cell_data->end->time += (dvdnav_convert_time(&cell->playback_time) / 90); -+ if ( find_val >= cell_data->bgn->time -+ && find_val <= cell_data->end->time) { -+ found = 1; -+ break; -+ } -+ cell_data->bgn->time = cell_data->end->time; -+ } -+ -+ /* found cell: set var */ -+ if (found) { -+ cell_data->idx = cell_idx; -+ } -+ else -+ fprintf(MSG_OUT, "cell not found; find=%"PRId64"", find_val); -+ return found; -+} -+ -+/* Given two sectors and a fraction, calc the corresponding vobu */ -+static int32_t dvdnav_admap_interpolate_vobu(dvdnav_jump_args_t *args, -+ dvdnav_pos_data_t *bgn, dvdnav_pos_data_t *end, uint32_t fraction, -+ uint32_t *jump_sector) { -+ int32_t result = 0; -+ uint32_t vobu_len = 0; -+ uint32_t vobu_adj = 0; -+ uint32_t vobu_idx = 0; -+ -+ /* get bgn->vobu_idx */ -+ result = dvdnav_admap_search(args->admap, args->admap_len, -+ bgn->sector, &bgn->vobu_idx); -+ if (!result) { -+ fprintf(MSG_OUT, "admap_interpolate: could not find sector_bgn"); -+ return 0; -+ } -+ -+ /* get end->vobu_idx */ -+ result = dvdnav_admap_search(args->admap, args->admap_len, -+ end->sector, &end->vobu_idx); -+ if (!result) { -+ fprintf(MSG_OUT, "admap_interpolate: could not find sector_end"); -+ return 0; -+ } -+ -+ vobu_len = end->vobu_idx - bgn->vobu_idx; -+ /* +500 to round up else 74% of a 4 sec interval = 2 sec */ -+ vobu_adj = ((fraction * vobu_len) + 500) / 1000; -+ /* HACK: need to add +1, or else will land too soon (not sure why) */ -+ vobu_adj++; -+ vobu_idx = bgn->vobu_idx + vobu_adj; -+ if (vobu_idx >= args->admap_len) { -+ fprintf(MSG_OUT, "admap_interpolate: vobu_idx >= admap_len"); -+ return 0; -+ } -+ *jump_sector = args->admap->vobu_start_sectors[vobu_idx]; -+ return 1; -+} -+ -+/* Given two tmap entries and a time, calc the time for the lo tmap entry */ -+static int32_t dvdnav_tmap_calc_time_for_tmap_entry(dvdnav_jump_args_t *args, -+ dvdnav_pos_data_t *lo, dvdnav_pos_data_t *hi, -+ dvdnav_pos_data_t *pos, uint64_t *out_time) { -+ int32_t result = 0; -+ uint32_t vobu_pct = 0; -+ uint64_t time_adj = 0; -+ -+ if (lo->sector == hi->sector) { -+ fprintf(MSG_OUT, "lo->sector == hi->sector: %i", lo->sector); -+ return 0; -+ } -+ -+ /* get vobus corresponding to lo, hi, pos */ -+ result = dvdnav_admap_search(args->admap, args->admap_len, -+ lo->sector, &lo->vobu_idx); -+ if (!result) { -+ fprintf(MSG_OUT, "lo->vobu: lo->sector=%i", lo->sector); -+ return 0; -+ } -+ result = dvdnav_admap_search(args->admap, args->admap_len, -+ hi->sector, &hi->vobu_idx); -+ if (!result) { -+ fprintf(MSG_OUT, "hi->vobu: hi->sector=%i", hi->sector); -+ return 0; -+ } -+ result = dvdnav_admap_search(args->admap, args->admap_len, -+ pos->sector, &pos->vobu_idx); -+ if (!result) { -+ fprintf(MSG_OUT, "pos->vobu: pos->sector=%i", pos->sector); -+ return 0; -+ } -+ -+ /* calc position of cell relative to lo */ -+ vobu_pct = ((pos->vobu_idx - lo->vobu_idx) * 1000) -+ / ( hi->vobu_idx - lo->vobu_idx); -+ if (vobu_pct < 0 || vobu_pct > 1000) { -+ fprintf(MSG_OUT, "vobu_pct must be between 0 and 1000"); -+ return 0; -+ } -+ -+ /* calc time of lo */ -+ time_adj = (uint64_t)((args->tmap_interval * vobu_pct) / 1000); -+ *out_time = pos->time - time_adj; -+ return 1; -+} -+ -+/* Find the tmap entries on either side of a given sector */ -+static int32_t dvdnav_tmap_get_entries_for_sector(dvdnav_t *this, -+ dvd_state_t *state, dvdnav_jump_args_t *args, -+ dvdnav_cell_data_t *cell_data, uint32_t find_sector, -+ dvdnav_pos_data_t *lo, dvdnav_pos_data_t *hi) { -+ int32_t result = 0; -+ -+ result = dvdnav_tmap_search(args->tmap, args->tmap_len, find_sector, -+ &lo->tmap_idx, &lo->sector); -+ if (!result) { -+ fprintf(MSG_OUT, "could not find lo idx: %i", find_sector); -+ return 0; -+ } -+ -+ /* HACK: Most DVDs have a tmap that starts at sector 0 -+ * However, some have initial dummy cells that are not seekable -+ * (restricted = y). -+ * These cells will throw off the tmap calcs when in the first playable cell. -+ * For now, assume that lo->sector is equal to the cell->bgn->sector -+ * Note that for most DVDs this will be 0 -+ * (Since they will have no dummy cells and cell 1 will start at sector 0) -+ */ -+ if (lo->tmap_idx == TMAP_IDX_EDGE_BGN) { -+ lo->sector = cell_data->bgn->sector; -+ } -+ -+ if (lo->tmap_idx == args->tmap_len - 1) { -+ /* lo is last tmap entry; "fake" entry for one beyond -+ * and mark it with cell_end_sector */ -+ hi->tmap_idx = TMAP_IDX_EDGE_END; -+ hi->sector = cell_data->end->sector; -+ } -+ else { -+ hi->tmap_idx = lo->tmap_idx + 1; -+ result = dvdnav_tmap_get_entry(args->tmap, args->tmap_len, -+ hi->tmap_idx, &hi->sector); -+ if (!result) { -+ fprintf(MSG_OUT, "could not find hi idx: %i", find_sector); -+ return 0; -+ } -+ } -+ return 1; -+} -+ -+/* Find the nearest vobu by using the tmap */ -+static int32_t dvdnav_find_vobu_by_tmap(dvdnav_t *this, dvd_state_t *state, -+ dvdnav_jump_args_t *args, dvdnav_cell_data_t *cell_data, -+ dvdnav_pos_data_t *jump) { -+ uint64_t seek_offset = 0; -+ uint32_t seek_idx = 0; -+ int32_t result = 0; -+ dvdnav_pos_data_t *cell_bgn_lo = NULL; -+ dvdnav_pos_data_t *cell_bgn_hi = NULL; -+ dvdnav_pos_data_t *jump_lo = NULL; -+ dvdnav_pos_data_t *jump_hi = NULL; -+ -+ /* get tmap, tmap_len, tmap_interval */ -+ args->tmap = dvdnav_tmap_get(this, state, -+ &args->tmap_len, &args->tmap_interval); -+ if (args->tmap == NULL) return 0; -+ -+ /* get tmap entries on either side of cell_bgn */ -+ cell_bgn_lo = &(dvdnav_pos_data_t){0}; -+ cell_bgn_hi = &(dvdnav_pos_data_t){0}; -+ result = dvdnav_tmap_get_entries_for_sector(this, state, args, cell_data, -+ cell_data->bgn->sector, cell_bgn_lo, cell_bgn_hi); -+ if (!result) return 0; -+ -+ /* calc time of cell_bgn_lo */ -+ result = dvdnav_tmap_calc_time_for_tmap_entry(args, cell_bgn_lo, cell_bgn_hi, -+ cell_data->bgn, &cell_bgn_lo->time); -+ if (!result) return 0; -+ -+ /* calc time of jump_time relative to cell_bgn_lo */ -+ seek_offset = jump->time - cell_bgn_lo->time; -+ seek_idx = (uint32_t)(seek_offset / args->tmap_interval); -+ uint32_t seek_remainder = seek_offset - (seek_idx * args->tmap_interval); -+ uint32_t seek_pct = (seek_remainder * 1000) / args->tmap_interval; -+ -+ /* get tmap entries on either side of jump_time */ -+ jump_lo = &(dvdnav_pos_data_t){0}; -+ jump_hi = &(dvdnav_pos_data_t){0}; -+ -+ /* if seek_idx == 0, then tmap_indexes are the same, do not re-get -+ * also, note cell_bgn_lo will already have sector if TMAP_IDX_EDGE_BGN */ -+ if (seek_idx == 0) { -+ jump_lo = cell_bgn_lo; -+ jump_hi = cell_bgn_hi; -+ } -+ else { -+ jump_lo->tmap_idx = (uint32_t)(cell_bgn_lo->tmap_idx + seek_idx); -+ result = dvdnav_tmap_get_entry(args->tmap, args->tmap_len, -+ jump_lo->tmap_idx, &jump_lo->sector); -+ if (!result) return 0; -+ -+ /* +1 handled by dvdnav_tmap_get_entry */ -+ jump_hi->tmap_idx = jump_lo->tmap_idx + 1; -+ result = dvdnav_tmap_get_entry(args->tmap, args->tmap_len, -+ jump_hi->tmap_idx, &jump_hi->sector); -+ if (!result) return 0; -+ } -+ -+ /* interpolate sector */ -+ result = dvdnav_admap_interpolate_vobu(args, jump_lo, jump_hi, -+ seek_pct, &jump->sector); -+ -+ return result; -+} -+ -+/* Find the nearest vobu by using the cell boundaries */ -+static int32_t dvdnav_find_vobu_by_cell_boundaries(dvdnav_t *this, -+ dvdnav_jump_args_t *args, dvdnav_cell_data_t *cell_data, -+ dvdnav_pos_data_t *jump) { -+ uint64_t jump_offset = 0; -+ uint64_t cell_len = 0; -+ uint32_t jump_pct = 0; -+ int32_t result = 0; -+ -+ /* get jump_offset */ -+ jump_offset = jump->time - cell_data->bgn->time; -+ if (jump_offset < 0) { -+ fprintf(MSG_OUT, "jump_offset < 0"); -+ return 0; -+ } -+ cell_len = cell_data->end->time - cell_data->bgn->time; -+ if (cell_len < 0) { -+ fprintf(MSG_OUT, "cell_len < 0"); -+ return 0; -+ } -+ jump_pct = (jump_offset * 1000) / cell_len; -+ -+ /* get sector */ -+ /* NOTE: end cell sector in VTS_PGC is last sector of cell -+ * this last sector is not the start of a VOBU -+ * +1 to get sector that is the start of a VOBU -+ * start of a VOBU is needed in order to index into admap */ -+ cell_data->end->sector += 1; -+ result = dvdnav_admap_interpolate_vobu(args, -+ cell_data->bgn, cell_data->end, jump_pct, &jump->sector); -+ if (!result) { -+ fprintf(MSG_OUT, "find_by_admap.interpolate"); -+ return 0; -+ } -+ return 1; -+} -+ -+/* Jump to sector by time */ -+/* NOTE: Mode is currently unimplemented. Only 0 should be passed. */ -+/* 1 and -1 are for future implementation */ -+/* 0: Default. Jump to a time which may be either <> time_in_pts_ticks */ -+/* 1: After. Always jump to a time that is > time_in_pts_ticks */ -+/* -1: Before. Always jump to a time that is < time_in_pts_ticks */ -+dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this, -+ uint64_t time_in_pts_ticks, int32_t mode) { -+ if (mode != JUMP_MODE_TIME_DEFAULT) return DVDNAV_STATUS_ERR; -+ int32_t result = DVDNAV_STATUS_ERR; -+ dvd_state_t *state = NULL; -+ uint32_t sector_off = 0; -+ dvdnav_pos_data_t *jump = NULL; -+ dvdnav_cell_data_t *cell_data = NULL; -+ dvdnav_jump_args_t *args = NULL; -+ -+ jump = &(dvdnav_pos_data_t){0}; -+ /* convert time to milliseconds */ -+ jump->time = time_in_pts_ticks / 90; -+ -+ /* get variables that will be used across both functions */ -+ state = &(this->vm->state); -+ if (state == NULL) goto exit; -+ -+ /* get cell info */ -+ cell_data = &(dvdnav_cell_data_t){0}; -+ cell_data->bgn = &(dvdnav_pos_data_t){0}; -+ cell_data->end = &(dvdnav_pos_data_t){0}; -+ result = dvdnav_cell_find(this, state, jump->time, cell_data); -+ if (!result) goto exit; -+ -+ /* get admap */ -+ args = &(dvdnav_jump_args_t){0}; -+ args->admap = dvdnav_admap_get(this, state, &args->admap_len); -+ if (args->admap == NULL) goto exit; -+ -+ /* find sector */ -+ result = dvdnav_find_vobu_by_tmap(this, state, args, cell_data, jump); -+ if (!result) {/* bad tmap; interpolate over cell */ -+ result = dvdnav_find_vobu_by_cell_boundaries(this, args, cell_data, jump); -+ if (!result) { -+ goto exit; -+ } -+ } -+ -+#ifdef LOG_DEBUG -+ fprintf(MSG_OUT, "libdvdnav: seeking to time=%lu\n", jump->time); -+ fprintf(MSG_OUT, "libdvdnav: Before cellN=%u blockN=%u\n", state->cellN, state->blockN); -+#endif -+ -+ /* jump to sector */ -+ sector_off = jump->sector - cell_data->bgn->sector; -+ this->cur_cell_time = 0; -+ if (vm_jump_cell_block(this->vm, cell_data->idx, sector_off)) { -+ pthread_mutex_lock(&this->vm_lock); -+ this->vm->hop_channel += HOP_SEEK; -+ pthread_mutex_unlock(&this->vm_lock); -+ result = DVDNAV_STATUS_OK; -+ } -+ -+#ifdef LOG_DEBUG -+ fprintf(MSG_OUT, "libdvdnav: After cellN=%u blockN=%u\n", state->cellN, state->blockN); -+#endif -+ -+exit: -+ return result; -+} diff --git a/lib/libdvd/patches/libdvdnav.diff b/lib/libdvd/patches/libdvdnav.diff index 32f7f0837a..cb702a4b38 100644 --- a/lib/libdvd/patches/libdvdnav.diff +++ b/lib/libdvd/patches/libdvdnav.diff @@ -1,6 +1,6 @@ -diff -uwr libdvdnav-4.2.0/Makefile xbmc/lib/libdvd/libdvdnav/Makefile ---- libdvdnav-4.2.0/Makefile 2008-12-30 15:48:46 +0100 -+++ xbmc/lib/libdvd/libdvdnav/Makefile 2013-02-07 14:42:34 +0100 +diff -uwr ../libdvdnav-4.2.1/Makefile lib/libdvd/libdvdnav/Makefile +--- ../libdvdnav-4.2.1/Makefile Tue Dec 30 14:48:46 2008 ++++ lib/libdvd/libdvdnav/Makefile Wed Jan 29 20:43:09 2014 @@ -112,7 +112,7 @@ # Clean targets @@ -10,67 +10,149 @@ diff -uwr libdvdnav-4.2.0/Makefile xbmc/lib/libdvd/libdvdnav/Makefile pcedit = sed \ -e 's,@prefix@,$(PREFIX),' \ -diff -uwr libdvdnav-4.2.0/src/dvdnav/dvdnav.h xbmc/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h ---- libdvdnav-4.2.0/src/dvdnav/dvdnav.h 2011-02-26 21:32:32 +0100 -+++ xbmc/lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h 2013-02-07 14:42:34 +0100 -@@ -695,6 +695,42 @@ - */ - int8_t dvdnav_is_domain_vts(dvdnav_t *self); +Only in lib/libdvd/libdvdnav/: config.h +Only in lib/libdvd/libdvdnav/: config.mak +diff -uwr ../libdvdnav-4.2.1/configure.ac lib/libdvd/libdvdnav/configure.ac +--- ../libdvdnav-4.2.1/configure.ac Wed Dec 4 23:52:30 2013 ++++ lib/libdvd/libdvdnav/configure.ac Fri Feb 7 19:24:37 2014 +@@ -89,7 +89,6 @@ + AC_PROG_MAKE_SET + AC_PROG_INSTALL + AC_PROG_LN_S +-PKG_PROG_PKG_CONFIG -+////////// RATDVD stuff /////////////// -+ -+/* -+ * Get the number of audio streams. -+ */ -+int32_t dvdnav_get_audio_stream_count(dvdnav_t * self); -+ -+/* -+ * Get the number of subpicture streams. -+ */ -+int32_t dvdnav_get_subpicture_stream_count(dvdnav_t * self); -+ -+/* -+ * Get attributes of the current audio stream. -+ */ -+dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes); -+ -+/* -+ * Get attributes of the current subpicture stream. -+ */ -+dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self, int32_t streamid, subp_attr_t* stitle_attributes); -+ -+/* -+ * Get information about the current video stream -+ */ -+dvdnav_status_t dvdnav_get_video_info(dvdnav_t * self, video_attr_t* video_attributes); -+ -+/* -+ * Select the audio stream to be played -+ */ -+dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio); -+ -+/* -+ * Select the spu stream to be displayed -+ */ -+dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture); + dnl -------------------------------------------------------------- + dnl Libtool +@@ -186,25 +185,15 @@ + [AS_HELP_STRING([--with-dvdread-config=PROG], + [dvdread-config program to use @<:@default=from PATH@:>@])], + [DVDREAD_CONFIG="$withval"], +- [DVDREAD_CONFIG=""]) +- +-dnl by default, search pkg-config, and then fall back to dvdread-config +-DVDREAD_PKG_CONFIG="no" +-if test "x$DVDREAD_CONFIG" = "x"; then +- PKG_CHECK_MODULES([DVDREAD], [dvdread], +- [DVDREAD_PKG_CONFIG="yes"], + [dnl User didn't specify program, search PATH + AC_PATH_PROG([DVDREAD_CONFIG], [dvdread-config], [no]) + test "x$DVDREAD_CONFIG" = xno && \ + AC_MSG_ERROR([dvdread-config required to link with libdvdread]) + ]) +-fi +-if test "x$DVDREAD_PKG_CONFIG" != "xyes"; then + DVDREAD_CFLAGS=`$DVDREAD_CONFIG --cflags` || \ + AC_MSG_ERROR([Could not get libdvdread CFLAGS from $DVDREAD_CONFIG]) + DVDREAD_LIBS=`$DVDREAD_CONFIG --libs` || \ + AC_MSG_ERROR([Could not get libdvdread LIBS from $DVDREAD_CONFIG]) +-fi + AC_SUBST([DVDREAD_CFLAGS]) + AC_SUBST([DVDREAD_LIBS]) - #ifdef __cplusplus +diff -uwr ../libdvdnav-4.2.1/configure2 lib/libdvd/libdvdnav/configure2 +--- ../libdvdnav-4.2.1/configure2 Thu Dec 19 21:43:16 2013 ++++ lib/libdvd/libdvdnav/configure2 Fri Feb 7 19:24:37 2014 +@@ -5,7 +5,6 @@ + + cc=gcc + make=make +-: ${PKG_CONFIG:=pkg-config} + + # find source path + source_path="`dirname \"$0\"`" +@@ -44,15 +43,12 @@ + echo "Developer options:" + echo " --disable-strip disable stripping of executables and shared libraries" + echo " --disable-opts disable compiler optimizations" +- echo "Environment variables:" +- echo " PKG_CONFIG use specified pkg-config [$PKG_CONFIG]" + exit 1 } -diff -uwr libdvdnav-4.2.0/src/dvdnav.c xbmc/lib/libdvd/libdvdnav/src/dvdnav.c ---- libdvdnav-4.2.0/src/dvdnav.c 2010-07-31 01:34:12 +0200 -+++ xbmc/lib/libdvd/libdvdnav/src/dvdnav.c 2013-02-07 14:42:34 +0100 -@@ -337,7 +337,9 @@ - } - #endif -- if(num_angle != 0) { -+ /* only use ILVU information if we are at the last vobunit in ILVU */ -+ /* otherwise we will miss nav packets from vobunits inbetween */ -+ if(num_angle != 0 && (nav_dsi->sml_pbi.category & 0x5000) == 0x5000 ) { + SHARED=yes + STATIC=yes +-DVDREAD_CONFIG="" +-DVDREAD_PKG_CONFIG="${PKG_CONFIG} dvdread" ++DVDREAD_CONFIG=dvdread-config + PREFIX=/usr/local/ + INSTALLSTRIP=-s + USEDEBUG=-g +@@ -108,14 +104,8 @@ + test -z "$incdir" && incdir=$PREFIX/include/dvdnav + + dvdread=no +-if test -z "$DVDREAD_CONFIG" ; then +- DVDREAD_CONFIG=${DVDREAD_PKG_CONFIG} +- $DVDREAD_CONFIG --exists >> /dev/null 2>&1 && dvdread=yes +-fi +-if test "$dvdread" != "yes" ; then +- DVDREAD_CONFIG=dvdread-config + $DVDREAD_CONFIG --prefix >> /dev/null 2>&1 && dvdread=yes +-fi ++test "$dvdread" != "yes" && $DVDREAD_CONFIG --exists >> /dev/null 2>&1 && dvdread=yes + if test "$dvdread" != "yes" ; then + echo "$DVDREAD_CONFIG returned an error. Can't proceed" + exit 1 +Only in lib/libdvd/libdvdnav/: obj +diff -uwr ../libdvdnav-4.2.1/src/dvdnav/dvd_types.h lib/libdvd/libdvdnav/src/dvdnav/dvd_types.h +--- ../libdvdnav-4.2.1/src/dvdnav/dvd_types.h Tue Dec 30 14:48:46 2008 ++++ lib/libdvd/libdvdnav/src/dvdnav/dvd_types.h Sun Jan 26 19:51:43 2014 +@@ -161,14 +161,13 @@ + /* The audio format */ + typedef enum { + DVD_AUDIO_FORMAT_AC3 = 0, +- DVD_AUDIO_FORMAT_MPEG1 = 1, +- DVD_AUDIO_FORMAT_MPEG1_DRC = 2, +- DVD_AUDIO_FORMAT_MPEG2 = 3, +- DVD_AUDIO_FORMAT_MPEG2_DRC = 4, +- DVD_AUDIO_FORMAT_LPCM = 5, ++ DVD_AUDIO_FORMAT_UNKNOWN_1 = 1, ++ DVD_AUDIO_FORMAT_MPEG = 2, ++ DVD_AUDIO_FORMAT_MPEG2_EXT = 3, ++ DVD_AUDIO_FORMAT_LPCM = 4, ++ DVD_AUDIO_FORMAT_UNKNOWN_5 = 5, + DVD_AUDIO_FORMAT_DTS = 6, +- DVD_AUDIO_FORMAT_SDDS = 7, +- DVD_AUDIO_FORMAT_Other = 8 ++ DVD_AUDIO_FORMAT_SDDS = 7 + } DVDAudioFormat_t; + + /* Audio language extension */ +diff -uwr ../libdvdnav-4.2.1/src/dvdnav/dvdnav.h lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h +--- ../libdvdnav-4.2.1/src/dvdnav/dvdnav.h Sun Oct 6 21:47:20 2013 ++++ lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h Fri Feb 7 19:24:42 2014 +@@ -63,12 +63,6 @@ + #define DVDNAV_STATUS_ERR 0 + #define DVDNAV_STATUS_OK 1 + +-#define DVDNAV_FORMAT_AC3 0 +-#define DVDNAV_FORMAT_MPEGAUDIO 3 +-#define DVDNAV_FORMAT_LPCM 4 +-#define DVDNAV_FORMAT_DTS 5 +-#define DVDNAV_FORMAT_SDDS 6 +- + /********************************************************************* + * initialisation & housekeeping functions * + *********************************************************************/ +@@ -377,6 +371,14 @@ + divide it by 90000 to get the current play time in seconds + */ + int64_t dvdnav_get_current_time(dvdnav_t *self); ++ ++/* ++ * Find the nearest vobu and jump to it ++ * ++ * Alternative to dvdnav_time_search ++ */ ++dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this, ++ uint64_t time_in_pts_ticks, int32_t mode); - if((next = nav_pci->nsml_agli.nsml_agl_dsta[angle-1]) != 0) { - if((next & 0x3fffffff) != 0) { -@@ -466,6 +468,10 @@ + /* + * Stop playing the current position and start playback of the title +diff -uwr ../libdvdnav-4.2.1/src/dvdnav.c lib/libdvd/libdvdnav/src/dvdnav.c +--- ../libdvdnav-4.2.1/src/dvdnav.c Thu Oct 3 23:39:38 2013 ++++ lib/libdvd/libdvdnav/src/dvdnav.c Fri Feb 7 19:24:42 2014 +@@ -467,6 +467,10 @@ /* Decode nav into pci and dsi. Then get next VOBU info. */ if(!dvdnav_decode_packet(this, *buf, &this->dsi, &this->pci)) { printerr("Expected NAV packet but none found."); @@ -81,7 +163,7 @@ diff -uwr libdvdnav-4.2.0/src/dvdnav.c xbmc/lib/libdvd/libdvdnav/src/dvdnav.c pthread_mutex_unlock(&this->vm_lock); return DVDNAV_STATUS_ERR; } -@@ -618,9 +624,17 @@ +@@ -619,9 +623,17 @@ cell_event->pgc_length = dvdnav_convert_time(&state->pgc->playback_time); cell_event->cell_start = 0; @@ -101,7 +183,7 @@ diff -uwr libdvdnav-4.2.0/src/dvdnav.c xbmc/lib/libdvd/libdvdnav/src/dvdnav.c cell_event->pg_start = 0; for (i = 1; i < state->pgc->program_map[state->pgN-1]; i++) -@@ -769,6 +783,10 @@ +@@ -770,6 +782,10 @@ /* Decode nav into pci and dsi. Then get next VOBU info. */ if(!dvdnav_decode_packet(this, *buf, &this->dsi, &this->pci)) { printerr("Expected NAV packet but none found."); @@ -112,7 +194,38 @@ diff -uwr libdvdnav-4.2.0/src/dvdnav.c xbmc/lib/libdvd/libdvdnav/src/dvdnav.c pthread_mutex_unlock(&this->vm_lock); return DVDNAV_STATUS_ERR; } -@@ -1166,6 +1184,10 @@ +@@ -908,27 +924,10 @@ + attr = vm_get_audio_attr(this->vm, stream); + pthread_mutex_unlock(&this->vm_lock); + +- switch(attr.audio_format) { +- case 0: +- format = DVDNAV_FORMAT_AC3; +- break; +- case 2: /* MPEG-1 or MPEG-2 without extension bitstream. */ +- case 3: /* MPEG-2 with extension bitstream. */ +- format = DVDNAV_FORMAT_MPEGAUDIO; +- break; +- case 4: +- format = DVDNAV_FORMAT_LPCM; +- break; +- case 6: +- format = DVDNAV_FORMAT_DTS; +- break; +- case 7: +- format = DVDNAV_FORMAT_SDDS; +- break; +- default: ++ if (attr.audio_format >=0 && attr.audio_format <= 7) ++ format = attr.audio_format; ++ else + format = 0xffff; +- break; +- } + + return format; + } +@@ -1167,6 +1166,11 @@ ops.ops_int = 0; @@ -120,10 +233,11 @@ diff -uwr libdvdnav-4.2.0/src/dvdnav.c xbmc/lib/libdvd/libdvdnav/src/dvdnav.c + printerr("Passed a NULL pointer."); + return ops.ops_struct; + } ++ if(!this->started) { printerr("Virtual DVD machine not started."); return ops.ops_struct; -@@ -1180,3 +1202,263 @@ +@@ -1183,3 +1187,50 @@ return ops.ops_struct; } @@ -135,68 +249,6 @@ diff -uwr libdvdnav-4.2.0/src/dvdnav.c xbmc/lib/libdvd/libdvdnav/src/dvdnav.c + return this->vm; +} + -+int dvdnav_get_nr_of_subtitle_streams(dvdnav_t *this) -+{ -+ int i; -+ int count = 0; -+ -+ if (this && this->vm && this->vm->state.pgc) -+ { -+ for (i = 0; i < 32; i++) -+ { -+ if (this->vm->state.pgc->subp_control[i] & (1<<31)) count++; -+ } -+ } -+ return count; -+ -+ /* old code -+ if(!this || !this->vm || !this->vm->vtsi || !this->vm->vtsi->vtsi_mat) return 0; -+ -+ switch ((this->vm->state).domain) { -+ case VTS_DOMAIN: -+ return this->vm->vtsi->vtsi_mat->nr_of_vts_subp_streams; -+ case VTSM_DOMAIN: -+ return this->vm->vtsi->vtsi_mat->nr_of_vtsm_subp_streams; // 1 -+ case VMGM_DOMAIN: -+ case FP_DOMAIN: -+ return this->vm->vmgi->vmgi_mat->nr_of_vmgm_subp_streams; // 1 -+ } -+ -+ return 0; -+ */ -+} -+ -+int dvdnav_get_nr_of_audio_streams(dvdnav_t *this) -+{ -+ int i; -+ int count = 0; -+ -+ if (this && this->vm && this->vm->state.pgc) -+ { -+ for (i = 0; i < 8; i++) -+ { -+ if (this->vm->state.pgc->audio_control[i] & (1<<15)) count++; -+ } -+ } -+ return count; -+ -+ /* old code -+ if(!this || !this->vm || !this->vm->vtsi || !this->vm->vtsi->vtsi_mat) return 0; -+ -+ switch ((this->vm->state).domain) { -+ case VTS_DOMAIN: -+ return this->vm->vtsi->vtsi_mat->nr_of_vts_audio_streams; -+ case VTSM_DOMAIN: -+ return this->vm->vtsi->vtsi_mat->nr_of_vtsm_audio_streams; // 1 -+ case VMGM_DOMAIN: -+ case FP_DOMAIN: -+ return this->vm->vmgi->vmgi_mat->nr_of_vmgm_audio_streams; // 1 -+ } -+ -+ return 0; -+ */ -+} -+ +/* return the alpha and color for the current active button + * color, alpha [0][] = selection + * color, alpha = color @@ -232,168 +284,64 @@ diff -uwr libdvdnav-4.2.0/src/dvdnav.c xbmc/lib/libdvd/libdvdnav/src/dvdnav.c + return 0; +} + -+/* -+ * the next stuff is taken from ratdvd -+ */ -+ +#undef printerr +#define printerr(str) strncpy(self->err_str, str, MAX_ERR_LEN); + -+dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes) -+{ -+ if(!self) { -+ printerr("Passed a NULL pointer."); -+ return -1; -+ } -+ if(!self->started) { -+ printerr("Virtual DVD machine not started."); -+ return -1; -+ } -+ -+ pthread_mutex_lock(&self->vm_lock); -+ audio_attr_t attributes = vm_get_audio_attr(self->vm,streamid); -+ pthread_mutex_unlock(&self->vm_lock); -+ audio_attributes->audio_format = attributes.audio_format; -+ audio_attributes->multichannel_extension = attributes.multichannel_extension; -+ audio_attributes->lang_type = attributes.lang_type; -+ audio_attributes->application_mode = attributes.application_mode; -+ audio_attributes->quantization = attributes.quantization; -+ audio_attributes->sample_frequency = attributes.sample_frequency; -+ audio_attributes->channels = attributes.channels; -+ audio_attributes->lang_code = attributes.lang_code; -+ audio_attributes->lang_extension = attributes.lang_extension; -+ audio_attributes->code_extension = attributes.code_extension; -+ audio_attributes->unknown3 = attributes.unknown3; -+ audio_attributes->app_info = attributes.app_info; -+ return DVDNAV_STATUS_OK; -+} -+ -+dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self -+ , int32_t streamid, subp_attr_t* stitle_attributes) -+{ -+ if(!self) { -+ printerr("Passed a NULL pointer."); -+ return -1; -+ } -+ if(!self->started) { -+ printerr("Virtual DVD machine not started."); -+ return -1; -+ } -+ -+ pthread_mutex_lock(&self->vm_lock); -+ subp_attr_t attributes = vm_get_subp_attr(self->vm,streamid); -+ pthread_mutex_unlock(&self->vm_lock); -+ stitle_attributes->code_mode = attributes.code_mode; -+ stitle_attributes->zero1 = attributes.zero1; -+ stitle_attributes->type = attributes.type; -+ stitle_attributes->zero2 = attributes.zero2; -+ stitle_attributes->lang_code = attributes.lang_code; -+ stitle_attributes->lang_extension = attributes.lang_extension; -+ stitle_attributes->code_extension = attributes.code_extension; -+ return DVDNAV_STATUS_OK; -+} -+ -+dvdnav_status_t dvdnav_get_video_info(dvdnav_t * self, video_attr_t* video_attributes) -+{ -+ if(!self) { -+ printerr("Passed a NULL pointer."); -+ return -1; -+ } -+ if(!self->started) { -+ printerr("Virtual DVD machine not started."); -+ return -1; -+ } -+ -+ pthread_mutex_lock(&self->vm_lock); -+ video_attr_t attributes = vm_get_video_attr(self->vm); -+ pthread_mutex_unlock(&self->vm_lock); -+ -+ video_attributes->video_format = attributes.video_format; -+ video_attributes->permitted_df = attributes.permitted_df; -+ video_attributes->display_aspect_ratio = attributes.display_aspect_ratio; -+ video_attributes->mpeg_version = attributes.mpeg_version; -+ video_attributes->film_mode = attributes.film_mode; -+ video_attributes->letterboxed = attributes.letterboxed; -+ video_attributes->picture_size = attributes.picture_size; -+ video_attributes->bit_rate = attributes.bit_rate; -+ video_attributes->unknown1 = attributes.unknown1; -+ video_attributes->line21_cc_2 = attributes.line21_cc_2; -+ video_attributes->line21_cc_1 = attributes.line21_cc_1; -+ return DVDNAV_STATUS_OK; -+} -+ -+dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio) -+{ -+ int32_t num; -+ -+ if(!self) { -+ printerr("Passed a NULL pointer."); -+ return DVDNAV_STATUS_ERR; -+ } -+ -+ num = dvdnav_get_nr_of_audio_streams(self); -+ pthread_mutex_lock(&self->vm_lock); -+ /* Set subp AUDIO if valid */ -+ if((audio >= 0) && (audio <= num)) { -+ self->vm->state.AST_REG = audio; -+ } else { -+ //printerr("Passed an invalid audio number."); -+ pthread_mutex_unlock(&self->vm_lock); -+ return DVDNAV_STATUS_ERR; -+ } -+ pthread_mutex_unlock(&self->vm_lock); -+ -+ return DVDNAV_STATUS_OK; -+} -+ -+dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture) -+{ -+ int32_t num; -+ -+ if(!self) { -+ printerr("Passed a NULL pointer."); -+ return DVDNAV_STATUS_ERR; -+ } -+ -+ num = dvdnav_get_nr_of_subtitle_streams(self); -+ pthread_mutex_lock(&self->vm_lock); -+ /* Set subp SPRM if valid */ -+ if((subpicture >= 0) && (subpicture <= num)) { -+ self->vm->state.SPST_REG = subpicture | 0x40; -+ } else if (subpicture & 0x80) { -+ self->vm->state.SPST_REG = subpicture & ~0x80; -+ } else { -+ self->vm->state.SPST_REG = subpicture; -+ //printerr("Passed an invalid subpicture number."); -+ //pthread_mutex_unlock(&self->vm_lock); -+ //return DVDNAV_STATUS_ERR; -+ } -+ pthread_mutex_unlock(&self->vm_lock); -+ -+ return DVDNAV_STATUS_OK; -+} -+ -+void dvdnav_lock(dvdnav_t *self) -+{ -+ // we do not check for null pointer problems -+ pthread_mutex_lock(&self->vm_lock); -+} ++#endif // _XBMC +diff -uwr ../libdvdnav-4.2.1/src/dvdnav_internal.h lib/libdvd/libdvdnav/src/dvdnav_internal.h +--- ../libdvdnav-4.2.1/src/dvdnav_internal.h Sun Dec 9 21:22:16 2012 ++++ lib/libdvd/libdvdnav/src/dvdnav_internal.h Fri Feb 7 19:24:37 2014 +@@ -133,6 +133,45 @@ + } ATTRIBUTE_PACKED spu_status_t; + #endif + ++/* ++ * Describes a given time, and the closest sector, vobu and tmap index ++ */ ++typedef struct { ++ uint64_t time; ++ uint32_t sector; ++ uint32_t vobu_idx; ++ int32_t tmap_idx; ++} dvdnav_pos_data_t; + -+void dvdnav_unlock(dvdnav_t *self) -+{ -+ // we do not check for null pointer problems -+ pthread_mutex_unlock(&self->vm_lock); -+} ++/* ++ * Encapsulates cell data ++ */ ++typedef struct { ++ int32_t idx; ++ dvdnav_pos_data_t *bgn; ++ dvdnav_pos_data_t *end; ++} dvdnav_cell_data_t; + -+#endif // _XBMC ++/* ++ * Encapsulates common variables used by internal functions of jump_to_time ++ */ ++typedef struct { ++ vobu_admap_t *admap; ++ int32_t admap_len; ++ vts_tmap_t *tmap; ++ int32_t tmap_len; ++ int32_t tmap_interval; ++} dvdnav_jump_args_t; + -diff -uwr libdvdnav-4.2.0/src/dvdnav_internal.h xbmc/lib/libdvd/libdvdnav/src/dvdnav_internal.h ---- libdvdnav-4.2.0/src/dvdnav_internal.h 2010-06-01 12:02:38 +0200 -+++ xbmc/lib/libdvd/libdvdnav/src/dvdnav_internal.h 2013-02-07 14:42:34 +0100 -@@ -175,6 +175,18 @@ ++/* ++ * Utility constants for jump_to_time ++ */ ++#define TMAP_IDX_EDGE_BGN -1 ++#define TMAP_IDX_EDGE_END -2 ++#define JUMP_MODE_TIME_AFTER 1 ++#define JUMP_MODE_TIME_DEFAULT 0 ++#define JUMP_MODE_TIME_BEFORE -1 ++ + typedef struct dvdnav_vobu_s { + int32_t vobu_start; /* Logical Absolute. MAX needed is 0x300000 */ + int32_t vobu_length; +@@ -182,6 +221,18 @@ + /* converts a dvd_time_t to PTS ticks */ int64_t dvdnav_convert_time(dvd_time_t *time); - ++ +/* XBMC added functions */ +/* + * Get current playback state @@ -405,13 +353,12 @@ diff -uwr libdvdnav-4.2.0/src/dvdnav_internal.h xbmc/lib/libdvd/libdvdnav/src/dv + */ +dvdnav_status_t dvdnav_set_state(dvdnav_t *this, dvd_state_t *save_state); +/* end XBMC */ -+ + /** USEFUL MACROS **/ - #ifdef __GNUC__ -diff -uwr libdvdnav-4.2.0/src/read_cache.c xbmc/lib/libdvd/libdvdnav/src/read_cache.c ---- libdvdnav-4.2.0/src/read_cache.c 2008-12-30 15:48:46 +0100 -+++ xbmc/lib/libdvd/libdvdnav/src/read_cache.c 2013-02-07 14:42:34 +0100 +diff -uwr ../libdvdnav-4.2.1/src/read_cache.c lib/libdvd/libdvdnav/src/read_cache.c +--- ../libdvdnav-4.2.1/src/read_cache.c Tue Dec 30 14:48:46 2008 ++++ lib/libdvd/libdvdnav/src/read_cache.c Wed Jan 29 20:43:09 2014 @@ -338,7 +338,7 @@ pthread_mutex_lock(&cache->lock); for (i = 0; i < READ_CACHE_CHUNKS; i++) { @@ -421,10 +368,18 @@ diff -uwr libdvdnav-4.2.0/src/read_cache.c xbmc/lib/libdvd/libdvdnav/src/read_ca cache->chunk[i].usage_count--; } } -diff -uwr libdvdnav-4.2.0/src/searching.c xbmc/lib/libdvd/libdvdnav/src/searching.c ---- libdvdnav-4.2.0/src/searching.c 2011-10-07 19:06:24 +0200 -+++ xbmc/lib/libdvd/libdvdnav/src/searching.c 2013-02-07 14:42:34 +0100 -@@ -121,6 +121,12 @@ +diff -uwr ../libdvdnav-4.2.1/src/searching.c lib/libdvd/libdvdnav/src/searching.c +--- ../libdvdnav-4.2.1/src/searching.c Tue Nov 12 00:55:10 2013 ++++ lib/libdvd/libdvdnav/src/searching.c Fri Feb 7 19:24:37 2014 +@@ -36,6 +36,7 @@ + #include "vm/decoder.h" + #include "vm/vm.h" + #include "dvdnav_internal.h" ++#include <dvdread/ifo_read.h> + + /* + #define LOG_DEBUG +@@ -121,6 +122,12 @@ return DVDNAV_STATUS_ERR; } @@ -437,7 +392,7 @@ diff -uwr libdvdnav-4.2.0/src/searching.c xbmc/lib/libdvd/libdvdnav/src/searchin this->cur_cell_time = 0; if (this->pgc_based) { -@@ -136,24 +142,109 @@ +@@ -136,24 +143,109 @@ last_cell_nr = state->pgc->nr_of_cells; } @@ -552,7 +507,7 @@ diff -uwr libdvdnav-4.2.0/src/searching.c xbmc/lib/libdvd/libdvdnav/src/searchin if(found) { uint32_t vobu; #ifdef LOG_DEBUG -@@ -202,6 +293,7 @@ +@@ -202,6 +294,7 @@ result = dvdnav_get_position(this, &target, &length); if(!result) { @@ -560,7 +515,7 @@ diff -uwr libdvdnav-4.2.0/src/searching.c xbmc/lib/libdvd/libdvdnav/src/searchin return DVDNAV_STATUS_ERR; } -@@ -213,7 +305,7 @@ +@@ -213,7 +306,7 @@ return DVDNAV_STATUS_ERR; } #ifdef LOG_DEBUG @@ -569,10 +524,11 @@ diff -uwr libdvdnav-4.2.0/src/searching.c xbmc/lib/libdvd/libdvdnav/src/searchin fprintf(MSG_OUT, "libdvdnav: Before cellN=%u blockN=%u\n", state->cellN, state->blockN); #endif -@@ -654,3 +746,62 @@ +@@ -681,4 +774,653 @@ + if(!retval && tmp) free(tmp); return retval; - } ++} + +dvdnav_status_t dvdnav_get_state(dvdnav_t *this, dvd_state_t *save_state) +{ @@ -632,10 +588,600 @@ diff -uwr libdvdnav-4.2.0/src/searching.c xbmc/lib/libdvd/libdvdnav/src/searchin + pthread_mutex_unlock(&this->vm_lock); + return DVDNAV_STATUS_OK; +} -diff -uwr libdvdnav-4.2.0/src/vm/vm.c xbmc/lib/libdvd/libdvdnav/src/vm/vm.c ---- libdvdnav-4.2.0/src/vm/vm.c 2010-11-22 00:59:44 +0100 -+++ xbmc/lib/libdvd/libdvdnav/src/vm/vm.c 2013-02-07 14:42:34 +0100 -@@ -255,6 +255,15 @@ ++ ++ ++ ++/* Get an admap and admap_len */ ++static vobu_admap_t* dvdnav_admap_get(dvdnav_t *this, dvd_state_t *state, ++ int32_t *admap_len) { ++ vobu_admap_t *admap = NULL; ++ switch(state->domain) { ++ case FP_DOMAIN: ++ case VMGM_DOMAIN: ++ admap = this->vm->vmgi->menu_vobu_admap; ++ break; ++ case VTSM_DOMAIN: ++ admap = this->vm->vtsi->menu_vobu_admap; ++ break; ++ case VTS_DOMAIN: ++ admap = this->vm->vtsi->vts_vobu_admap; ++ break; ++ default: { ++ fprintf(MSG_OUT, "Unknown domain"); ++ return NULL; ++ } ++ } ++ if (admap == NULL) return NULL; ++ ++ *admap_len = (admap->last_byte + 1 - VOBU_ADMAP_SIZE) / VOBU_ADMAP_SIZE; ++ if (*admap_len <= 0) { ++ fprintf(MSG_OUT, "admap_len <= 0"); ++ return NULL; ++ } ++ return admap; ++} ++ ++/* Get a tmap, tmap_len and tmap_interval */ ++static vts_tmap_t* dvdnav_tmap_get(dvdnav_t *this, dvd_state_t *state, ++ int32_t *tmap_len, int32_t *tmap_interval) { ++ int32_t vts_idx = 0; ++ domain_t domain; ++ ifo_handle_t *ifo = NULL; ++ vts_tmapt_t *tmapt = NULL; ++ uint16_t tmap_count = 0; ++ int32_t pgcN = 0; ++ vts_tmap_t *tmap = NULL; ++ int32_t result = 0; ++ ++ vts_idx = state->vtsN; ++ domain = state->domain; ++ switch(domain) { ++ case FP_DOMAIN: ++ case VTSM_DOMAIN: ++ case VMGM_DOMAIN: { ++ ifo = this->vm->vmgi; ++ break; ++ } ++ case VTS_DOMAIN: { ++ ifo = this->vm->vtsi; ++ break; ++ } ++ default: { ++ fprintf(MSG_OUT, "unknown domain for tmap"); ++ return NULL; ++ } ++ } ++ if (ifo == NULL) return NULL; ++ tmapt = ifo->vts_tmapt; ++ /* HACK: ifo->vts_tmapt is NULL b/c ifo_read.c never loads it ++ * load ifo->vts_tmapt directly*/ ++ if (tmapt == NULL) { ++ result = ifoRead_VTS_TMAPT(ifo); ++ if (!result) { ++ return NULL; ++ } ++ tmapt = ifo->vts_tmapt; ++ if (tmapt == NULL) return NULL; ++ } ++ ++ tmap_count = tmapt->nr_of_tmaps; ++ pgcN = state->pgcN - 1; /* -1 b/c pgcN is base1 */ ++ if (pgcN < 0) { ++ fprintf(MSG_OUT, "pgcN < 0"); ++ return NULL; ++ } ++ ++ /* get tmap */ ++ switch(domain) { ++ case FP_DOMAIN: ++ case VMGM_DOMAIN: ++ case VTSM_DOMAIN: { ++ if (tmap_count == 0) { ++ fprintf(MSG_OUT, "tmap_count == 0"); ++ return NULL; ++ } ++ tmap = &tmapt->tmap[0]; /* ASSUME: vmgi only has one time map */ ++ break; ++ } ++ case VTS_DOMAIN: { ++ if (pgcN >= tmap_count) { ++ fprintf(MSG_OUT, "pgcN >= tmap_count; pgcN=%i tmap_count=%i", ++ pgcN, tmap_count); ++ return NULL; ++ } ++ tmap = &tmapt->tmap[pgcN]; ++ break; ++ } ++ } ++ if (tmap == NULL) return NULL; ++ ++ /* tmap->tmu is in seconds; convert to millisecs */ ++ *tmap_interval = tmap->tmu * 1000; ++ if (*tmap_interval == 0) { ++ fprintf(MSG_OUT, "tmap_interval == 0"); ++ return NULL; ++ } ++ *tmap_len = tmap->nr_of_entries; ++ if (*tmap_len == 0) { ++ fprintf(MSG_OUT, "tmap_len == 0"); ++ return NULL; ++ } ++ return tmap; ++} ++ ++/* Get a sector from a tmap */ ++static int32_t dvdnav_tmap_get_entry(vts_tmap_t *tmap, uint16_t tmap_len, ++ int32_t idx, uint32_t *sector) { ++ /* tmaps start at idx 0 which represents a sector at time 1 * tmap_interval ++ * this creates a "fake" tmap index at idx -1 for sector 0 */ ++ if (idx == TMAP_IDX_EDGE_BGN) { ++ *sector = 0; ++ return 1; ++ } ++ if (idx < TMAP_IDX_EDGE_BGN || idx >= tmap_len) { ++ fprintf(MSG_OUT, "idx out of bounds idx=%i %i", idx, tmap_len); ++ return 0; ++ } ++ /* 0x7fffffff unsets discontinuity bit if present */ ++ *sector = tmap->map_ent[idx] & 0x7fffffff; ++ return 1; ++} ++ ++/* Do a binary search for earlier admap index near find_sector */ ++static int32_t dvdnav_admap_search(vobu_admap_t *admap, uint32_t admap_len, ++ uint32_t find_sector, uint32_t *vobu) { ++ int32_t adj = 1; ++ int32_t prv_pos = 0; ++ int32_t prv_len = admap_len; ++ int32_t cur_len = 0; ++ int32_t cur_idx = 0; ++ uint32_t cur_sector = 0; ++ while (1) { ++ cur_len = prv_len / 2; ++ /* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */ ++ if (prv_len % 2 == 1) ++cur_len; ++ cur_idx = prv_pos + (cur_len * adj); ++ if (cur_idx < 0) cur_idx = 0; ++ else if (cur_idx >= admap_len) cur_idx = admap_len - 1; ++ ++ cur_sector = admap->vobu_start_sectors[cur_idx]; ++ if (find_sector < cur_sector) adj = -1; ++ else if (find_sector > cur_sector) adj = 1; ++ else if (find_sector == cur_sector) { ++ *vobu = cur_idx; ++ return 1; ++ } ++ if (cur_len == 1) {/* no smaller intervals left */ ++ if (adj == -1) {/* last comparison was greater; take lesser */ ++ cur_idx -= 1; ++ cur_sector = admap->vobu_start_sectors[cur_idx]; ++ } ++ *vobu = cur_idx; ++ return 1; ++ } ++ prv_len = cur_len; ++ prv_pos = cur_idx; ++ } ++} ++ ++/* Do a binary search for the earlier tmap entry near find_sector */ ++static int32_t dvdnav_tmap_search(vts_tmap_t *tmap, uint32_t tmap_len, ++ uint32_t find_sector, int32_t *tmap_idx, uint32_t *sector) { ++ int32_t adj = 1; ++ int32_t prv_pos = 0; ++ int32_t prv_len = tmap_len; ++ int32_t result = 0; ++ int32_t cur_len = 0; ++ int32_t cur_idx = 0; ++ uint32_t cur_sector = 0; ++ while (1) { ++ cur_len = prv_len / 2; ++ /* need to add 1 when prv_len == 3 (cur_len shoud go to 2, not 1) */ ++ if (prv_len % 2 == 1) ++cur_len; ++ cur_idx = prv_pos + (cur_len * adj); ++ if (cur_idx < 0) cur_idx = 0; ++ else if (cur_idx >= tmap_len) cur_idx = tmap_len - 1; ++ cur_sector = 0; ++ result = dvdnav_tmap_get_entry(tmap, tmap_len, cur_idx, &cur_sector); ++ if (!result) return 0; ++ if (find_sector < cur_sector) adj = -1; ++ else if (find_sector > cur_sector) adj = 1; ++ else if (find_sector == cur_sector) { ++ *tmap_idx = cur_idx; ++ *sector = cur_sector; ++ return 1; ++ } ++ if (cur_len == 1) {/* no smaller intervals left */ ++ if (adj == -1) {/* last comparison was greater; take lesser */ ++ if (cur_idx == 0) { /* fake tmap index for sector 0 */ ++ cur_idx = TMAP_IDX_EDGE_BGN; ++ cur_sector = 0; ++ } ++ else { ++ cur_idx -= 1; ++ result = dvdnav_tmap_get_entry(tmap, tmap_len, cur_idx, &cur_sector); ++ if (!result) return 0; ++ } ++ } ++ *tmap_idx = cur_idx; ++ *sector = cur_sector; ++ return 1; ++ } ++ prv_len = cur_len; ++ prv_pos = cur_idx; ++ } ++} ++ ++/* Find the cell for a given time */ ++static int32_t dvdnav_cell_find(dvdnav_t *this, dvd_state_t *state, ++ uint64_t find_val, dvdnav_cell_data_t *cell_data) { ++ uint32_t cells_len = 0; ++ uint32_t cells_bgn = 0; ++ uint32_t cells_end = 0; ++ uint32_t cell_idx = 0; ++ pgc_t *pgc = NULL; ++ int pgN = 0; ++ cell_playback_t *cell = NULL; ++ int found = 0; ++ ++ pgc = state->pgc; ++ if (pgc == NULL) return 0; ++ cells_len = pgc->nr_of_cells; ++ if (cells_len == 0) { ++ fprintf(MSG_OUT, "cells_len == 0"); ++ return 0; ++ } ++ ++ /* get cells_bgn, cells_end */ ++ if (this->pgc_based) { ++ cells_bgn = 1; ++ cells_end = cells_len; ++ } ++ else { ++ pgN = state->pgN; ++ cells_bgn = pgc->program_map[pgN - 1]; /* -1 b/c pgN is 1 based? */ ++ if (pgN < pgc->nr_of_programs) { ++ cells_end = pgc->program_map[pgN] - 1; ++ } ++ else { ++ cells_end = cells_len; ++ } ++ } ++ ++ /* search cells */ ++ for (cell_idx = cells_bgn; cell_idx <= cells_end; cell_idx++) { ++ cell = &(pgc->cell_playback[cell_idx - 1]); /* -1 b/c cell is base1 */ ++ /* if angle block, only consider first angleBlock ++ * (others are "redundant" for purpose of search) */ ++ if ( cell->block_type == BLOCK_TYPE_ANGLE_BLOCK ++ && cell->block_mode != BLOCK_MODE_FIRST_CELL) { ++ continue; ++ } ++ cell_data->bgn->sector = cell->first_sector; ++ cell_data->end->sector = cell->last_sector; ++ ++ /* 90 pts to ms */ ++ cell_data->end->time += (dvdnav_convert_time(&cell->playback_time) / 90); ++ if ( find_val >= cell_data->bgn->time ++ && find_val <= cell_data->end->time) { ++ found = 1; ++ break; ++ } ++ cell_data->bgn->time = cell_data->end->time; ++ } ++ ++ /* found cell: set var */ ++ if (found) { ++ cell_data->idx = cell_idx; ++ } ++ else ++ fprintf(MSG_OUT, "cell not found; find=%"PRId64"", find_val); ++ return found; ++} ++ ++/* Given two sectors and a fraction, calc the corresponding vobu */ ++static int32_t dvdnav_admap_interpolate_vobu(dvdnav_jump_args_t *args, ++ dvdnav_pos_data_t *bgn, dvdnav_pos_data_t *end, uint32_t fraction, ++ uint32_t *jump_sector) { ++ int32_t result = 0; ++ uint32_t vobu_len = 0; ++ uint32_t vobu_adj = 0; ++ uint32_t vobu_idx = 0; ++ ++ /* get bgn->vobu_idx */ ++ result = dvdnav_admap_search(args->admap, args->admap_len, ++ bgn->sector, &bgn->vobu_idx); ++ if (!result) { ++ fprintf(MSG_OUT, "admap_interpolate: could not find sector_bgn"); ++ return 0; ++ } ++ ++ /* get end->vobu_idx */ ++ result = dvdnav_admap_search(args->admap, args->admap_len, ++ end->sector, &end->vobu_idx); ++ if (!result) { ++ fprintf(MSG_OUT, "admap_interpolate: could not find sector_end"); ++ return 0; ++ } ++ ++ vobu_len = end->vobu_idx - bgn->vobu_idx; ++ /* +500 to round up else 74% of a 4 sec interval = 2 sec */ ++ vobu_adj = ((fraction * vobu_len) + 500) / 1000; ++ /* HACK: need to add +1, or else will land too soon (not sure why) */ ++ vobu_adj++; ++ vobu_idx = bgn->vobu_idx + vobu_adj; ++ if (vobu_idx >= args->admap_len) { ++ fprintf(MSG_OUT, "admap_interpolate: vobu_idx >= admap_len"); ++ return 0; ++ } ++ *jump_sector = args->admap->vobu_start_sectors[vobu_idx]; ++ return 1; ++} ++ ++/* Given two tmap entries and a time, calc the time for the lo tmap entry */ ++static int32_t dvdnav_tmap_calc_time_for_tmap_entry(dvdnav_jump_args_t *args, ++ dvdnav_pos_data_t *lo, dvdnav_pos_data_t *hi, ++ dvdnav_pos_data_t *pos, uint64_t *out_time) { ++ int32_t result = 0; ++ uint32_t vobu_pct = 0; ++ uint64_t time_adj = 0; ++ ++ if (lo->sector == hi->sector) { ++ fprintf(MSG_OUT, "lo->sector == hi->sector: %i", lo->sector); ++ return 0; ++ } ++ ++ /* get vobus corresponding to lo, hi, pos */ ++ result = dvdnav_admap_search(args->admap, args->admap_len, ++ lo->sector, &lo->vobu_idx); ++ if (!result) { ++ fprintf(MSG_OUT, "lo->vobu: lo->sector=%i", lo->sector); ++ return 0; ++ } ++ result = dvdnav_admap_search(args->admap, args->admap_len, ++ hi->sector, &hi->vobu_idx); ++ if (!result) { ++ fprintf(MSG_OUT, "hi->vobu: hi->sector=%i", hi->sector); ++ return 0; ++ } ++ result = dvdnav_admap_search(args->admap, args->admap_len, ++ pos->sector, &pos->vobu_idx); ++ if (!result) { ++ fprintf(MSG_OUT, "pos->vobu: pos->sector=%i", pos->sector); ++ return 0; ++ } ++ ++ /* calc position of cell relative to lo */ ++ vobu_pct = ((pos->vobu_idx - lo->vobu_idx) * 1000) ++ / ( hi->vobu_idx - lo->vobu_idx); ++ if (vobu_pct < 0 || vobu_pct > 1000) { ++ fprintf(MSG_OUT, "vobu_pct must be between 0 and 1000"); ++ return 0; ++ } ++ ++ /* calc time of lo */ ++ time_adj = (uint64_t)((args->tmap_interval * vobu_pct) / 1000); ++ *out_time = pos->time - time_adj; ++ return 1; ++} ++ ++/* Find the tmap entries on either side of a given sector */ ++static int32_t dvdnav_tmap_get_entries_for_sector(dvdnav_t *this, ++ dvd_state_t *state, dvdnav_jump_args_t *args, ++ dvdnav_cell_data_t *cell_data, uint32_t find_sector, ++ dvdnav_pos_data_t *lo, dvdnav_pos_data_t *hi) { ++ int32_t result = 0; ++ ++ result = dvdnav_tmap_search(args->tmap, args->tmap_len, find_sector, ++ &lo->tmap_idx, &lo->sector); ++ if (!result) { ++ fprintf(MSG_OUT, "could not find lo idx: %i", find_sector); ++ return 0; ++ } ++ ++ /* HACK: Most DVDs have a tmap that starts at sector 0 ++ * However, some have initial dummy cells that are not seekable ++ * (restricted = y). ++ * These cells will throw off the tmap calcs when in the first playable cell. ++ * For now, assume that lo->sector is equal to the cell->bgn->sector ++ * Note that for most DVDs this will be 0 ++ * (Since they will have no dummy cells and cell 1 will start at sector 0) ++ */ ++ if (lo->tmap_idx == TMAP_IDX_EDGE_BGN) { ++ lo->sector = cell_data->bgn->sector; ++ } ++ ++ if (lo->tmap_idx == args->tmap_len - 1) { ++ /* lo is last tmap entry; "fake" entry for one beyond ++ * and mark it with cell_end_sector */ ++ hi->tmap_idx = TMAP_IDX_EDGE_END; ++ hi->sector = cell_data->end->sector; ++ } ++ else { ++ hi->tmap_idx = lo->tmap_idx + 1; ++ result = dvdnav_tmap_get_entry(args->tmap, args->tmap_len, ++ hi->tmap_idx, &hi->sector); ++ if (!result) { ++ fprintf(MSG_OUT, "could not find hi idx: %i", find_sector); ++ return 0; ++ } ++ } ++ return 1; ++} ++ ++/* Find the nearest vobu by using the tmap */ ++static int32_t dvdnav_find_vobu_by_tmap(dvdnav_t *this, dvd_state_t *state, ++ dvdnav_jump_args_t *args, dvdnav_cell_data_t *cell_data, ++ dvdnav_pos_data_t *jump) { ++ uint64_t seek_offset = 0; ++ uint32_t seek_idx = 0; ++ int32_t result = 0; ++ dvdnav_pos_data_t *cell_bgn_lo = NULL; ++ dvdnav_pos_data_t *cell_bgn_hi = NULL; ++ dvdnav_pos_data_t *jump_lo = NULL; ++ dvdnav_pos_data_t *jump_hi = NULL; ++ ++ /* get tmap, tmap_len, tmap_interval */ ++ args->tmap = dvdnav_tmap_get(this, state, ++ &args->tmap_len, &args->tmap_interval); ++ if (args->tmap == NULL) return 0; ++ ++ /* get tmap entries on either side of cell_bgn */ ++ cell_bgn_lo = &(dvdnav_pos_data_t){0}; ++ cell_bgn_hi = &(dvdnav_pos_data_t){0}; ++ result = dvdnav_tmap_get_entries_for_sector(this, state, args, cell_data, ++ cell_data->bgn->sector, cell_bgn_lo, cell_bgn_hi); ++ if (!result) return 0; ++ ++ /* calc time of cell_bgn_lo */ ++ result = dvdnav_tmap_calc_time_for_tmap_entry(args, cell_bgn_lo, cell_bgn_hi, ++ cell_data->bgn, &cell_bgn_lo->time); ++ if (!result) return 0; ++ ++ /* calc time of jump_time relative to cell_bgn_lo */ ++ seek_offset = jump->time - cell_bgn_lo->time; ++ seek_idx = (uint32_t)(seek_offset / args->tmap_interval); ++ uint32_t seek_remainder = seek_offset - (seek_idx * args->tmap_interval); ++ uint32_t seek_pct = (seek_remainder * 1000) / args->tmap_interval; ++ ++ /* get tmap entries on either side of jump_time */ ++ jump_lo = &(dvdnav_pos_data_t){0}; ++ jump_hi = &(dvdnav_pos_data_t){0}; ++ ++ /* if seek_idx == 0, then tmap_indexes are the same, do not re-get ++ * also, note cell_bgn_lo will already have sector if TMAP_IDX_EDGE_BGN */ ++ if (seek_idx == 0) { ++ jump_lo = cell_bgn_lo; ++ jump_hi = cell_bgn_hi; ++ } ++ else { ++ jump_lo->tmap_idx = (uint32_t)(cell_bgn_lo->tmap_idx + seek_idx); ++ result = dvdnav_tmap_get_entry(args->tmap, args->tmap_len, ++ jump_lo->tmap_idx, &jump_lo->sector); ++ if (!result) return 0; ++ ++ /* +1 handled by dvdnav_tmap_get_entry */ ++ jump_hi->tmap_idx = jump_lo->tmap_idx + 1; ++ result = dvdnav_tmap_get_entry(args->tmap, args->tmap_len, ++ jump_hi->tmap_idx, &jump_hi->sector); ++ if (!result) return 0; ++ } ++ ++ /* interpolate sector */ ++ result = dvdnav_admap_interpolate_vobu(args, jump_lo, jump_hi, ++ seek_pct, &jump->sector); ++ ++ return result; ++} ++ ++/* Find the nearest vobu by using the cell boundaries */ ++static int32_t dvdnav_find_vobu_by_cell_boundaries(dvdnav_t *this, ++ dvdnav_jump_args_t *args, dvdnav_cell_data_t *cell_data, ++ dvdnav_pos_data_t *jump) { ++ uint64_t jump_offset = 0; ++ uint64_t cell_len = 0; ++ uint32_t jump_pct = 0; ++ int32_t result = 0; ++ ++ /* get jump_offset */ ++ jump_offset = jump->time - cell_data->bgn->time; ++ if (jump_offset < 0) { ++ fprintf(MSG_OUT, "jump_offset < 0"); ++ return 0; ++ } ++ cell_len = cell_data->end->time - cell_data->bgn->time; ++ if (cell_len < 0) { ++ fprintf(MSG_OUT, "cell_len < 0"); ++ return 0; ++ } ++ jump_pct = (jump_offset * 1000) / cell_len; ++ ++ /* get sector */ ++ /* NOTE: end cell sector in VTS_PGC is last sector of cell ++ * this last sector is not the start of a VOBU ++ * +1 to get sector that is the start of a VOBU ++ * start of a VOBU is needed in order to index into admap */ ++ cell_data->end->sector += 1; ++ result = dvdnav_admap_interpolate_vobu(args, ++ cell_data->bgn, cell_data->end, jump_pct, &jump->sector); ++ if (!result) { ++ fprintf(MSG_OUT, "find_by_admap.interpolate"); ++ return 0; ++ } ++ return 1; ++} ++ ++/* Jump to sector by time */ ++/* NOTE: Mode is currently unimplemented. Only 0 should be passed. */ ++/* 1 and -1 are for future implementation */ ++/* 0: Default. Jump to a time which may be either <> time_in_pts_ticks */ ++/* 1: After. Always jump to a time that is > time_in_pts_ticks */ ++/* -1: Before. Always jump to a time that is < time_in_pts_ticks */ ++dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this, ++ uint64_t time_in_pts_ticks, int32_t mode) { ++ if (mode != JUMP_MODE_TIME_DEFAULT) return DVDNAV_STATUS_ERR; ++ int32_t result = DVDNAV_STATUS_ERR; ++ dvd_state_t *state = NULL; ++ uint32_t sector_off = 0; ++ dvdnav_pos_data_t *jump = NULL; ++ dvdnav_cell_data_t *cell_data = NULL; ++ dvdnav_jump_args_t *args = NULL; ++ ++ jump = &(dvdnav_pos_data_t){0}; ++ /* convert time to milliseconds */ ++ jump->time = time_in_pts_ticks / 90; ++ ++ /* get variables that will be used across both functions */ ++ state = &(this->vm->state); ++ if (state == NULL) goto exit; ++ ++ /* get cell info */ ++ cell_data = &(dvdnav_cell_data_t){0}; ++ cell_data->bgn = &(dvdnav_pos_data_t){0}; ++ cell_data->end = &(dvdnav_pos_data_t){0}; ++ result = dvdnav_cell_find(this, state, jump->time, cell_data); ++ if (!result) goto exit; ++ ++ /* get admap */ ++ args = &(dvdnav_jump_args_t){0}; ++ args->admap = dvdnav_admap_get(this, state, &args->admap_len); ++ if (args->admap == NULL) goto exit; ++ ++ /* find sector */ ++ result = dvdnav_find_vobu_by_tmap(this, state, args, cell_data, jump); ++ if (!result) {/* bad tmap; interpolate over cell */ ++ result = dvdnav_find_vobu_by_cell_boundaries(this, args, cell_data, jump); ++ if (!result) { ++ goto exit; ++ } ++ } ++ ++#ifdef LOG_DEBUG ++ fprintf(MSG_OUT, "libdvdnav: seeking to time=%lu\n", jump->time); ++ fprintf(MSG_OUT, "libdvdnav: Before cellN=%u blockN=%u\n", state->cellN, state->blockN); ++#endif ++ ++ /* jump to sector */ ++ sector_off = jump->sector - cell_data->bgn->sector; ++ this->cur_cell_time = 0; ++ if (vm_jump_cell_block(this->vm, cell_data->idx, sector_off)) { ++ pthread_mutex_lock(&this->vm_lock); ++ this->vm->hop_channel += HOP_SEEK; ++ pthread_mutex_unlock(&this->vm_lock); ++ result = DVDNAV_STATUS_OK; ++ } ++ ++#ifdef LOG_DEBUG ++ fprintf(MSG_OUT, "libdvdnav: After cellN=%u blockN=%u\n", state->cellN, state->blockN); ++#endif ++ ++exit: ++ return result; + } +diff -uwr ../libdvdnav-4.2.1/src/vm/vm.c lib/libdvd/libdvdnav/src/vm/vm.c +--- ../libdvdnav-4.2.1/src/vm/vm.c Wed Dec 4 23:02:02 2013 ++++ lib/libdvd/libdvdnav/src/vm/vm.c Fri Feb 7 19:31:48 2014 +@@ -254,6 +254,15 @@ fprintf(MSG_OUT, "libdvdnav: ifoRead_TITLE_VOBU_ADMAP vtsi failed\n"); return 0; } @@ -651,41 +1197,21 @@ diff -uwr libdvdnav-4.2.0/src/vm/vm.c xbmc/lib/libdvd/libdvdnav/src/vm/vm.c (vm->state).vtsN = vtsN; return 1; -@@ -390,7 +399,15 @@ - /* return 0; Not really used for now.. */ +@@ -392,6 +401,13 @@ } /* ifoRead_TXTDT_MGI(vmgi); Not implemented yet */ + dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot); +#ifdef _XBMC + if(DVDUDFVolumeInfo(vm->dvd, vm->dvd_name, sizeof(vm->dvd_name), NULL, 0)) + if(DVDISOVolumeInfo(vm->dvd, vm->dvd_name, sizeof(vm->dvd_name), NULL, 0)) + strcpy(vm->dvd_name, ""); + + fprintf(MSG_OUT, "libdvdnav: vm: DVD Title: %s\n", vm->dvd_name); -+#else - dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot); +#endif vm->map = remap_loadmap(vm->dvd_name); } if (vm->vmgi) { -@@ -846,7 +863,7 @@ - } - } - --#if 0 -+// XBMC #if 0 - /* currently unused */ - void vm_get_audio_info(vm_t *vm, int *current, int *num_avail) { - switch ((vm->state).domain) { -@@ -884,7 +901,7 @@ - break; - } - } --#endif -+// XBMC #endif - - void vm_get_video_res(vm_t *vm, int *width, int *height) { - video_attr_t attr = vm_get_video_attr(vm); -@@ -1981,6 +1998,50 @@ +@@ -1983,6 +1999,50 @@ ifoClose(ifo); } @@ -736,23 +1262,9 @@ diff -uwr libdvdnav-4.2.0/src/vm/vm.c xbmc/lib/libdvd/libdvdnav/src/vm/vm.c /* Debug functions */ #ifdef TRACE -diff -uwr libdvdnav-4.2.0/src/vm/vm.h xbmc/lib/libdvd/libdvdnav/src/vm/vm.h ---- libdvdnav-4.2.0/src/vm/vm.h 2010-07-31 01:34:16 +0200 -+++ xbmc/lib/libdvd/libdvdnav/src/vm/vm.h 2013-02-07 14:42:34 +0100 -@@ -156,11 +156,11 @@ - int vm_get_audio_active_stream(vm_t *vm); - int vm_get_subp_active_stream(vm_t *vm, int mode); - void vm_get_angle_info(vm_t *vm, int *current, int *num_avail); --#if 0 -+// _XBMC #if 0 - /* currently unused */ - void vm_get_audio_info(vm_t *vm, int *current, int *num_avail); - void vm_get_subp_info(vm_t *vm, int *current, int *num_avail); --#endif -+// _XBMC #endif - void vm_get_video_res(vm_t *vm, int *width, int *height); - int vm_get_video_aspect(vm_t *vm); - int vm_get_video_scale_permission(vm_t *vm); +diff -uwr ../libdvdnav-4.2.1/src/vm/vm.h lib/libdvd/libdvdnav/src/vm/vm.h +--- ../libdvdnav-4.2.1/src/vm/vm.h Sat Jul 31 00:34:16 2010 ++++ lib/libdvd/libdvdnav/src/vm/vm.h Fri Feb 7 19:30:55 2014 @@ -170,6 +170,9 @@ ifo_handle_t *vm_get_title_ifo(vm_t *vm, uint32_t title); void vm_ifo_close(ifo_handle_t *ifo); @@ -763,4 +1275,4 @@ diff -uwr libdvdnav-4.2.0/src/vm/vm.h xbmc/lib/libdvd/libdvdnav/src/vm/vm.h /* Uncomment for VM command tracing */ /* #define TRACE */ #ifdef TRACE -Only in xbmc/lib/libdvd/libdvdnav: version.h +Only in lib/libdvd/libdvdnav/: version.h diff --git a/lib/libdvd/patches/libdvdnav_correct_audio_format_enum.diff b/lib/libdvd/patches/libdvdnav_correct_audio_format_enum.diff deleted file mode 100644 index 2951de71c9..0000000000 --- a/lib/libdvd/patches/libdvdnav_correct_audio_format_enum.diff +++ /dev/null @@ -1,23 +0,0 @@ ---- libdvdnav-4.2.0/src/dvdnav/dvd_types.h Wed Mar 20 08:51:10 2013 -+++ lib/libdvd/libdvdnav/src/dvdnav/dvd_types.h Wed Mar 20 12:22:25 2013 -@@ -161,14 +161,13 @@ - /* The audio format */ - typedef enum { - DVD_AUDIO_FORMAT_AC3 = 0, -- DVD_AUDIO_FORMAT_MPEG1 = 1, -- DVD_AUDIO_FORMAT_MPEG1_DRC = 2, -- DVD_AUDIO_FORMAT_MPEG2 = 3, -- DVD_AUDIO_FORMAT_MPEG2_DRC = 4, -- DVD_AUDIO_FORMAT_LPCM = 5, -+ DVD_AUDIO_FORMAT_UNKNOWN_1 = 1, -+ DVD_AUDIO_FORMAT_MPEG = 2, -+ DVD_AUDIO_FORMAT_MPEG2_EXT = 3, -+ DVD_AUDIO_FORMAT_LPCM = 4, -+ DVD_AUDIO_FORMAT_UNKNOWN_5 = 5, - DVD_AUDIO_FORMAT_DTS = 6, -- DVD_AUDIO_FORMAT_SDDS = 7, -- DVD_AUDIO_FORMAT_Other = 8 -+ DVD_AUDIO_FORMAT_SDDS = 7 - } DVDAudioFormat_t; - - /* Audio language extension */ diff --git a/lib/libdvd/patches/libdvdnav_correct_dvdnav_audio_stream_format.diff b/lib/libdvd/patches/libdvdnav_correct_dvdnav_audio_stream_format.diff deleted file mode 100644 index d4e3b776d8..0000000000 --- a/lib/libdvd/patches/libdvdnav_correct_dvdnav_audio_stream_format.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- libdvdnav-4.2.0/src/dvdnav.c Wed Mar 20 11:38:53 2013 -+++ lib/libdvd/libdvdnav/src/dvdnav.c Wed Mar 20 13:20:35 2013 -@@ -907,27 +925,10 @@ - attr = vm_get_audio_attr(this->vm, stream); - pthread_mutex_unlock(&this->vm_lock); - -- switch(attr.audio_format) { -- case 0: -- format = DVDNAV_FORMAT_AC3; -- break; -- case 2: /* MPEG-1 or MPEG-2 without extension bitstream. */ -- case 3: /* MPEG-2 with extension bitstream. */ -- format = DVDNAV_FORMAT_MPEGAUDIO; -- break; -- case 4: -- format = DVDNAV_FORMAT_LPCM; -- break; -- case 6: -- format = DVDNAV_FORMAT_DTS; -- break; -- case 7: -- format = DVDNAV_FORMAT_SDDS; -- break; -- default: -+ if (attr.audio_format >=0 && attr.audio_format <= 7) -+ format = attr.audio_format; -+ else - format = 0xffff; -- break; -- } - - return format; - } diff --git a/lib/libdvd/patches/libdvdnav_reenable_serialstring.diff b/lib/libdvd/patches/libdvdnav_reenable_serialstring.diff deleted file mode 100644 index 80b2fd912f..0000000000 --- a/lib/libdvd/patches/libdvdnav_reenable_serialstring.diff +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/libdvdnav/src/vm/vm.c b/libdvdnav/src/vm/vm.c -index aea50f3..a14e675 100644 ---- a/libdvdnav/src/vm/vm.c -+++ b/libdvdnav/src/vm/vm.c -@@ -176,7 +176,6 @@ static void dvd_read_name(char *name, char *serial, const char *device) { - off = lseek( fd, 32 * (off_t) DVD_VIDEO_LB_LEN, SEEK_SET ); - if( off == ( 32 * (off_t) DVD_VIDEO_LB_LEN ) ) { - 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++ ) { -@@ -399,14 +398,13 @@ int vm_reset(vm_t *vm, const char *dvdroot) { - /* return 0; Not really used for now.. */ - } - /* ifoRead_TXTDT_MGI(vmgi); Not implemented yet */ -+ dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot); - #ifdef _XBMC - if(DVDUDFVolumeInfo(vm->dvd, vm->dvd_name, sizeof(vm->dvd_name), NULL, 0)) - if(DVDISOVolumeInfo(vm->dvd, vm->dvd_name, sizeof(vm->dvd_name), NULL, 0)) - strcpy(vm->dvd_name, ""); - - fprintf(MSG_OUT, "libdvdnav: vm: DVD Title: %s\n", vm->dvd_name); --#else -- dvd_read_name(vm->dvd_name, vm->dvd_serial, dvdroot); - #endif - vm->map = remap_loadmap(vm->dvd_name); - } diff --git a/lib/libdvd/patches/libdvdnav_remove_unneeded_defines.diff b/lib/libdvd/patches/libdvdnav_remove_unneeded_defines.diff deleted file mode 100644 index 9609dd0312..0000000000 --- a/lib/libdvd/patches/libdvdnav_remove_unneeded_defines.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- libdvdnav-4.2.0/src/dvdnav/dvdnav.h Wed Mar 20 11:38:52 2013 -+++ lib/libdvd/libdvdnav/src/dvdnav/dvdnav.h Wed Mar 20 13:19:13 2013 -@@ -63,12 +63,6 @@ - #define DVDNAV_STATUS_ERR 0 - #define DVDNAV_STATUS_OK 1 - --#define DVDNAV_FORMAT_AC3 0 --#define DVDNAV_FORMAT_MPEGAUDIO 3 --#define DVDNAV_FORMAT_LPCM 4 --#define DVDNAV_FORMAT_DTS 5 --#define DVDNAV_FORMAT_SDDS 6 -- - /********************************************************************* - * initialisation & housekeeping functions * - *********************************************************************/ diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp index 015a2ae9d5..54cbe5d1df 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp +++ b/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp @@ -852,7 +852,7 @@ bool CDVDInputStreamNavigator::GetSubtitleStreamInfo(const int iId, DVDNavStream int streamId = ConvertSubtitleStreamId_XBMCToExternal(iId); subp_attr_t subp_attributes; - if( m_dll.dvdnav_get_stitle_info(m_dvdnav, streamId, &subp_attributes) == DVDNAV_STATUS_OK ) + if( m_dll.dvdnav_get_spu_attr(m_dvdnav, streamId, &subp_attributes) == DVDNAV_STATUS_OK ) { SetSubtitleStreamName(info, subp_attributes); @@ -1038,7 +1038,7 @@ bool CDVDInputStreamNavigator::GetAudioStreamInfo(const int iId, DVDNavStreamInf int streamId = ConvertAudioStreamId_XBMCToExternal(iId); audio_attr_t audio_attributes; - if( m_dll.dvdnav_get_audio_info(m_dvdnav, streamId, &audio_attributes) == DVDNAV_STATUS_OK ) + if( m_dll.dvdnav_get_audio_attr(m_dvdnav, streamId, &audio_attributes) == DVDNAV_STATUS_OK ) { SetAudioStreamName(info, audio_attributes); diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/DllDvdNav.h b/xbmc/cores/dvdplayer/DVDInputStreams/DllDvdNav.h index 1998967518..ecacd978f3 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/DllDvdNav.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/DllDvdNav.h @@ -86,8 +86,6 @@ public: virtual int8_t dvdnav_get_active_audio_stream(dvdnav_t *self)=0; virtual uint16_t dvdnav_audio_stream_to_lang(dvdnav_t *self, uint8_t stream)=0; virtual vm_t* dvdnav_get_vm(dvdnav_t *self)=0; - virtual int dvdnav_get_nr_of_subtitle_streams(dvdnav_t *self)=0; - virtual int dvdnav_get_nr_of_audio_streams(dvdnav_t *self)=0; virtual int dvdnav_get_button_info(dvdnav_t* self, int alpha[2][4], int color[2][4])=0; virtual int8_t dvdnav_get_audio_logical_stream(dvdnav_t *self, uint8_t audio_num)=0; virtual dvdnav_status_t dvdnav_set_region_mask(dvdnav_t *self, int32_t region_mask)=0; @@ -97,10 +95,8 @@ public: virtual dvdnav_status_t dvdnav_get_number_of_parts(dvdnav_t *self, int32_t title, int32_t *parts)=0; virtual dvdnav_status_t dvdnav_title_play(dvdnav_t *self, int32_t title)=0; virtual dvdnav_status_t dvdnav_part_play(dvdnav_t *self, int32_t title, int32_t part)=0; - virtual dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture)=0; - virtual dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio)=0; - virtual dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes)=0; - virtual dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self, int32_t streamid, subp_attr_t* stitle_attributes)=0; + virtual dvdnav_status_t dvdnav_get_audio_attr(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes)=0; + virtual dvdnav_status_t dvdnav_get_spu_attr(dvdnav_t * self, int32_t streamid, subp_attr_t* stitle_attributes)=0; virtual dvdnav_status_t dvdnav_time_search(dvdnav_t * self, uint64_t timepos)=0; virtual int64_t dvdnav_convert_time(dvd_time_t *time)=0; virtual dvdnav_status_t dvdnav_get_state(dvdnav_t *self, dvd_state_t *save_state)=0; @@ -195,10 +191,6 @@ public: { return ::dvdnav_audio_stream_to_lang(self, stream); } virtual vm_t* dvdnav_get_vm(dvdnav_t *self) { return ::dvdnav_get_vm(self); } - virtual int dvdnav_get_nr_of_subtitle_streams(dvdnav_t *self) - { return ::dvdnav_get_nr_of_subtitle_streams(self); } - virtual int dvdnav_get_nr_of_audio_streams(dvdnav_t *self) - { return ::dvdnav_get_nr_of_audio_streams(self); } virtual int dvdnav_get_button_info(dvdnav_t* self, int alpha[2][4], int color[2][4]) { return ::dvdnav_get_button_info(self, alpha, color); } virtual int8_t dvdnav_get_audio_logical_stream(dvdnav_t *self, uint8_t audio_num) @@ -217,14 +209,10 @@ public: { return ::dvdnav_title_play(self, title); } virtual dvdnav_status_t dvdnav_part_play(dvdnav_t *self, int32_t title, int32_t part) { return ::dvdnav_part_play(self, title, part); } - virtual dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture) - { return ::dvdnav_subpicture_change(self, subpicture); } - virtual dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio) - { return ::dvdnav_audio_change(self, audio); } - virtual dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes) - { return ::dvdnav_get_audio_info(self, streamid, audio_attributes); } - virtual dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self, int32_t streamid, subp_attr_t* stitle_attributes) - { return ::dvdnav_get_stitle_info(self, streamid, stitle_attributes); } + virtual dvdnav_status_t dvdnav_get_audio_attr(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes) + { return ::dvdnav_get_audio_attr(self, streamid, audio_attributes); } + virtual dvdnav_status_t dvdnav_get_spu_attr(dvdnav_t * self, int32_t streamid, subp_attr_t* stitle_attributes) + { return ::dvdnav_get_spu_attr(self, streamid, stitle_attributes); } virtual dvdnav_status_t dvdnav_time_search(dvdnav_t * self, uint64_t timepos) { return ::dvdnav_time_search(self, timepos); } virtual int64_t dvdnav_convert_time(dvd_time_t *time) @@ -294,8 +282,6 @@ class DllDvdNav : public DllDynamic, DllDvdNavInterface DEFINE_METHOD1(int8_t, dvdnav_get_active_audio_stream, (dvdnav_t *p1)) DEFINE_METHOD2(uint16_t, dvdnav_audio_stream_to_lang, (dvdnav_t *p1, uint8_t p2)) DEFINE_METHOD1(vm_t*, dvdnav_get_vm, (dvdnav_t *p1)) - DEFINE_METHOD1(int, dvdnav_get_nr_of_subtitle_streams, (dvdnav_t *p1)) - DEFINE_METHOD1(int, dvdnav_get_nr_of_audio_streams, (dvdnav_t *p1)) DEFINE_METHOD3(int, dvdnav_get_button_info, (dvdnav_t* p1, int p2[2][4], int p3[2][4])) DEFINE_METHOD2(int8_t, dvdnav_get_audio_logical_stream, (dvdnav_t *p1, uint8_t p2)) DEFINE_METHOD2(dvdnav_status_t, dvdnav_set_region_mask, (dvdnav_t *p1, int32_t p2)) @@ -305,10 +291,8 @@ class DllDvdNav : public DllDynamic, DllDvdNavInterface DEFINE_METHOD3(dvdnav_status_t, dvdnav_get_number_of_parts, (dvdnav_t *p1, int32_t p2, int32_t *p3)) DEFINE_METHOD2(dvdnav_status_t, dvdnav_title_play, (dvdnav_t *p1, int32_t p2)) DEFINE_METHOD3(dvdnav_status_t, dvdnav_part_play, (dvdnav_t *p1, int32_t p2, int32_t p3)) - DEFINE_METHOD2(dvdnav_status_t, dvdnav_subpicture_change, (dvdnav_t *p1, int32_t p2)) - DEFINE_METHOD2(dvdnav_status_t, dvdnav_audio_change, (dvdnav_t *p1, int32_t p2)) - DEFINE_METHOD3(dvdnav_status_t, dvdnav_get_audio_info, (dvdnav_t * p1, int32_t p2, audio_attr_t* p3)) - DEFINE_METHOD3(dvdnav_status_t, dvdnav_get_stitle_info, (dvdnav_t * p1, int32_t p2, subp_attr_t* p3)) + DEFINE_METHOD3(dvdnav_status_t, dvdnav_get_audio_attr, (dvdnav_t * p1, int32_t p2, audio_attr_t* p3)) + DEFINE_METHOD3(dvdnav_status_t, dvdnav_get_spu_attr, (dvdnav_t * p1, int32_t p2, subp_attr_t* p3)) DEFINE_METHOD2(dvdnav_status_t, dvdnav_time_search, (dvdnav_t * p1, uint64_t p2)) DEFINE_METHOD3(dvdnav_status_t, dvdnav_jump_to_sector_by_time, (dvdnav_t * p1, uint64_t p2, int32_t p3)) DEFINE_METHOD1(int64_t, dvdnav_convert_time, (dvd_time_t *p1)) @@ -358,8 +342,6 @@ class DllDvdNav : public DllDynamic, DllDvdNavInterface RESOLVE_METHOD(dvdnav_get_active_audio_stream) RESOLVE_METHOD(dvdnav_audio_stream_to_lang) RESOLVE_METHOD(dvdnav_get_vm) - RESOLVE_METHOD(dvdnav_get_nr_of_subtitle_streams) - RESOLVE_METHOD(dvdnav_get_nr_of_audio_streams) RESOLVE_METHOD(dvdnav_get_button_info) RESOLVE_METHOD(dvdnav_get_audio_logical_stream) RESOLVE_METHOD(dvdnav_set_region_mask) @@ -369,10 +351,8 @@ class DllDvdNav : public DllDynamic, DllDvdNavInterface RESOLVE_METHOD(dvdnav_get_number_of_parts) RESOLVE_METHOD(dvdnav_title_play) RESOLVE_METHOD(dvdnav_part_play) - RESOLVE_METHOD(dvdnav_subpicture_change) - RESOLVE_METHOD(dvdnav_audio_change) - RESOLVE_METHOD(dvdnav_get_audio_info) - RESOLVE_METHOD(dvdnav_get_stitle_info) + RESOLVE_METHOD(dvdnav_get_audio_attr) + RESOLVE_METHOD(dvdnav_get_spu_attr) RESOLVE_METHOD(dvdnav_time_search) RESOLVE_METHOD(dvdnav_jump_to_sector_by_time) RESOLVE_METHOD(dvdnav_convert_time) diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h index 0370a9d6d9..5faa3395c9 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h @@ -22,9 +22,6 @@ #ifndef LIBDVDNAV_DECODER_H #define LIBDVDNAV_DECODER_H -//#include <inttypes.h> -//#include <sys/time.h> - #include "ifo_types.h" /* vm_cmd_t */ #include "dvdnav_internal.h" diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h index a3067a5298..145059032e 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h @@ -26,8 +26,6 @@ #ifndef LIBDVDNAV_DVD_TYPES_H #define LIBDVDNAV_DVD_TYPES_H -//#include <inttypes.h> - /* * DVD Menu ID * (see dvdnav_menu_call()) diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h index bad8246d2b..ea3bce0ee6 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h @@ -63,6 +63,11 @@ typedef int32_t dvdnav_status_t; #define DVDNAV_STATUS_ERR 0 #define DVDNAV_STATUS_OK 1 +#define DVDNAV_FORMAT_AC3 0 +#define DVDNAV_FORMAT_MPEGAUDIO 3 +#define DVDNAV_FORMAT_LPCM 4 +#define DVDNAV_FORMAT_DTS 5 +#define DVDNAV_FORMAT_SDDS 6 /********************************************************************* * initialisation & housekeeping functions * @@ -377,7 +382,7 @@ int64_t dvdnav_get_current_time(dvdnav_t *self); * Stop playing the current position and start playback of the title * from the specified timecode. * - * Currently unimplemented! + * Currently implemented using interpolation, which is slightly inaccurate. */ dvdnav_status_t dvdnav_time_search(dvdnav_t *self, uint64_t time); @@ -691,51 +696,10 @@ int8_t dvdnav_is_domain_vtsm(dvdnav_t *self); int8_t dvdnav_is_domain_vts(dvdnav_t *self); /* XBMC added functions */ -int dvdnav_get_nr_of_subtitle_streams(dvdnav_t *self); - -int dvdnav_get_nr_of_audio_streams(dvdnav_t *self); - int dvdnav_get_button_info(dvdnav_t* self, int alpha[2][4], int color[2][4]); int64_t dvdnav_convert_time(dvd_time_t *time); -////////// RATDVD stuff /////////////// - -/* - * Get the number of audio streams. - */ -int32_t dvdnav_get_audio_stream_count(dvdnav_t * self); - -/* - * Get the number of subpicture streams. - */ -int32_t dvdnav_get_subpicture_stream_count(dvdnav_t * self); - -/* - * Get attributes of the current audio stream. - */ -dvdnav_status_t dvdnav_get_audio_info(dvdnav_t * self, int32_t streamid, audio_attr_t* audio_attributes); - -/* - * Get attributes of the current subpicture stream. - */ -dvdnav_status_t dvdnav_get_stitle_info(dvdnav_t * self, int32_t streamid, subp_attr_t* stitle_attributes); - -/* - * Get information about the current video stream - */ -dvdnav_status_t dvdnav_get_video_info(dvdnav_t * self, video_attr_t* video_attributes); - -/* - * Select the audio stream to be played - */ -dvdnav_status_t dvdnav_audio_change(dvdnav_t *self, int32_t audio); - -/* - * Select the spu stream to be displayed - */ -dvdnav_status_t dvdnav_subpicture_change(dvdnav_t *self, int32_t subpicture); - #ifdef __cplusplus } #endif diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h index 703bcf0ecf..558e2bdf3c 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h @@ -27,7 +27,6 @@ #include <stdlib.h> #include <stdio.h> -//#include <unistd.h> #include <limits.h> #include <string.h> @@ -94,6 +93,14 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz ) #define DVD_VIDEO_LB_LEN 2048 #endif +typedef enum { + DSI_ILVU_PRE = 1 << 15, /* set during the last 3 VOBU preceeding an interleaved block. */ + DSI_ILVU_BLOCK = 1 << 14, /* set for all VOBU in an interleaved block */ + DSI_ILVU_FIRST = 1 << 13, /* set for the first VOBU for a given angle or scene within a ILVU, or the first VOBU in the preparation (PREU) sequence */ + DSI_ILVU_LAST = 1 << 12, /* set for the last VOBU for a given angle or scene within a ILVU, or the last VOBU in the preparation (PREU) sequence */ + DSI_ILVU_MASK = 0xf000 +} DSI_ILVU; + typedef struct read_cache_s read_cache_t; /* diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h index 7a0701be23..f82459e520 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h @@ -301,6 +301,7 @@ typedef struct { pgc_program_map_t *program_map; cell_playback_t *cell_playback; cell_position_t *cell_position; + int ref_count; } ATTRIBUTE_PACKED pgc_t; #define PGC_SIZE 236U @@ -326,6 +327,7 @@ typedef struct { uint16_t zero_1; uint32_t last_byte; pgci_srp_t *pgci_srp; + int ref_count; } ATTRIBUTE_PACKED pgcit_t; #define PGCIT_SIZE 8U diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h index da76d3d447..b3e4715a49 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h @@ -159,8 +159,11 @@ int vm_get_subp_stream(vm_t *vm, int subpN, int mode); int vm_get_audio_active_stream(vm_t *vm); int vm_get_subp_active_stream(vm_t *vm, int mode); void vm_get_angle_info(vm_t *vm, int *current, int *num_avail); +#if 0 +/* currently unused */ void vm_get_audio_info(vm_t *vm, int *current, int *num_avail); void vm_get_subp_info(vm_t *vm, int *current, int *num_avail); +#endif void vm_get_video_res(vm_t *vm, int *width, int *height); int vm_get_video_aspect(vm_t *vm); int vm_get_video_scale_permission(vm_t *vm); diff --git a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vmcmd.h b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vmcmd.h index b2d0ee099c..74d513d03f 100644 --- a/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vmcmd.h +++ b/xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vmcmd.h @@ -22,8 +22,6 @@ #ifndef LIBDVDNAV_VMCMD_H #define LIBDVDNAV_VMCMD_H -//#include <inttypes.h> - void vm_print_mnemonic(vm_cmd_t *command); void vm_print_cmd(int row, vm_cmd_t *command); |