VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/ddk/ntddcdvd.h@ 106293

最後變更 在這個檔案從106293是 53206,由 vboxsync 提交於 10 年 前

Devices/vmsvga: header fixes

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 6.6 KB
 
1/*
2 * DDK information for DVD
3 *
4 * Copyright (C) 2004 Uwe Bonnes
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21/*
22 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
23 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
24 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
25 * a choice of LGPL license versions is made available with the language indicating
26 * that LGPLv2 or any later version may be used, or where a choice of which version
27 * of the LGPL is applied is otherwise unspecified.
28 */
29
30#ifndef __NTDDCDVD_H
31#define __NTDDCDVD_H
32
33/* definitions taken from libdvdcss, modified to reflect Windows names and data types in places */
34
35#define IOCTL_DVD_BASE FILE_DEVICE_DVD
36
37#define IOCTL_DVD_START_SESSION CTL_CODE(IOCTL_DVD_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
38#define IOCTL_DVD_READ_KEY CTL_CODE(IOCTL_DVD_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
39#define IOCTL_DVD_SEND_KEY CTL_CODE(IOCTL_DVD_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS)
40#define IOCTL_DVD_END_SESSION CTL_CODE(IOCTL_DVD_BASE, 0x0403, METHOD_BUFFERED, FILE_READ_ACCESS)
41#define IOCTL_DVD_SET_READ_AHEAD CTL_CODE(IOCTL_DVD_BASE, 0x0404, METHOD_BUFFERED, FILE_READ_ACCESS)
42#define IOCTL_DVD_GET_REGION CTL_CODE(IOCTL_DVD_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS)
43#define IOCTL_DVD_SEND_KEY2 CTL_CODE(IOCTL_DVD_BASE, 0x0406, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
44
45#define IOCTL_DVD_READ_STRUCTURE CTL_CODE(IOCTL_DVD_BASE, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS)
46
47typedef enum {
48 DvdChallengeKey = 0x01,
49 DvdBusKey1,
50 DvdBusKey2,
51 DvdTitleKey,
52 DvdAsf,
53 DvdSetRpcKey = 0x6,
54 DvdGetRpcKey = 0x8,
55 DvdDiskKey = 0x80,
56 DvdInvalidateAGID = 0x3f
57} DVD_KEY_TYPE;
58
59typedef ULONG DVD_SESSION_ID, *PDVD_SESSION_ID;
60
61#include <pshpack1.h>
62
63typedef struct _DVD_COPY_PROTECT_KEY {
64 ULONG KeyLength;
65 DVD_SESSION_ID SessionId;
66 DVD_KEY_TYPE KeyType;
67 ULONG KeyFlags;
68 union {
69 struct {
70 ULONG FileHandle;
71 ULONG Reserved; /* used for NT alignment */
72 } s;
73 LARGE_INTEGER TitleOffset;
74 } Parameters;
75 UCHAR KeyData[1];
76} DVD_COPY_PROTECT_KEY, *PDVD_COPY_PROTECT_KEY;
77
78typedef struct _DVD_RPC_KEY {
79 UCHAR UserResetsAvailable:3;
80 UCHAR ManufacturerResetsAvailable:3;
81 UCHAR TypeCode:2;
82 UCHAR RegionMask;
83 UCHAR RpcScheme;
84 UCHAR Reserved2[1];
85} DVD_RPC_KEY, * PDVD_RPC_KEY;
86
87typedef struct _DVD_ASF {
88 UCHAR Reserved0[3];
89 UCHAR SuccessFlag:1;
90 UCHAR Reserved1:7;
91} DVD_ASF, * PDVD_ASF;
92
93typedef struct _DVD_REGION
94{
95 UCHAR CopySystem;
96 UCHAR RegionData; /* current media region (not playable when set) */
97 UCHAR SystemRegion; /* current drive region (playable when set) */
98 UCHAR ResetCount; /* number of resets available */
99} DVD_REGION, * PDVD_REGION;
100
101typedef enum _DVD_STRUCTURE_FORMAT
102{
103 DvdPhysicalDescriptor,
104 DvdCopyrightDescriptor,
105 DvdDiskKeyDescriptor,
106 DvdBCADescriptor,
107 DvdManufacturerDescriptor,
108 DvdMaxDescriptor
109} DVD_STRUCTURE_FORMAT, *PDVD_STRUCTURE_FORMAT;
110
111typedef struct DVD_READ_STRUCTURE {
112 /* Contains an offset to the logical block address of the descriptor to be retrieved. */
113 LARGE_INTEGER BlockByteOffset;
114
115 /* 0:Physical descriptor, 1:Copyright descriptor, 2:Disk key descriptor
116 3:BCA descriptor, 4:Manufacturer descriptor, 5:Max descriptor
117 */
118 DVD_STRUCTURE_FORMAT Format;
119
120 /* Session ID, that is obtained by IOCTL_DVD_START_SESSION */
121 DVD_SESSION_ID SessionId;
122
123 /* From 0 to 4 */
124 UCHAR LayerNumber;
125} DVD_READ_STRUCTURE, *PDVD_READ_STRUCTURE;
126
127typedef struct _DVD_DESCRIPTOR_HEADER {
128 USHORT Length;
129 UCHAR Reserved[2];
130} DVD_DESCRIPTOR_HEADER, *PDVD_DESCRIPTOR_HEADER;
131C_ASSERT(sizeof(DVD_DESCRIPTOR_HEADER) == 4);
132
133typedef struct _DVD_LAYER_DESCRIPTOR
134{
135 UCHAR BookVersion : 4;
136
137 /* 0:DVD-ROM, 1:DVD-RAM, 2:DVD-R, 3:DVD-RW, 9:DVD-RW */
138 UCHAR BookType : 4;
139
140 UCHAR MinimumRate : 4;
141
142 /* The physical size of the media. 0:120 mm, 1:80 mm. */
143 UCHAR DiskSize : 4;
144
145 /* 1:Read-only layer, 2:Recordable layer, 4:Rewritable layer */
146 UCHAR LayerType : 4;
147
148 /* 0:parallel track path, 1:opposite track path */
149 UCHAR TrackPath : 1;
150
151 /* 0:one layers, 1:two layers, and so on */
152 UCHAR NumberOfLayers : 2;
153
154 UCHAR Reserved1 : 1;
155
156 /* 0:0.74 µm/track, 1:0.80 µm/track, 2:0.615 µm/track */
157 UCHAR TrackDensity : 4;
158
159 /* 0:0.267 µm/bit, 1:0.293 µm/bit, 2:0.409 to 0.435 µm/bit, 4:0.280 to 0.291 µm/bit, 8:0.353 µm/bit */
160 UCHAR LinearDensity : 4;
161
162 /* Must be either 0x30000:DVD-ROM or DVD-R/-RW or 0x31000:DVD-RAM or DVD+RW */
163 ULONG StartingDataSector;
164
165 ULONG EndDataSector;
166 ULONG EndLayerZeroSector;
167 UCHAR Reserved5 : 7;
168
169 /* 0 indicates no BCA data */
170 UCHAR BCAFlag : 1;
171}DVD_LAYER_DESCRIPTOR, * PDVD_LAYER_DESCRIPTOR;
172C_ASSERT(sizeof(DVD_LAYER_DESCRIPTOR) == 17);
173
174typedef struct _DVD_COPYRIGHT_DESCRIPTOR
175{
176 UCHAR CopyrightProtectionType;
177 UCHAR RegionManagementInformation;
178 USHORT Reserved;
179}DVD_COPYRIGHT_DESCRIPTOR, * PDVD_COPYRIGHT_DESCRIPTOR;
180
181typedef struct _DVD_DISK_KEY_DESCRIPTOR
182{
183 UCHAR DiskKeyData[2048];
184}DVD_DISK_KEY_DESCRIPTOR, * PDVD_DISK_KEY_DESCRIPTOR;
185
186typedef struct _DVD_BCA_DESCRIPTOR
187{
188 UCHAR BCAInformation[1];
189}DVD_BCA_DESCRIPTOR, * PDVD_BCA_DESCRIPTOR;
190
191typedef struct _DVD_MANUFACTURER_DESCRIPTOR
192{
193 UCHAR ManufacturingInformation[2048];
194}DVD_MANUFACTURER_DESCRIPTOR, * PDVD_MANUFACTURER_DESCRIPTOR;
195
196#define DVD_CHALLENGE_KEY_LENGTH (12 + sizeof(DVD_COPY_PROTECT_KEY) - sizeof(UCHAR))
197
198#define DVD_DISK_KEY_LENGTH (2048 + sizeof(DVD_COPY_PROTECT_KEY) - sizeof(UCHAR))
199
200#define DVD_KEY_SIZE 5
201#define DVD_CHALLENGE_SIZE 10
202#define DVD_DISCKEY_SIZE 2048
203#define DVD_SECTOR_PROTECTED 0x00000020
204
205#include <poppack.h>
206
207#endif /* __NTDDCDVD_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette