Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated libdvdcss, read and nav to the latest versions

All XBMC modifications are kept intact

Moved get/set state functions from vm.h to dvdnav_internal.h where
they should be

Added comments to clarify which functions are added by XBMC
  • Loading branch information...
commit 421d9fdb0658abb01306a62e5d57da044263b216 1 parent 7b2dddc
@Paxxi authored
Showing with 2,430 additions and 1,397 deletions.
  1. +5 −0 .gitignore
  2. +3 −1 lib/libdvd/build-xbmc-win32.sh
  3. +2 −0  lib/libdvd/includes/dvdnav/.ignoreme
  4. +19 −1 lib/libdvd/libdvdcss/AUTHORS
  5. +323 −0 lib/libdvd/libdvdcss/ChangeLog
  6. +7 −1 lib/libdvd/libdvdcss/INSTALL
  7. +1 −1  lib/libdvd/libdvdcss/Makefile.am
  8. +17 −1 lib/libdvd/libdvdcss/NEWS
  9. +9 −15 lib/libdvd/libdvdcss/README
  10. +1 −1  lib/libdvd/libdvdcss/bootstrap
  11. +6 −2 lib/libdvd/libdvdcss/configure.ac
  12. +2 −2 lib/libdvd/libdvdcss/doc/doxygen.cfg.in
  13. +1 −1  lib/libdvd/libdvdcss/doc/footer.html
  14. +1 −1  lib/libdvd/libdvdcss/doc/header.html
  15. +4 −4 lib/libdvd/libdvdcss/src/bsdi_dvd.h
  16. +8 −8 lib/libdvd/libdvdcss/src/common.h
  17. +60 −13 lib/libdvd/libdvdcss/src/css.c
  18. +11 −4 lib/libdvd/libdvdcss/src/css.h
  19. +7 −4 lib/libdvd/libdvdcss/src/csstables.h
  20. +126 −9 lib/libdvd/libdvdcss/src/device.c
  21. +11 −5 lib/libdvd/libdvdcss/src/device.h
  22. +4 −4 lib/libdvd/libdvdcss/src/dvdcss/dvdcss.h
  23. +6 −6 lib/libdvd/libdvdcss/src/error.c
  24. +6 −6 lib/libdvd/libdvdcss/src/ioctl.c
  25. +10 −5 lib/libdvd/libdvdcss/src/ioctl.h
  26. +37 −19 lib/libdvd/libdvdcss/src/libdvdcss.c
  27. +12 −5 lib/libdvd/libdvdcss/src/libdvdcss.h
  28. +13 −0 lib/libdvd/libdvdnav/ChangeLog
  29. +2 −2 lib/libdvd/libdvdnav/Makefile
  30. +1 −1  lib/libdvd/libdvdnav/README
  31. +0 −2  lib/libdvd/libdvdnav/autogen.sh
  32. +5 −22 lib/libdvd/libdvdnav/configure.ac
  33. +1 −1  lib/libdvd/libdvdnav/configure2
  34. +10 −13 lib/libdvd/libdvdnav/examples/menus.c
  35. +0 −4 lib/libdvd/libdvdnav/m4/Makefile.am
  36. +5 −0 lib/libdvd/libdvdnav/msvc/config.h
  37. +0 −3  lib/libdvd/libdvdnav/msvc/contrib/dlfcn.c
  38. +2 −2 lib/libdvd/libdvdnav/msvc/contrib/getopt.c
  39. +2 −2 lib/libdvd/libdvdnav/msvc/contrib/timer/timer.c
  40. +1 −6 lib/libdvd/libdvdnav/msvc/include/dlfcn.h
  41. +6 −9 lib/libdvd/libdvdnav/msvc/include/dvdnav_internal.h
  42. +2 −2 lib/libdvd/libdvdnav/msvc/include/getopt.h
  43. +2 −2 lib/libdvd/libdvdnav/msvc/include/inttypes.h
  44. +0 −3  lib/libdvd/libdvdnav/msvc/include/os_types.h
  45. +2 −2 lib/libdvd/libdvdnav/msvc/include/pthreads/pthread.h
  46. +2 −2 lib/libdvd/libdvdnav/msvc/include/pthreads/sched.h
  47. +2 −2 lib/libdvd/libdvdnav/msvc/include/sys/time.h
  48. +2 −2 lib/libdvd/libdvdnav/msvc/include/unistd.h
  49. +2 −2 lib/libdvd/libdvdnav/src/Makefile.am
  50. +32 −19 lib/libdvd/libdvdnav/src/dvdnav.c
  51. +7 −10 lib/libdvd/libdvdnav/src/{ → dvdnav}/dvd_types.h
  52. +45 −26 lib/libdvd/libdvdnav/src/{ → dvdnav}/dvdnav.h
  53. +6 −9 lib/libdvd/libdvdnav/src/{ → dvdnav}/dvdnav_events.h
  54. +10 −21 lib/libdvd/libdvdnav/src/dvdnav_internal.h
  55. +6 −10 lib/libdvd/libdvdnav/src/highlight.c
  56. +84 −8 lib/libdvd/libdvdnav/src/navigation.c
  57. +4 −8 lib/libdvd/libdvdnav/src/read_cache.c
  58. +6 −9 lib/libdvd/libdvdnav/src/read_cache.h
  59. +5 −8 lib/libdvd/libdvdnav/src/remap.c
  60. +6 −8 lib/libdvd/libdvdnav/src/remap.h
  61. +49 −19 lib/libdvd/libdvdnav/src/searching.c
  62. +4 −8 lib/libdvd/libdvdnav/src/settings.c
  63. +5 −9 lib/libdvd/libdvdnav/src/vm/decoder.c
  64. +7 −10 lib/libdvd/libdvdnav/src/vm/decoder.h
  65. +150 −33 lib/libdvd/libdvdnav/src/vm/vm.c
  66. +10 −11 lib/libdvd/libdvdnav/src/vm/vm.h
  67. +5 −9 lib/libdvd/libdvdnav/src/vm/vmcmd.c
  68. +7 −10 lib/libdvd/libdvdnav/src/vm/vmcmd.h
  69. +1 −1  lib/libdvd/libdvdnav/version.h
  70. +18 −18 lib/libdvd/libdvdnav/version.sh
  71. +18 −0 lib/libdvd/libdvdread/ChangeLog
  72. +9 −9 lib/libdvd/libdvdread/Makefile
  73. +1 −1  lib/libdvd/libdvdread/README
  74. +0 −2  lib/libdvd/libdvdread/autogen.sh
  75. +6 −23 lib/libdvd/libdvdread/configure.ac
  76. +15 −1 lib/libdvd/libdvdread/configure2
  77. +0 −4 lib/libdvd/libdvdread/m4/Makefile.am
  78. +5 −0 lib/libdvd/libdvdread/msvc/config.h
  79. +0 −3  lib/libdvd/libdvdread/msvc/contrib/dlfcn.c
  80. +2 −2 lib/libdvd/libdvdread/msvc/contrib/getopt.c
  81. +2 −2 lib/libdvd/libdvdread/msvc/contrib/timer/timer.c
  82. +1 −6 lib/libdvd/libdvdread/msvc/include/dlfcn.h
  83. +6 −9 lib/libdvd/libdvdread/msvc/include/dvdnav_internal.h
  84. +2 −2 lib/libdvd/libdvdread/msvc/include/getopt.h
  85. +2 −2 lib/libdvd/libdvdread/msvc/include/inttypes.h
  86. +0 −3  lib/libdvd/libdvdread/msvc/include/os_types.h
  87. +5 −5 lib/libdvd/libdvdread/msvc/include/pthreads/pthread.h
  88. +2 −2 lib/libdvd/libdvdread/msvc/include/pthreads/sched.h
  89. +3 −3 lib/libdvd/libdvdread/msvc/include/sys/time.h
  90. +4 −4 lib/libdvd/libdvdread/msvc/include/unistd.h
  91. +2 −2 lib/libdvd/libdvdread/src/Makefile.am
  92. +9 −9 lib/libdvd/libdvdread/src/bitreader.c
  93. +13 −11 lib/libdvd/libdvdread/src/bswap.h
  94. +15 −12 lib/libdvd/libdvdread/src/dvd_input.c
  95. +14 −13 lib/libdvd/libdvdread/src/dvd_input.h
  96. +271 −63 lib/libdvd/libdvdread/src/dvd_reader.c
  97. +68 −44 lib/libdvd/libdvdread/src/dvd_udf.c
  98. +11 −10 lib/libdvd/libdvdread/src/{ → dvdread}/bitreader.h
  99. +54 −16 lib/libdvd/libdvdread/src/{ → dvdread}/dvd_reader.h
  100. +18 −18 lib/libdvd/libdvdread/src/{ → dvdread}/dvd_udf.h
  101. +28 −0 lib/libdvd/libdvdread/src/dvdread/ifo_print.h
  102. +14 −12 lib/libdvd/libdvdread/src/{ → dvdread}/ifo_read.h
  103. +18 −14 lib/libdvd/libdvdread/src/{ → dvdread}/ifo_types.h
  104. +17 −15 lib/libdvd/libdvdread/src/{ → dvdread}/nav_print.h
  105. +12 −10 lib/libdvd/libdvdread/src/{ → dvdread}/nav_read.h
  106. +9 −10 lib/libdvd/libdvdread/src/{ → dvdread}/nav_types.h
  107. +31 −5 lib/libdvd/libdvdread/src/dvdread_internal.h
  108. +64 −110 lib/libdvd/libdvdread/src/ifo_print.c
  109. +0 −53 lib/libdvd/libdvdread/src/ifo_print.h
  110. +147 −85 lib/libdvd/libdvdread/src/ifo_read.c
  111. +1 −5 lib/libdvd/libdvdread/src/md5.c
  112. +4 −4 lib/libdvd/libdvdread/src/md5.h
  113. +6 −10 lib/libdvd/libdvdread/src/nav_print.c
  114. +11 −11 lib/libdvd/libdvdread/src/nav_read.c
  115. +1 −1  lib/libdvd/libdvdread/version.h
  116. +7 −10 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/decoder.h
  117. +57 −17 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_reader.h
  118. +9 −13 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvd_types.h
  119. +96 −30 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav.h
  120. +6 −10 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_events.h
  121. +32 −13 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/dvdnav_internal.h
  122. +36 −169 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/ifo_types.h
  123. +9 −10 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/nav_types.h
  124. +6 −8 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/remap.h
  125. +16 −14 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vm.h
  126. +7 −10 xbmc/cores/dvdplayer/DVDInputStreams/dvdnav/vmcmd.h
View
5 .gitignore
@@ -631,6 +631,11 @@ lib/cmyth/Makefile
/lib/libdvd/includes/dvdread/ifo_read.h
/lib/libdvd/includes/dvdread/nav_types.h
+# /lib/libdvd/includes/dvdnav
+/lib/libdvd/includes/dvdnav/dvd_types.h
+/lib/libdvd/includes/dvdnav/dvdnav.h
+/lib/libdvd/includes/dvdnav/dvdnav_events.h
+
# /lib/libdvd/libdvdcss/
/lib/libdvd/libdvdcss/.auto/
/lib/libdvd/libdvdcss/Makefile.in
View
4 lib/libdvd/build-xbmc-win32.sh
@@ -47,7 +47,7 @@ echo "***** Building libdvdread *****"
--extra-cflags="-DHAVE_DVDCSS_DVDCSS_H -D_XBMC -DNDEBUG -D_MSC_VER -I`pwd`/../includes" \
--disable-debug
mkdir -p ../includes/dvdread
-cp ../libdvdread/src/*.h ../includes/dvdread
+cp ../libdvdread/src/dvdread/*.h ../includes/dvdread
make $MAKEFLAGS
cd ..
@@ -65,6 +65,8 @@ echo "***** Building libdvdnav *****"
--extra-cflags="-D_XBMC -DNDEBUG -I`pwd`/../includes" \
--with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
--disable-debug
+mkdir -p ../includes/dvdnav
+cp ../libdvdnav/src/dvdnav/*.h ../includes/dvdnav
make $MAKEFLAGS
gcc \
-shared \
View
2  lib/libdvd/includes/dvdnav/.ignoreme
@@ -0,0 +1,2 @@
+Dummy file so that this directory shows up for git users.
+Ignore this file.
View
20 lib/libdvd/libdvdcss/AUTHORS
@@ -2,7 +2,7 @@
#
# Authors and contributors are listed alphabetically.
#
-# The fields are: name (N), email (E), web-address (W), CVS account login (C),
+# 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).
N: Billy Biggs
@@ -20,6 +20,7 @@ D: cache bug fix for discs with identical content but different keys
N: H�kan Hjort
E: d95hjort@dtek.chalmers.se
+C: hjort
D: Solaris port of the DVD ioctls
D: libdvdcss enhancements
@@ -39,6 +40,15 @@ C: jlj
D: Win32 port
D: Fixes to the Darwin port
+N: KO Myung-Hun
+E: komh@chollian.net
+D: OS/2 port
+
+N: Jean-Baptiste Kempf
+C: jb
+E: jb@videolan.org
+D: maintainer
+
N: Markus Kuespert
E: ltlBeBoy@beosmail.com
D: BeOS port of the DVD ioctls
@@ -47,6 +57,14 @@ N: Pascal Levesque
E: Pascal.Levesque@mindready.com
D: QNX port
+N: Steve Lhomme
+E: steve.lhomme@free.fr
+D: win32 improvements
+
+N: Christophe Massiot
+E: massiot@via.ecp.fr
+D: former maintainer
+
N: Steven M. Schultz
E: sms@TO.GD-ES.COM
D: BSD/OS port
View
323 lib/libdvd/libdvdcss/ChangeLog
@@ -1,4 +1,327 @@
------------------------------------------------------------------------
+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
+
+Prepare 1.2.12
+
+
+------------------------------------------------------------------------
+r250 | jb | 2012-03-11 12:37:40 +0000 (Sun, 11 Mar 2012) | 3 lines
+Changed paths:
+ M /trunk/AUTHORS
+
+Update Authors file
+
+
+------------------------------------------------------------------------
+r249 | jb | 2012-02-18 16:22:03 +0000 (Sat, 18 Feb 2012) | 4 lines
+Changed paths:
+ M /trunk/src/css.c
+
+If unsure, assume the drive is of RPC-I type
+
+This can happen when patched drives do not answer to ioctl_ReportRPC correctly
+
+------------------------------------------------------------------------
+r247 | jb | 2011-11-14 10:40:05 +0000 (Mon, 14 Nov 2011) | 3 lines
+Changed paths:
+ M /trunk/ChangeLog
+
+Update Changelog
+
+
+------------------------------------------------------------------------
+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
+
+Bumping version to 1.2.11
+
+
+------------------------------------------------------------------------
+r245 | jb | 2011-11-14 10:26:47 +0000 (Mon, 14 Nov 2011) | 3 lines
+Changed paths:
+ M /trunk/INSTALL
+ M /trunk/README
+
+Update README and INSTALL to be a bit less out-of-date
+
+
+------------------------------------------------------------------------
+r244 | jb | 2011-10-26 05:10:24 +0000 (Wed, 26 Oct 2011) | 3 lines
+Changed paths:
+ M /trunk/Makefile.am
+
+Fix "doc" Makefile target
+
+
+------------------------------------------------------------------------
+r243 | jb | 2011-10-26 05:01:11 +0000 (Wed, 26 Oct 2011) | 12 lines
+Changed paths:
+ M /trunk/src/common.h
+
+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.
+
+Patch by Diego Biurrun - diego at biurrun d0t de
+
+
+------------------------------------------------------------------------
+r242 | jb | 2011-10-26 04:59:23 +0000 (Wed, 26 Oct 2011) | 8 lines
+Changed paths:
+ M /trunk/src/device.c
+
+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.
+
+Patch by Diego Biurrun - diego at biurrun d0t de
+
+
+------------------------------------------------------------------------
+r241 | jb | 2011-08-16 10:41:24 +0000 (Tue, 16 Aug 2011) | 4 lines
+Changed paths:
+ M /trunk/INSTALL
+ M /trunk/README
+
+Fix typos in README and INSTALL
+
+Patch by bryce, ref http://trac.videolan.org/vlc/ticket/5200
+
+------------------------------------------------------------------------
+r240 | jb | 2011-03-23 15:00:06 +0000 (Wed, 23 Mar 2011) | 3 lines
+Changed paths:
+ M /trunk/src/libdvdcss.h
+
+Remove excessive whitespace
+
+
+------------------------------------------------------------------------
+r239 | jb | 2011-03-23 14:59:36 +0000 (Wed, 23 Mar 2011) | 5 lines
+Changed paths:
+ M /trunk/src/css.c
+
+Fix a small memleak
+
+Reported by Thélesphonse Bigorneault
+
+
+------------------------------------------------------------------------
+r238 | jb | 2011-02-09 22:48:29 +0000 (Wed, 09 Feb 2011) | 3 lines
+Changed paths:
+ M /trunk/doc/doxygen.cfg.in
+
+Update documentation version
+
+
+------------------------------------------------------------------------
+r237 | reimar | 2010-09-25 14:21:47 +0000 (Sat, 25 Sep 2010) | 3 lines
+Changed paths:
+ M /trunk/src/libdvdcss.c
+
+Ensure dvdcss->css.p_disc_key is always initialized,
+even if _dvdcss_disckey fails.
+
+------------------------------------------------------------------------
+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
+
+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.
+
+Patch by Diego Biurrun - diego at biurrun d0t de
+
+
+------------------------------------------------------------------------
+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
+
+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.
+
+Patch by Diego Biurrun - diego at biurrun d0t de
+
+
+------------------------------------------------------------------------
+r234 | jb | 2010-08-02 15:38:08 +0000 (Mon, 02 Aug 2010) | 7 lines
+Changed paths:
+ M /trunk/src/bsdi_dvd.h
+
+Use filename as multiple inclusion guard
+
+For some reason bsdi_dvd.h does not use the (full) filename as multiple
+inclusion guard.
+
+Patch by Diego Biurrun - diego at biurrun d0t de
+
+------------------------------------------------------------------------
+r233 | jb | 2010-08-02 14:04:16 +0000 (Mon, 02 Aug 2010) | 7 lines
+Changed paths:
+ M /trunk/doc/doxygen.cfg.in
+
+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.
+
+Patch by Diego Biurrun - diego at biurrun d0t de
+
+------------------------------------------------------------------------
+r232 | jb | 2010-08-02 13:56:10 +0000 (Mon, 02 Aug 2010) | 4 lines
+Changed paths:
+ M /trunk/src
+
+svn:ignore src/libdvdcss.pc
+
+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
+
+
+------------------------------------------------------------------------
+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
View
8 lib/libdvd/libdvdcss/INSTALL
@@ -10,6 +10,12 @@ A typical way to configure libdvdcss is:
See `./configure --help' for more information.
+
+If you got libdvdcss from its version control system, please bootstrap first:
+
+ ./bootstrap
+
+
Building libdvdcss
==================
@@ -34,7 +40,7 @@ You have two alternatives to build libdvdcss for Win32:
- natively on Windows, using MSYS + MINGW (www.mingw.org):
- (MSYS is a minimal build environnement to compile unixish projects under
+ (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
View
2  lib/libdvd/libdvdcss/Makefile.am
@@ -8,5 +8,5 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 subdir-objects
doc-dummy:
doc: doc-dummy
- $(MAKE) -C doc doc
+ $(MAKE) -C doc
View
18 lib/libdvd/libdvdcss/NEWS
@@ -1,4 +1,20 @@
-$Id$
+$Id: NEWS 251 2012-03-11 13:33:49Z jb $
+
+Changes between 1.2.11 and 1.2.12:
+----------------------------------
+
+ * fix regression on RPC-I drives handling.
+
+
+Changes between 1.2.10 and 1.2.11:
+----------------------------------
+
+ * improvements on RPC-II handling.
+ * more robust key retrieval.
+ * fixes for MingW compilation.
+ * fixes for OS/2 compilation.
+ * various bug fixes for small issues, memleaks, crashes and build issues.
+
Changes between 1.2.9 and 1.2.10:
---------------------------------
View
24 lib/libdvd/libdvdcss/README
@@ -1,13 +1,13 @@
README for libdvdcss, a portable abstraction library for DVD decryption
-$Id$
+$Id: README 245 2011-11-14 10:26:47Z jb $
Introduction
============
-libdvdcss is part of the VideoLAN project, a full MPEG2 client/server
-solution. The VideoLAN Client can also be used as a standalone program
-to play MPEG2 streams from a hard disk or a DVD.
+libdvdcss is part of the VideoLAN project, a full video client/server
+streaming solution. VLC can also be used as a standalone program
+to play video streams from a hard disk or a DVD.
Building and Installing libdvdcss
@@ -23,7 +23,7 @@ variables:
DVDCSS_METHOD={title|disc|key}: method for key decryption
title: decrypted title key is guessed from the encrypted sectors of
the stream. Thus it should work with a file as well as the
- DVD device. But it sometimes takes much time to decrypt a title
+ DVD device. But it sometimes takes too much time to decrypt a title
key and may even fail. With this method, the key is only checked
at the beginning of each title, so it won't work if the key
changes in the middle of a title.
@@ -33,7 +33,7 @@ variables:
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,
+ 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
@@ -46,17 +46,11 @@ Troubleshooting
A mailing-list has been set up for support and discussion about
libdvdcss. Its address is :
- <libdvdcss@videolan.org>
+ <libdvdcss-devel@videolan.org>
-To subscribe, send a mail to <listar@videolan.org> with the following
-words in the mail body :
-
- subscribe libdvdcss
-
-To unsubscribe, do the same with the words :
-
- unsubscribe libdvdcss
+To subscribe or unsubscribe, go to:
+ http://mailman.videolan.org/
When reporting bugs, try to be as precise as possible (which OS, which
distribution, what plugins you were trying, and so on).
View
2  lib/libdvd/libdvdcss/bootstrap
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: bootstrap 2005 2008-07-16 20:51:50Z sam $
+# $Id: bootstrap 214 2008-08-29 18:57:45Z sam $
# bootstrap: generic bootstrap/autogen.sh script for autotools projects
#
View
8 lib/libdvd/libdvdcss/configure.ac
@@ -4,8 +4,8 @@ AC_PREREQ(2.50)
AC_CONFIG_AUX_DIR(.auto)
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(libdvdcss, 1.2.10)
-AC_CONFIG_HEADERS(config.h)
+AM_INIT_AUTOMAKE(libdvdcss, 1.2.12)
+AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_STDC_HEADERS
@@ -38,6 +38,10 @@ case x"${target_os}" in
xbeos*)
AC_DEFINE(SYS_BEOS, 1, Have a BeOS system.)
;;
+ xos2*)
+ LDFLAGS="-Zbin-files"
+ AC_DEFINE(SYS_OS2, 1, Have a OS/2 system.)
+ ;;
x*msvc*)
SYS_MSVC=1
;;
View
4 lib/libdvd/libdvdcss/doc/doxygen.cfg.in
@@ -31,7 +31,7 @@ PROJECT_NAME = libdvdcss
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 1.2.5
+PROJECT_NUMBER = 1.2.12
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@@ -481,7 +481,7 @@ FILE_VERSION_FILTER =
# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
-QUIET = NO
+QUIET = YES
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated by doxygen. Possible values are YES and NO. If left blank
View
2  lib/libdvd/libdvdcss/doc/footer.html
@@ -1,3 +1,3 @@
-<!-- $Id$ -->
+<!-- $Id: footer.html 186 2005-09-04 07:43:15Z robux4 $ -->
</body>
</html>
View
2  lib/libdvd/libdvdcss/doc/header.html
@@ -7,4 +7,4 @@
<link href="/doxygen.css" rel="stylesheet" type="text/css">
</head>
<body>
-<!-- $Id$ -->
+<!-- $Id: header.html 186 2005-09-04 07:43:15Z robux4 $ -->
View
8 lib/libdvd/libdvdcss/src/bsdi_dvd.h
@@ -1,9 +1,9 @@
/*
- * $Id$
+ * $Id: bsdi_dvd.h 234 2010-08-02 15:38:08Z jb $
*/
-#ifndef DVDCSS_DVD_H
-#define DVDCSS_DVD_H
+#ifndef DVDCSS_BSDI_DVD_H
+#define DVDCSS_BSDI_DVD_H
#include <sys/cdefs.h>
#include <machine/endian.h>
@@ -341,4 +341,4 @@ typedef struct
int error;
} tracktype;
-#endif /* DVDCSS_DVD_H */
+#endif /* DVDCSS_BSDI_DVD_H */
View
16 lib/libdvd/libdvdcss/src/common.h
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id$
+ * $Id: common.h 243 2011-10-26 05:01:11Z jb $
*
* Authors: Sam Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
@@ -19,11 +19,14 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
+#ifndef DVDCSS_COMMON_H
+#define DVDCSS_COMMON_H
+
/*****************************************************************************
* Basic types definitions
*****************************************************************************/
@@ -73,9 +76,6 @@ typedef __int64 off_t;
# define stat _stati64
# endif
-# ifndef snprintf
-# define snprintf _snprintf /* snprintf not defined in mingw32 (bug?) */
-# endif
-
#endif
+#endif /* DVDCSS_COMMON_H */
View
73 lib/libdvd/libdvdcss/src/css.c
@@ -2,7 +2,7 @@
* css.c: Functions for DVD authentication and descrambling
*****************************************************************************
* Copyright (C) 1999-2008 VideoLAN
- * $Id$
+ * $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>
@@ -16,19 +16,19 @@
* - DecVOB
* see http://www.lemuria.org/DeCSS/ by Tom Vogt for more information.
*
- * This program is free software; you can redistribute it and/or modify
+ * 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
/*****************************************************************************
@@ -89,10 +89,19 @@ static int AttackPadding ( uint8_t const[], int, uint8_t * );
/*****************************************************************************
* _dvdcss_test: check if the disc is encrypted or not
+ *****************************************************************************
+ * Return values:
+ * 1: DVD is scrambled but can be read
+ * 0: DVD is not scrambled and can be read
+ * -1: could not get "copyright" information
+ * -2: could not get RPC information (reading the disc might be possible)
+ * -3: drive is RPC-II, region is not set, and DVD is scrambled: the RPC
+ * scheme will prevent us from reading the scrambled data
*****************************************************************************/
int _dvdcss_test( dvdcss_t dvdcss )
{
- int i_ret, i_copyright;
+ char const *psz_type, *psz_rpc;
+ int i_ret, i_copyright, i_type, i_mask, i_rpc;
i_ret = ioctl_ReadCopyright( dvdcss->i_fd, 0 /* i_layer */, &i_copyright );
@@ -115,14 +124,51 @@ int _dvdcss_test( dvdcss_t dvdcss )
if( i_ret < 0 )
{
/* Since it's the first ioctl we try to issue, we add a notice */
- print_error( dvdcss, "css error: ioctl_ReadCopyright failed, "
- "make sure there is a DVD in the drive, and that "
- "you have used the correct device node." );
+ print_error( dvdcss, "css error: could not get \"copyright\""
+ " information, make sure there is a DVD in the drive,"
+ " and that you have used the correct device node." );
+
+ return -1;
+ }
+
+ print_debug( dvdcss, "disc reports copyright information 0x%x",
+ i_copyright );
- return i_ret;
+ i_ret = ioctl_ReportRPC( dvdcss->i_fd, &i_type, &i_mask, &i_rpc);
+
+ if( i_ret < 0 )
+ {
+ print_error( dvdcss, "css error: could not get RPC status. Assuming RPC-I drive." );
+ i_type = i_mask = i_rpc = 0;
}
- return i_copyright;
+ switch( i_rpc )
+ {
+ case 0: psz_rpc = "RPC-I"; break;
+ case 1: psz_rpc = "RPC-II"; break;
+ default: psz_rpc = "unknown RPC scheme"; break;
+ }
+
+ switch( i_type )
+ {
+ case 0: psz_type = "no region code set"; break;
+ case 1: psz_type = "region code set"; break;
+ case 2: psz_type = "one region change remaining"; break;
+ case 3: psz_type = "region code set permanently"; break;
+ default: psz_type = "unknown status"; break;
+ }
+
+ print_debug( dvdcss, "drive region mask 0x%x, %s, %s",
+ i_mask, psz_rpc, psz_type );
+
+ if( i_copyright && i_rpc == 1 && i_type == 0 )
+ {
+ print_error( dvdcss, "css error: drive will prevent access to "
+ "scrambled data" );
+ return -3;
+ }
+
+ return i_copyright ? 1 : 0;
}
/*****************************************************************************
@@ -379,7 +425,7 @@ int _dvdcss_titlekey( dvdcss_t dvdcss, int i_pos, dvd_key_t p_title_key )
/* We need to authenticate again every time to get a new session key */
if( GetBusKey( dvdcss ) < 0 )
{
- return -1;
+ i_ret = -1;
}
/* Get encrypted title key */
@@ -1153,6 +1199,7 @@ static int CrackDiscKey( dvdcss_t dvdcss, uint8_t *p_disc_key )
memset( BigTable, 0 , 16777216 * sizeof(int) );
if( BigTable == NULL )
{
+ free( K1table );
return -1;
}
View
15 lib/libdvd/libdvdcss/src/css.h
@@ -2,7 +2,7 @@
* css.h: Structures for DVD authentication and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id$
+ * $Id: css.h 236 2010-08-02 15:59:13Z jb $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
@@ -22,10 +22,16 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
+
+#ifndef DVDCSS_CSS_H
+#define DVDCSS_CSS_H
+
+#include "dvdcss/dvdcss.h"
+
#define KEY_SIZE 5
typedef uint8_t dvd_key_t[KEY_SIZE];
@@ -54,3 +60,4 @@ 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 */
View
11 lib/libdvd/libdvdcss/src/csstables.h
@@ -2,7 +2,7 @@
* csstables.h: CSS Tables for DVD unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id$
+ * $Id: csstables.h 235 2010-08-02 15:41:14Z jb $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
@@ -24,11 +24,13 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
+#ifndef DVDCSS_CSSTABLES_H
+#define DVDCSS_CSSTABLES_H
static uint8_t p_css_tab1[ 256 ] =
{
@@ -390,3 +392,4 @@ static uint8_t p_crypt_tab3[ 288 ] =
0xC3, 0x82, 0xC9, 0x15, 0x57, 0x16, 0x5D, 0x81
};
+#endif /* DVDCSS_CSSTABLES_H */
View
135 lib/libdvd/libdvdcss/src/device.c
@@ -2,25 +2,25 @@
* device.h: DVD device access
*****************************************************************************
* Copyright (C) 1998-2006 VideoLAN
- * $Id$
+ * $Id: device.c 242 2011-10-26 04:59:23Z jb $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* Sam Hocevar <sam@zoy.org>
* Håkan Hjort <d95hjort@dtek.chalmers.se>
*
- * This program is free software; you can redistribute it and/or modify
+ * 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
/*
@@ -69,6 +69,14 @@
# include <IOKit/storage/IODVDMedia.h>
#endif
+#ifdef SYS_OS2
+# define INCL_DOS
+# define INCL_DOSDEVIOCTL
+# include <os2.h>
+# include <io.h> /* setmode() */
+# include <fcntl.h> /* O_BINARY */
+#endif
+
#include "dvdcss/dvdcss.h"
#include "common.h"
@@ -95,6 +103,12 @@ 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 )
+static int os2_open ( dvdcss_t, char const * );
+/* just use macros for libc */
+# define os2_seek libc_seek
+# define os2_read libc_read
+# define os2_readv libc_readv
#endif
int _dvdcss_use_ioctls( dvdcss_t dvdcss )
@@ -114,6 +128,16 @@ int _dvdcss_use_ioctls( dvdcss_t dvdcss )
{
return 1;
}
+#elif defined( SYS_OS2 )
+ ULONG ulMode;
+
+ if( DosQueryFHState( dvdcss->i_fd, &ulMode ) != 0 )
+ return 1; /* What to do? Be conservative and try to use the ioctls */
+
+ if( ulMode & OPEN_FLAGS_DASD )
+ return 1;
+
+ return 0;
#else
struct stat fileinfo;
int ret;
@@ -161,6 +185,28 @@ void _dvdcss_check ( dvdcss_t dvdcss )
kern_return_t kern_result;
io_iterator_t media_iterator;
CFMutableDictionaryRef classes_to_match;
+#elif defined( SYS_OS2 )
+#pragma pack( 1 )
+ struct
+ {
+ BYTE bCmdInfo;
+ BYTE bDrive;
+ } param;
+
+ struct
+ {
+ BYTE abEBPB[31];
+ USHORT usCylinders;
+ BYTE bDevType;
+ USHORT usDevAttr;
+ } data;
+#pragma pack()
+
+ ULONG ulParamLen;
+ ULONG ulDataLen;
+ ULONG rc;
+
+ int i;
#else
char *ppsz_devices[] = { "/dev/dvd", "/dev/cdrom", "/dev/hdc", NULL };
int i, i_fd;
@@ -274,6 +320,32 @@ void _dvdcss_check ( dvdcss_t dvdcss )
}
IOObjectRelease( media_iterator );
+#elif defined( SYS_OS2 )
+ for( i = 0; i < 26; i++ )
+ {
+ param.bCmdInfo = 0;
+ param.bDrive = i;
+
+ rc = DosDevIOCtl( ( HFILE )-1, IOCTL_DISK, DSK_GETDEVICEPARAMS,
+ &param, sizeof( param ), &ulParamLen,
+ &data, sizeof( data ), &ulDataLen );
+
+ if( rc == 0 )
+ {
+ /* Check for removable and for cylinders */
+ if( ( data.usDevAttr & 1 ) == 0 && data.usCylinders == 0xFFFF )
+ {
+ char psz_dvd[] = "A:";
+
+ psz_dvd[0] += i;
+
+ print_debug( dvdcss, "defaulting to drive `%s'", psz_dvd );
+ free( dvdcss->psz_device );
+ dvdcss->psz_device = strdup( psz_dvd );
+ return;
+ }
+ }
+ }
#else
for( i = 0; ppsz_devices[i]; i++ )
{
@@ -335,6 +407,18 @@ int _dvdcss_open ( dvdcss_t dvdcss )
return aspi_open( dvdcss, psz_device );
}
else
+#elif defined( SYS_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] ) ) )
+ {
+ print_debug( dvdcss, "using OS2 API for access" );
+ dvdcss->pf_seek = os2_seek;
+ dvdcss->pf_read = os2_read;
+ dvdcss->pf_readv = os2_readv;
+ return os2_open( dvdcss, psz_device );
+ }
+ else
#endif
{
print_debug( dvdcss, "using libc for access" );
@@ -345,7 +429,7 @@ int _dvdcss_open ( dvdcss_t dvdcss )
}
}
-#ifndef WIN32
+#if !defined(WIN32) && !defined(SYS_OS2)
int _dvdcss_raw_open ( dvdcss_t dvdcss, char const *psz_device )
{
dvdcss->i_raw_fd = open( psz_device, 0 );
@@ -400,11 +484,13 @@ int _dvdcss_close ( dvdcss_t dvdcss )
#else
close( dvdcss->i_fd );
+#ifndef SYS_OS2
if( dvdcss->i_raw_fd >= 0 )
{
close( dvdcss->i_raw_fd );
dvdcss->i_raw_fd = -1;
}
+#endif
return 0;
#endif
@@ -417,7 +503,7 @@ int _dvdcss_close ( dvdcss_t dvdcss )
*****************************************************************************/
static int libc_open ( dvdcss_t dvdcss, char const *psz_device )
{
-#if !defined( WIN32 )
+#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 );
@@ -444,7 +530,7 @@ static int win2k_open ( dvdcss_t dvdcss, char const *psz_device )
strcpy(psz_dvd, "cdrom0:");
#else
char psz_dvd[7];
- _snprintf( psz_dvd, 7, "\\\\.\\%c:", psz_device[0] );
+ snprintf( psz_dvd, 7, "\\\\.\\%c:", psz_device[0] );
#endif
/* To work around an M$ bug in IOCTL_DVD_READ_STRUCTURE, we need read
@@ -605,6 +691,37 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device )
}
#endif
+#ifdef SYS_OS2
+static int os2_open ( dvdcss_t dvdcss, char const *psz_device )
+{
+ char psz_dvd[] = "X:";
+ HFILE hfile;
+ ULONG ulAction;
+ ULONG rc;
+
+ psz_dvd[0] = psz_device[0];
+
+ rc = DosOpenL( ( PSZ )psz_dvd, &hfile, &ulAction, 0, FILE_NORMAL,
+ OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW,
+ OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE | OPEN_FLAGS_DASD,
+ NULL );
+
+ if( rc )
+ {
+ print_error( dvdcss, "failed to open device" );
+ return -1;
+ }
+
+ setmode( hfile, O_BINARY );
+
+ dvdcss->i_fd = dvdcss->i_read_fd = hfile;
+
+ dvdcss->i_pos = 0;
+
+ return 0;
+}
+#endif
+
/*****************************************************************************
* Seek commands.
*****************************************************************************/
View
16 lib/libdvd/libdvdcss/src/device.h
@@ -2,7 +2,7 @@
* device.h: DVD device access
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id$
+ * $Id: device.h 236 2010-08-02 15:59:13Z jb $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* Sam Hocevar <sam@zoy.org>
@@ -18,11 +18,14 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
+#ifndef DVDCSS_DEVICE_H
+#define DVDCSS_DEVICE_H
+
/*****************************************************************************
* iovec structure: vectored data entry
*****************************************************************************/
@@ -33,6 +36,8 @@
# include <sys/uio.h> /* struct iovec */
#endif
+#include "dvdcss/dvdcss.h"
+
#if defined( WIN32 ) && !defined( SYS_CYGWIN )
struct iovec
{
@@ -52,7 +57,8 @@ int _dvdcss_close ( dvdcss_t );
/*****************************************************************************
* Device reading prototypes, raw-device specific
*****************************************************************************/
-#ifndef WIN32
+#if !defined(WIN32) && !defined(SYS_OS2)
int _dvdcss_raw_open ( dvdcss_t, char const * );
#endif
+#endif /* DVDCSS_DEVICE_H */
View
8 lib/libdvd/libdvdcss/src/dvdcss/dvdcss.h
@@ -10,7 +10,7 @@
/*
* Copyright (C) 1998-2008 VideoLAN
- * $Id$
+ * $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
@@ -22,9 +22,9 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DVDCSS_DVDCSS_H
View
12 lib/libdvd/libdvdcss/src/error.c
@@ -2,23 +2,23 @@
* error.c: error management functions
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id$
+ * $Id: error.c 221 2009-02-09 00:45:44Z sam $
*
* Author: Sam Hocevar <sam@zoy.org>
*
- * This program is free software; you can redistribute it and/or modify
+ * 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
#include "config.h"
View
12 lib/libdvd/libdvdcss/src/ioctl.c
@@ -2,7 +2,7 @@
* ioctl.c: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id$
+ * $Id: ioctl.c 221 2009-02-09 00:45:44Z sam $
*
* Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
* Sam Hocevar <sam@zoy.org>
@@ -13,19 +13,19 @@
* Alex Strelnikov <lelik@os2.ru>
* Gildas Bazin <gbazin@netcourrier.com>
*
- * This program is free software; you can redistribute it and/or modify
+ * 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
/*****************************************************************************
View
15 lib/libdvd/libdvdcss/src/ioctl.h
@@ -2,7 +2,7 @@
* ioctl.h: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id$
+ * $Id: ioctl.h 235 2010-08-02 15:41:14Z jb $
*
* Authors: Sam Hocevar <sam@zoy.org>
*
@@ -16,11 +16,14 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
+#ifndef DVDCSS_IOCTL_H
+#define DVDCSS_IOCTL_H
+
int ioctl_ReadCopyright ( int, int, int * );
int ioctl_ReadDiscKey ( int, int *, uint8_t * );
int ioctl_ReadTitleKey ( int, int *, int, uint8_t * );
@@ -321,7 +324,7 @@ typedef struct SCSI_PASS_THROUGH_DIRECT
typedef DWORD (CALLBACK *GETASPI32SUPPORTINFO)(VOID);
typedef DWORD (CALLBACK *SENDASPI32COMMAND)(LPVOID);
-#if defined(_XBOX) || defined(WIN32)
+#if defined(_XBOX)
#define WIN2K 1
#else
#define WIN2K ( GetVersion() < 0x80000000 )
@@ -431,3 +434,5 @@ struct OS2_ExecSCSICmd
#pragma pack()
#endif
+
+#endif /* DVDCSS_IOCTL_H */
View
56 lib/libdvd/libdvdcss/src/libdvdcss.c
@@ -5,21 +5,21 @@
* Håkan Hjort <d95hjort@dtek.chalmers.se>
*
* Copyright (C) 1998-2008 VideoLAN
- * $Id$
+ * $Id: libdvdcss.c 237 2010-09-25 14:21:47Z reimar $
*
- * This program is free software; you can redistribute it and/or modify
+ * 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this library; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/**
@@ -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" );
-#ifndef WIN32
+#if !defined(WIN32) && !defined(SYS_OS2)
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
*/
-#ifndef WIN32
+#if !defined(WIN32) && !defined(SYS_OS2)
dvdcss->i_raw_fd = -1;
#endif
dvdcss->p_titles = NULL;
@@ -310,7 +310,25 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
/* Cache our keys in ${HOME}/.dvdcss/ */
if( psz_home )
{
- snprintf( psz_buffer, PATH_MAX, "%s/.dvdcss", psz_home );
+ int home_pos = 0;
+
+#ifdef SYS_OS2
+ if( *psz_home == '/' || *psz_home == '\\')
+ {
+ char *psz_unixroot = getenv("UNIXROOT");
+
+ if( psz_unixroot &&
+ psz_unixroot[0] &&
+ psz_unixroot[1] == ':' &&
+ psz_unixroot[2] == '\0')
+ {
+ strcpy( psz_buffer, psz_unixroot );
+ home_pos = 2;
+ }
+ }
+#endif
+ snprintf( psz_buffer + home_pos, PATH_MAX - home_pos,
+ "%s/.dvdcss", psz_home );
psz_buffer[PATH_MAX-1] = '\0';
psz_cache = psz_buffer;
}
@@ -353,7 +371,14 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
if( dvdcss->b_ioctls )
{
i_ret = _dvdcss_test( dvdcss );
- if( i_ret < 0 )
+
+ if( i_ret == -3 )
+ {
+ print_debug( dvdcss, "scrambled disc on a region-free RPC-II "
+ "drive: possible failure, but continuing "
+ "anyway" );
+ }
+ else if( i_ret < 0 )
{
/* Disable the CSS ioctls and hope that it works? */
print_debug( dvdcss,
@@ -369,7 +394,6 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
}
/* 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 )
{
@@ -380,10 +404,6 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
print_debug( dvdcss, "could not get disc key" );
}
}
- else
- {
- memset( dvdcss->css.p_disc_key, 0, KEY_SIZE );
- }
/* If the cache is enabled, write the cache directory tag */
if( psz_cache )
@@ -408,7 +428,6 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
if( psz_cache )
{
uint8_t p_sector[DVDCSS_BLOCK_SIZE];
- char psz_debug[PATH_MAX + 30];
char psz_key[1 + KEY_SIZE * 2 + 1];
char *psz_title;
uint8_t *psz_serial;
@@ -554,13 +573,12 @@ LIBDVDCSS_EXPORT dvdcss_t dvdcss_open ( char *psz_target )
/* Pointer to the filename we will use. */
dvdcss->psz_block = dvdcss->psz_cachefile + i;
- sprintf( psz_debug, "using CSS key cache dir: %s",
+ print_debug( dvdcss, "using CSS key cache dir: %s",
dvdcss->psz_cachefile );
- print_debug( dvdcss, "%s", psz_debug );
}
nocache:
-#ifndef WIN32
+#if !defined(WIN32) && !defined(SYS_OS2)
if( psz_raw_device != NULL )
{
_dvdcss_raw_open( dvdcss, psz_raw_device );
View
17 lib/libdvd/libdvdcss/src/libdvdcss.h
@@ -2,7 +2,7 @@
* libdvdcss.h: private DVD reading library data
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id$
+ * $Id: libdvdcss.h 240 2011-03-23 15:00:06Z jb $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* Sam Hocevar <sam@zoy.org>
@@ -17,11 +17,17 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdcss; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*****************************************************************************/
+#ifndef DVDCSS_LIBDVDCSS_H
+#define DVDCSS_LIBDVDCSS_H
+
+#include "dvdcss/dvdcss.h"
+#include "css.h"
+
struct iovec;
/*****************************************************************************
@@ -62,7 +68,7 @@ struct dvdcss_s
int i_readv_buf_size;
#endif
-#ifndef WIN32
+#if !defined(WIN32) && !defined(SYS_OS2)
int i_raw_fd;
#endif
};
@@ -102,3 +108,4 @@ __forceinline void print_debug(dvdcss_t dvdcss, const char *msg,...)
void _print_error ( dvdcss_t, char * );
+#endif /* DVDCSS_LIBDVDCSS_H */
View
13 lib/libdvd/libdvdnav/ChangeLog
@@ -1,3 +1,16 @@
+libdvdnav (4.2.0)
+ * OS/2 support
+ * added dvdnav_get_serial_string() function
+ * fixed ifo leak in dvdnav_describe_chapters()
+ * added dvdnav_get_video_resolution() to retrieve video resolution
+ * added dvdnav_program_play() & dvdnav_current_title_program() for
+ more reliable playback
+ * fixed deadlock between dvdnav_reset() and dvd_clear()
+ * fixed pthread_mutex_destroy macro for Win32
+ * fixed numerous assertion failures occuring when playing DVDs with
+ new "copy protection" schemes
+ * fixed forward seeks to always move forward
+
libdvdnav (4.1.3)
* an embarassing amount of fixes regarding potential memory and resource leaks
(patches contributed by Erik Hovland)
View
4 lib/libdvd/libdvdnav/Makefile
@@ -12,11 +12,11 @@ SRCS = dvdnav.c highlight.c navigation.c read_cache.c remap.c searching.c settin
VPATH+= $(SRC_PATH_BARE)/src/vm
SRCS+= decoder.c vm.c vmcmd.c
-HEADERS = src/dvd_types.h src/dvdnav.h src/dvdnav_events.h
+HEADERS = src/dvdnav/dvd_types.h src/dvdnav/dvdnav.h src/dvdnav/dvdnav_events.h
CFLAGS += $(USEDEBUG) -Wall -funsigned-char
CFLAGS += -I$(CURDIR) -I$(SRC_PATH)/src -I$(SRC_PATH)/src/vm
-CFLAGS += -DDVDNAV_COMPILE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
+CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CFLAGS += -DHAVE_CONFIG_H -DHAVE_DLFCN_H
L=libdvdnav
View
2  lib/libdvd/libdvdnav/README
@@ -26,7 +26,7 @@ from xine-dvdnav and went into the first version of libdvdnav.
Where is it now?
----------------
-libdvdnav is hosted on http://www.mplayerhq.hu/MPlayer/releases/dvdnav/ .
+libdvdnav is hosted at http://dvdnav.mplayerhq.hu/ .
Please report bugs to the developers mailinglist at
mailto:dvdnav-discuss@mplayerhq.hu .
View
2  lib/libdvd/libdvdnav/autogen.sh
@@ -1,7 +1,5 @@
#!/bin/sh
#
-# $Id: autogen.sh 1091 2008-06-08 06:37:22Z nicodvb $
-#
# run this to generate all the initial makefiles, etc.
srcdir=`dirname "$0"`
View
27 lib/libdvd/libdvdnav/configure.ac
@@ -13,8 +13,8 @@ dnl
dnl These are defined in m4 so they can be passed to AC_INIT
dnl --------------------------------------------------------------
m4_define([dvdnav_major], [4])
-m4_define([dvdnav_minor], [1])
-m4_define([dvdnav_sub], [3])
+m4_define([dvdnav_minor], [2])
+m4_define([dvdnav_sub], [0])
m4_define([dvdnav_pre], [])
AC_INIT([libdvdnav], [dvdnav_major.dvdnav_minor.dvdnav_sub[]dvdnav_pre])
@@ -165,6 +165,9 @@ case $host in
*cygwin*)
LDFLAGS="-no-undefined $LDFLAGS"
;;
+ *os2*)
+ LDFLAGS="-no-undefined -Zbin-files $LDFLAGS"
+ ;;
*)
AC_CHECK_LIB(c, dlopen,
DYNAMIC_LD_LIBS="",
@@ -204,26 +207,6 @@ DEBUG_CFLAGS="-g -DDEBUG $CFLAGS"
AC_SUBST(DEBUG_CFLAGS)
dnl ---------------------------------------------
-dnl Get where .m4 should be installed.
-dnl ---------------------------------------------
-case "`id`" in
- uid=0\(* )
- AC_MSG_CHECKING(for aclocal directory)
- if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL_DIR="`eval $ACLOCAL --print-ac-dir`"
- AC_MSG_RESULT($ACLOCAL_DIR)
- else
- ACLOCAL_DIR="/usr/local/share/aclocal"
- AC_MSG_RESULT(none - will be installed in $ACLOCAL_DIR)
- fi
- escapedprefix="`echo $prefix | sed -e 's/\\//\\\\\//g'`"
- ACLOCAL_DIR="`echo $ACLOCAL_DIR|sed -e 's/^'$escapedprefix/'\${prefix}'/`"
- AC_SUBST(ACLOCAL_DIR)
- ;;
-esac
-AM_CONDITIONAL(INSTALL_M4, test x"$ACLOCAL_DIR" != "x")
-
-dnl ---------------------------------------------
dnl Check for doxygen (dynamic documentation generator)
dnl ---------------------------------------------
AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, no)
View
2  lib/libdvd/libdvdnav/configure2
@@ -1,6 +1,6 @@
#!/bin/sh
-dvdnav_sh_version=4.1.3
+dvdnav_sh_version=4.2.0
dvdnav_sh_major=`echo $dvdnav_sh_version | awk -F. '{print $1}'`
cc=gcc
View
23 lib/libdvd/libdvdnav/examples/menus.c
@@ -13,12 +13,9 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: menus.c 1135 2008-09-06 21:55:51Z rathann $
- *
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdnav; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdio.h>
@@ -27,12 +24,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include "dvd_types.h"
-#include <dvdread/dvd_reader.h>
-#include <dvdread/nav_types.h>
-#include <dvdread/ifo_types.h> /* For vm_cmd_t */
-#include "dvdnav.h"
-#include "dvdnav_events.h"
+#include <dvdnav/dvdnav.h>
/* shall we use libdvdnav's read ahead cache? */
#define DVD_READ_CACHE 1
@@ -51,9 +43,14 @@ int main(int argc, char **argv) {
int output_fd = 0;
int dump = 0, tt_dump = 0;
+ if (argc < 2) {
+ printf("Specify DVD device.\n");
+ return 1;
+ }
+
/* open dvdnav handle */
printf("Opening DVD...\n");
- if (dvdnav_open(&dvdnav, "/dev/dvd") != DVDNAV_STATUS_OK) {
+ if (dvdnav_open(&dvdnav, argv[1]) != DVDNAV_STATUS_OK) {
printf("Error on dvdnav_open\n");
return 1;
}
View
4 lib/libdvd/libdvdnav/m4/Makefile.am
@@ -2,10 +2,6 @@ include $(top_srcdir)/misc/Makefile.common
EXTRA_DIST = dvdnav.m4
-if INSTALL_M4
-m4datadir = @ACLOCAL_DIR@
-else
m4datadir = $(datadir)/aclocal
-endif
m4data_DATA = dvdnav.m4
View
5 lib/libdvd/libdvdnav/msvc/config.h
@@ -1,5 +1,8 @@
/* config.h. Generated by hand. */
+#ifndef LIBDVNAV_CONFIG_H
+#define LIBDVNAV_CONFIG_H
+
#define HAVE_DLFCN_H 1
/* #undef HAVE_DVDCSS_DVDCSS_H*/
/* #undef HAVE_INTTYPES_H */
@@ -49,3 +52,5 @@ typedef signed int int32_t;
typedef unsigned __int64 uint64_t;
typedef signed __int64 int64_t;
typedef unsigned int uintptr_t;
+
+#endif /* LIBDVNAV_CONFIG_H */
View
3  lib/libdvd/libdvdnav/msvc/contrib/dlfcn.c
@@ -1,7 +1,4 @@
/*
- * $Id: dlfcn.c 1135 2008-09-06 21:55:51Z rathann $
- * $Name$
- *
* Adopted from Apache DSO code.
* Portions copyright Apache Software Foundation
*
View
4 lib/libdvd/libdvdnav/msvc/contrib/getopt.c
@@ -21,8 +21,8 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ Floor, Boston, MA 02110-1301 USA. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */
View
4 lib/libdvd/libdvdnav/msvc/contrib/timer/timer.c
@@ -14,8 +14,8 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* WIN32 PORT,
* by Matthew Grooms <elon@altavista.com>
View
7 lib/libdvd/libdvdnav/msvc/include/dlfcn.h
@@ -1,11 +1,6 @@
#ifndef __DLFCN_H__
# define __DLFCN_H__
-/*
- * $Id: dlfcn.h 1135 2008-09-06 21:55:51Z rathann $
- * $Name$
- *
- *
- */
+
extern void *dlopen (const char *file, int mode);
extern int dlclose (void *handle);
extern void *dlsym (void * handle, const char * name);
View
15 lib/libdvd/libdvdnav/msvc/include/dvdnav_internal.h
@@ -14,16 +14,13 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: dvdnav_internal.h 1135 2008-09-06 21:55:51Z rathann $
- *
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdnav; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef DVDNAV_INTERNAL_H_INCLUDED
-#define DVDNAV_INTERNAL_H_INCLUDED
+#ifndef LIBDVDNAV_DVDNAV_INTERNAL_H
+#define LIBDVDNAV_DVDNAV_INTERNAL_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -182,4 +179,4 @@ struct dvdnav_s {
#define S_OK DVDNAV_STATUS_OK
#endif /* MSC_VER */
-#endif /* DVDNAV_INTERNAL_H_INCLUDED */
+#endif /* LIBDVDNAV_DVDNAV_INTERNAL_H */
View
4 lib/libdvd/libdvdnav/msvc/include/getopt.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ Floor, Boston, MA 02110-1301 USA. */
#ifndef _GETOPT_H
#define _GETOPT_H 1
View
4 lib/libdvd/libdvdnav/msvc/include/inttypes.h
@@ -14,8 +14,8 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* WIN32 PORT,
* by Matthew Grooms <elon@altavista.com>
View
3  lib/libdvd/libdvdnav/msvc/include/os_types.h
@@ -1,9 +1,6 @@
#ifndef __OS_TYPES_H__
#define __OS_TYPES_H__
/*
- * $Id: os_types.h 1135 2008-09-06 21:55:51Z rathann $
- * $Name$
- *
* win32 types
* 04 Sept 2001 - Chris Wolf create.
*/
View
4 lib/libdvd/libdvdnav/msvc/include/pthreads/pthread.h
@@ -15,8 +15,8 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
*/
#if !defined( PTHREAD_H )
View
4 lib/libdvd/libdvdnav/msvc/include/pthreads/sched.h
@@ -22,8 +22,8 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA.
*/
#ifndef _SCHED_H
#define _SCHED_H
View
4 lib/libdvd/libdvdnav/msvc/include/sys/time.h
@@ -14,8 +14,8 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* WIN32 PORT,
* by Matthew Grooms <elon@altavista.com>
View
4 lib/libdvd/libdvdnav/msvc/include/unistd.h
@@ -14,8 +14,8 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* WIN32 PORT,
* by Matthew Grooms <elon@altavista.com>
View
4 lib/libdvd/libdvdnav/src/Makefile.am
@@ -4,7 +4,7 @@ SUBDIRS = vm
includedir = ${prefix}/include/dvdnav
-AM_CPPFLAGS = -DDVDNAV_COMPILE $(THREAD_CFLAGS) $(DVDREAD_CFLAGS) \
+AM_CPPFLAGS = $(THREAD_CFLAGS) $(DVDREAD_CFLAGS) \
-I$(top_srcdir)/src/vm
EXTRA_DIST = README.MAP FELLOWSHIP.map
@@ -31,4 +31,4 @@ libdvdnavmini_la_LIBADD = $(THREAD_LIBS) \
libdvdnavmini_la_LDFLAGS = $(libdvdnav_la_LDFLAGS)
-include_HEADERS = dvdnav.h dvdnav_events.h dvd_types.h
+include_HEADERS = dvdnav/dvdnav.h dvdnav/dvdnav_events.h dvdnav/dvd_types.h
View
51 lib/libdvd/libdvdnav/src/dvdnav.c
@@ -13,12 +13,9 @@
* 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- *
- * $Id: dvdnav.c 1135 2008-09-06 21:55:51Z rathann $
- *
+ * You should have received a copy of the GNU General Public License along
+ * with libdvdnav; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifdef HAVE_CONFIG_H
@@ -36,15 +33,13 @@
#include <limits.h>
#include <string.h>
#include <sys/time.h>
-#include "dvd_types.h"
+#include "dvdnav/dvdnav.h"
#include <dvdread/dvd_reader.h>
#include <dvdread/nav_types.h>
#include <dvdread/ifo_types.h> /* For vm_cmd_t */
#include "remap.h"
#include "vm/decoder.h"
#include "vm/vm.h"
-#include "dvdnav.h"
-#include "dvdnav_events.h"
#include "dvdnav_internal.h"
#include "read_cache.h"
#include <dvdread/nav_read.h>
@@ -57,12 +52,12 @@ static dvdnav_status_t dvdnav_clear(dvdnav_t * this) {
if (this->file) DVDCloseFile(this->file);
this->file = NULL;
+ memset(&this->position_current,0,sizeof(this->position_current));
memset(&this->pci,0,sizeof(this->pci));
memset(&this->dsi,0,sizeof(this->dsi));
this->last_cmd_nav_lbn = SRI_END_OF_CELL;
/* Set initial values of flags */
- this->position_current.still = 0;
this->skip_still = 0;
this->sync_wait = 0;
this->sync_wait_skip = 0;
@@ -183,9 +178,9 @@ dvdnav_status_t dvdnav_reset(dvdnav_t *this) {
#ifdef LOG_DEBUG
fprintf(MSG_OUT, "libdvdnav: clearing dvdnav\n");
#endif
+ pthread_mutex_unlock(&this->vm_lock);
result = dvdnav_clear(this);
- pthread_mutex_unlock(&this->vm_lock);
return result;
}
@@ -674,7 +669,7 @@ dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, uint8_t **buf,
fprintf(MSG_OUT, "libdvdnav: SPU_CLUT_CHANGE\n");
#endif
(*len) = 16 * sizeof(uint32_t);
- memcpy(*buf, state->pgc->palette, 16 * sizeof(uint32_t));
+ memcpy(*buf, &(state->pgc->palette), 16 * sizeof(uint32_t));
this->spu_clut_changed = 0;
pthread_mutex_unlock(&this->vm_lock);
return DVDNAV_STATUS_OK;
@@ -848,6 +843,11 @@ dvdnav_status_t dvdnav_get_title_string(dvdnav_t *this, const char **title_str)
return DVDNAV_STATUS_OK;
}
+dvdnav_status_t dvdnav_get_serial_string(dvdnav_t *this, const char **serial_str) {
+ (*serial_str) = this->vm->dvd_serial;
+ return DVDNAV_STATUS_OK;
+}
+
uint8_t dvdnav_get_video_aspect(dvdnav_t *this) {
uint8_t retval;
@@ -862,6 +862,22 @@ uint8_t dvdnav_get_video_aspect(dvdnav_t *this) {
return retval;
}
+int dvdnav_get_video_resolution(dvdnav_t *this, uint32_t *width, uint32_t *height) {
+ int w, h;
+
+ if(!this->started) {
+ printerr("Virtual DVD machine not started.");
+ return -1;
+ }