Mercurial > mplayer.hg
annotate libmpdvdkit2/ioctl.h @ 12401:c704b145c62a
Blinkenlights section expanded.
author | diego |
---|---|
date | Mon, 03 May 2004 01:15:38 +0000 |
parents | f0f0f176d298 |
children | 80494fefb7ea |
rev | line source |
---|---|
7027 | 1 /***************************************************************************** |
2 * ioctl.h: DVD ioctl replacement function | |
3 ***************************************************************************** | |
4 * Copyright (C) 1999-2001 VideoLAN | |
5 * $Id$ | |
6 * | |
7 * Authors: Samuel Hocevar <sam@zoy.org> | |
8 * | |
9 * This program is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. | |
22 *****************************************************************************/ | |
23 | |
24 int ioctl_ReadCopyright ( int, int, int * ); | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
25 int ioctl_ReadDiscKey ( int, int *, uint8_t * ); |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
26 int ioctl_ReadTitleKey ( int, int *, int, uint8_t * ); |
7027 | 27 int ioctl_ReportAgid ( int, int * ); |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
28 int ioctl_ReportChallenge ( int, int *, uint8_t * ); |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
29 int ioctl_ReportKey1 ( int, int *, uint8_t * ); |
7027 | 30 int ioctl_ReportASF ( int, int *, int * ); |
31 int ioctl_InvalidateAgid ( int, int * ); | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
32 int ioctl_SendChallenge ( int, int *, uint8_t * ); |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
33 int ioctl_SendKey2 ( int, int *, uint8_t * ); |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
34 int ioctl_ReportRPC ( int, int *, int *, int * ); |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
35 int ioctl_SendRPC ( int, int ); |
7027 | 36 |
37 #define DVD_KEY_SIZE 5 | |
38 #define DVD_CHALLENGE_SIZE 10 | |
39 #define DVD_DISCKEY_SIZE 2048 | |
40 | |
41 /***************************************************************************** | |
42 * Common macro, BeOS specific | |
43 *****************************************************************************/ | |
44 #if defined( SYS_BEOS ) | |
45 #define INIT_RDC( TYPE, SIZE ) \ | |
46 raw_device_command rdc; \ | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
47 uint8_t p_buffer[ (SIZE)+1 ]; \ |
7027 | 48 memset( &rdc, 0, sizeof( raw_device_command ) ); \ |
49 rdc.data = (char *)p_buffer; \ | |
50 rdc.data_length = (SIZE); \ | |
51 BeInitRDC( &rdc, (TYPE) ); | |
52 #endif | |
53 | |
54 /***************************************************************************** | |
55 * Common macro, HP-UX specific | |
56 *****************************************************************************/ | |
57 #if defined( HPUX_SCTL_IO ) | |
58 #define INIT_SCTL_IO( TYPE, SIZE ) \ | |
59 struct sctl_io sctl_io; \ | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
60 uint8_t p_buffer[ (SIZE)+1 ]; \ |
7027 | 61 memset( &sctl_io, 0, sizeof( sctl_io ) ); \ |
62 sctl_io.data = (void *)p_buffer; \ | |
63 sctl_io.data_length = (SIZE); \ | |
64 HPUXInitSCTL( &sctl_io, (TYPE) ); | |
65 #endif | |
66 | |
67 /***************************************************************************** | |
68 * Common macro, Solaris specific | |
69 *****************************************************************************/ | |
70 #if defined( SOLARIS_USCSI ) | |
71 #define USCSI_TIMEOUT( SC, TO ) ( (SC)->uscsi_timeout = (TO) ) | |
72 #define USCSI_RESID( SC ) ( (SC)->uscsi_resid ) | |
73 #define INIT_USCSI( TYPE, SIZE ) \ | |
74 struct uscsi_cmd sc; \ | |
75 union scsi_cdb rs_cdb; \ | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
76 uint8_t p_buffer[ (SIZE)+1 ]; \ |
7027 | 77 memset( &sc, 0, sizeof( struct uscsi_cmd ) ); \ |
78 sc.uscsi_cdb = (caddr_t)&rs_cdb; \ | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
79 sc.uscsi_bufaddr = (caddr_t)p_buffer; \ |
7027 | 80 sc.uscsi_buflen = (SIZE); \ |
81 SolarisInitUSCSI( &sc, (TYPE) ); | |
82 #endif | |
83 | |
84 /***************************************************************************** | |
85 * Common macro, Darwin specific | |
86 *****************************************************************************/ | |
87 #if defined( DARWIN_DVD_IOCTL ) | |
88 #define INIT_DVDIOCTL( DKDVD_TYPE, BUFFER_TYPE, FORMAT ) \ | |
89 DKDVD_TYPE dvd; \ | |
90 BUFFER_TYPE dvdbs; \ | |
91 memset( &dvd, 0, sizeof(dvd) ); \ | |
92 memset( &dvdbs, 0, sizeof(dvdbs) ); \ | |
93 dvd.format = FORMAT; \ | |
94 dvd.buffer = &dvdbs; \ | |
95 dvd.bufferLength = sizeof(dvdbs); | |
96 #endif | |
97 | |
98 /***************************************************************************** | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
99 * Common macro, win32 specific |
7027 | 100 *****************************************************************************/ |
101 #if defined( WIN32 ) | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
102 #define INIT_SPTD( TYPE, SIZE ) \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
103 DWORD tmp; \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
104 SCSI_PASS_THROUGH_DIRECT sptd; \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
105 uint8_t p_buffer[ (SIZE) ]; \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
106 memset( &sptd, 0, sizeof( SCSI_PASS_THROUGH_DIRECT ) ); \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
107 sptd.Length = sizeof( SCSI_PASS_THROUGH_DIRECT ); \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
108 sptd.DataBuffer = p_buffer; \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
109 sptd.DataTransferLength = (SIZE); \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
110 WinInitSPTD( &sptd, (TYPE) ); |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
111 #define SEND_SPTD( DEV, SPTD, TMP ) \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
112 (DeviceIoControl( (HANDLE)(DEV), IOCTL_SCSI_PASS_THROUGH_DIRECT, \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
113 (SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
114 (SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \ |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
115 (TMP), NULL ) ? 0 : -1) |
7027 | 116 #define INIT_SSC( TYPE, SIZE ) \ |
117 struct SRB_ExecSCSICmd ssc; \ | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
118 uint8_t p_buffer[ (SIZE)+1 ]; \ |
7027 | 119 memset( &ssc, 0, sizeof( struct SRB_ExecSCSICmd ) ); \ |
120 ssc.SRB_BufPointer = (char *)p_buffer; \ | |
121 ssc.SRB_BufLen = (SIZE); \ | |
122 WinInitSSC( &ssc, (TYPE) ); | |
123 #endif | |
124 | |
125 /***************************************************************************** | |
126 * Common macro, QNX specific | |
127 *****************************************************************************/ | |
128 #if defined( __QNXNTO__ ) | |
129 #define INIT_CPT( TYPE, SIZE ) \ | |
130 CAM_PASS_THRU * p_cpt; \ | |
131 uint8_t * p_buffer; \ | |
132 int structSize = sizeof( CAM_PASS_THRU ) + (SIZE); \ | |
133 p_cpt = (CAM_PASS_THRU *) malloc ( structSize ); \ | |
134 p_buffer = (uint8_t *) p_cpt + sizeof( CAM_PASS_THRU ); \ | |
135 memset( p_cpt, 0, structSize ); \ | |
136 p_cpt->cam_data_ptr = sizeof( CAM_PASS_THRU ); \ | |
137 p_cpt->cam_dxfer_len = (SIZE); \ | |
138 QNXInitCPT( p_cpt, (TYPE) ); | |
139 #endif | |
140 | |
141 /***************************************************************************** | |
142 * Common macro, OS2 specific | |
143 *****************************************************************************/ | |
144 #if defined( SYS_OS2 ) | |
145 #define INIT_SSC( TYPE, SIZE ) \ | |
146 struct OS2_ExecSCSICmd sdc; \ | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
147 uint8_t p_buffer[ (SIZE)+1 ]; \ |
7027 | 148 unsigned long ulParamLen; \ |
149 unsigned long ulDataLen; \ | |
150 memset( &sdc, 0, sizeof( OS2_ExecSCSICmd ) ); \ | |
151 memset( &p_buffer, 0, SIZE ); \ | |
152 sdc.data_length = (SIZE); \ | |
153 ulParamLen = sizeof(sdc); \ | |
154 OS2InitSDC( &sdc, (TYPE) ) | |
155 #endif | |
156 | |
157 /***************************************************************************** | |
158 * Additional types, OpenBSD specific | |
159 *****************************************************************************/ | |
160 #if defined( HAVE_OPENBSD_DVD_STRUCT ) | |
161 typedef union dvd_struct dvd_struct; | |
162 typedef union dvd_authinfo dvd_authinfo; | |
163 #endif | |
164 | |
165 /***************************************************************************** | |
166 * Various DVD I/O tables | |
167 *****************************************************************************/ | |
168 #if defined( SYS_BEOS ) || defined( WIN32 ) || defined ( SOLARIS_USCSI ) || defined ( HPUX_SCTL_IO ) || defined ( __QNXNTO__ ) || defined ( SYS_OS2 ) | |
169 /* The generic packet command opcodes for CD/DVD Logical Units, | |
170 * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */ | |
171 # define GPCMD_READ_DVD_STRUCTURE 0xad | |
172 # define GPCMD_REPORT_KEY 0xa4 | |
173 # define GPCMD_SEND_KEY 0xa3 | |
174 /* DVD struct types */ | |
175 # define DVD_STRUCT_PHYSICAL 0x00 | |
176 # define DVD_STRUCT_COPYRIGHT 0x01 | |
177 # define DVD_STRUCT_DISCKEY 0x02 | |
178 # define DVD_STRUCT_BCA 0x03 | |
179 # define DVD_STRUCT_MANUFACT 0x04 | |
180 /* Key formats */ | |
181 # define DVD_REPORT_AGID 0x00 | |
182 # define DVD_REPORT_CHALLENGE 0x01 | |
183 # define DVD_SEND_CHALLENGE 0x01 | |
184 # define DVD_REPORT_KEY1 0x02 | |
185 # define DVD_SEND_KEY2 0x03 | |
186 # define DVD_REPORT_TITLE_KEY 0x04 | |
187 # define DVD_REPORT_ASF 0x05 | |
188 # define DVD_SEND_RPC 0x06 | |
189 # define DVD_REPORT_RPC 0x08 | |
190 # define DVD_INVALIDATE_AGID 0x3f | |
191 #endif | |
192 | |
193 /***************************************************************************** | |
194 * win32 ioctl specific | |
195 *****************************************************************************/ | |
196 #if defined( WIN32 ) | |
197 | |
198 #define WIN32_LEAN_AND_MEAN | |
199 #include <windows.h> | |
200 | |
201 #define IOCTL_DVD_START_SESSION CTL_CODE(FILE_DEVICE_DVD, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS) | |
202 #define IOCTL_DVD_READ_KEY CTL_CODE(FILE_DEVICE_DVD, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS) | |
203 #define IOCTL_DVD_SEND_KEY CTL_CODE(FILE_DEVICE_DVD, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS) | |
204 #define IOCTL_DVD_END_SESSION CTL_CODE(FILE_DEVICE_DVD, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS) | |
205 #define IOCTL_DVD_GET_REGION CTL_CODE(FILE_DEVICE_DVD, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS) | |
206 #define IOCTL_DVD_SEND_KEY2 CTL_CODE(FILE_DEVICE_DVD, 0x0406, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
207 #define IOCTL_DVD_READ_STRUCTURE CTL_CODE(FILE_DEVICE_DVD, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS) |
7027 | 208 #define IOCTL_SCSI_PASS_THROUGH_DIRECT CTL_CODE(FILE_DEVICE_CONTROLLER, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) |
209 | |
210 #define DVD_CHALLENGE_KEY_LENGTH (12 + sizeof(DVD_COPY_PROTECT_KEY)) | |
211 #define DVD_BUS_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY)) | |
212 #define DVD_TITLE_KEY_LENGTH (8 + sizeof(DVD_COPY_PROTECT_KEY)) | |
213 #define DVD_DISK_KEY_LENGTH (2048 + sizeof(DVD_COPY_PROTECT_KEY)) | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
214 #define DVD_RPC_KEY_LENGTH (sizeof(DVD_RPC_KEY) + sizeof(DVD_COPY_PROTECT_KEY)) |
7027 | 215 #define DVD_ASF_LENGTH (sizeof(DVD_ASF) + sizeof(DVD_COPY_PROTECT_KEY)) |
216 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
217 #define DVD_COPYRIGHT_MASK 0x00000040 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
218 #define DVD_NOT_COPYRIGHTED 0x00000000 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
219 #define DVD_COPYRIGHTED 0x00000040 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
220 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
221 #define DVD_SECTOR_PROTECT_MASK 0x00000020 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
222 #define DVD_SECTOR_NOT_PROTECTED 0x00000000 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
223 #define DVD_SECTOR_PROTECTED 0x00000020 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
224 |
7027 | 225 #define SCSI_IOCTL_DATA_OUT 0 |
226 #define SCSI_IOCTL_DATA_IN 1 | |
227 | |
228 typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID; | |
229 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
230 typedef enum DVD_STRUCTURE_FORMAT { |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
231 DvdPhysicalDescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
232 DvdCopyrightDescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
233 DvdDiskKeyDescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
234 DvdBCADescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
235 DvdManufacturerDescriptor, |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
236 DvdMaxDescriptor |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
237 } DVD_STRUCTURE_FORMAT, *PDVD_STRUCTURE_FORMAT; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
238 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
239 typedef struct DVD_READ_STRUCTURE { |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
240 LARGE_INTEGER BlockByteOffset; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
241 DVD_STRUCTURE_FORMAT Format; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
242 DVD_SESSION_ID SessionId; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
243 UCHAR LayerNumber; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
244 } DVD_READ_STRUCTURE, *PDVD_READ_STRUCTURE; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
245 |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
246 typedef struct _DVD_COPYRIGHT_DESCRIPTOR { |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
247 UCHAR CopyrightProtectionType; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
248 UCHAR RegionManagementInformation; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
249 USHORT Reserved; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
250 } DVD_COPYRIGHT_DESCRIPTOR, *PDVD_COPYRIGHT_DESCRIPTOR; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
251 |
7027 | 252 typedef enum |
253 { | |
254 DvdChallengeKey = 0x01, | |
255 DvdBusKey1, | |
256 DvdBusKey2, | |
257 DvdTitleKey, | |
258 DvdAsf, | |
259 DvdSetRpcKey = 0x6, | |
260 DvdGetRpcKey = 0x8, | |
261 DvdDiskKey = 0x80, | |
262 DvdInvalidateAGID = 0x3f | |
263 } DVD_KEY_TYPE; | |
264 | |
265 typedef struct _DVD_COPY_PROTECT_KEY | |
266 { | |
267 ULONG KeyLength; | |
268 DVD_SESSION_ID SessionId; | |
269 DVD_KEY_TYPE KeyType; | |
270 ULONG KeyFlags; | |
271 union | |
272 { | |
273 struct | |
274 { | |
275 ULONG FileHandle; | |
276 ULONG Reserved; // used for NT alignment | |
277 }; | |
278 LARGE_INTEGER TitleOffset; | |
279 } Parameters; | |
280 UCHAR KeyData[0]; | |
281 } DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY; | |
282 | |
283 typedef struct _DVD_ASF | |
284 { | |
285 UCHAR Reserved0[3]; | |
286 UCHAR SuccessFlag:1; | |
287 UCHAR Reserved1:7; | |
288 } DVD_ASF, * PDVD_ASF; | |
289 | |
9333
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
290 typedef struct _DVD_RPC_KEY |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
291 { |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
292 UCHAR UserResetsAvailable:3; |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
293 UCHAR ManufacturerResetsAvailable:3; |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
294 UCHAR TypeCode:2; |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
295 UCHAR RegionMask; |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
296 UCHAR RpcScheme; |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
297 UCHAR Reserved2[1]; |
f0f0f176d298
sync with libdvdcss 1.2.5 (including u8->uint8_t and whitespace cosmetics...)
arpi
parents:
8637
diff
changeset
|
298 } DVD_RPC_KEY, * PDVD_RPC_KEY; |
7027 | 299 |
300 typedef struct _SCSI_PASS_THROUGH_DIRECT | |
301 { | |
302 USHORT Length; | |
303 UCHAR ScsiStatus; | |
304 UCHAR PathId; | |
305 UCHAR TargetId; | |
306 UCHAR Lun; | |
307 UCHAR CdbLength; | |
308 UCHAR SenseInfoLength; | |
309 UCHAR DataIn; | |
310 ULONG DataTransferLength; | |
311 ULONG TimeOutValue; | |
312 PVOID DataBuffer; | |
313 ULONG SenseInfoOffset; | |
314 UCHAR Cdb[16]; | |
315 } SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT; | |
316 | |
317 /***************************************************************************** | |
318 * win32 aspi specific | |
319 *****************************************************************************/ | |
320 | |
321 #define WIN2K ( GetVersion() < 0x80000000 ) | |
322 #define ASPI_HAID 0 | |
323 #define ASPI_TARGET 0 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
324 #define DTYPE_CDROM 0x05 |
7027 | 325 |
326 #define SENSE_LEN 0x0E | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
327 #define SC_GET_DEV_TYPE 0x01 |
7027 | 328 #define SC_EXEC_SCSI_CMD 0x02 |
329 #define SC_GET_DISK_INFO 0x06 | |
330 #define SS_COMP 0x01 | |
331 #define SS_PENDING 0x00 | |
332 #define SS_NO_ADAPTERS 0xE8 | |
333 #define SRB_DIR_IN 0x08 | |
334 #define SRB_DIR_OUT 0x10 | |
335 #define SRB_EVENT_NOTIFY 0x40 | |
336 | |
337 struct w32_aspidev | |
338 { | |
339 long hASPI; | |
340 short i_sid; | |
341 int i_blocks; | |
342 long (*lpSendCommand)( void* ); | |
343 }; | |
344 | |
345 #pragma pack(1) | |
346 | |
347 struct SRB_GetDiskInfo | |
348 { | |
349 unsigned char SRB_Cmd; | |
350 unsigned char SRB_Status; | |
351 unsigned char SRB_HaId; | |
352 unsigned char SRB_Flags; | |
353 unsigned long SRB_Hdr_Rsvd; | |
354 unsigned char SRB_Target; | |
355 unsigned char SRB_Lun; | |
356 unsigned char SRB_DriveFlags; | |
357 unsigned char SRB_Int13HDriveInfo; | |
358 unsigned char SRB_Heads; | |
359 unsigned char SRB_Sectors; | |
360 unsigned char SRB_Rsvd1[22]; | |
361 }; | |
362 | |
8637
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
363 struct SRB_GDEVBlock |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
364 { |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
365 unsigned char SRB_Cmd; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
366 unsigned char SRB_Status; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
367 unsigned char SRB_HaId; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
368 unsigned char SRB_Flags; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
369 unsigned long SRB_Hdr_Rsvd; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
370 unsigned char SRB_Target; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
371 unsigned char SRB_Lun; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
372 unsigned char SRB_DeviceType; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
373 unsigned char SRB_Rsvd1; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
374 }; |
0211de3039eb
update libdvdcss in libmpdvdkit to latest version (1.2.4)
arpi
parents:
7027
diff
changeset
|
375 |
7027 | 376 struct SRB_ExecSCSICmd |
377 { | |
378 unsigned char SRB_Cmd; | |
379 unsigned char SRB_Status; | |
380 unsigned char SRB_HaId; | |
381 unsigned char SRB_Flags; | |
382 unsigned long SRB_Hdr_Rsvd; | |
383 unsigned char SRB_Target; | |
384 unsigned char SRB_Lun; | |
385 unsigned short SRB_Rsvd1; | |
386 unsigned long SRB_BufLen; | |
387 unsigned char *SRB_BufPointer; | |
388 unsigned char SRB_SenseLen; | |
389 unsigned char SRB_CDBLen; | |
390 unsigned char SRB_HaStat; | |
391 unsigned char SRB_TargStat; | |
392 unsigned long *SRB_PostProc; | |
393 unsigned char SRB_Rsvd2[20]; | |
394 unsigned char CDBByte[16]; | |
395 unsigned char SenseArea[SENSE_LEN+2]; | |
396 }; | |
397 | |
398 #pragma pack() | |
399 | |
400 #endif | |
401 | |
402 /***************************************************************************** | |
403 * OS2 ioctl specific | |
404 *****************************************************************************/ | |
405 #if defined( SYS_OS2 ) | |
406 | |
407 #define CDROMDISK_EXECMD 0x7A | |
408 | |
409 #define EX_DIRECTION_IN 0x01 | |
410 #define EX_PLAYING_CHK 0x02 | |
411 | |
412 #pragma pack(1) | |
413 | |
414 struct OS2_ExecSCSICmd | |
415 { | |
416 unsigned long id_code; // 'CD01' | |
417 unsigned short data_length; // length of the Data Packet | |
418 unsigned short cmd_length; // length of the Command Buffer | |
419 unsigned short flags; // flags | |
420 unsigned char command[16]; // Command Buffer for SCSI command | |
421 | |
422 } OS2_ExecSCSICmd; | |
423 | |
424 #pragma pack() | |
425 | |
426 #endif |