[PSDK]
[reactos.git] / reactos / sdk / include / psdk / ksmedia.h
1 /*
2 KS Media
3 (c) Andrew Greenwood, 2007.
4
5 Please see COPYING in the top level directory for license information.
6 */
7
8 #ifndef KSMEDIA_H
9 #define KSMEDIA_H
10
11 #include <ks.h>
12
13 /*
14 KS CATEGORIES
15 */
16
17 typedef LONGLONG REFERENCE_TIME;
18
19
20 #if (NTDDI_VERSION >= NTDDI_WINXP)
21
22 #if !defined(INIT_USBAUDIO_MID)
23 #define INIT_USBAUDIO_MID(guid, id)\
24 {\
25 (guid)->Data1 = 0x4e1cecd2 + (USHORT)(id);\
26 (guid)->Data2 = 0x1679;\
27 (guid)->Data3 = 0x463b;\
28 (guid)->Data4[0] = 0xa7;\
29 (guid)->Data4[1] = 0x2f;\
30 (guid)->Data4[2] = 0xa5;\
31 (guid)->Data4[3] = 0xbf;\
32 (guid)->Data4[4] = 0x64;\
33 (guid)->Data4[5] = 0xc8;\
34 (guid)->Data4[6] = 0x6e;\
35 (guid)->Data4[7] = 0xba;\
36 }
37 #define EXTRACT_USBAUDIO_MID(guid)\
38 (USHORT)((guid)->Data1 - 0x4e1cecd2)
39 #define DEFINE_USBAUDIO_MID_GUID(id)\
40 0x4e1cecd2+(USHORT)(id), 0x1679, 0x463b, 0xa7, 0x2f, 0xa5, 0xbf, 0x64, 0xc8, 0x6e, 0xba
41
42 #define INIT_EXBUS_MANUFACTURER_ID INIT_USBAUDIO_MID
43
44 #define IS_COMPATIBLE_USBAUDIO_MID(guid)\
45 (((guid)->Data1 >= 0x4e1cecd2) &&\
46 ((guid)->Data1 < 0x4e1cecd2 + 0xffff) &&\
47 ((guid)->Data2 == 0x1679) &&\
48 ((guid)->Data3 == 0x463b) &&\
49 ((guid)->Data4[0] == 0xa7) &&\
50 ((guid)->Data4[1] == 0x2f) &&\
51 ((guid)->Data4[2] == 0xa5) &&\
52 ((guid)->Data4[3] == 0xbf) &&\
53 ((guid)->Data4[4] == 0x64) &&\
54 ((guid)->Data4[5] == 0xc8) &&\
55 ((guid)->Data4[6] == 0x6e) &&\
56 ((guid)->Data4[7] == 0xba))
57 #endif // !defined(INIT_USBAUDIO_MID)
58
59 #if !defined(INIT_USBAUDIO_PID)
60 #define INIT_USBAUDIO_PID(guid, id)\
61 {\
62 (guid)->Data1 = 0xabcc5a5e + (USHORT)(id);\
63 (guid)->Data2 = 0xc263;\
64 (guid)->Data3 = 0x463b;\
65 (guid)->Data4[0] = 0xa7;\
66 (guid)->Data4[1] = 0x2f;\
67 (guid)->Data4[2] = 0xa5;\
68 (guid)->Data4[3] = 0xbf;\
69 (guid)->Data4[4] = 0x64;\
70 (guid)->Data4[5] = 0xc8;\
71 (guid)->Data4[6] = 0x6e;\
72 (guid)->Data4[7] = 0xba;\
73 }
74 #define EXTRACT_USBAUDIO_PID(guid)\
75 (USHORT)((guid)->Data1 - 0xabcc5a5e)
76 #define DEFINE_USBAUDIO_PID_GUID(id)\
77 0xabcc5a5e+(USHORT)(id), 0xc263, 0x463b, 0xa7, 0x2f, 0xa5, 0xbf, 0x64, 0xc8, 0x6e, 0xba
78
79 #define INIT_EXBUS_PRODUCT_ID INIT_USBAUDIO_PID
80
81 #define IS_COMPATIBLE_USBAUDIO_PID(guid)\
82 (((guid)->Data1 >= 0xabcc5a5e) &&\
83 ((guid)->Data1 < 0xabcc5a5e + 0xffff) &&\
84 ((guid)->Data2 == 0xc263) &&\
85 ((guid)->Data3 == 0x463b) &&\
86 ((guid)->Data4[0] == 0xa7) &&\
87 ((guid)->Data4[1] == 0x2f) &&\
88 ((guid)->Data4[2] == 0xa5) &&\
89 ((guid)->Data4[3] == 0xbf) &&\
90 ((guid)->Data4[4] == 0x64) &&\
91 ((guid)->Data4[5] == 0xc8) &&\
92 ((guid)->Data4[6] == 0x6e) &&\
93 ((guid)->Data4[7] == 0xba))
94 #endif // !defined(INIT_USBAUDIO_PID)
95
96 #if !defined(INIT_USBAUDIO_PRODUCT_NAME)
97 #define INIT_USBAUDIO_PRODUCT_NAME(guid, vid, pid, strIndex)\
98 {\
99 (guid)->Data1 = 0XFC575048 + (USHORT)(vid);\
100 (guid)->Data2 = 0x2E08 + (USHORT)(pid);\
101 (guid)->Data3 = 0x463B + (USHORT)(strIndex);\
102 (guid)->Data4[0] = 0xA7;\
103 (guid)->Data4[1] = 0x2F;\
104 (guid)->Data4[2] = 0xA5;\
105 (guid)->Data4[3] = 0xBF;\
106 (guid)->Data4[4] = 0x64;\
107 (guid)->Data4[5] = 0xC8;\
108 (guid)->Data4[6] = 0x6E;\
109 (guid)->Data4[7] = 0xBA;\
110 }
111 #define DEFINE_USBAUDIO_PRODUCT_NAME(vid, pid, strIndex)\
112 0xFC575048+(USHORT)(vid), 0x2E08+(USHORT)(pid), 0x463B+(USHORT)(strIndex), 0xA7, 0x2F, 0xA5, 0xBF, 0x64, 0xC8, 0x6E, 0xBA
113 #endif
114
115 #define INIT_EXBUS_PRODUCT_NAME INIT_USBAUDIO_PRODUCT_NAME
116
117 // USB Component ID
118 #define STATIC_KSCOMPONENTID_USBAUDIO \
119 0x8F1275F0, 0x26E9, 0x4264, {0xBA, 0x4D, 0x39, 0xFF, 0xF0, 0x1D, 0x94, 0xAA}
120 DEFINE_GUIDSTRUCT("8F1275F0-26E9-4264-BA4D-39FFF01D94AA", KSCOMPONENTID_USBAUDIO);
121 #define KSCOMPONENTID_USBAUDIO DEFINE_GUIDNAMED(KSCOMPONENTID_USBAUDIO)
122
123 #endif // (NTDDI_VERSION >= NTDDI_WINXP)
124
125 #define EXTRACT_WAVEFORMATEX_ID(Guid)\
126 (USHORT)((Guid)->Data1)
127
128 #define DEFINE_USB_TERMINAL_GUID(id)\
129 0xDFF219E0+(USHORT)(id), 0xF70F, 0x11D0, {0xB9, 0x17, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
130
131
132 /* Audio device (as presented by sysaudio) */
133
134 #define STATIC_KSCATEGORY_AUDIO_DEVICE \
135 0xFBF6F530L, 0x07B9, 0x11D2, {0xA7, 0x1E, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}
136 DEFINE_GUIDSTRUCT("FBF6F530-07B9-11D2-A71E-0000F8004788", KSCATEGORY_AUDIO_DEVICE);
137 #define KSCATEGORY_AUDIO_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_DEVICE)
138
139 /* video */
140 #define STATIC_PINNAME_VIDEO_CAPTURE \
141 0xfb6c4281, 0x353, 0x11d1, {0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba}
142 #define STATIC_PINNAME_CAPTURE STATIC_PINNAME_VIDEO_CAPTURE
143 DEFINE_GUIDSTRUCT("FB6C4281-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CAPTURE);
144 #define PINNAME_VIDEO_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CAPTURE)
145 #define PINNAME_CAPTURE PINNAME_VIDEO_CAPTURE
146
147 /* Preferred devices */
148
149 #define STATIC_KSCATEGORY_PREFERRED_WAVEOUT_DEVICE \
150 0xD6C5066EL, 0x72C1, 0x11D2, {0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}
151 DEFINE_GUIDSTRUCT("D6C5066E-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_WAVEOUT_DEVICE);
152 #define KSCATEGORY_PREFERRED_WAVEOUT_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_WAVEOUT_DEVICE)
153
154 #define STATIC_KSCATEGORY_PREFERRED_WAVEIN_DEVICE \
155 0xD6C50671L, 0x72C1, 0x11D2, {0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}
156 DEFINE_GUIDSTRUCT("D6C50671-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_WAVEIN_DEVICE);
157 #define KSCATEGORY_PREFERRED_WAVEIN_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_WAVEIN_DEVICE)
158
159 #define STATIC_KSCATEGORY_PREFERRED_MIDIOUT_DEVICE \
160 0xD6C50674L, 0x72C1, 0x11D2, {0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}
161 DEFINE_GUIDSTRUCT("D6C50674-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_MIDIOUT_DEVICE);
162 #define KSCATEGORY_PREFERRED_MIDIOUT_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_MIDIOUT_DEVICE)
163
164
165 /* Media type categories */
166
167 #define STATIC_KSCATEGORY_AUDIO \
168 0x6994AD04L, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
169 DEFINE_GUIDSTRUCT("6994AD04-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_AUDIO);
170 #define KSCATEGORY_AUDIO DEFINE_GUIDNAMED(KSCATEGORY_AUDIO)
171
172 #define STATIC_KSCATEGORY_VIDEO \
173 0x6994AD05L, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
174 DEFINE_GUIDSTRUCT("6994AD05-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_VIDEO);
175 #define KSCATEGORY_VIDEO DEFINE_GUIDNAMED(KSCATEGORY_VIDEO)
176
177 #define STATIC_KSCATEGORY_TEXT \
178 0x6994AD06L, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
179 DEFINE_GUIDSTRUCT("6994AD06-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_TEXT);
180 #define KSCATEGORY_TEXT DEFINE_GUIDNAMED(KSCATEGORY_TEXT)
181
182 #define STATIC_KSCATEGORY_NETWORK \
183 0x67C9CC3CL, 0x69C4, 0x11D2, {0x87, 0x59, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
184 DEFINE_GUIDSTRUCT("67C9CC3C-69C4-11D2-8759-00A0C9223196", KSCATEGORY_NETWORK);
185 #define KSCATEGORY_NETWORK DEFINE_GUIDNAMED(KSCATEGORY_NETWORK)
186
187 #define STATIC_KSINTERFACESETID_Media \
188 0x3A13EB40L, 0x30A7, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
189 DEFINE_GUIDSTRUCT("3A13EB40-30A7-11D0-A5D6-28DB04C10000", KSINTERFACESETID_Media);
190 #define KSINTERFACESETID_Media DEFINE_GUIDNAMED(KSINTERFACESETID_Media)
191
192 /* ... */
193
194 #define STATIC_KSCATEGORY_TOPOLOGY \
195 0xDDA54A40L, 0x1E4C, 0x11D1, {0xA0, 0x50, 0x40, 0x57, 0x05, 0xC1, 0x00, 0x00}
196 DEFINE_GUIDSTRUCT("DDA54A40-1E4C-11D1-A050-405705C10000", KSCATEGORY_TOPOLOGY);
197 #define KSCATEGORY_TOPOLOGY DEFINE_GUIDNAMED(KSCATEGORY_TOPOLOGY)
198
199 #define STATIC_KSCATEGORY_VIRTUAL \
200 0x3503EAC4L, 0x1F26, 0x11D1, {0x8A, 0xB0, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
201 DEFINE_GUIDSTRUCT("3503EAC4-1F26-11D1-8AB0-00A0C9223196", KSCATEGORY_VIRTUAL);
202 #define KSCATEGORY_VIRTUAL DEFINE_GUIDNAMED(KSCATEGORY_VIRTUAL)
203
204 #define STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL \
205 0xBF963D80L, 0xC559, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
206 DEFINE_GUIDSTRUCT("BF963D80-C559-11D0-8A2B-00A0C9255AC1", KSCATEGORY_ACOUSTIC_ECHO_CANCEL);
207 #define KSCATEGORY_ACOUSTIC_ECHO_CANCEL DEFINE_GUIDNAMED(KSCATEGORY_ACOUSTIC_ECHO_CANCEL)
208
209
210 /* Component-specific */
211
212 #define STATIC_KSCATEGORY_SYSAUDIO \
213 0xA7C7A5B1L, 0x5AF3, 0x11D1, {0x9C, 0xED, 0x00, 0xA0, 0x24, 0xBF, 0x04, 0x07}
214 DEFINE_GUIDSTRUCT("A7C7A5B1-5AF3-11D1-9CED-00A024BF0407", KSCATEGORY_SYSAUDIO);
215 #define KSCATEGORY_SYSAUDIO DEFINE_GUIDNAMED(KSCATEGORY_SYSAUDIO)
216
217 #define STATIC_KSCATEGORY_WDMAUD \
218 0x3E227E76L, 0x690D, 0x11D2, {0x81, 0x61, 0x00, 0x00, 0xF8, 0x77, 0x5B, 0xF1}
219 DEFINE_GUIDSTRUCT("3E227E76-690D-11D2-8161-0000F8775BF1", KSCATEGORY_WDMAUD);
220 #define KSCATEGORY_WDMAUD DEFINE_GUIDNAMED(KSCATEGORY_WDMAUD)
221
222 #define STATIC_KSCATEGORY_AUDIO_GFX \
223 0x9BAF9572L, 0x340C, 0x11D3, {0xAB, 0xDC, 0x00, 0xA0, 0xC9, 0x0A, 0xB1, 0x6F}
224 DEFINE_GUIDSTRUCT("9BAF9572-340C-11D3-ABDC-00A0C90AB16F", KSCATEGORY_AUDIO_GFX);
225 #define KSCATEGORY_AUDIO_GFX DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_GFX)
226
227 #define STATIC_KSCATEGORY_AUDIO_SPLITTER \
228 0x9EA331FAL, 0xB91B, 0x45F8, {0x92, 0x85, 0xBD, 0x2B, 0xC7, 0x7A, 0xFC, 0xDE}
229 DEFINE_GUIDSTRUCT("9EA331FA-B91B-45F8-9285-BD2BC77AFCDE", KSCATEGORY_AUDIO_SPLITTER);
230 #define KSCATEGORY_AUDIO_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_SPLITTER)
231
232 #define STATIC_KSCATEGORY_SYNTHESIZER STATIC_KSNODETYPE_SYNTHESIZER
233 #define KSCATEGORY_SYNTHESIZER KSNODETYPE_SYNTHESIZER
234
235 #define STATIC_KSCATEGORY_DRM_DESCRAMBLE STATIC_KSNODETYPE_DRM_DESCRAMBLE
236 #define KSCATEGORY_DRM_DESCRAMBLE KSNODETYPE_DRM_DESCRAMBLE
237
238 #define STATIC_KSDATAFORMAT_SPECIFIER_ANALOGVIDEO \
239 0x0482DDE0L, 0x7817, 0x11CF, {0x8A, 0x03, 0x00, 0xAA, 0x00, 0x6E, 0xCB, 0x65}
240 DEFINE_GUIDSTRUCT("0482DDE0-7817-11CF-8A03-00AA006ECB65", KSDATAFORMAT_SPECIFIER_ANALOGVIDEO);
241 #define KSDATAFORMAT_SPECIFIER_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_ANALOGVIDEO)
242
243 #define STATIC_KSDATAFORMAT_TYPE_ANALOGVIDEO \
244 0x0482DDE1L, 0x7817, 0x11CF, {0x8A, 0x03, 0x00, 0xAA, 0x00, 0x6E, 0xCB, 0x65}
245 DEFINE_GUIDSTRUCT("0482DDE1-7817-11CF-8A03-00AA006ECB65", KSDATAFORMAT_TYPE_ANALOGVIDEO);
246 #define KSDATAFORMAT_TYPE_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_ANALOGVIDEO)
247
248 #define STATIC_PINNAME_VIDEO_ANALOGVIDEOIN \
249 0xFB6C4283L, 0x0353, 0x11D1, {0x90, 0x5F, 0x00, 0x00, 0xC0, 0xCC, 0x16, 0xBA}
250 DEFINE_GUIDSTRUCT("FB6C4283-0353-11D1-905F-0000C0CC16BA", PINNAME_VIDEO_ANALOGVIDEOIN);
251 #define PINNAME_VIDEO_ANALOGVIDEOIN DEFINE_GUIDNAMED(PINNAME_VIDEO_ANALOGVIDEOIN)
252
253 /*
254 Nodes
255 */
256
257 #define STATIC_KSNODETYPE_ADC\
258 0x4D837FE0L, 0xC555, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
259 DEFINE_GUIDSTRUCT("4D837FE0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_ADC);
260 #define KSNODETYPE_ADC DEFINE_GUIDNAMED(KSNODETYPE_ADC)
261
262 #define STATIC_KSNODETYPE_AGC\
263 0xE88C9BA0L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
264 DEFINE_GUIDSTRUCT("E88C9BA0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_AGC);
265 #define KSNODETYPE_AGC DEFINE_GUIDNAMED(KSNODETYPE_AGC)
266
267 #define STATIC_KSNODETYPE_3D_EFFECTS\
268 0x55515860L, 0xC559, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
269 DEFINE_GUIDSTRUCT("55515860-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_3D_EFFECTS);
270 #define KSNODETYPE_3D_EFFECTS DEFINE_GUIDNAMED(KSNODETYPE_3D_EFFECTS)
271
272 #define STATIC_KSNODETYPE_SUPERMIX\
273 0xE573ADC0L, 0xC555, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
274 DEFINE_GUIDSTRUCT("E573ADC0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SUPERMIX);
275 #define KSNODETYPE_SUPERMIX DEFINE_GUIDNAMED(KSNODETYPE_SUPERMIX)
276
277 #define STATIC_KSNODETYPE_SRC\
278 0x9DB7B9E0L, 0xC555, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
279 DEFINE_GUIDSTRUCT("9DB7B9E0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SRC);
280 #define KSNODETYPE_SRC DEFINE_GUIDNAMED(KSNODETYPE_SRC)
281
282 #define STATIC_KSNODETYPE_DAC\
283 0x507AE360L, 0xC554, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
284 DEFINE_GUIDSTRUCT("507AE360-C554-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DAC);
285 #define KSNODETYPE_DAC DEFINE_GUIDNAMED(KSNODETYPE_DAC)
286
287 #define STATIC_KSNODETYPE_SPDIF_INTERFACE\
288 DEFINE_USB_TERMINAL_GUID(0x0605)
289 DEFINE_GUIDSTRUCT("DFF21FE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPDIF_INTERFACE);
290 #define KSNODETYPE_SPDIF_INTERFACE DEFINE_GUIDNAMED(KSNODETYPE_SPDIF_INTERFACE)
291
292 #define STATIC_KSNODETYPE_MICROPHONE\
293 DEFINE_USB_TERMINAL_GUID(0x0201)
294 DEFINE_GUIDSTRUCT("DFF21BE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MICROPHONE);
295 #define KSNODETYPE_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_MICROPHONE)
296
297 #define STATIC_KSNODETYPE_CD_PLAYER\
298 DEFINE_USB_TERMINAL_GUID(0x0703)
299 DEFINE_GUIDSTRUCT("DFF220E3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_CD_PLAYER);
300 #define KSNODETYPE_CD_PLAYER DEFINE_GUIDNAMED(KSNODETYPE_CD_PLAYER)
301
302 #define STATIC_KSNODETYPE_CHORUS\
303 0x20173F20L, 0xC559, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
304 DEFINE_GUIDSTRUCT("20173F20-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_CHORUS);
305 #define KSNODETYPE_CHORUS DEFINE_GUIDNAMED(KSNODETYPE_CHORUS)
306
307 #define STATIC_KSNODETYPE_REVERB\
308 0xEF0328E0L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
309 DEFINE_GUIDSTRUCT("EF0328E0-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_REVERB);
310 #define KSNODETYPE_REVERB DEFINE_GUIDNAMED(KSNODETYPE_REVERB)
311
312
313 #define STATIC_KSNODETYPE_LINE_CONNECTOR\
314 DEFINE_USB_TERMINAL_GUID(0x0603)
315 DEFINE_GUIDSTRUCT("DFF21FE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LINE_CONNECTOR);
316 #define KSNODETYPE_LINE_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_LINE_CONNECTOR)
317
318 #define STATIC_KSNODETYPE_ANALOG_CONNECTOR\
319 DEFINE_USB_TERMINAL_GUID(0x601)
320 DEFINE_GUIDSTRUCT("DFF21FE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ANALOG_CONNECTOR);
321 #define KSNODETYPE_ANALOG_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_ANALOG_CONNECTOR)
322
323 #define STATIC_KSNODETYPE_SPEAKER\
324 DEFINE_USB_TERMINAL_GUID(0x0301)
325 DEFINE_GUIDSTRUCT("DFF21CE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPEAKER);
326 #define KSNODETYPE_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_SPEAKER)
327
328 #define STATIC_KSAUDFNAME_RECORDING_CONTROL\
329 0x185FEDFAL, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
330 DEFINE_GUIDSTRUCT("185FEDFA-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_RECORDING_CONTROL);
331 #define KSAUDFNAME_RECORDING_CONTROL DEFINE_GUIDNAMED(KSAUDFNAME_RECORDING_CONTROL)
332
333 #define STATIC_KSNODETYPE_VOLUME\
334 0x3A5ACC00L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
335 DEFINE_GUIDSTRUCT("3A5ACC00-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_VOLUME);
336 #define KSNODETYPE_VOLUME DEFINE_GUIDNAMED(KSNODETYPE_VOLUME)
337
338 #define STATIC_KSAUDFNAME_WAVE_VOLUME\
339 0x185FEDE5L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
340 DEFINE_GUIDSTRUCT("185FEDE5-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_VOLUME);
341 #define KSAUDFNAME_WAVE_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_VOLUME)
342
343 #define STATIC_KSNODETYPE_MUTE\
344 0x02B223C0L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
345 DEFINE_GUIDSTRUCT("02B223C0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_MUTE);
346 #define KSNODETYPE_MUTE DEFINE_GUIDNAMED(KSNODETYPE_MUTE)
347
348 #define STATIC_KSAUDFNAME_WAVE_MUTE\
349 0x185FEDE6L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
350 DEFINE_GUIDSTRUCT("185FEDE6-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_MUTE);
351 #define KSAUDFNAME_WAVE_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_MUTE)
352
353 #define STATIC_KSAUDFNAME_MIC_VOLUME\
354 0x185FEDEDL, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
355 DEFINE_GUIDSTRUCT("185FEDED-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_VOLUME);
356 #define KSAUDFNAME_MIC_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIC_VOLUME)
357
358 #define STATIC_KSNODETYPE_SUM\
359 0xDA441A60L, 0xC556, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
360 DEFINE_GUIDSTRUCT("DA441A60-C556-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SUM);
361 #define KSNODETYPE_SUM DEFINE_GUIDNAMED(KSNODETYPE_SUM)
362
363 #define STATIC_KSAUDFNAME_MASTER_VOLUME\
364 0x185FEDE3L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
365 DEFINE_GUIDSTRUCT("185FEDE3-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MASTER_VOLUME);
366 #define KSAUDFNAME_MASTER_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MASTER_VOLUME)
367
368 #define STATIC_KSAUDFNAME_CD_VOLUME\
369 0x185FEDE9L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
370 DEFINE_GUIDSTRUCT("185FEDE9-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_VOLUME);
371 #define KSAUDFNAME_CD_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_CD_VOLUME)
372
373 #define STATIC_KSAUDFNAME_RECORDING_SOURCE\
374 0x185FEDEFL, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
375 DEFINE_GUIDSTRUCT("185FEDEF-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_RECORDING_SOURCE);
376 #define KSAUDFNAME_RECORDING_SOURCE DEFINE_GUIDNAMED(KSAUDFNAME_RECORDING_SOURCE)
377
378 #define STATIC_KSAUDFNAME_LINE_IN_VOLUME\
379 0x185FEDF4L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
380 DEFINE_GUIDSTRUCT("185FEDF4-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_IN_VOLUME);
381 #define KSAUDFNAME_LINE_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_LINE_IN_VOLUME)
382
383 #define STATIC_KSAUDFNAME_AUX_VOLUME\
384 0x185FEDFCL, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
385 DEFINE_GUIDSTRUCT("185FEDFC-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX_VOLUME);
386 #define KSAUDFNAME_AUX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_AUX_VOLUME)
387
388 #define STATIC_KSAUDFNAME_MIC_IN_VOLUME\
389 0x185FEDF5L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
390 DEFINE_GUIDSTRUCT("185FEDF5-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_IN_VOLUME);
391 #define KSAUDFNAME_MIC_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIC_IN_VOLUME)
392
393 #define STATIC_KSNODETYPE_LOUDNESS\
394 0x41887440L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
395 DEFINE_GUIDSTRUCT("41887440-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_LOUDNESS);
396 #define KSNODETYPE_LOUDNESS DEFINE_GUIDNAMED(KSNODETYPE_LOUDNESS)
397
398 #define STATIC_KSAUDFNAME_MICROPHONE_BOOST\
399 0x2bc31d6aL, 0x96e3, 0x11d2, {0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68}
400 DEFINE_GUIDSTRUCT("2BC31D6A-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MICROPHONE_BOOST);
401 #define KSAUDFNAME_MICROPHONE_BOOST DEFINE_GUIDNAMED(KSAUDFNAME_MICROPHONE_BOOST)
402
403 #define STATIC_KSAUDFNAME_CD_MUTE\
404 0x185FEDEAL, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
405 DEFINE_GUIDSTRUCT("185FEDEA-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_MUTE);
406 #define KSAUDFNAME_CD_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_CD_MUTE)
407
408 #define STATIC_KSAUDFNAME_LINE_MUTE\
409 0x185FEDECL, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
410 DEFINE_GUIDSTRUCT("185FEDEC-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_MUTE);
411 #define KSAUDFNAME_LINE_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_LINE_MUTE)
412
413 #define STATIC_KSAUDFNAME_MIC_MUTE\
414 0x185FEDEEL, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
415 DEFINE_GUIDSTRUCT("185FEDEE-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_MUTE);
416 #define KSAUDFNAME_MIC_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MIC_MUTE)
417
418 #define STATIC_KSAUDFNAME_AUX_MUTE\
419 0x185FEDFDL, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
420 DEFINE_GUIDSTRUCT("185FEDFD-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX_MUTE);
421 #define KSAUDFNAME_AUX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_AUX_MUTE)
422
423 #define STATIC_KSAUDFNAME_VOLUME_CONTROL\
424 0x185FEDF7L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
425 DEFINE_GUIDSTRUCT("185FEDF7-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_VOLUME_CONTROL);
426 #define KSAUDFNAME_VOLUME_CONTROL DEFINE_GUIDNAMED(KSAUDFNAME_VOLUME_CONTROL)
427
428 #define STATIC_KSNODETYPE_MUX\
429 0x2CEAF780L, 0xC556, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
430 DEFINE_GUIDSTRUCT("2CEAF780-C556-11D0-8A2B-00A0C9255AC1", KSNODETYPE_MUX);
431 #define KSNODETYPE_MUX DEFINE_GUIDNAMED(KSNODETYPE_MUX)
432
433 #define STATIC_KSAUDFNAME_MASTER_MUTE\
434 0x185FEDE4L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
435 DEFINE_GUIDSTRUCT("185FEDE4-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MASTER_MUTE);
436 #define KSAUDFNAME_MASTER_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MASTER_MUTE)
437
438 #define STATIC_KSNODETYPE_PEAKMETER\
439 0xa085651eL, 0x5f0d, 0x4b36, {0xa8, 0x69, 0xd1, 0x95, 0xd6, 0xab, 0x4b, 0x9e}
440 DEFINE_GUIDSTRUCT("A085651E-5F0D-4b36-A869-D195D6AB4B9E", KSNODETYPE_PEAKMETER);
441 #define KSNODETYPE_PEAKMETER DEFINE_GUIDNAMED(KSNODETYPE_PEAKMETER)
442
443 #define STATIC_KSNODETYPE_STEREO_WIDE\
444 0xA9E69800L, 0xC558, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
445 DEFINE_GUIDSTRUCT("A9E69800-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_STEREO_WIDE);
446 #define KSNODETYPE_STEREO_WIDE DEFINE_GUIDNAMED(KSNODETYPE_STEREO_WIDE)
447
448 #define STATIC_KSNODETYPE_TONE\
449 0x7607E580L, 0xC557, 0x11D0, {0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1}
450 DEFINE_GUIDSTRUCT("7607E580-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_TONE);
451 #define KSNODETYPE_TONE DEFINE_GUIDNAMED(KSNODETYPE_TONE)
452
453
454 #define STATIC_KSNODETYPE_DESKTOP_MICROPHONE\
455 DEFINE_USB_TERMINAL_GUID(0x0202)
456 DEFINE_GUIDSTRUCT("DFF21BE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DESKTOP_MICROPHONE);
457 #define KSNODETYPE_DESKTOP_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_DESKTOP_MICROPHONE)
458
459 #define STATIC_KSNODETYPE_PERSONAL_MICROPHONE\
460 DEFINE_USB_TERMINAL_GUID(0x0203)
461 DEFINE_GUIDSTRUCT("DFF21BE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PERSONAL_MICROPHONE);
462 #define KSNODETYPE_PERSONAL_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_PERSONAL_MICROPHONE)
463
464 #define STATIC_KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE\
465 DEFINE_USB_TERMINAL_GUID(0x0204)
466 DEFINE_GUIDSTRUCT("DFF21BE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE);
467 #define KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE)
468
469 #define STATIC_KSNODETYPE_MICROPHONE_ARRAY\
470 DEFINE_USB_TERMINAL_GUID(0x0205)
471 DEFINE_GUIDSTRUCT("DFF21BE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MICROPHONE_ARRAY);
472 #define KSNODETYPE_MICROPHONE_ARRAY DEFINE_GUIDNAMED(KSNODETYPE_MICROPHONE_ARRAY)
473
474 #define STATIC_KSNODETYPE_PROCESSING_MICROPHONE_ARRAY\
475 DEFINE_USB_TERMINAL_GUID(0x0206)
476 DEFINE_GUIDSTRUCT("DFF21BE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PROCESSING_MICROPHONE_ARRAY);
477 #define KSNODETYPE_PROCESSING_MICROPHONE_ARRAY DEFINE_GUIDNAMED(KSNODETYPE_PROCESSING_MICROPHONE_ARRAY)
478
479 #define STATIC_KSNODETYPE_HEADPHONES\
480 DEFINE_USB_TERMINAL_GUID(0x0302)
481 DEFINE_GUIDSTRUCT("DFF21CE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEADPHONES);
482 #define KSNODETYPE_HEADPHONES DEFINE_GUIDNAMED(KSNODETYPE_HEADPHONES)
483
484 #define STATIC_KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO\
485 DEFINE_USB_TERMINAL_GUID(0x0303)
486 DEFINE_GUIDSTRUCT("DFF21CE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO);
487 #define KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO)
488
489 #define STATIC_KSNODETYPE_DESKTOP_SPEAKER\
490 DEFINE_USB_TERMINAL_GUID(0x0304)
491 DEFINE_GUIDSTRUCT("DFF21CE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DESKTOP_SPEAKER);
492 #define KSNODETYPE_DESKTOP_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_DESKTOP_SPEAKER)
493
494 #define STATIC_KSNODETYPE_ROOM_SPEAKER\
495 DEFINE_USB_TERMINAL_GUID(0x0305)
496 DEFINE_GUIDSTRUCT("DFF21CE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ROOM_SPEAKER);
497 #define KSNODETYPE_ROOM_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_ROOM_SPEAKER)
498
499 #define STATIC_KSNODETYPE_COMMUNICATION_SPEAKER\
500 DEFINE_USB_TERMINAL_GUID(0x0306)
501 DEFINE_GUIDSTRUCT("DFF21CE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_COMMUNICATION_SPEAKER);
502 #define KSNODETYPE_COMMUNICATION_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_COMMUNICATION_SPEAKER)
503
504 #define STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER\
505 DEFINE_USB_TERMINAL_GUID(0x0307)
506 DEFINE_GUIDSTRUCT("DFF21CE7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER);
507 #define KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER)
508
509
510 /*
511 Pins
512 */
513
514 #define STATIC_KSCATEGORY_WDMAUD_USE_PIN_NAME \
515 0x47A4FA20L, 0xA251, 0x11D1, {0xA0, 0x50, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88}
516 DEFINE_GUIDSTRUCT("47A4FA20-A251-11D1-A050-0000F8004788", KSCATEGORY_WDMAUD_USE_PIN_NAME);
517 #define KSCATEGORY_WDMAUD_USE_PIN_NAME DEFINE_GUIDNAMED(KSCATEGORY_WDMAUD_USE_PIN_NAME)
518
519
520 /*
521 Formats
522 */
523
524 //#if defined(_INC_MMREG)
525 #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
526 #include <pshpack1.h>
527 #endif
528 typedef struct {
529 KSDATAFORMAT DataFormat;
530 WAVEFORMATEX WaveFormatEx;
531 } KSDATAFORMAT_WAVEFORMATEX, *PKSDATAFORMAT_WAVEFORMATEX;
532
533 #ifndef _WAVEFORMATEXTENSIBLE_
534 #define _WAVEFORMATEXTENSIBLE_
535 typedef struct {
536 WAVEFORMATEX Format;
537 union
538 {
539 WORD wValidBitsPerSample;
540 WORD wSamplesPerBlock;
541 WORD wReserved;
542 }Samples;
543 DWORD dwChannelMask;
544 GUID SubFormat;
545 } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
546 #endif
547
548 #if !defined(WAVE_FORMAT_EXTENSIBLE)
549 #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
550 #endif
551
552 typedef struct {
553 ULONG Flags;
554 ULONG Control;
555 WAVEFORMATEX WaveFormatEx;
556 } KSDSOUND_BUFFERDESC, *PKSDSOUND_BUFFERDESC;
557
558 typedef struct {
559 KSDATAFORMAT DataFormat;
560 KSDSOUND_BUFFERDESC BufferDesc;
561 } KSDATAFORMAT_DSOUND, *PKSDATAFORMAT_DSOUND;
562
563 #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
564 #include <poppack.h>
565 #endif
566
567 //#endif
568
569 typedef enum {
570 KSPROPERTY_ALLOCATOR_CONTROL_HONOR_COUNT,
571 KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE,
572 KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS,
573 KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE
574 } KSPROPERTY_ALLOCATOR_CONTROL;
575
576 typedef struct {
577 KSDATARANGE DataRange;
578 ULONG MaximumChannels;
579 ULONG MinimumBitsPerSample;
580 ULONG MaximumBitsPerSample;
581 ULONG MinimumSampleFrequency;
582 ULONG MaximumSampleFrequency;
583 } KSDATARANGE_AUDIO, *PKSDATARANGE_AUDIO;
584
585 typedef struct tagKS_AnalogVideoInfo {
586 RECT rcSource;
587 RECT rcTarget;
588 DWORD dwActiveWidth;
589 DWORD dwActiveHeight;
590 REFERENCE_TIME AvgTimePerFrame;
591 } KS_ANALOGVIDEOINFO, *PKS_ANALOGVIDEOINFO;
592
593 typedef struct tagKS_DATARANGE_ANALOGVIDEO {
594 KSDATARANGE DataRange;
595 KS_ANALOGVIDEOINFO AnalogVideoInfo;
596 } KS_DATARANGE_ANALOGVIDEO, *PKS_DATARANGE_ANALOGVIDEO;
597
598 typedef enum {
599 KS_TUNER_TUNING_EXACT = 1,
600 KS_TUNER_TUNING_FINE,
601 KS_TUNER_TUNING_COARSE,
602 } KS_TUNER_TUNING_FLAGS;
603
604 typedef enum {
605 KS_TUNER_STRATEGY_PLL = 0x01,
606 KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0x02,
607 KS_TUNER_STRATEGY_DRIVER_TUNES = 0x04,
608 } KS_TUNER_STRATEGY;
609
610 typedef struct {
611 KSPROPERTY Property;
612 ULONG ModesSupported;
613 KSPIN_MEDIUM VideoMedium;
614 KSPIN_MEDIUM TVAudioMedium;
615 KSPIN_MEDIUM RadioAudioMedium;
616 } KSPROPERTY_TUNER_CAPS_S, *PKSPROPERTY_TUNER_CAPS_S;
617
618 typedef struct {
619 KSPROPERTY Property;
620 KSPIN_MEDIUM IFMedium;
621 } KSPROPERTY_TUNER_IF_MEDIUM_S, *PKSPROPERTY_TUNER_IF_MEDIUM_S;
622
623 typedef struct {
624 KSPROPERTY Property;
625 ULONG Mode;
626 } KSPROPERTY_TUNER_MODE_S, *PKSPROPERTY_TUNER_MODE_S;
627
628 typedef struct {
629 KSPROPERTY Property;
630 ULONG Frequency;
631 ULONG LastFrequency;
632 ULONG TuningFlags;
633 ULONG VideoSubChannel;
634 ULONG AudioSubChannel;
635 ULONG Channel;
636 ULONG Country;
637 } KSPROPERTY_TUNER_FREQUENCY_S, *PKSPROPERTY_TUNER_FREQUENCY_S;
638
639 typedef struct {
640 KSPROPERTY Property;
641 ULONG Standard;
642 } KSPROPERTY_TUNER_STANDARD_S, *PKSPROPERTY_TUNER_STANDARD_S;
643
644 typedef struct {
645 KSPROPERTY Property;
646 ULONG InputIndex;
647 } KSPROPERTY_TUNER_INPUT_S, *PKSPROPERTY_TUNER_INPUT_S;
648
649 typedef struct {
650 KSPROPERTY Property;
651 ULONG CurrentFrequency;
652 ULONG PLLOffset;
653 ULONG SignalStrength;
654 ULONG Busy;
655 } KSPROPERTY_TUNER_STATUS_S, *PKSPROPERTY_TUNER_STATUS_S;
656
657 typedef enum {
658 KSEVENT_TUNER_CHANGED,
659 KSEVENT_TUNER_INITIATE_SCAN
660 } KSEVENT_TUNER;
661
662 typedef enum {
663 KS_AnalogVideo_None = 0x00000000,
664 KS_AnalogVideo_NTSC_M = 0x00000001,
665 KS_AnalogVideo_NTSC_M_J = 0x00000002,
666 KS_AnalogVideo_NTSC_433 = 0x00000004,
667 KS_AnalogVideo_PAL_B = 0x00000010,
668 KS_AnalogVideo_PAL_D = 0x00000020,
669 KS_AnalogVideo_PAL_G = 0x00000040,
670 KS_AnalogVideo_PAL_H = 0x00000080,
671 KS_AnalogVideo_PAL_I = 0x00000100,
672 KS_AnalogVideo_PAL_M = 0x00000200,
673 KS_AnalogVideo_PAL_N = 0x00000400,
674 KS_AnalogVideo_PAL_60 = 0x00000800,
675 KS_AnalogVideo_SECAM_B = 0x00001000,
676 KS_AnalogVideo_SECAM_D = 0x00002000,
677 KS_AnalogVideo_SECAM_G = 0x00004000,
678 KS_AnalogVideo_SECAM_H = 0x00008000,
679 KS_AnalogVideo_SECAM_K = 0x00010000,
680 KS_AnalogVideo_SECAM_K1 = 0x00020000,
681 KS_AnalogVideo_SECAM_L = 0x00040000,
682 KS_AnalogVideo_SECAM_L1 = 0x00080000,
683 KS_AnalogVideo_PAL_N_COMBO = 0x00100000
684 } KS_AnalogVideoStandard;
685
686 typedef struct {
687 KSPROPERTY Property;
688 ULONG Mode;
689 ULONG StandardsSupported;
690 ULONG MinFrequency;
691 ULONG MaxFrequency;
692 ULONG TuningGranularity;
693 ULONG NumberOfInputs;
694 ULONG SettlingTime;
695 ULONG Strategy;
696 } KSPROPERTY_TUNER_MODE_CAPS_S, *PKSPROPERTY_TUNER_MODE_CAPS_S;
697
698 typedef struct tagKS_BITMAPINFOHEADER {
699 DWORD biSize;
700 LONG biWidth;
701 LONG biHeight;
702 WORD biPlanes;
703 WORD biBitCount;
704 DWORD biCompression;
705 DWORD biSizeImage;
706 LONG biXPelsPerMeter;
707 LONG biYPelsPerMeter;
708 DWORD biClrUsed;
709 DWORD biClrImportant;
710 } KS_BITMAPINFOHEADER, *PKS_BITMAPINFOHEADER;
711
712 typedef struct _KS_VIDEO_STREAM_CONFIG_CAPS {
713 GUID guid;
714 ULONG VideoStandard;
715 SIZE InputSize;
716 SIZE MinCroppingSize;
717 SIZE MaxCroppingSize;
718 int CropGranularityX;
719 int CropGranularityY;
720 int CropAlignX;
721 int CropAlignY;
722 SIZE MinOutputSize;
723 SIZE MaxOutputSize;
724 int OutputGranularityX;
725 int OutputGranularityY;
726 int StretchTapsX;
727 int StretchTapsY;
728 int ShrinkTapsX;
729 int ShrinkTapsY;
730 LONGLONG MinFrameInterval;
731 LONGLONG MaxFrameInterval;
732 LONG MinBitsPerSecond;
733 LONG MaxBitsPerSecond;
734 } KS_VIDEO_STREAM_CONFIG_CAPS, *PKS_VIDEO_STREAM_CONFIG_CAPS;
735
736 typedef struct tagKS_FRAME_INFO {
737 ULONG ExtendedHeaderSize;
738 DWORD dwFrameFlags;
739 LONGLONG PictureNumber;
740 LONGLONG DropCount;
741 HANDLE hDirectDraw;
742 HANDLE hSurfaceHandle;
743 RECT DirectDrawRect;
744 union {
745 LONG lSurfacePitch;
746 DWORD Reserved1;
747 };
748 DWORD Reserved2;
749 union {
750 struct {
751 DWORD Reserved3;
752 DWORD Reserved4;
753 };
754 ULONGLONG FrameCompletionNumber;
755 };
756 } KS_FRAME_INFO, *PKS_FRAME_INFO;
757
758 typedef struct tagKS_VIDEOINFOHEADER {
759 RECT rcSource;
760 RECT rcTarget;
761 DWORD dwBitRate;
762 DWORD dwBitErrorRate;
763 REFERENCE_TIME AvgTimePerFrame;
764 KS_BITMAPINFOHEADER bmiHeader;
765 } KS_VIDEOINFOHEADER, *PKS_VIDEOINFOHEADER;
766
767 typedef struct tagKS_VIDEOINFOHEADER2 {
768 RECT rcSource;
769 RECT rcTarget;
770 DWORD dwBitRate;
771 DWORD dwBitErrorRate;
772 REFERENCE_TIME AvgTimePerFrame;
773 DWORD dwInterlaceFlags;
774 DWORD dwCopyProtectFlags;
775 DWORD dwPictAspectRatioX;
776 DWORD dwPictAspectRatioY;
777 union {
778 DWORD dwControlFlags;
779 DWORD dwReserved1;
780 };
781 DWORD dwReserved2;
782 KS_BITMAPINFOHEADER bmiHeader;
783 } KS_VIDEOINFOHEADER2, *PKS_VIDEOINFOHEADER2;
784
785 typedef struct tagKS_DATARANGE_VIDEO {
786 KSDATARANGE DataRange;
787 BOOL bFixedSizeSamples;
788 BOOL bTemporalCompression;
789 DWORD StreamDescriptionFlags;
790 DWORD MemoryAllocationFlags;
791 KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
792 KS_VIDEOINFOHEADER VideoInfoHeader;
793 } KS_DATARANGE_VIDEO, *PKS_DATARANGE_VIDEO;
794
795 typedef struct tagKS_DATARANGE_VIDEO2 {
796 KSDATARANGE DataRange;
797 BOOL bFixedSizeSamples;
798 BOOL bTemporalCompression;
799 DWORD StreamDescriptionFlags;
800 DWORD MemoryAllocationFlags;
801 KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
802 KS_VIDEOINFOHEADER2 VideoInfoHeader;
803 } KS_DATARANGE_VIDEO2, *PKS_DATARANGE_VIDEO2;
804
805 typedef struct tagKS_VBIINFOHEADER {
806 ULONG StartLine;
807 ULONG EndLine;
808 ULONG SamplingFrequency;
809 ULONG MinLineStartTime;
810 ULONG MaxLineStartTime;
811 ULONG ActualLineStartTime;
812 ULONG ActualLineEndTime;
813 ULONG VideoStandard;
814 ULONG SamplesPerLine;
815 ULONG StrideInBytes;
816 ULONG BufferSize;
817 } KS_VBIINFOHEADER, *PKS_VBIINFOHEADER;
818
819 typedef struct tagKS_DATARANGE_VIDEO_VBI {
820 KSDATARANGE DataRange;
821 BOOL bFixedSizeSamples;
822 BOOL bTemporalCompression;
823 DWORD StreamDescriptionFlags;
824 DWORD MemoryAllocationFlags;
825 KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
826 KS_VBIINFOHEADER VBIInfoHeader;
827 } KS_DATARANGE_VIDEO_VBI, *PKS_DATARANGE_VIDEO_VBI;
828
829 typedef struct tagKS_TVTUNER_CHANGE_INFO {
830 DWORD dwFlags;
831 DWORD dwCountryCode;
832 DWORD dwAnalogVideoStandard;
833 DWORD dwChannel;
834 } KS_TVTUNER_CHANGE_INFO, *PKS_TVTUNER_CHANGE_INFO;
835
836 typedef struct {
837 KSPROPERTY Property;
838 ULONG IndexInputPin;
839 ULONG IndexOutputPin;
840 ULONG CanRoute;
841 } KSPROPERTY_CROSSBAR_ROUTE_S, *PKSPROPERTY_CROSSBAR_ROUTE_S;
842
843 typedef struct tagKS_VBI_FRAME_INFO {
844 ULONG ExtendedHeaderSize;
845 DWORD dwFrameFlags;
846 LONGLONG PictureNumber;
847 LONGLONG DropCount;
848 DWORD dwSamplingFrequency;
849 KS_TVTUNER_CHANGE_INFO TvTunerChangeInfo;
850 KS_VBIINFOHEADER VBIInfoHeader;
851 } KS_VBI_FRAME_INFO, *PKS_VBI_FRAME_INFO;
852
853 #define KS_SIZE_PREHEADER (FIELD_OFFSET(KS_VIDEOINFOHEADER,bmiHeader))
854
855 #if !defined( DEFINE_WAVEFORMATEX_GUID )
856 #define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
857 #endif
858
859 #define STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX\
860 0x00000000L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
861 DEFINE_GUIDSTRUCT("00000000-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_WAVEFORMATEX);
862 #define KSDATAFORMAT_SUBTYPE_WAVEFORMATEX DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_WAVEFORMATEX)
863
864
865 #define INIT_WAVEFORMATEX_GUID(Guid, x) \
866 { \
867 *(Guid) = KSDATAFORMAT_SUBTYPE_WAVEFORMATEX; \
868 (Guid)->Data1 = (USHORT)(x); \
869 }
870
871 // 'vids'
872 #define STATIC_KSDATAFORMAT_TYPE_VIDEO \
873 0x73646976L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
874 DEFINE_GUIDSTRUCT("73646976-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_VIDEO);
875 #define KSDATAFORMAT_TYPE_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VIDEO)
876
877 // 'auds'
878 #define STATIC_KSDATAFORMAT_TYPE_AUDIO \
879 0x73647561L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
880 DEFINE_GUIDSTRUCT("73647561-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_AUDIO);
881 #define KSDATAFORMAT_TYPE_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUDIO)
882
883 #define STATIC_KSDATAFORMAT_SPECIFIER_DSOUND\
884 0x518590a2L, 0xa184, 0x11d0, {0x85, 0x22, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3}
885 DEFINE_GUIDSTRUCT("518590a2-a184-11d0-8522-00c04fd9baf3", KSDATAFORMAT_SPECIFIER_DSOUND);
886 #define KSDATAFORMAT_SPECIFIER_DSOUND DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DSOUND)
887
888 #define STATIC_KSDATAFORMAT_SUBTYPE_ANALOG\
889 0x6dba3190L, 0x67bd, 0x11cf, {0xa0, 0xf7, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4}
890 DEFINE_GUIDSTRUCT("6dba3190-67bd-11cf-a0f7-0020afd156e4", KSDATAFORMAT_SUBTYPE_ANALOG);
891 #define KSDATAFORMAT_SUBTYPE_ANALOG DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ANALOG)
892
893
894 // 'txts'
895 #define STATIC_KSDATAFORMAT_TYPE_TEXT \
896 0x73747874L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
897 DEFINE_GUIDSTRUCT("73747874-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_TEXT);
898 #define KSDATAFORMAT_TYPE_TEXT DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_TEXT)
899
900 #define STATIC_KSDATAFORMAT_TYPE_MUSIC \
901 0xE725D360L, 0x62CC, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
902 DEFINE_GUIDSTRUCT("E725D360-62CC-11CF-A5D6-28DB04C10000", KSDATAFORMAT_TYPE_MUSIC);
903 #define KSDATAFORMAT_TYPE_MUSIC DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MUSIC)
904
905 // 'mids'
906 #define STATIC_KSDATAFORMAT_TYPE_MIDI \
907 0x7364696DL, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
908 DEFINE_GUIDSTRUCT("7364696D-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_MIDI);
909 #define KSDATAFORMAT_TYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MIDI)
910
911 #define STATIC_KSDATAFORMAT_SUBTYPE_MIDI \
912 0x1D262760L, 0xE957, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
913 DEFINE_GUIDSTRUCT("1D262760-E957-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI);
914 #define KSDATAFORMAT_SUBTYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI)
915
916 #define STATIC_KSDATAFORMAT_SUBTYPE_PCM\
917 0x00000001L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
918 DEFINE_GUIDSTRUCT("00000001-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_PCM);
919 #define KSDATAFORMAT_SUBTYPE_PCM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_PCM)
920
921 #define STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\
922 0x00000003L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
923 DEFINE_GUIDSTRUCT("00000003-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEEE_FLOAT);
924 #define KSDATAFORMAT_SUBTYPE_IEEE_FLOAT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)
925
926 #define STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\
927 0x05589f81L, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}
928 DEFINE_GUIDSTRUCT("05589f81-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_WAVEFORMATEX);
929 #define KSDATAFORMAT_SPECIFIER_WAVEFORMATEX DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
930
931 #define STATIC_KSDATAFORMAT_SUBTYPE_AC3_AUDIO\
932 0xe06d802cL, 0xdb46, 0x11cf, {0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea}
933 DEFINE_GUIDSTRUCT("e06d802c-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_AC3_AUDIO);
934 #define KSDATAFORMAT_SUBTYPE_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_AC3_AUDIO)
935
936 #define STATIC_KSDATAFORMAT_SPECIFIER_AC3_AUDIO\
937 0xe06d80e4L, 0xdb46, 0x11cf, {0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea}
938 DEFINE_GUIDSTRUCT("e06d80e4-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_AC3_AUDIO);
939 #define KSDATAFORMAT_SPECIFIER_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_AC3_AUDIO)
940
941 #define STATIC_KSPROPSETID_AC3\
942 0xBFABE720L, 0x6E1F, 0x11D0, {0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}
943 DEFINE_GUIDSTRUCT("BFABE720-6E1F-11D0-BCF2-444553540000", KSPROPSETID_AC3);
944 #define KSPROPSETID_AC3 DEFINE_GUIDNAMED(KSPROPSETID_AC3)
945
946 #define STATIC_KSPROPSETID_Audio\
947 0x45FFAAA0L, 0x6E1B, 0x11D0, {0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}
948 DEFINE_GUIDSTRUCT("45FFAAA0-6E1B-11D0-BCF2-444553540000", KSPROPSETID_Audio);
949 #define KSPROPSETID_Audio DEFINE_GUIDNAMED(KSPROPSETID_Audio)
950
951 typedef enum {
952 KSPROPERTY_AUDIO_LATENCY = 1,
953 KSPROPERTY_AUDIO_COPY_PROTECTION,
954 KSPROPERTY_AUDIO_CHANNEL_CONFIG,
955 KSPROPERTY_AUDIO_VOLUMELEVEL,
956 KSPROPERTY_AUDIO_POSITION,
957 KSPROPERTY_AUDIO_DYNAMIC_RANGE,
958 KSPROPERTY_AUDIO_QUALITY,
959 KSPROPERTY_AUDIO_SAMPLING_RATE,
960 KSPROPERTY_AUDIO_DYNAMIC_SAMPLING_RATE,
961 KSPROPERTY_AUDIO_MIX_LEVEL_TABLE,
962 KSPROPERTY_AUDIO_MIX_LEVEL_CAPS,
963 KSPROPERTY_AUDIO_MUX_SOURCE,
964 KSPROPERTY_AUDIO_MUTE,
965 KSPROPERTY_AUDIO_BASS,
966 KSPROPERTY_AUDIO_MID,
967 KSPROPERTY_AUDIO_TREBLE,
968 KSPROPERTY_AUDIO_BASS_BOOST,
969 KSPROPERTY_AUDIO_EQ_LEVEL,
970 KSPROPERTY_AUDIO_NUM_EQ_BANDS,
971 KSPROPERTY_AUDIO_EQ_BANDS,
972 KSPROPERTY_AUDIO_AGC,
973 KSPROPERTY_AUDIO_DELAY,
974 KSPROPERTY_AUDIO_LOUDNESS,
975 KSPROPERTY_AUDIO_WIDE_MODE,
976 KSPROPERTY_AUDIO_WIDENESS,
977 KSPROPERTY_AUDIO_REVERB_LEVEL,
978 KSPROPERTY_AUDIO_CHORUS_LEVEL,
979 KSPROPERTY_AUDIO_DEV_SPECIFIC,
980 KSPROPERTY_AUDIO_DEMUX_DEST,
981 KSPROPERTY_AUDIO_STEREO_ENHANCE,
982 KSPROPERTY_AUDIO_MANUFACTURE_GUID,
983 KSPROPERTY_AUDIO_PRODUCT_GUID,
984 KSPROPERTY_AUDIO_CPU_RESOURCES,
985 KSPROPERTY_AUDIO_STEREO_SPEAKER_GEOMETRY,
986 KSPROPERTY_AUDIO_SURROUND_ENCODE,
987 KSPROPERTY_AUDIO_3D_INTERFACE
988
989 #if (NTDDI_VERSION >= NTDDI_WINXP)
990 , KSPROPERTY_AUDIO_PEAKMETER
991 , KSPROPERTY_AUDIO_ALGORITHM_INSTANCE
992 , KSPROPERTY_AUDIO_FILTER_STATE
993 , KSPROPERTY_AUDIO_PREFERRED_STATUS
994
995 #endif
996 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
997 , KSPROPERTY_AUDIO_PEQ_MAX_BANDS
998 , KSPROPERTY_AUDIO_PEQ_NUM_BANDS
999 , KSPROPERTY_AUDIO_PEQ_BAND_CENTER_FREQ
1000 , KSPROPERTY_AUDIO_PEQ_BAND_Q_FACTOR
1001 , KSPROPERTY_AUDIO_PEQ_BAND_LEVEL
1002 , KSPROPERTY_AUDIO_CHORUS_MODULATION_RATE
1003 , KSPROPERTY_AUDIO_CHORUS_MODULATION_DEPTH
1004 , KSPROPERTY_AUDIO_REVERB_TIME
1005 , KSPROPERTY_AUDIO_REVERB_DELAY_FEEDBACK
1006 , KSPROPERTY_AUDIO_POSITIONEX
1007 , KSPROPERTY_AUDIO_MIC_ARRAY_GEOMETRY
1008 #endif
1009
1010 } KSPROPERTY_AUDIO;
1011
1012 #define STATIC_KSEVENTSETID_AudioControlChange\
1013 0xE85E9698L, 0xFA2F, 0x11D1, {0x95, 0xBD, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
1014 DEFINE_GUIDSTRUCT("E85E9698-FA2F-11D1-95BD-00C04FB925D3", KSEVENTSETID_AudioControlChange);
1015 #define KSEVENTSETID_AudioControlChange DEFINE_GUIDNAMED(KSEVENTSETID_AudioControlChange)
1016
1017 typedef enum {
1018 KSEVENT_CONTROL_CHANGE,
1019 } KSEVENT_AUDIO_CONTROL_CHANGE;
1020
1021
1022 #define STATIC_KSEVENTSETID_LoopedStreaming\
1023 0x4682B940L, 0xC6EF, 0x11D0, {0x96, 0xD8, 0x00, 0xAA, 0x00, 0x51, 0xE5, 0x1D}
1024 DEFINE_GUIDSTRUCT("4682B940-C6EF-11D0-96D8-00AA0051E51D", KSEVENTSETID_LoopedStreaming);
1025 #define KSEVENTSETID_LoopedStreaming DEFINE_GUIDNAMED(KSEVENTSETID_LoopedStreaming)
1026
1027 typedef enum {
1028 KSEVENT_LOOPEDSTREAMING_POSITION,
1029 } KSEVENT_LOOPEDSTREAMING;
1030
1031 #define STATIC_KSEVENTSETID_Connection\
1032 0x7f4bcbe0L, 0x9ea5, 0x11cf, {0xa5, 0xd6, 0x28, 0xdb, 0x04, 0xc1, 0x00, 0x00}
1033 DEFINE_GUIDSTRUCT("7f4bcbe0-9ea5-11cf-a5d6-28db04c10000", KSEVENTSETID_Connection);
1034 #define KSEVENTSETID_Connection DEFINE_GUIDNAMED(KSEVENTSETID_Connection)
1035
1036
1037 typedef struct {
1038 KSEVENTDATA KsEventData;
1039 #if defined(_NTDDK_)
1040 ULONGLONG Position;
1041 #else // !_NTDDK_
1042 DWORDLONG Position;
1043 #endif // !_NTDDK_
1044 } LOOPEDSTREAMING_POSITION_EVENT_DATA, *PLOOPEDSTREAMING_POSITION_EVENT_DATA ;
1045
1046 #define STATIC_KSPROPSETID_DrmAudioStream\
1047 0x2f2c8ddd, 0x4198, 0x4fac, {0xba, 0x29, 0x61, 0xbb, 0x5, 0xb7, 0xde, 0x6}
1048 DEFINE_GUIDSTRUCT("2F2C8DDD-4198-4fac-BA29-61BB05B7DE06", KSPROPSETID_DrmAudioStream);
1049 #define KSPROPSETID_DrmAudioStream DEFINE_GUIDNAMED(KSPROPSETID_DrmAudioStream)
1050
1051 typedef enum {
1052 KSPROPERTY_DRMAUDIOSTREAM_CONTENTID
1053 } KSPROPERTY_DRMAUDIOSTREAM;
1054
1055
1056 /*
1057 SysAudio Properties
1058 */
1059
1060 #define STATIC_KSPROPSETID_Sysaudio \
1061 0xCBE3FAA0L, 0xCC75, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}
1062 DEFINE_GUIDSTRUCT("CBE3FAA0-CC75-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio);
1063 #define KSPROPSETID_Sysaudio DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio)
1064
1065 typedef enum {
1066 KSPROPERTY_SYSAUDIO_DEVICE_COUNT = 1,
1067 KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME = 2,
1068 KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE = 3,
1069 KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME = 4,
1070 KSPROPERTY_SYSAUDIO_SELECT_GRAPH = 5,
1071 KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE = 6,
1072 KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT = 7,
1073 KSPROPERTY_SYSAUDIO_INSTANCE_INFO = 14,
1074 KSPROPERTY_SYSAUDIO_COMPONENT_ID = 16
1075 } KSPROPERTY_SYSAUDIO;
1076
1077 typedef struct {
1078 KSPROPERTY Property;
1079 ULONG Flags;
1080 ULONG DeviceNumber;
1081 } SYSAUDIO_INSTANCE_INFO, *PSYSAUDIO_INSTANCE_INFO;
1082
1083 #define SYSAUDIO_FLAGS_DONT_COMBINE_PINS 0x00000001
1084
1085
1086 #define STATIC_KSPROPSETID_Sysaudio_Pin \
1087 0xA3A53220L, 0xC6E4, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}
1088 DEFINE_GUIDSTRUCT("A3A53220-C6E4-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio_Pin);
1089 #define KSPROPSETID_Sysaudio_Pin DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio_Pin)
1090
1091 typedef enum {
1092 KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE = 1,
1093 } KSPROPERTY_SYSAUDIO_PIN;
1094
1095
1096 #define KSAUDIO_CPU_RESOURCES_NOT_HOST_CPU 0x00000000
1097 #define KSAUDIO_CPU_RESOURCES_HOST_CPU 0x7FFFFFFF
1098
1099 #if (NTDDI_VERSION >= NTDDI_WINXP)
1100 #define KSAUDIO_SPEAKER_DIRECTOUT 0
1101 #endif
1102 #define KSAUDIO_SPEAKER_MONO (SPEAKER_FRONT_CENTER)
1103 #define KSAUDIO_SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
1104 #define KSAUDIO_SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1105 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
1106 #define KSAUDIO_SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1107 SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
1108 #define KSAUDIO_SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1109 SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
1110 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
1111 #define KSAUDIO_SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1112 SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
1113 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \
1114 SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER)
1115
1116 #if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
1117
1118 #define KSAUDIO_SPEAKER_5POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1119 SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
1120 SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
1121 #define KSAUDIO_SPEAKER_7POINT1_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1122 SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
1123 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \
1124 SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT)
1125 #define KSAUDIO_SPEAKER_5POINT1_BACK KSAUDIO_SPEAKER_5POINT1
1126 #define KSAUDIO_SPEAKER_7POINT1_WIDE KSAUDIO_SPEAKER_7POINT1
1127 #endif
1128
1129 typedef struct
1130 {
1131 KSPROPERTY Property;
1132 ULONG NodeId;
1133 ULONG Reserved;
1134 } KSNODEPROPERTY, *PKSNODEPROPERTY;
1135
1136 typedef struct
1137 {
1138 KSNODEPROPERTY NodeProperty;
1139 LONG Channel;
1140 ULONG Reserved;
1141 } KSNODEPROPERTY_AUDIO_CHANNEL, *PKSNODEPROPERTY_AUDIO_CHANNEL;
1142
1143 typedef struct {
1144 #if defined(_NTDDK_)
1145 ULONGLONG PlayOffset;
1146 ULONGLONG WriteOffset;
1147 #else
1148 DWORDLONG PlayOffset;
1149 DWORDLONG WriteOffset;
1150 #endif
1151 } KSAUDIO_POSITION, *PKSAUDIO_POSITION;
1152
1153 typedef struct {
1154 ULONG FifoSize;
1155 ULONG ChipsetDelay;
1156 ULONG CodecDelay;
1157 } KSRTAUDIO_HWLATENCY, *PKSRTAUDIO_HWLATENCY;
1158
1159 typedef struct {
1160 PVOID Register;
1161 ULONG Width;
1162 ULONGLONG Numerator;
1163 ULONGLONG Denominator;
1164 ULONG Accuracy;
1165 } KSRTAUDIO_HWREGISTER, *PKSRTAUDIO_HWREGISTER;
1166
1167 #define KSNODEPIN_STANDARD_IN 1
1168 #define KSNODEPIN_STANDARD_OUT 0
1169
1170 #define KSNODEPIN_SUM_MUX_IN 1
1171 #define KSNODEPIN_SUM_MUX_OUT 0
1172
1173 #define KSNODEPIN_DEMUX_IN 0
1174 #define KSNODEPIN_DEMUX_OUT 1
1175
1176 #if (NTDDI_VERSION < NTDDI_VISTA)
1177
1178 #define KSNODEPIN_AEC_RENDER_IN 1
1179 #define KSNODEPIN_AEC_RENDER_OUT 0
1180 #define KSNODEPIN_AEC_CAPTURE_IN 2
1181 #define KSNODEPIN_AEC_CAPTURE_OUT 3
1182
1183 #endif
1184
1185
1186 #define STATIC_KSMUSIC_TECHNOLOGY_PORT\
1187 0x86C92E60L, 0x62E8, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
1188 DEFINE_GUIDSTRUCT("86C92E60-62E8-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_PORT);
1189 #define KSMUSIC_TECHNOLOGY_PORT DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_PORT)
1190
1191 #define STATIC_KSDATAFORMAT_SUBTYPE_MIDI_BUS\
1192 0x2CA15FA0L, 0x6CFE, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}
1193 DEFINE_GUIDSTRUCT("2CA15FA0-6CFE-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI_BUS);
1194 #define KSDATAFORMAT_SUBTYPE_MIDI_BUS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI_BUS)
1195
1196 #define STATIC_KSAUDFNAME_MIDI\
1197 0x185FEDF8L, 0x9905, 0x11D1, {0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3}
1198 DEFINE_GUIDSTRUCT("185FEDF8-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI);
1199 #define KSAUDFNAME_MIDI DEFINE_GUIDNAMED(KSAUDFNAME_MIDI)
1200
1201 #define STATIC_KSNODETYPE_SYNTHESIZER\
1202 DEFINE_USB_TERMINAL_GUID(0x0713)
1203 DEFINE_GUIDSTRUCT("DFF220F3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SYNTHESIZER);
1204 #define KSNODETYPE_SYNTHESIZER DEFINE_GUIDNAMED(KSNODETYPE_SYNTHESIZER)
1205
1206 typedef struct
1207 {
1208 KSDATARANGE DataRange;
1209 GUID Technology;
1210 ULONG Channels;
1211 ULONG Notes;
1212 ULONG ChannelMask;
1213 } KSDATARANGE_MUSIC, *PKSDATARANGE_MUSIC;
1214
1215 #if (NTDDI_VERSION >= NTDDI_WINXPSP1)
1216
1217 #define STATIC_KSPROPSETID_Jack\
1218 0x4509f757, 0x2d46, 0x4637, {0x8e, 0x62, 0xce, 0x7d, 0xb9, 0x44, 0xf5, 0x7b}
1219 DEFINE_GUIDSTRUCT("4509F757-2D46-4637-8E62-CE7DB944F57B", KSPROPSETID_Jack);
1220 #define KSPROPSETID_Jack DEFINE_GUIDNAMED(KSPROPSETID_Jack)
1221
1222 typedef enum {
1223 KSPROPERTY_JACK_DESCRIPTION = 1,
1224 KSPROPERTY_JACK_DESCRIPTION2,
1225 KSPROPERTY_JACK_SINK_INFO,
1226 KSPROPERTY_JACK_CONTAINERID
1227 } KSPROPERTY_JACK;
1228
1229 typedef enum {
1230 eConnTypeUnknown,
1231 eConnType3Point5mm,
1232 eConnTypeQuarter,
1233 eConnTypeAtapiInternal,
1234 eConnTypeRCA,
1235 eConnTypeOptical,
1236 eConnTypeOtherDigital,
1237 eConnTypeOtherAnalog,
1238 eConnTypeMultichannelAnalogDIN,
1239 eConnTypeXlrProfessional,
1240 eConnTypeRJ11Modem,
1241 eConnTypeCombination
1242 } EPcxConnectionType;
1243
1244 #define eGeoLocReserved5 eGeoLocNotApplicable
1245
1246 typedef enum {
1247 eGeoLocRear = 0x1,
1248 eGeoLocFront,
1249 eGeoLocLeft,
1250 eGeoLocRight,
1251 eGeoLocTop,
1252 eGeoLocBottom,
1253 eGeoLocRearPanel,
1254 eGeoLocRiser,
1255 eGeoLocInsideMobileLid,
1256 eGeoLocDrivebay,
1257 eGeoLocHDMI,
1258 eGeoLocOutsideMobileLid,
1259 eGeoLocATAPI,
1260 eGeoLocNotApplicable,
1261 eGeoLocReserved6,
1262 EPcxGeoLocation_enum_count
1263 } EPcxGeoLocation;
1264
1265 typedef enum {
1266 eGenLocPrimaryBox = 0,
1267 eGenLocInternal,
1268 eGenLocSeparate,
1269 eGenLocOther,
1270 EPcxGenLocation_enum_count
1271 } EPcxGenLocation;
1272
1273 typedef enum {
1274 ePortConnJack = 0,
1275 ePortConnIntegratedDevice,
1276 ePortConnBothIntegratedAndJack,
1277 ePortConnUnknown
1278 } EPxcPortConnection;
1279
1280 typedef struct {
1281 DWORD ChannelMapping;
1282 DWORD Color;
1283 EPcxConnectionType ConnectionType;
1284 EPcxGeoLocation GeoLocation;
1285 EPcxGenLocation GenLocation;
1286 EPxcPortConnection PortConnection;
1287 BOOL IsConnected;
1288 } KSJACK_DESCRIPTION, *PKSJACK_DESCRIPTION;
1289
1290 typedef enum {
1291 KSJACK_SINK_CONNECTIONTYPE_HDMI = 0,
1292 KSJACK_SINK_CONNECTIONTYPE_DISPLAYPORT
1293 } KSJACK_SINK_CONNECTIONTYPE;
1294
1295 #define MAX_SINK_DESCRIPTION_NAME_LENGTH 32
1296
1297 typedef struct _tagKSJACK_SINK_INFORMATION {
1298 KSJACK_SINK_CONNECTIONTYPE ConnType;
1299 WORD ManufacturerId;
1300 WORD ProductId;
1301 WORD AudioLatency;
1302 BOOL HDCPCapable;
1303 BOOL AICapable;
1304 UCHAR SinkDescriptionLength;
1305 WCHAR SinkDescription[MAX_SINK_DESCRIPTION_NAME_LENGTH];
1306 LUID PortId;
1307 } KSJACK_SINK_INFORMATION, *PKSJACK_SINK_INFORMATION;
1308
1309 #define JACKDESC2_PRESENCE_DETECT_CAPABILITY 0x1
1310 #define JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY 0x2
1311
1312 typedef struct _tagKSJACK_DESCRIPTION2 {
1313 DWORD DeviceStateInfo;
1314 DWORD JackCapabilities;
1315 } KSJACK_DESCRIPTION2, *PKSJACK_DESCRIPTION2;
1316
1317 #endif /* (NTDDI_VERSION >= NTDDI_WINXPSP1) */
1318
1319 #ifndef _SPEAKER_POSITIONS_
1320 #define _SPEAKER_POSITIONS_
1321
1322
1323 #define SPEAKER_FRONT_LEFT 0x1
1324 #define SPEAKER_FRONT_RIGHT 0x2
1325 #define SPEAKER_FRONT_CENTER 0x4
1326 #define SPEAKER_LOW_FREQUENCY 0x8
1327 #define SPEAKER_BACK_LEFT 0x10
1328 #define SPEAKER_BACK_RIGHT 0x20
1329 #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
1330 #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
1331 #define SPEAKER_BACK_CENTER 0x100
1332 #define SPEAKER_SIDE_LEFT 0x200
1333 #define SPEAKER_SIDE_RIGHT 0x400
1334 #define SPEAKER_TOP_CENTER 0x800
1335 #define SPEAKER_TOP_FRONT_LEFT 0x1000
1336 #define SPEAKER_TOP_FRONT_CENTER 0x2000
1337 #define SPEAKER_TOP_FRONT_RIGHT 0x4000
1338 #define SPEAKER_TOP_BACK_LEFT 0x8000
1339 #define SPEAKER_TOP_BACK_CENTER 0x10000
1340 #define SPEAKER_TOP_BACK_RIGHT 0x20000
1341
1342 #define SPEAKER_RESERVED 0x7FFC0000
1343 #define SPEAKER_ALL 0x80000000
1344
1345 #endif
1346
1347 #if (NTDDI_VERSION >= NTDDI_WINXP)
1348 #define KSAUDIO_SPEAKER_DIRECTOUT 0
1349 #endif
1350
1351 #define KSAUDIO_SPEAKER_MONO (SPEAKER_FRONT_CENTER)
1352 #define KSAUDIO_SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
1353 #define KSAUDIO_SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1354 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
1355 #define KSAUDIO_SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1356 SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
1357 #define KSAUDIO_SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1358 SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
1359 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
1360 #define KSAUDIO_SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1361 SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
1362 SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \
1363 SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER)
1364
1365 #endif