annotate libmpdvdkit2/libdvdcss_changes.diff @ 16392:cdd649f1de0b

a libmpcdec version with our patches was released (but I did not yet test it).
author reimar
date Sun, 04 Sep 2005 22:42:01 +0000
parents 05f2d8e27cf4
children 954cdf2171f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14861
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
1 --- bsdi_ioctl.c 2003-03-10 00:34:10.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
2 +++ bsdi_ioctl.c 2005-03-01 07:41:41.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
3 @@ -694,7 +698,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
4 struct cdrom_tocentry entry;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
5 int ret, i;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
6
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
7 - bzero(tracks, sizeof (*tracks));
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
8 + memset(tracks, 0, sizeof (*tracks));
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
9 ret = cdrom_ioctl(fd, CDROMREADTOCHDR, &header);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
10 /*
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
11 * This whole business is a crock anyhow so we don't bother distinguishing
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
12 --- common.h 2003-06-13 19:33:35.000000000 +0200
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
13 +++ common.h 2005-03-01 07:41:41.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
14 @@ -27,21 +30,10 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
15 /*****************************************************************************
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
16 * Basic types definitions
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
17 *****************************************************************************/
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
18 -#if defined( HAVE_STDINT_H )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
19 -# include <stdint.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
20 -#elif defined( HAVE_INTTYPES_H )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
21 -# include <inttypes.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
22 -#elif defined( SYS_CYGWIN )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
23 -# include <sys/types.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
24 - /* Cygwin only defines half of these... */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
25 - typedef u_int8_t uint8_t;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
26 - typedef u_int32_t uint32_t;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
27 -#else
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
28 - /* Fallback types (very x86-centric, sorry) */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
29 - typedef unsigned char uint8_t;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
30 - typedef signed char int8_t;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
31 - typedef unsigned int uint32_t;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
32 - typedef signed int int32_t;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
33 +#include <inttypes.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
34 +
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
35 +#ifdef __CYGWIN__
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
36 +#define SYS_CYGWIN
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
37 #endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
38
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
39 #if defined( WIN32 )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
40 --- css.c 2003-07-29 01:37:06.000000000 +0200
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
41 +++ css.c 2005-03-01 07:41:41.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
42 @@ -40,19 +43,11 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
43 #include <string.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
44 #include <sys/types.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
45 #include <sys/stat.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
46 -#ifdef HAVE_SYS_PARAM_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
47 -# include <sys/param.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
48 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
49 -#ifdef HAVE_UNISTD_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
50 -# include <unistd.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
51 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
52 #include <fcntl.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
53 +#include <unistd.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
54 +#include <limits.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
55
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
56 -#ifdef HAVE_LIMITS_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
57 -# include <limits.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
58 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
59 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
60 -#include "dvdcss/dvdcss.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
61 +#include "dvdcss.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
62
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
63 #include "common.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
64 #include "css.h"
15692
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
65 --- dvdcss/device.c 2005-06-07 19:22:40.181853664 +0200
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
66 +++ device.c 2005-06-07 15:36:21.000000000 +0200
14861
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
67 @@ -33,18 +36,9 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
68 #include <string.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
69 #include <sys/types.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
70 #include <sys/stat.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
71 -#ifdef HAVE_SYS_PARAM_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
72 -# include <sys/param.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
73 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
74 #include <fcntl.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
75 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
76 -#ifdef HAVE_UNISTD_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
77 -# include <unistd.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
78 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
79 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
80 -#ifdef HAVE_LIMITS_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
81 -# include <limits.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
82 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
83 +#include <unistd.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
84 +#include <limits.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
85
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
86 #if defined( WIN32 ) && !defined( SYS_CYGWIN )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
87 # include <io.h> /* read() */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
88 @@ -52,7 +46,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
89 # include <sys/uio.h> /* struct iovec */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
90 #endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
91
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
92 -#include "dvdcss/dvdcss.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
93 +#include "dvdcss.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
94
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
95 #include "common.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
96 #include "css.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
97 @@ -143,8 +137,11 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
98 _dvdcss_debug( dvdcss, psz_debug );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
99
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
100 #if defined( WIN32 )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
101 - /* If device is not "X:", we are actually opening a file. */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
102 - dvdcss->b_file = !psz_device[0] || psz_device[1] != ':' || psz_device[2];
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
103 + dvdcss->b_file = 1;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
104 + /* If device is "X:" or "X:\", we are not actually opening a file. */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
105 + if (psz_device[0] && psz_device[1] == ':' &&
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
106 + (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3])))
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
107 + dvdcss->b_file = 0;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
108
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
109 /* Initialize readv temporary buffer */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
110 dvdcss->p_readv_buffer = NULL;
15692
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
111 @@ -276,14 +273,14 @@
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
112 * won't send back the right result).
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
113 * (See Microsoft Q241374: Read and Write Access Required for SCSI
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
114 * Pass Through Requests) */
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
115 - (HANDLE) dvdcss->i_fd =
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
116 + dvdcss->i_fd = (int)
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
117 CreateFile( psz_dvd, GENERIC_READ | GENERIC_WRITE,
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
118 FILE_SHARE_READ | FILE_SHARE_WRITE,
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
119 NULL, OPEN_EXISTING,
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
120 FILE_FLAG_RANDOM_ACCESS, NULL );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
121
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
122 if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE )
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
123 - (HANDLE) dvdcss->i_fd =
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
124 + dvdcss->i_fd = (int)
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
125 CreateFile( psz_dvd, GENERIC_READ, FILE_SHARE_READ,
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
126 NULL, OPEN_EXISTING,
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
127 FILE_FLAG_RANDOM_ACCESS, NULL );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
128 @@ -305,8 +302,8 @@
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
129 DWORD dwSupportInfo;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
130 struct w32_aspidev *fd;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
131 int i, j, i_hostadapters;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
132 - long (*lpGetSupport)( void );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
133 - long (*lpSendCommand)( void* );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
134 + GETASPI32SUPPORTINFO lpGetSupport;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
135 + SENDASPI32COMMAND lpSendCommand;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
136 char c_drive = psz_device[0];
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
137
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
138 /* load aspi and init w32_aspidev structure */
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
139 @@ -317,8 +314,8 @@
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
140 return -1;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
141 }
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
142
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
143 - (FARPROC) lpGetSupport = GetProcAddress( hASPI, "GetASPI32SupportInfo" );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
144 - (FARPROC) lpSendCommand = GetProcAddress( hASPI, "SendASPI32Command" );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
145 + lpGetSupport = (GETASPI32SUPPORTINFO) GetProcAddress( hASPI, "GetASPI32SupportInfo" );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
146 + lpSendCommand = (SENDASPI32COMMAND) GetProcAddress( hASPI, "SendASPI32Command" );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
147
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
148 if(lpGetSupport == NULL || lpSendCommand == NULL )
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
149 {
14861
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
150 --- error.c 2003-03-10 01:15:31.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
151 +++ error.c 2005-03-01 07:41:41.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
152 @@ -25,16 +28,9 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
153
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
154 #include <stdio.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
155 #include <stdlib.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
156 +#include <limits.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
157
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
158 -#ifdef HAVE_SYS_PARAM_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
159 -# include <sys/param.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
160 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
161 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
162 -#ifdef HAVE_LIMITS_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
163 -# include <limits.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
164 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
165 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
166 -#include "dvdcss/dvdcss.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
167 +#include "dvdcss.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
168
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
169 #include "common.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
170 #include "css.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
171 --- ioctl.c 2003-03-10 00:34:10.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
172 +++ ioctl.c 2005-03-01 07:41:41.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
173 @@ -76,6 +79,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
174 # include <sys/scsi.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
175 #endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
176 #ifdef SOLARIS_USCSI
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
177 +# include <dlfcn.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
178 # include <unistd.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
179 # include <stropts.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
180 # include <sys/scsi/scsi_types.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
181 @@ -112,6 +116,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
182 *****************************************************************************/
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
183 #if defined( SOLARIS_USCSI )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
184 static void SolarisInitUSCSI( struct uscsi_cmd *p_sc, int i_type );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
185 +static int SolarisSendUSCSI( int fd, struct uscsi_cmd *p_sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
186 #endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
187
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
188 /*****************************************************************************
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
189 @@ -192,7 +197,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
190 rs_cdb.cdb_opaque[ 6 ] = i_layer;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
191 rs_cdb.cdb_opaque[ 7 ] = DVD_STRUCT_COPYRIGHT;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
192
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
193 - i_ret = ioctl(i_fd, USCSICMD, &sc);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
194 + i_ret = SolarisSendUSCSI(i_fd, &sc);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
195
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
196 if( i_ret < 0 || sc.uscsi_status ) {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
197 i_ret = -1;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
198 @@ -351,7 +356,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
199 rs_cdb.cdb_opaque[ 7 ] = DVD_STRUCT_DISCKEY;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
200 rs_cdb.cdb_opaque[ 10 ] = *pi_agid << 6;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
201
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
202 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
203 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
204
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
205 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
206 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
207 @@ -513,7 +518,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
208 rs_cdb.cdb_opaque[ 5 ] = ( i_pos ) & 0xff;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
209 rs_cdb.cdb_opaque[ 10 ] = DVD_REPORT_TITLE_KEY | (*pi_agid << 6);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
210
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
211 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
212 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
213
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
214 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
215 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
216 @@ -665,7 +670,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
217
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
218 rs_cdb.cdb_opaque[ 10 ] = DVD_REPORT_AGID | (*pi_agid << 6);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
219
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
220 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
221 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
222
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
223 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
224 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
225 @@ -787,7 +792,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
226
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
227 rs_cdb.cdb_opaque[ 10 ] = DVD_REPORT_CHALLENGE | (*pi_agid << 6);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
228
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
229 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
230 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
231
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
232 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
233 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
234 @@ -921,7 +926,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
235
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
236 rs_cdb.cdb_opaque[ 10 ] = DVD_REPORT_ASF;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
237
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
238 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
239 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
240
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
241 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
242 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
243 @@ -1054,7 +1059,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
244
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
245 rs_cdb.cdb_opaque[ 10 ] = DVD_REPORT_KEY1 | (*pi_agid << 6);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
246
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
247 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
248 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
249
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
250 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
251 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
252 @@ -1175,7 +1180,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
253
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
254 rs_cdb.cdb_opaque[ 10 ] = DVD_INVALIDATE_AGID | (*pi_agid << 6);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
255
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
256 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
257 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
258
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
259 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
260 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
261 @@ -1299,7 +1304,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
262 p_buffer[ 1 ] = 0xe;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
263 memcpy( p_buffer + 4, p_challenge, DVD_CHALLENGE_SIZE );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
264
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
265 - if( ioctl( i_fd, USCSICMD, &sc ) < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
266 + if( SolarisSendUSCSI( i_fd, &sc ) < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
267 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
268 return -1;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
269 }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
270 @@ -1436,7 +1441,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
271 p_buffer[ 1 ] = 0xa;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
272 memcpy( p_buffer + 4, p_key, DVD_KEY_SIZE );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
273
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
274 - if( ioctl( i_fd, USCSICMD, &sc ) < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
275 + if( SolarisSendUSCSI( i_fd, &sc ) < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
276 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
277 return -1;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
278 }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
279 @@ -1578,7 +1583,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
280
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
281 rs_cdb.cdb_opaque[ 10 ] = DVD_REPORT_RPC;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
282
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
283 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
284 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
285
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
286 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
287 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
288 @@ -1728,7 +1733,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
289 p_buffer[ 1 ] = 6;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
290 p_buffer[ 4 ] = i_pdrc;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
291
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
292 - i_ret = ioctl( i_fd, USCSICMD, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
293 + i_ret = SolarisSendUSCSI( i_fd, &sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
294
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
295 if( i_ret < 0 || sc.uscsi_status )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
296 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
297 @@ -1901,6 +1906,54 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
298
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
299 USCSI_TIMEOUT( p_sc, 15 );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
300 }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
301 +
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
302 +/*****************************************************************************
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
303 + * SolarisSendUSCSI: send a USCSICMD structure to the Solaris kernel
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
304 + * for execution
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
305 + *****************************************************************************
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
306 + * When available, this function uses the function smedia_uscsi_cmd()
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
307 + * from solaris' libsmedia library (solaris 9 or newer) to execute the
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
308 + * USCSI command. smedia_uscsi_cmd() allows USCSI commands for
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
309 + * non-root users on removable media devices on solaris 9; sending the
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
310 + * USCSI command directly to the device using the USCSICMD ioctl fails
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
311 + * with an EPERM error on solaris 9.
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
312 + *
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
313 + * The code will fall back to the USCSICMD ioctl method, when
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
314 + * libsmedia.so is not available or does not export the
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
315 + * smedia_uscsi_cmd() function (on solaris releases upto and including
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
316 + * solaris 8). Fortunatelly, on these old releases non-root users are
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
317 + * allowed to perform USCSICMD ioctls on removable media devices.
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
318 + *****************************************************************************/
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
319 +static int SolarisSendUSCSI( int i_fd, struct uscsi_cmd *p_sc ) {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
320 + void *sm_hdl;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
321 + static int initialized;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
322 + static void* (*sm_get_handle)(int32_t);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
323 + static int (*sm_release_handle)(void*);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
324 + static int (*sm_uscsi_cmd)(void*, struct uscsi_cmd *);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
325 +
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
326 + if (!initialized)
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
327 + {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
328 + void *smedia_lib;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
329 +
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
330 + smedia_lib = dlopen("libsmedia.so", RTLD_NOW);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
331 + if (smedia_lib) {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
332 + sm_get_handle = dlsym(smedia_lib, "smedia_get_handle");
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
333 + sm_release_handle = dlsym(smedia_lib, "smedia_release_handle");
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
334 + sm_uscsi_cmd = dlsym(smedia_lib, "smedia_uscsi_cmd");
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
335 + }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
336 + initialized = 1;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
337 + }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
338 +
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
339 + if (sm_get_handle && sm_uscsi_cmd && sm_release_handle
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
340 + && (sm_hdl = sm_get_handle(i_fd)))
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
341 + {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
342 + int i_ret = sm_uscsi_cmd(sm_hdl, p_sc);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
343 + sm_release_handle(sm_hdl);
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
344 + return i_ret;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
345 + }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
346 +
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
347 + return ioctl( i_fd, USCSICMD, p_sc );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
348 +}
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
349 #endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
350
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
351 #if defined( WIN32 )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
352 --- libdvdcss.c 2003-06-22 16:08:53.000000000 +0200
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
353 +++ libdvdcss.c 2005-03-01 07:41:41.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
354 @@ -22,7 +25,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
355 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
356 */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
357
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
358 -/**
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
359 +/*
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
360 * \mainpage libdvdcss developer documentation
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
361 *
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
362 * \section intro Introduction
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
363 @@ -87,10 +90,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
364 * values. This will speed up descrambling of DVDs which are in the
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
365 * cache. The DVDCSS_CACHE directory is created if it does not exist,
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
366 * and a subdirectory is created named after the DVD's title or
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
367 - * manufacturing date. If DVDCSS_CACHE is not set or is empty, \e libdvdcss
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
368 - * will use the default value which is "${HOME}/.dvdcss/" under Unix and
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
369 - * "C:\Documents and Settings\$USER\Application Data\dvdcss\" under Win32.
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
370 - * The special value "off" disables caching.
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
371 + * manufacturing date.
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
372 */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
373
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
374 /*
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
375 @@ -103,28 +103,12 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
376 #include <string.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
377 #include <sys/types.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
378 #include <sys/stat.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
379 -#ifdef HAVE_SYS_PARAM_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
380 -# include <sys/param.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
381 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
382 -#ifdef HAVE_PWD_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
383 -# include <pwd.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
384 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
385 #include <fcntl.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
386 #include <errno.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
387 +#include <unistd.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
388 +#include <limits.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
389
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
390 -#ifdef HAVE_UNISTD_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
391 -# include <unistd.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
392 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
393 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
394 -#ifdef HAVE_LIMITS_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
395 -# include <limits.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
396 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
397 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
398 -#ifdef HAVE_DIRECT_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
399 -# include <direct.h>
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
400 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
401 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
402 -#include "dvdcss/dvdcss.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
403 +#include "dvdcss.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
404
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
405 #include "common.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
406 #include "css.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
407 @@ -132,6 +116,12 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
408 #include "ioctl.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
409 #include "device.h"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
410
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
411 +#ifndef HAVE_MPLAYER
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
412 + #include "get_path.c"
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
413 +#else
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
414 + extern char * get_path( char * filename );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
415 +#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
416 +
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
417 /**
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
418 * \brief Symbol for version checks.
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
419 *
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
420 @@ -234,87 +224,11 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
421 }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
422
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
423 /*
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
424 - * If DVDCSS_CACHE was not set, try to guess a default value
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
425 - */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
426 - if( psz_cache == NULL || psz_cache[0] == '\0' )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
427 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
428 -#ifdef HAVE_DIRECT_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
429 - typedef HRESULT( WINAPI *SHGETFOLDERPATH )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
430 - ( HWND, int, HANDLE, DWORD, LPTSTR );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
431 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
432 -# define CSIDL_FLAG_CREATE 0x8000
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
433 -# define CSIDL_APPDATA 0x1A
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
434 -# define SHGFP_TYPE_CURRENT 0
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
435 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
436 - char psz_home[MAX_PATH];
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
437 - HINSTANCE p_dll;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
438 - SHGETFOLDERPATH p_getpath;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
439 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
440 - *psz_home = '\0';
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
441 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
442 - /* Load the shfolder dll to retrieve SHGetFolderPath */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
443 - p_dll = LoadLibrary( "shfolder.dll" );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
444 - if( p_dll )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
445 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
446 - p_getpath = (void*)GetProcAddress( p_dll, "SHGetFolderPathA" );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
447 - if( p_getpath )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
448 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
449 - /* Get the "Application Data" folder for the current user */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
450 - if( p_getpath( NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE,
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
451 - NULL, SHGFP_TYPE_CURRENT, psz_home ) == S_OK )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
452 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
453 - FreeLibrary( p_dll );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
454 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
455 - else
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
456 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
457 - *psz_home = '\0';
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
458 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
459 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
460 - FreeLibrary( p_dll );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
461 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
462 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
463 - /* Cache our keys in
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
464 - * C:\Documents and Settings\$USER\Application Data\dvdcss\ */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
465 - if( *psz_home )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
466 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
467 - snprintf( psz_buffer, PATH_MAX, "%s/dvdcss", psz_home );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
468 - psz_buffer[PATH_MAX-1] = '\0';
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
469 - psz_cache = psz_buffer;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
470 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
471 -#else
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
472 - char *psz_home = NULL;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
473 -# ifdef HAVE_PWD_H
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
474 - struct passwd *p_pwd;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
475 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
476 - /* Try looking in password file for home dir. */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
477 - p_pwd = getpwuid(getuid());
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
478 - if( p_pwd )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
479 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
480 - psz_home = p_pwd->pw_dir;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
481 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
482 -# endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
483 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
484 - if( psz_home == NULL )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
485 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
486 - psz_home = getenv( "HOME" );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
487 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
488 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
489 - /* Cache our keys in ${HOME}/.dvdcss/ */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
490 - if( psz_home )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
491 - {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
492 - snprintf( psz_buffer, PATH_MAX, "%s/.dvdcss", psz_home );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
493 - psz_buffer[PATH_MAX-1] = '\0';
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
494 - psz_cache = psz_buffer;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
495 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
496 -#endif
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
497 - }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
498 -
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
499 - /*
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
500 * Find cache dir from the DVDCSS_CACHE environment variable
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
501 */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
502 if( psz_cache != NULL )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
503 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
504 - if( psz_cache[0] == '\0' || !strcmp( psz_cache, "off" ) )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
505 + if( psz_cache[0] == '\0' )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
506 {
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
507 psz_cache = NULL;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
508 }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
509 @@ -325,6 +239,7 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
510 psz_cache = NULL;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
511 }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
512 }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
513 + else psz_cache = get_path( "DVDKeys" );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
514
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
515 /*
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
516 * Open device
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
517 @@ -465,9 +380,10 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
518 dvdcss->psz_cachefile[0] = '\0';
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
519 goto nocache;
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
520 }
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
521 + i += sprintf( dvdcss->psz_cachefile + i, "/");
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
522
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
523 - i += sprintf( dvdcss->psz_cachefile + i, "/%s#%s", psz_title,
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
524 - psz_serial );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
525 +// i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_data );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
526 + i += sprintf( dvdcss->psz_cachefile + i, "/%s#%s", psz_title, psz_serial );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
527 #if !defined( WIN32 ) || defined( SYS_CYGWIN )
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
528 i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
529 #else
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
530 --- dvdcss/dvdcss.h 2003-04-18 20:05:36.000000000 +0200
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
531 +++ dvdcss.h 2005-03-01 07:41:41.000000000 +0100
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
532 @@ -67,6 +70,8 @@
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
533 */
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
534 extern dvdcss_t dvdcss_open ( char *psz_target );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
535 extern int dvdcss_close ( dvdcss_t );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
536 +extern int dvdcss_title ( dvdcss_t,
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
537 + int i_block );
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
538 extern int dvdcss_seek ( dvdcss_t,
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
539 int i_blocks,
caf9d95cd508 MPlayer-specific changes to libdvdcss
diego
parents:
diff changeset
540 int i_flags );
15692
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
541 --- dvdcss/ioctl.h 2005-06-07 19:22:40.187852752 +0200
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
542 +++ ioctl.h 2005-06-07 15:31:43.000000000 +0200
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
543 @@ -318,6 +318,9 @@
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
544 * win32 aspi specific
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
545 *****************************************************************************/
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
546
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
547 +typedef WINAPI DWORD (*GETASPI32SUPPORTINFO)(VOID);
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
548 +typedef WINAPI DWORD (*SENDASPI32COMMAND)(LPVOID);
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
549 +
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
550 #define WIN2K ( GetVersion() < 0x80000000 )
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
551 #define ASPI_HAID 0
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
552 #define ASPI_TARGET 0
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
553 @@ -339,7 +342,7 @@
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
554 long hASPI;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
555 short i_sid;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
556 int i_blocks;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
557 - long (*lpSendCommand)( void* );
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
558 + SENDASPI32COMMAND lpSendCommand;
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
559 };
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
560
05f2d8e27cf4 merge the mingw gcc 4.1 diff
faust3
parents: 14989
diff changeset
561 #pragma pack(1)