/[cvs]/api/include/ksmedia.h
ViewVC logotype

Annotation of /api/include/ksmedia.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (23 years, 5 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

1 bearsoft 1.1 /*++
2    
3     Copyright (C) Microsoft Corporation, 1996 - 2000
4    
5     Module Name:
6    
7     ksmedia.h
8    
9     Abstract:
10    
11     WDM-CSA Multimedia Definitions.
12    
13     --*/
14    
15     #if !defined(_KS_)
16     #error KS.H must be included before KSMEDIA.H
17     #endif // !defined(_KS_)
18    
19     #if !defined(_KSMEDIA_)
20     #define _KSMEDIA_
21    
22     typedef struct {
23     KSPROPERTY Property;
24     KSMULTIPLE_ITEM MultipleItem;
25     } KSMULTIPLE_DATA_PROP, *PKSMULTIPLE_DATA_PROP;
26    
27     #define STATIC_KSMEDIUMSETID_MidiBus \
28     0x05908040L, 0x3246, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
29     DEFINE_GUIDSTRUCT("05908040-3246-11D0-A5D6-28DB04C10000", KSMEDIUMSETID_MidiBus);
30     #define KSMEDIUMSETID_MidiBus DEFINE_GUIDNAMED(KSMEDIUMSETID_MidiBus)
31    
32     #define STATIC_KSMEDIUMSETID_VPBus \
33     0xA18C15ECL, 0xCE43, 0x11D0, 0xAB, 0xE7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
34     DEFINE_GUIDSTRUCT("A18C15EC-CE43-11D0-ABE7-00A0C9223196", KSMEDIUMSETID_VPBus);
35     #define KSMEDIUMSETID_VPBus DEFINE_GUIDNAMED(KSMEDIUMSETID_VPBus)
36    
37     #define STATIC_KSINTERFACESETID_Media \
38     0x3A13EB40L, 0x30A7, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
39     DEFINE_GUIDSTRUCT("3A13EB40-30A7-11D0-A5D6-28DB04C10000", KSINTERFACESETID_Media);
40     #define KSINTERFACESETID_Media DEFINE_GUIDNAMED(KSINTERFACESETID_Media)
41    
42     typedef enum {
43     KSINTERFACE_MEDIA_MUSIC,
44     KSINTERFACE_MEDIA_WAVE_BUFFERED,
45     KSINTERFACE_MEDIA_WAVE_QUEUED
46     } KSINTERFACE_MEDIA;
47    
48    
49     // USB Terminals
50     #define INIT_USB_TERMINAL(guid, id)\
51     {\
52     (guid)->Data1 = 0xDFF219E0 + (USHORT)(id);\
53     (guid)->Data2 = 0xF70F;\
54     (guid)->Data3 = 0x11D0;\
55     (guid)->Data4[0] = 0xb9;\
56     (guid)->Data4[1] = 0x17;\
57     (guid)->Data4[2] = 0x00;\
58     (guid)->Data4[3] = 0xa0;\
59     (guid)->Data4[4] = 0xc9;\
60     (guid)->Data4[5] = 0x22;\
61     (guid)->Data4[6] = 0x31;\
62     (guid)->Data4[7] = 0x96;\
63     }
64     #define EXTRACT_USB_TERMINAL(guid)\
65     (USHORT)((guid)->Data1 - 0xDFF219E0)
66     #define DEFINE_USB_TERMINAL_GUID(id)\
67     0xDFF219E0+(USHORT)(id), 0xF70F, 0x11D0, 0xB9, 0x17, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
68    
69     #define STATIC_KSNODETYPE_MICROPHONE\
70     DEFINE_USB_TERMINAL_GUID(0x0201)
71     DEFINE_GUIDSTRUCT("DFF21BE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MICROPHONE);
72     #define KSNODETYPE_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_MICROPHONE)
73    
74     #define STATIC_KSNODETYPE_DESKTOP_MICROPHONE\
75     DEFINE_USB_TERMINAL_GUID(0x0202)
76     DEFINE_GUIDSTRUCT("DFF21BE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DESKTOP_MICROPHONE);
77     #define KSNODETYPE_DESKTOP_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_DESKTOP_MICROPHONE)
78    
79     #define STATIC_KSNODETYPE_PERSONAL_MICROPHONE\
80     DEFINE_USB_TERMINAL_GUID(0x0203)
81     DEFINE_GUIDSTRUCT("DFF21BE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PERSONAL_MICROPHONE);
82     #define KSNODETYPE_PERSONAL_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_PERSONAL_MICROPHONE)
83    
84     #define STATIC_KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE\
85     DEFINE_USB_TERMINAL_GUID(0x0204)
86     DEFINE_GUIDSTRUCT("DFF21BE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE);
87     #define KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE)
88    
89     #define STATIC_KSNODETYPE_MICROPHONE_ARRAY\
90     DEFINE_USB_TERMINAL_GUID(0x0205)
91     DEFINE_GUIDSTRUCT("DFF21BE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MICROPHONE_ARRAY);
92     #define KSNODETYPE_MICROPHONE_ARRAY DEFINE_GUIDNAMED(KSNODETYPE_MICROPHONE_ARRAY)
93    
94     #define STATIC_KSNODETYPE_PROCESSING_MICROPHONE_ARRAY\
95     DEFINE_USB_TERMINAL_GUID(0x0206)
96     DEFINE_GUIDSTRUCT("DFF21BE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PROCESSING_MICROPHONE_ARRAY);
97     #define KSNODETYPE_PROCESSING_MICROPHONE_ARRAY DEFINE_GUIDNAMED(KSNODETYPE_PROCESSING_MICROPHONE_ARRAY)
98    
99     #define STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR \
100     0x830a44f2, 0xa32d, 0x476b, 0xbe, 0x97, 0x42, 0x84, 0x56, 0x73, 0xb3, 0x5a
101     DEFINE_GUIDSTRUCT("830a44f2-a32d-476b-be97-42845673b35a", KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR);
102     #define KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR DEFINE_GUIDNAMED(KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR)
103    
104     #define STATIC_KSNODETYPE_SPEAKER\
105     DEFINE_USB_TERMINAL_GUID(0x0301)
106     DEFINE_GUIDSTRUCT("DFF21CE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPEAKER);
107     #define KSNODETYPE_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_SPEAKER)
108    
109     #define STATIC_KSNODETYPE_HEADPHONES\
110     DEFINE_USB_TERMINAL_GUID(0x0302)
111     DEFINE_GUIDSTRUCT("DFF21CE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEADPHONES);
112     #define KSNODETYPE_HEADPHONES DEFINE_GUIDNAMED(KSNODETYPE_HEADPHONES)
113    
114     #define STATIC_KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO\
115     DEFINE_USB_TERMINAL_GUID(0x0303)
116     DEFINE_GUIDSTRUCT("DFF21CE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO);
117     #define KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO)
118    
119     #define STATIC_KSNODETYPE_DESKTOP_SPEAKER\
120     DEFINE_USB_TERMINAL_GUID(0x0304)
121     DEFINE_GUIDSTRUCT("DFF21CE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DESKTOP_SPEAKER);
122     #define KSNODETYPE_DESKTOP_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_DESKTOP_SPEAKER)
123    
124     #define STATIC_KSNODETYPE_ROOM_SPEAKER\
125     DEFINE_USB_TERMINAL_GUID(0x0305)
126     DEFINE_GUIDSTRUCT("DFF21CE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ROOM_SPEAKER);
127     #define KSNODETYPE_ROOM_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_ROOM_SPEAKER)
128    
129     #define STATIC_KSNODETYPE_COMMUNICATION_SPEAKER\
130     DEFINE_USB_TERMINAL_GUID(0x0306)
131     DEFINE_GUIDSTRUCT("DFF21CE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_COMMUNICATION_SPEAKER);
132     #define KSNODETYPE_COMMUNICATION_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_COMMUNICATION_SPEAKER)
133    
134     #define STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER\
135     DEFINE_USB_TERMINAL_GUID(0x0307)
136     DEFINE_GUIDSTRUCT("DFF21CE7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER);
137     #define KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER)
138    
139     #define STATIC_KSNODETYPE_HANDSET\
140     DEFINE_USB_TERMINAL_GUID(0x0401)
141     DEFINE_GUIDSTRUCT("DFF21DE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HANDSET);
142     #define KSNODETYPE_HANDSET DEFINE_GUIDNAMED(KSNODETYPE_HANDSET)
143    
144     #define STATIC_KSNODETYPE_HEADSET\
145     DEFINE_USB_TERMINAL_GUID(0x0402)
146     DEFINE_GUIDSTRUCT("DFF21DE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEADSET);
147     #define KSNODETYPE_HEADSET DEFINE_GUIDNAMED(KSNODETYPE_HEADSET)
148    
149     #define STATIC_KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION\
150     DEFINE_USB_TERMINAL_GUID(0x0403)
151     DEFINE_GUIDSTRUCT("DFF21DE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION);
152     #define KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION DEFINE_GUIDNAMED(KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION)
153    
154     #define STATIC_KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE\
155     DEFINE_USB_TERMINAL_GUID(0x0404)
156     DEFINE_GUIDSTRUCT("DFF21DE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE);
157     #define KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE DEFINE_GUIDNAMED(KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE)
158    
159     #define STATIC_KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE\
160     DEFINE_USB_TERMINAL_GUID(0x0405)
161     DEFINE_GUIDSTRUCT("DFF21DE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE);
162     #define KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE DEFINE_GUIDNAMED(KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE)
163    
164     #define STATIC_KSNODETYPE_PHONE_LINE\
165     DEFINE_USB_TERMINAL_GUID(0x0501)
166     DEFINE_GUIDSTRUCT("DFF21EE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PHONE_LINE);
167     #define KSNODETYPE_PHONE_LINE DEFINE_GUIDNAMED(KSNODETYPE_PHONE_LINE)
168    
169     #define STATIC_KSNODETYPE_TELEPHONE\
170     DEFINE_USB_TERMINAL_GUID(0x0502)
171     DEFINE_GUIDSTRUCT("DFF21EE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_TELEPHONE);
172     #define KSNODETYPE_TELEPHONE DEFINE_GUIDNAMED(KSNODETYPE_TELEPHONE)
173    
174     #define STATIC_KSNODETYPE_DOWN_LINE_PHONE\
175     DEFINE_USB_TERMINAL_GUID(0x0503)
176     DEFINE_GUIDSTRUCT("DFF21EE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DOWN_LINE_PHONE);
177     #define KSNODETYPE_DOWN_LINE_PHONE DEFINE_GUIDNAMED(KSNODETYPE_DOWN_LINE_PHONE)
178    
179     #define STATIC_KSNODETYPE_ANALOG_CONNECTOR\
180     DEFINE_USB_TERMINAL_GUID(0x601)
181     DEFINE_GUIDSTRUCT("DFF21FE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ANALOG_CONNECTOR);
182     #define KSNODETYPE_ANALOG_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_ANALOG_CONNECTOR)
183    
184     #define STATIC_KSNODETYPE_DIGITAL_AUDIO_INTERFACE\
185     DEFINE_USB_TERMINAL_GUID(0x0602)
186     DEFINE_GUIDSTRUCT("DFF21FE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DIGITAL_AUDIO_INTERFACE);
187     #define KSNODETYPE_DIGITAL_AUDIO_INTERFACE DEFINE_GUIDNAMED(KSNODETYPE_DIGITAL_AUDIO_INTERFACE)
188    
189     #define STATIC_KSNODETYPE_LINE_CONNECTOR\
190     DEFINE_USB_TERMINAL_GUID(0x0603)
191     DEFINE_GUIDSTRUCT("DFF21FE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LINE_CONNECTOR);
192     #define KSNODETYPE_LINE_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_LINE_CONNECTOR)
193    
194     #define STATIC_KSNODETYPE_LEGACY_AUDIO_CONNECTOR\
195     DEFINE_USB_TERMINAL_GUID(0x0604)
196     DEFINE_GUIDSTRUCT("DFF21FE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LEGACY_AUDIO_CONNECTOR);
197     #define KSNODETYPE_LEGACY_AUDIO_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_LEGACY_AUDIO_CONNECTOR)
198    
199     #define STATIC_KSNODETYPE_SPDIF_INTERFACE\
200     DEFINE_USB_TERMINAL_GUID(0x0605)
201     DEFINE_GUIDSTRUCT("DFF21FE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPDIF_INTERFACE);
202     #define KSNODETYPE_SPDIF_INTERFACE DEFINE_GUIDNAMED(KSNODETYPE_SPDIF_INTERFACE)
203    
204     #define STATIC_KSNODETYPE_1394_DA_STREAM\
205     DEFINE_USB_TERMINAL_GUID(0x0606)
206     DEFINE_GUIDSTRUCT("DFF21FE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_1394_DA_STREAM);
207     #define KSNODETYPE_1394_DA_STREAM DEFINE_GUIDNAMED(KSNODETYPE_1394_DA_STREAM)
208    
209     #define STATIC_KSNODETYPE_1394_DV_STREAM_SOUNDTRACK\
210     DEFINE_USB_TERMINAL_GUID(0x0607)
211     DEFINE_GUIDSTRUCT("DFF21FE7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_1394_DV_STREAM_SOUNDTRACK);
212     #define KSNODETYPE_1394_DV_STREAM_SOUNDTRACK DEFINE_GUIDNAMED(KSNODETYPE_1394_DV_STREAM_SOUNDTRACK)
213    
214     #define STATIC_KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE\
215     DEFINE_USB_TERMINAL_GUID(0x0701)
216     DEFINE_GUIDSTRUCT("DFF220E1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE);
217     #define KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE DEFINE_GUIDNAMED(KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE)
218    
219     #define STATIC_KSNODETYPE_EQUALIZATION_NOISE\
220     DEFINE_USB_TERMINAL_GUID(0x0702)
221     DEFINE_GUIDSTRUCT("DFF220E2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_EQUALIZATION_NOISE);
222     #define KSNODETYPE_EQUALIZATION_NOISE DEFINE_GUIDNAMED(KSNODETYPE_EQUALIZATION_NOISE)
223    
224     #define STATIC_KSNODETYPE_CD_PLAYER\
225     DEFINE_USB_TERMINAL_GUID(0x0703)
226     DEFINE_GUIDSTRUCT("DFF220E3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_CD_PLAYER);
227     #define KSNODETYPE_CD_PLAYER DEFINE_GUIDNAMED(KSNODETYPE_CD_PLAYER)
228    
229     #define STATIC_KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE\
230     DEFINE_USB_TERMINAL_GUID(0x0704)
231     DEFINE_GUIDSTRUCT("DFF220E4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE);
232     #define KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE DEFINE_GUIDNAMED(KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE)
233    
234     #define STATIC_KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE\
235     DEFINE_USB_TERMINAL_GUID(0x0705)
236     DEFINE_GUIDSTRUCT("DFF220E5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE);
237     #define KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE DEFINE_GUIDNAMED(KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE)
238    
239     #define STATIC_KSNODETYPE_MINIDISK\
240     DEFINE_USB_TERMINAL_GUID(0x0706)
241     DEFINE_GUIDSTRUCT("DFF220E6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MINIDISK);
242     #define KSNODETYPE_MINIDISK DEFINE_GUIDNAMED(KSNODETYPE_MINIDISK)
243    
244     #define STATIC_KSNODETYPE_ANALOG_TAPE\
245     DEFINE_USB_TERMINAL_GUID(0x0707)
246     DEFINE_GUIDSTRUCT("DFF220E7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ANALOG_TAPE);
247     #define KSNODETYPE_ANALOG_TAPE DEFINE_GUIDNAMED(KSNODETYPE_ANALOG_TAPE)
248    
249     #define STATIC_KSNODETYPE_PHONOGRAPH\
250     DEFINE_USB_TERMINAL_GUID(0x0708)
251     DEFINE_GUIDSTRUCT("DFF220E8-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PHONOGRAPH);
252     #define KSNODETYPE_PHONOGRAPH DEFINE_GUIDNAMED(KSNODETYPE_PHONOGRAPH)
253    
254     #define STATIC_KSNODETYPE_VCR_AUDIO\
255     DEFINE_USB_TERMINAL_GUID(0x0708)
256     DEFINE_GUIDSTRUCT("DFF220E9-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VCR_AUDIO);
257     #define KSNODETYPE_VCR_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_VCR_AUDIO)
258    
259     #define STATIC_KSNODETYPE_VIDEO_DISC_AUDIO\
260     DEFINE_USB_TERMINAL_GUID(0x070A)
261     DEFINE_GUIDSTRUCT("DFF220EA-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_DISC_AUDIO);
262     #define KSNODETYPE_VIDEO_DISC_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_DISC_AUDIO)
263    
264     #define STATIC_KSNODETYPE_DVD_AUDIO\
265     DEFINE_USB_TERMINAL_GUID(0x070B)
266     DEFINE_GUIDSTRUCT("DFF220EB-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DVD_AUDIO);
267     #define KSNODETYPE_DVD_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_DVD_AUDIO)
268    
269     #define STATIC_KSNODETYPE_TV_TUNER_AUDIO\
270     DEFINE_USB_TERMINAL_GUID(0x070C)
271     DEFINE_GUIDSTRUCT("DFF220EC-F70F-11D0-B917-00A0C9223196", KSNODETYPE_TV_TUNER_AUDIO);
272     #define KSNODETYPE_TV_TUNER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_TV_TUNER_AUDIO)
273    
274     #define STATIC_KSNODETYPE_SATELLITE_RECEIVER_AUDIO\
275     DEFINE_USB_TERMINAL_GUID(0x070D)
276     DEFINE_GUIDSTRUCT("DFF220ED-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SATELLITE_RECEIVER_AUDIO);
277     #define KSNODETYPE_SATELLITE_RECEIVER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_SATELLITE_RECEIVER_AUDIO)
278    
279     #define STATIC_KSNODETYPE_CABLE_TUNER_AUDIO\
280     DEFINE_USB_TERMINAL_GUID(0x070E)
281     DEFINE_GUIDSTRUCT("DFF220EE-F70F-11D0-B917-00A0C9223196", KSNODETYPE_CABLE_TUNER_AUDIO);
282     #define KSNODETYPE_CABLE_TUNER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_CABLE_TUNER_AUDIO)
283    
284     #define STATIC_KSNODETYPE_DSS_AUDIO\
285     DEFINE_USB_TERMINAL_GUID(0x070F)
286     DEFINE_GUIDSTRUCT("DFF220EF-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DSS_AUDIO);
287     #define KSNODETYPE_DSS_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_DSS_AUDIO)
288    
289     #define STATIC_KSNODETYPE_RADIO_RECEIVER\
290     DEFINE_USB_TERMINAL_GUID(0x0710)
291     DEFINE_GUIDSTRUCT("DFF220F0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_RADIO_RECEIVER);
292     #define KSNODETYPE_RADIO_RECEIVER DEFINE_GUIDNAMED(KSNODETYPE_RADIO_RECEIVER)
293    
294     #define STATIC_KSNODETYPE_RADIO_TRANSMITTER\
295     DEFINE_USB_TERMINAL_GUID(0x0711)
296     DEFINE_GUIDSTRUCT("DFF220F1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_RADIO_TRANSMITTER);
297     #define KSNODETYPE_RADIO_TRANSMITTER DEFINE_GUIDNAMED(KSNODETYPE_RADIO_TRANSMITTER)
298    
299     #define STATIC_KSNODETYPE_MULTITRACK_RECORDER\
300     DEFINE_USB_TERMINAL_GUID(0x0712)
301     DEFINE_GUIDSTRUCT("DFF220F2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MULTITRACK_RECORDER);
302     #define KSNODETYPE_MULTITRACK_RECORDER DEFINE_GUIDNAMED(KSNODETYPE_MULTITRACK_RECORDER)
303    
304     #define STATIC_KSNODETYPE_SYNTHESIZER\
305     DEFINE_USB_TERMINAL_GUID(0x0713)
306     DEFINE_GUIDSTRUCT("DFF220F3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SYNTHESIZER);
307     #define KSNODETYPE_SYNTHESIZER DEFINE_GUIDNAMED(KSNODETYPE_SYNTHESIZER)
308    
309     // Microsoft's WDMAUD virtual swsynth pin name guid
310    
311     #define STATIC_KSNODETYPE_SWSYNTH\
312     0x423274A0L, 0x8B81, 0x11D1, 0xA0, 0x50, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88
313     DEFINE_GUIDSTRUCT("423274A0-8B81-11D1-A050-0000F8004788", KSNODETYPE_SWSYNTH);
314     #define KSNODETYPE_SWSYNTH DEFINE_GUIDNAMED(KSNODETYPE_SWSYNTH)
315    
316     // Microsoft's SWMIDI midi pin and node name guid
317    
318     #define STATIC_KSNODETYPE_SWMIDI\
319     0xCB9BEFA0L, 0xA251, 0x11D1, 0xA0, 0x50, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88
320     DEFINE_GUIDSTRUCT("CB9BEFA0-A251-11D1-A050-0000F8004788", KSNODETYPE_SWMIDI);
321     #define KSNODETYPE_SWMIDI DEFINE_GUIDNAMED(KSNODETYPE_SWMIDI)
322    
323     #define STATIC_KSNODETYPE_DRM_DESCRAMBLE\
324     0xFFBB6E3FL, 0xCCFE, 0x4D84, 0x90, 0xD9, 0x42, 0x14, 0x18, 0xB0, 0x3A, 0x8E
325     DEFINE_GUIDSTRUCT("FFBB6E3F-CCFE-4D84-90D9-421418B03A8E", KSNODETYPE_DRM_DESCRAMBLE);
326     #define KSNODETYPE_DRM_DESCRAMBLE DEFINE_GUIDNAMED(KSNODETYPE_DRM_DESCRAMBLE)
327    
328     // General categories
329     #define STATIC_KSCATEGORY_AUDIO \
330     0x6994AD04L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
331     DEFINE_GUIDSTRUCT("6994AD04-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_AUDIO);
332     #define KSCATEGORY_AUDIO DEFINE_GUIDNAMED(KSCATEGORY_AUDIO)
333    
334     #define STATIC_KSCATEGORY_VIDEO \
335     0x6994AD05L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
336     DEFINE_GUIDSTRUCT("6994AD05-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_VIDEO);
337     #define KSCATEGORY_VIDEO DEFINE_GUIDNAMED(KSCATEGORY_VIDEO)
338    
339     #define STATIC_KSCATEGORY_TEXT \
340     0x6994AD06L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
341     DEFINE_GUIDSTRUCT("6994AD06-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_TEXT);
342     #define KSCATEGORY_TEXT DEFINE_GUIDNAMED(KSCATEGORY_TEXT)
343    
344     #define STATIC_KSCATEGORY_NETWORK \
345     0x67C9CC3CL, 0x69C4, 0x11D2, 0x87, 0x59, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
346     DEFINE_GUIDSTRUCT("67C9CC3C-69C4-11D2-8759-00A0C9223196", KSCATEGORY_NETWORK);
347     #define KSCATEGORY_NETWORK DEFINE_GUIDNAMED(KSCATEGORY_NETWORK)
348    
349     #define STATIC_KSCATEGORY_TOPOLOGY \
350     0xDDA54A40L, 0x1E4C, 0x11D1, 0xA0, 0x50, 0x40, 0x57, 0x05, 0xC1, 0x00, 0x00
351     DEFINE_GUIDSTRUCT("DDA54A40-1E4C-11D1-A050-405705C10000", KSCATEGORY_TOPOLOGY);
352     #define KSCATEGORY_TOPOLOGY DEFINE_GUIDNAMED(KSCATEGORY_TOPOLOGY)
353    
354     #define STATIC_KSCATEGORY_VIRTUAL \
355     0x3503EAC4L, 0x1F26, 0x11D1, 0x8A, 0xB0, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
356     DEFINE_GUIDSTRUCT("3503EAC4-1F26-11D1-8AB0-00A0C9223196", KSCATEGORY_VIRTUAL);
357     #define KSCATEGORY_VIRTUAL DEFINE_GUIDNAMED(KSCATEGORY_VIRTUAL)
358    
359     #define STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL \
360     0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
361     DEFINE_GUIDSTRUCT("BF963D80-C559-11D0-8A2B-00A0C9255AC1", KSCATEGORY_ACOUSTIC_ECHO_CANCEL);
362     #define KSCATEGORY_ACOUSTIC_ECHO_CANCEL DEFINE_GUIDNAMED(KSCATEGORY_ACOUSTIC_ECHO_CANCEL)
363    
364    
365     #define STATIC_KSCATEGORY_SYSAUDIO \
366     0xA7C7A5B1L, 0x5AF3, 0x11D1, 0x9C, 0xED, 0x00, 0xA0, 0x24, 0xBF, 0x04, 0x07
367     DEFINE_GUIDSTRUCT("A7C7A5B1-5AF3-11D1-9CED-00A024BF0407", KSCATEGORY_SYSAUDIO);
368     #define KSCATEGORY_SYSAUDIO DEFINE_GUIDNAMED(KSCATEGORY_SYSAUDIO)
369    
370     #define STATIC_KSCATEGORY_WDMAUD \
371     0x3E227E76L, 0x690D, 0x11D2, 0x81, 0x61, 0x00, 0x00, 0xF8, 0x77, 0x5B, 0xF1
372     DEFINE_GUIDSTRUCT("3E227E76-690D-11D2-8161-0000F8775BF1", KSCATEGORY_WDMAUD);
373     #define KSCATEGORY_WDMAUD DEFINE_GUIDNAMED(KSCATEGORY_WDMAUD)
374    
375     #define STATIC_KSCATEGORY_AUDIO_GFX \
376     0x9BAF9572L, 0x340C, 0x11D3, 0xAB, 0xDC, 0x00, 0xA0, 0xC9, 0x0A, 0xB1, 0x6F
377     DEFINE_GUIDSTRUCT("9BAF9572-340C-11D3-ABDC-00A0C90AB16F", KSCATEGORY_AUDIO_GFX);
378     #define KSCATEGORY_AUDIO_GFX DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_GFX)
379    
380     #define STATIC_KSCATEGORY_AUDIO_SPLITTER \
381     0x9EA331FAL, 0xB91B, 0x45F8, 0x92, 0x85, 0xBD, 0x2B, 0xC7, 0x7A, 0xFC, 0xDE
382     DEFINE_GUIDSTRUCT("9EA331FA-B91B-45F8-9285-BD2BC77AFCDE", KSCATEGORY_AUDIO_SPLITTER);
383     #define KSCATEGORY_AUDIO_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_SPLITTER)
384    
385     #define STATIC_KSCATEGORY_SYNTHESIZER STATIC_KSNODETYPE_SYNTHESIZER
386     #define KSCATEGORY_SYNTHESIZER KSNODETYPE_SYNTHESIZER
387    
388     #define STATIC_KSCATEGORY_DRM_DESCRAMBLE STATIC_KSNODETYPE_DRM_DESCRAMBLE
389     #define KSCATEGORY_DRM_DESCRAMBLE KSNODETYPE_DRM_DESCRAMBLE
390    
391     #define STATIC_KSCATEGORY_AUDIO_DEVICE \
392     0xFBF6F530L, 0x07B9, 0x11D2, 0xA7, 0x1E, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88
393     DEFINE_GUIDSTRUCT("FBF6F530-07B9-11D2-A71E-0000F8004788", KSCATEGORY_AUDIO_DEVICE);
394     #define KSCATEGORY_AUDIO_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_DEVICE)
395    
396     #define STATIC_KSCATEGORY_PREFERRED_WAVEOUT_DEVICE \
397     0xD6C5066EL, 0x72C1, 0x11D2, 0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88
398     DEFINE_GUIDSTRUCT("D6C5066E-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_WAVEOUT_DEVICE);
399     #define KSCATEGORY_PREFERRED_WAVEOUT_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_WAVEOUT_DEVICE)
400    
401     #define STATIC_KSCATEGORY_PREFERRED_WAVEIN_DEVICE \
402     0xD6C50671L, 0x72C1, 0x11D2, 0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88
403     DEFINE_GUIDSTRUCT("D6C50671-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_WAVEIN_DEVICE);
404     #define KSCATEGORY_PREFERRED_WAVEIN_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_WAVEIN_DEVICE)
405    
406     #define STATIC_KSCATEGORY_PREFERRED_MIDIOUT_DEVICE \
407     0xD6C50674L, 0x72C1, 0x11D2, 0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88
408     DEFINE_GUIDSTRUCT("D6C50674-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_MIDIOUT_DEVICE);
409     #define KSCATEGORY_PREFERRED_MIDIOUT_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_MIDIOUT_DEVICE)
410    
411     // Special pin category for wdmaud
412    
413     #define STATIC_KSCATEGORY_WDMAUD_USE_PIN_NAME \
414     0x47A4FA20L, 0xA251, 0x11D1, 0xA0, 0x50, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88
415     DEFINE_GUIDSTRUCT("47A4FA20-A251-11D1-A050-0000F8004788", KSCATEGORY_WDMAUD_USE_PIN_NAME);
416     #define KSCATEGORY_WDMAUD_USE_PIN_NAME DEFINE_GUIDNAMED(KSCATEGORY_WDMAUD_USE_PIN_NAME)
417    
418     // Escalante Platform Interface
419    
420     #define STATIC_KSCATEGORY_ESCALANTE_PLATFORM_DRIVER \
421     0x74f3aea8L, 0x9768, 0x11d1, 0x8e, 0x07, 0x00, 0xa0, 0xc9, 0x5e, 0xc2, 0x2e
422     DEFINE_GUIDSTRUCT("74f3aea8-9768-11d1-8e07-00a0c95ec22e", KSCATEGORY_ESCALANTE_PLATFORM_DRIVER);
423     #define KSCATEGORY_ESCALANTE_PLATFORM_DRIVER DEFINE_GUIDNAMED(KSCATEGORY_ESCALANTE_PLATFORM_DRIVER)
424    
425     // -- major types ---
426    
427     // 'vids' == MEDIATYPE_Video,
428     #define STATIC_KSDATAFORMAT_TYPE_VIDEO\
429     0x73646976L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
430     DEFINE_GUIDSTRUCT("73646976-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_VIDEO);
431     #define KSDATAFORMAT_TYPE_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VIDEO)
432    
433     // 'auds' == MEDIATYPE_Audio
434     #define STATIC_KSDATAFORMAT_TYPE_AUDIO\
435     0x73647561L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
436     DEFINE_GUIDSTRUCT("73647561-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_AUDIO);
437     #define KSDATAFORMAT_TYPE_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUDIO)
438    
439     // 'txts' == MEDIATYPE_Text
440     #define STATIC_KSDATAFORMAT_TYPE_TEXT\
441     0x73747874L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
442     DEFINE_GUIDSTRUCT("73747874-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_TEXT);
443     #define KSDATAFORMAT_TYPE_TEXT DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_TEXT)
444    
445     #if !defined( DEFINE_WAVEFORMATEX_GUID )
446     #define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
447     #endif
448    
449     #define STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX\
450     0x00000000L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
451     DEFINE_GUIDSTRUCT("00000000-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_WAVEFORMATEX);
452     #define KSDATAFORMAT_SUBTYPE_WAVEFORMATEX DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_WAVEFORMATEX)
453    
454     #define INIT_WAVEFORMATEX_GUID(Guid, x)\
455     {\
456     *(Guid) = KSDATAFORMAT_SUBTYPE_WAVEFORMATEX;\
457     (Guid)->Data1 = (USHORT)(x);\
458     }
459    
460     #define EXTRACT_WAVEFORMATEX_ID(Guid)\
461     (USHORT)((Guid)->Data1)
462    
463     #define IS_VALID_WAVEFORMATEX_GUID(Guid)\
464     (!memcmp(((PUSHORT)&KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1, sizeof(GUID) - sizeof(USHORT)))
465    
466     #if !defined(INIT_MMREG_MID)
467     //{d5a47fa7-6d98-11d1-a21a-00a0c9223196}
468     #define INIT_MMREG_MID(guid, id)\
469     {\
470     (guid)->Data1 = 0xd5a47fa7 + (USHORT)(id);\
471     (guid)->Data2 = 0x6d98;\
472     (guid)->Data3 = 0x11d1;\
473     (guid)->Data4[0] = 0xa2;\
474     (guid)->Data4[1] = 0x1a;\
475     (guid)->Data4[2] = 0x00;\
476     (guid)->Data4[3] = 0xa0;\
477     (guid)->Data4[4] = 0xc9;\
478     (guid)->Data4[5] = 0x22;\
479     (guid)->Data4[6] = 0x31;\
480     (guid)->Data4[7] = 0x96;\
481     }
482     #define EXTRACT_MMREG_MID(guid)\
483     (USHORT)((guid)->Data1 - 0xd5a47fa7)
484     #define DEFINE_MMREG_MID_GUID(id)\
485     0xd5a47fa7+(USHORT)(id), 0x6d98, 0x11d1, 0xa2, 0x1a, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96
486    
487     #define IS_COMPATIBLE_MMREG_MID(guid)\
488     (((guid)->Data1 >= 0xd5a47fa7) &&\
489     ((guid)->Data1 < 0xd5a47fa7 + 0xffff) &&\
490     ((guid)->Data2 == 0x6d98) &&\
491     ((guid)->Data3 == 0x11d1) &&\
492     ((guid)->Data4[0] == 0xa2) &&\
493     ((guid)->Data4[1] == 0x1a) &&\
494     ((guid)->Data4[2] == 0x00) &&\
495     ((guid)->Data4[3] == 0xa0) &&\
496     ((guid)->Data4[4] == 0xc9) &&\
497     ((guid)->Data4[5] == 0x22) &&\
498     ((guid)->Data4[6] == 0x31) &&\
499     ((guid)->Data4[7] == 0x96))
500     #endif // !defined(INIT_MMREG_MID)
501    
502     #if !defined(INIT_MMREG_PID)
503     //{e36dc2ac-6d9a-11d1-a21a-00a0c9223196}
504     #define INIT_MMREG_PID(guid, id)\
505     {\
506     (guid)->Data1 = 0xe36dc2ac + (USHORT)(id);\
507     (guid)->Data2 = 0x6d9a;\
508     (guid)->Data3 = 0x11d1;\
509     (guid)->Data4[0] = 0xa2;\
510     (guid)->Data4[1] = 0x1a;\
511     (guid)->Data4[2] = 0x00;\
512     (guid)->Data4[3] = 0xa0;\
513     (guid)->Data4[4] = 0xc9;\
514     (guid)->Data4[5] = 0x22;\
515     (guid)->Data4[6] = 0x31;\
516     (guid)->Data4[7] = 0x96;\
517     }
518     #define EXTRACT_MMREG_PID(guid)\
519     (USHORT)((guid)->Data1 - 0xe36dc2ac)
520     #define DEFINE_MMREG_PID_GUID(id)\
521     0xe36dc2ac+(USHORT)(id), 0x6d9a, 0x11d1, 0xa2, 0x1a, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96
522    
523     #define IS_COMPATIBLE_MMREG_PID(guid)\
524     (((guid)->Data1 >= 0xe36dc2ac) &&\
525     ((guid)->Data1 < 0xe36dc2ac + 0xffff) &&\
526     ((guid)->Data2 == 0x6d9a) &&\
527     ((guid)->Data3 == 0x11d1) &&\
528     ((guid)->Data4[0] == 0xa2) &&\
529     ((guid)->Data4[1] == 0x1a) &&\
530     ((guid)->Data4[2] == 0x00) &&\
531     ((guid)->Data4[3] == 0xa0) &&\
532     ((guid)->Data4[4] == 0xc9) &&\
533     ((guid)->Data4[5] == 0x22) &&\
534     ((guid)->Data4[6] == 0x31) &&\
535     ((guid)->Data4[7] == 0x96))
536     #endif // !defined(INIT_MMREG_PID)
537    
538     #define STATIC_KSDATAFORMAT_SUBTYPE_ANALOG\
539     0x6dba3190L, 0x67bd, 0x11cf, 0xa0, 0xf7, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4
540     DEFINE_GUIDSTRUCT("6dba3190-67bd-11cf-a0f7-0020afd156e4", KSDATAFORMAT_SUBTYPE_ANALOG);
541     #define KSDATAFORMAT_SUBTYPE_ANALOG DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ANALOG)
542    
543     #define STATIC_KSDATAFORMAT_SUBTYPE_PCM\
544     DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_PCM)
545     DEFINE_GUIDSTRUCT("00000001-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_PCM);
546     #define KSDATAFORMAT_SUBTYPE_PCM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_PCM)
547    
548     #if defined(_INC_MMREG)
549     #define STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\
550     DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_IEEE_FLOAT)
551     DEFINE_GUIDSTRUCT("00000003-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEEE_FLOAT);
552     #define KSDATAFORMAT_SUBTYPE_IEEE_FLOAT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)
553    
554     #define STATIC_KSDATAFORMAT_SUBTYPE_DRM\
555     DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_DRM)
556     DEFINE_GUIDSTRUCT("00000009-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_DRM);
557     #define KSDATAFORMAT_SUBTYPE_DRM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DRM)
558    
559     #define STATIC_KSDATAFORMAT_SUBTYPE_ALAW\
560     DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_ALAW)
561     DEFINE_GUIDSTRUCT("00000006-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_ALAW);
562     #define KSDATAFORMAT_SUBTYPE_ALAW DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ALAW)
563    
564     #define STATIC_KSDATAFORMAT_SUBTYPE_MULAW\
565     DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_MULAW)
566     DEFINE_GUIDSTRUCT("00000007-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_MULAW);
567     #define KSDATAFORMAT_SUBTYPE_MULAW DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MULAW)
568    
569     #define STATIC_KSDATAFORMAT_SUBTYPE_ADPCM\
570     DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_ADPCM)
571     DEFINE_GUIDSTRUCT("00000002-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_ADPCM);
572     #define KSDATAFORMAT_SUBTYPE_ADPCM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ADPCM)
573    
574     #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG\
575     DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_MPEG)
576     DEFINE_GUIDSTRUCT("00000050-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_MPEG);
577     #define KSDATAFORMAT_SUBTYPE_MPEG DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG)
578     #endif // defined(_INC_MMREG)
579    
580     #define STATIC_KSDATAFORMAT_SPECIFIER_VC_ID\
581     0xAD98D184L, 0xAAC3, 0x11D0, 0xA4, 0x1C, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
582     DEFINE_GUIDSTRUCT("AD98D184-AAC3-11D0-A41C-00A0C9223196", KSDATAFORMAT_SPECIFIER_VC_ID);
583     #define KSDATAFORMAT_SPECIFIER_VC_ID DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VC_ID)
584    
585     #define STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\
586     0x05589f81L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a
587     DEFINE_GUIDSTRUCT("05589f81-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_WAVEFORMATEX);
588     #define KSDATAFORMAT_SPECIFIER_WAVEFORMATEX DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
589    
590     #define STATIC_KSDATAFORMAT_SPECIFIER_DSOUND\
591     0x518590a2L, 0xa184, 0x11d0, 0x85, 0x22, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3
592     DEFINE_GUIDSTRUCT("518590a2-a184-11d0-8522-00c04fd9baf3", KSDATAFORMAT_SPECIFIER_DSOUND);
593     #define KSDATAFORMAT_SPECIFIER_DSOUND DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DSOUND)
594    
595     #if defined(_INC_MMSYSTEM) || defined(_INC_MMREG)
596     #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
597     #include <pshpack1.h>
598     #endif
599     typedef struct {
600     KSDATAFORMAT DataFormat;
601     WAVEFORMATEX WaveFormatEx;
602     } KSDATAFORMAT_WAVEFORMATEX, *PKSDATAFORMAT_WAVEFORMATEX;
603    
604     #ifndef _WAVEFORMATEXTENSIBLE_
605     #define _WAVEFORMATEXTENSIBLE_
606     typedef struct {
607     WAVEFORMATEX Format;
608     union {
609     WORD wValidBitsPerSample; /* bits of precision */
610     WORD wSamplesPerBlock; /* valid if wBitsPerSample==0 */
611     WORD wReserved; /* If neither applies, set to zero. */
612     } Samples;
613     DWORD dwChannelMask; /* which channels are */
614     /* present in stream */
615     GUID SubFormat;
616     } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
617     #endif // !_WAVEFORMATEXTENSIBLE_
618    
619     #if !defined(WAVE_FORMAT_EXTENSIBLE)
620     #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
621     #endif // !defined(WAVE_FORMAT_EXTENSIBLE)
622    
623     // DirectSound buffer description
624     typedef struct {
625     ULONG Flags;
626     ULONG Control;
627     WAVEFORMATEX WaveFormatEx;
628     } KSDSOUND_BUFFERDESC, *PKSDSOUND_BUFFERDESC;
629    
630     // DirectSound format
631     typedef struct {
632     KSDATAFORMAT DataFormat;
633     KSDSOUND_BUFFERDESC BufferDesc;
634     } KSDATAFORMAT_DSOUND, *PKSDATAFORMAT_DSOUND;
635    
636     #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
637     #include <poppack.h>
638     #endif
639     #endif // defined(_INC_MMSYSTEM) || defined(_INC_MMREG)
640    
641    
642    
643     // DirectSound buffer flags
644     #define KSDSOUND_BUFFER_PRIMARY 0x00000001
645     #define KSDSOUND_BUFFER_STATIC 0x00000002
646     #define KSDSOUND_BUFFER_LOCHARDWARE 0x00000004
647     #define KSDSOUND_BUFFER_LOCSOFTWARE 0x00000008
648    
649     // DirectSound buffer control flags
650     #define KSDSOUND_BUFFER_CTRL_3D 0x00000001
651     #define KSDSOUND_BUFFER_CTRL_FREQUENCY 0x00000002
652     #define KSDSOUND_BUFFER_CTRL_PAN 0x00000004
653     #define KSDSOUND_BUFFER_CTRL_VOLUME 0x00000008
654     #define KSDSOUND_BUFFER_CTRL_POSITIONNOTIFY 0x00000010
655    
656     #define KSDSOUND_BUFFER_CTRL_HRTF_3D 0x40000000
657    
658     typedef struct {
659     #if defined(_NTDDK_)
660     ULONGLONG PlayOffset;
661     ULONGLONG WriteOffset;
662     #else // !_NTDDK_
663     DWORDLONG PlayOffset;
664     DWORDLONG WriteOffset;
665     #endif // !_NTDDK_
666     } KSAUDIO_POSITION, *PKSAUDIO_POSITION;
667    
668     // DirectSound3D FIR context
669     typedef struct {
670     LONG Channel;
671     FLOAT VolSmoothScale;
672     FLOAT TotalDryAttenuation;
673     FLOAT TotalWetAttenuation;
674     LONG SmoothFrequency;
675     LONG Delay;
676     } KSDS3D_ITD_PARAMS, *PKSDS3D_ITD_PARAMS;
677    
678     typedef struct {
679     ULONG Enabled;
680     KSDS3D_ITD_PARAMS LeftParams;
681     KSDS3D_ITD_PARAMS RightParams;
682     ULONG Reserved;
683     } KSDS3D_ITD_PARAMS_MSG, *PKSDS3D_ITD_PARAMS_MSG;
684    
685     // DirectSound3D HRTF messages
686    
687     typedef struct {
688     ULONG Size; // This is the size of the struct in bytes
689     ULONG Enabled;
690     BOOL SwapChannels;
691     BOOL ZeroAzimuth;
692     BOOL CrossFadeOutput;
693     ULONG FilterSize; // This is the additional size of the filter coeff in bytes
694     } KSDS3D_HRTF_PARAMS_MSG, *PKSDS3D_HRTF_PARAMS_MSG;
695    
696    
697     // HRTF filter quality levels
698     typedef enum {
699     FULL_FILTER,
700     LIGHT_FILTER,
701     KSDS3D_FILTER_QUALITY_COUNT
702     } KSDS3D_HRTF_FILTER_QUALITY;
703    
704     typedef struct {
705     ULONG Size; // This is the size of the struct in bytes
706     KSDS3D_HRTF_FILTER_QUALITY Quality;
707     FLOAT SampleRate;
708     ULONG MaxFilterSize;
709     ULONG FilterTransientMuteLength;
710     ULONG FilterOverlapBufferLength;
711     ULONG OutputOverlapBufferLength;
712     ULONG Reserved;
713     } KSDS3D_HRTF_INIT_MSG, *PKSDS3D_HRTF_INIT_MSG;
714    
715     // Coefficient formats
716     typedef enum {
717     FLOAT_COEFF,
718     SHORT_COEFF,
719     KSDS3D_COEFF_COUNT
720     } KSDS3D_HRTF_COEFF_FORMAT;
721    
722     // Filter methods
723     typedef enum {
724     DIRECT_FORM,
725     CASCADE_FORM,
726     KSDS3D_FILTER_METHOD_COUNT
727     } KSDS3D_HRTF_FILTER_METHOD;
728    
729     // Filter methods
730     typedef enum {
731     DS3D_HRTF_VERSION_1
732     } KSDS3D_HRTF_FILTER_VERSION;
733    
734     typedef struct {
735     KSDS3D_HRTF_FILTER_METHOD FilterMethod;
736     KSDS3D_HRTF_COEFF_FORMAT CoeffFormat;
737     KSDS3D_HRTF_FILTER_VERSION Version;
738     ULONG Reserved;
739     } KSDS3D_HRTF_FILTER_FORMAT_MSG, *PKSDS3D_HRTF_FILTER_FORMAT_MSG;
740    
741     //===========================================================================
742     // DirectSound3D HAL
743    
744    
745     typedef struct _DS3DVECTOR {
746     union {
747     FLOAT x;
748     FLOAT dvX;
749     };
750     union {
751     FLOAT y;
752     FLOAT dvY;
753     };
754     union {
755     FLOAT z;
756     FLOAT dvZ;
757     };
758     } DS3DVECTOR, *PDS3DVECTOR;
759    
760    
761     //===========================================================================
762     //===========================================================================
763    
764     // KSPROPSETID_DirectSound3DListener : {437B3414-D060-11d0-8583-00C04FD9BAF3}
765    
766     #define STATIC_KSPROPSETID_DirectSound3DListener\
767     0x437b3414L, 0xd060, 0x11d0, 0x85, 0x83, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3
768     DEFINE_GUIDSTRUCT("437b3414-d060-11d0-8583-00c04fd9baf3",KSPROPSETID_DirectSound3DListener);
769     #define KSPROPSETID_DirectSound3DListener DEFINE_GUIDNAMED(KSPROPSETID_DirectSound3DListener)
770    
771     typedef enum {
772     KSPROPERTY_DIRECTSOUND3DLISTENER_ALL,
773     KSPROPERTY_DIRECTSOUND3DLISTENER_POSITION,
774     KSPROPERTY_DIRECTSOUND3DLISTENER_VELOCITY,
775     KSPROPERTY_DIRECTSOUND3DLISTENER_ORIENTATION,
776     KSPROPERTY_DIRECTSOUND3DLISTENER_DISTANCEFACTOR,
777     KSPROPERTY_DIRECTSOUND3DLISTENER_ROLLOFFFACTOR,
778     KSPROPERTY_DIRECTSOUND3DLISTENER_DOPPLERFACTOR,
779     KSPROPERTY_DIRECTSOUND3DLISTENER_BATCH,
780     KSPROPERTY_DIRECTSOUND3DLISTENER_ALLOCATION
781     } KSPROPERTY_DIRECTSOUND3DLISTENER;
782    
783     typedef struct {
784     DS3DVECTOR Position;
785     DS3DVECTOR Velocity;
786     DS3DVECTOR OrientFront;
787     DS3DVECTOR OrientTop;
788     FLOAT DistanceFactor;
789     FLOAT RolloffFactor;
790     FLOAT DopplerFactor;
791     } KSDS3D_LISTENER_ALL, *PKSDS3D_LISTENER_ALL;
792    
793     typedef struct {
794     DS3DVECTOR Front;
795     DS3DVECTOR Top;
796     } KSDS3D_LISTENER_ORIENTATION, *PKSDS3D_LISTENER_ORIENTATION;
797    
798    
799     //===========================================================================
800     //===========================================================================
801     // KSPROPSETID_DirectSound3DBuffer : {437B3411-D060-11d0-8583-00C04FD9BAF3}
802    
803     #define STATIC_KSPROPSETID_DirectSound3DBuffer\
804     0x437b3411L, 0xd060, 0x11d0, 0x85, 0x83, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3
805     DEFINE_GUIDSTRUCT("437b3411-d060-11d0-8583-00c04fd9baf3", KSPROPSETID_DirectSound3DBuffer);
806     #define KSPROPSETID_DirectSound3DBuffer DEFINE_GUIDNAMED(KSPROPSETID_DirectSound3DBuffer)
807    
808    
809     typedef enum {
810     KSPROPERTY_DIRECTSOUND3DBUFFER_ALL,
811     KSPROPERTY_DIRECTSOUND3DBUFFER_POSITION,
812     KSPROPERTY_DIRECTSOUND3DBUFFER_VELOCITY,
813     KSPROPERTY_DIRECTSOUND3DBUFFER_CONEANGLES,
814     KSPROPERTY_DIRECTSOUND3DBUFFER_CONEORIENTATION,
815     KSPROPERTY_DIRECTSOUND3DBUFFER_CONEOUTSIDEVOLUME,
816     KSPROPERTY_DIRECTSOUND3DBUFFER_MINDISTANCE,
817     KSPROPERTY_DIRECTSOUND3DBUFFER_MAXDISTANCE,
818     KSPROPERTY_DIRECTSOUND3DBUFFER_MODE
819     } KSPROPERTY_DIRECTSOUND3DBUFFER;
820    
821    
822     typedef struct {
823     DS3DVECTOR Position;
824     DS3DVECTOR Velocity;
825     ULONG InsideConeAngle;
826     ULONG OutsideConeAngle;
827     DS3DVECTOR ConeOrientation;
828     LONG ConeOutsideVolume;
829     FLOAT MinDistance;
830     FLOAT MaxDistance;
831     ULONG Mode;
832     } KSDS3D_BUFFER_ALL, *PKSDS3D_BUFFER_ALL;
833    
834     typedef struct {
835     ULONG InsideConeAngle;
836     ULONG OutsideConeAngle;
837     } KSDS3D_BUFFER_CONE_ANGLES, *PKSDS3D_BUFFER_CONE_ANGLES;
838    
839     #define KSAUDIO_STEREO_SPEAKER_GEOMETRY_HEADPHONE (-1)
840     #define KSAUDIO_STEREO_SPEAKER_GEOMETRY_MIN 5
841     #define KSAUDIO_STEREO_SPEAKER_GEOMETRY_NARROW 10
842     #define KSAUDIO_STEREO_SPEAKER_GEOMETRY_WIDE 20
843     #define KSAUDIO_STEREO_SPEAKER_GEOMETRY_MAX 180
844    
845     #define KSDSOUND_3D_MODE_NORMAL 0x00000000
846     #define KSDSOUND_3D_MODE_HEADRELATIVE 0x00000001
847     #define KSDSOUND_3D_MODE_DISABLE 0x00000002
848    
849     typedef struct {
850     KSDATARANGE DataRange;
851     ULONG MaximumChannels;
852     ULONG MinimumBitsPerSample;
853     ULONG MaximumBitsPerSample;
854     ULONG MinimumSampleFrequency;
855     ULONG MaximumSampleFrequency;
856     } KSDATARANGE_AUDIO, *PKSDATARANGE_AUDIO;
857    
858     //---------------------------------------------------------------------------
859    
860     #define STATIC_KSDATAFORMAT_SUBTYPE_RIFF\
861     0x4995DAEEL, 0x9EE6, 0x11D0, 0xA4, 0x0E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
862     DEFINE_GUIDSTRUCT("4995DAEE-9EE6-11D0-A40E-00A0C9223196", KSDATAFORMAT_SUBTYPE_RIFF);
863     #define KSDATAFORMAT_SUBTYPE_RIFF DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFF)
864    
865     #define STATIC_KSDATAFORMAT_SUBTYPE_RIFFWAVE\
866     0xe436eb8bL, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
867     DEFINE_GUIDSTRUCT("e436eb8b-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_RIFFWAVE);
868     #define KSDATAFORMAT_SUBTYPE_RIFFWAVE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFFWAVE)
869    
870     //===========================================================================
871     //===========================================================================
872    
873     #define STATIC_KSPROPSETID_Bibliographic \
874     0x07BA150EL, 0xE2B1, 0x11D0, 0xAC, 0x17, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
875     DEFINE_GUIDSTRUCT("07BA150E-E2B1-11D0-AC17-00A0C9223196", KSPROPSETID_Bibliographic);
876     #define KSPROPSETID_Bibliographic DEFINE_GUIDNAMED(KSPROPSETID_Bibliographic)
877    
878     //Repeatable tags contain all entries within the property, each preceeded by length
879     typedef enum {
880     KSPROPERTY_BIBLIOGRAPHIC_LEADER = 'RDL ',
881     KSPROPERTY_BIBLIOGRAPHIC_LCCN = '010 ',
882     KSPROPERTY_BIBLIOGRAPHIC_ISBN = '020 ',
883     KSPROPERTY_BIBLIOGRAPHIC_ISSN = '220 ',
884     KSPROPERTY_BIBLIOGRAPHIC_CATALOGINGSOURCE = '040 ',
885     KSPROPERTY_BIBLIOGRAPHIC_MAINPERSONALNAME = '001 ',
886     KSPROPERTY_BIBLIOGRAPHIC_MAINCORPORATEBODY = '011 ',
887     KSPROPERTY_BIBLIOGRAPHIC_MAINMEETINGNAME = '111 ',
888     KSPROPERTY_BIBLIOGRAPHIC_MAINUNIFORMTITLE = '031 ',
889     KSPROPERTY_BIBLIOGRAPHIC_UNIFORMTITLE = '042 ',
890     KSPROPERTY_BIBLIOGRAPHIC_TITLESTATEMENT = '542 ',
891     KSPROPERTY_BIBLIOGRAPHIC_VARYINGFORMTITLE = '642 ',
892     KSPROPERTY_BIBLIOGRAPHIC_PUBLICATION = '062 ',
893     KSPROPERTY_BIBLIOGRAPHIC_PHYSICALDESCRIPTION = '003 ',
894     KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTITLE = '044 ',
895     KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENT = '094 ',
896     KSPROPERTY_BIBLIOGRAPHIC_GENERALNOTE = '005 ',
897     KSPROPERTY_BIBLIOGRAPHIC_BIBLIOGRAPHYNOTE = '405 ',
898     KSPROPERTY_BIBLIOGRAPHIC_CONTENTSNOTE = '505 ',
899     KSPROPERTY_BIBLIOGRAPHIC_CREATIONCREDIT = '805 ',
900     KSPROPERTY_BIBLIOGRAPHIC_CITATION = '015 ',
901     KSPROPERTY_BIBLIOGRAPHIC_PARTICIPANT = '115 ',
902     KSPROPERTY_BIBLIOGRAPHIC_SUMMARY = '025 ',
903     KSPROPERTY_BIBLIOGRAPHIC_TARGETAUDIENCE = '125 ',
904     KSPROPERTY_BIBLIOGRAPHIC_ADDEDFORMAVAILABLE = '035 ',
905     KSPROPERTY_BIBLIOGRAPHIC_SYSTEMDETAILS = '835 ',
906     KSPROPERTY_BIBLIOGRAPHIC_AWARDS = '685 ',
907     KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYPERSONALNAME = '006 ',
908     KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTOPICALTERM = '056 ',
909     KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYGEOGRAPHIC = '156 ',
910     KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMGENRE = '556 ',
911     KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMCURRICULUM = '856 ',
912     KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYUNIFORMTITLE = '037 ',
913     KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYRELATED = '047 ',
914     KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTPERSONALNAME = '008 ',
915     KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTUNIFORMTITLE = '038 '
916     } KSPROPERTY_BIBLIOGRAPHIC;
917    
918     #define STATIC_KSPROPSETID_TopologyNode\
919     0x45FFAAA1L, 0x6E1B, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00
920     DEFINE_GUIDSTRUCT("45FFAAA1-6E1B-11D0-BCF2-444553540000", KSPROPSETID_TopologyNode);
921     #define KSPROPSETID_TopologyNode DEFINE_GUIDNAMED(KSPROPSETID_TopologyNode)
922    
923     typedef enum {
924     KSPROPERTY_TOPOLOGYNODE_ENABLE = 1,
925     KSPROPERTY_TOPOLOGYNODE_RESET
926     } KSPROPERTY_TOPOLOGYNODE;
927    
928     //===========================================================================
929     #define STATIC_KSPROPSETID_DrmAudioStream\
930     0x2f2c8ddd, 0x4198, 0x4fac, 0xba, 0x29, 0x61, 0xbb, 0x5, 0xb7, 0xde, 0x6
931     DEFINE_GUIDSTRUCT("2F2C8DDD-4198-4fac-BA29-61BB05B7DE06", KSPROPSETID_DrmAudioStream);
932     #define KSPROPSETID_DrmAudioStream DEFINE_GUIDNAMED(KSPROPSETID_DrmAudioStream)
933    
934     typedef enum {
935     KSPROPERTY_DRMAUDIOSTREAM_CONTENTID,
936     KSPROPERTY_DRMAUDIOSTREAM_AUTHENTICATEFUNCTION
937     } KSPROPERTY_DRMAUDIOSTREAM;
938    
939     //===========================================================================
940     #define STATIC_KSPROPSETID_Audio\
941     0x45FFAAA0L, 0x6E1B, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00
942     DEFINE_GUIDSTRUCT("45FFAAA0-6E1B-11D0-BCF2-444553540000", KSPROPSETID_Audio);
943     #define KSPROPSETID_Audio DEFINE_GUIDNAMED(KSPROPSETID_Audio)
944    
945     typedef enum {
946     KSPROPERTY_AUDIO_LATENCY = 1,
947     KSPROPERTY_AUDIO_COPY_PROTECTION,
948     KSPROPERTY_AUDIO_CHANNEL_CONFIG,
949     KSPROPERTY_AUDIO_VOLUMELEVEL,
950     KSPROPERTY_AUDIO_POSITION,
951     KSPROPERTY_AUDIO_DYNAMIC_RANGE,
952     KSPROPERTY_AUDIO_QUALITY,
953     KSPROPERTY_AUDIO_SAMPLING_RATE,
954     KSPROPERTY_AUDIO_DYNAMIC_SAMPLING_RATE,
955     KSPROPERTY_AUDIO_MIX_LEVEL_TABLE,
956     KSPROPERTY_AUDIO_MIX_LEVEL_CAPS,
957     KSPROPERTY_AUDIO_MUX_SOURCE,
958     KSPROPERTY_AUDIO_MUTE,
959     KSPROPERTY_AUDIO_BASS,
960     KSPROPERTY_AUDIO_MID,
961     KSPROPERTY_AUDIO_TREBLE,
962     KSPROPERTY_AUDIO_BASS_BOOST,
963     KSPROPERTY_AUDIO_EQ_LEVEL,
964     KSPROPERTY_AUDIO_NUM_EQ_BANDS,
965     KSPROPERTY_AUDIO_EQ_BANDS,
966     KSPROPERTY_AUDIO_AGC,
967     KSPROPERTY_AUDIO_DELAY,
968     KSPROPERTY_AUDIO_LOUDNESS,
969     KSPROPERTY_AUDIO_WIDE_MODE,
970     KSPROPERTY_AUDIO_WIDENESS,
971     KSPROPERTY_AUDIO_REVERB_LEVEL,
972     KSPROPERTY_AUDIO_CHORUS_LEVEL,
973     KSPROPERTY_AUDIO_DEV_SPECIFIC,
974     KSPROPERTY_AUDIO_DEMUX_DEST,
975     KSPROPERTY_AUDIO_STEREO_ENHANCE,
976     KSPROPERTY_AUDIO_MANUFACTURE_GUID,
977     KSPROPERTY_AUDIO_PRODUCT_GUID,
978     KSPROPERTY_AUDIO_CPU_RESOURCES,
979     KSPROPERTY_AUDIO_STEREO_SPEAKER_GEOMETRY,
980     KSPROPERTY_AUDIO_SURROUND_ENCODE,
981     KSPROPERTY_AUDIO_3D_INTERFACE,
982     KSPROPERTY_AUDIO_PEAKMETER,
983     KSPROPERTY_AUDIO_ALGORITHM_INSTANCE
984     } KSPROPERTY_AUDIO;
985    
986     // Audio quality constants
987     #define KSAUDIO_QUALITY_WORST 0x0
988     #define KSAUDIO_QUALITY_PC 0x1
989     #define KSAUDIO_QUALITY_BASIC 0x2
990     #define KSAUDIO_QUALITY_ADVANCED 0x3
991    
992     // Audio CPU resource constants
993     #define KSAUDIO_CPU_RESOURCES_NOT_HOST_CPU 0x00000000
994     #define KSAUDIO_CPU_RESOURCES_HOST_CPU 0x7FFFFFFF
995    
996     typedef struct {
997     BOOL fCopyrighted;
998     BOOL fOriginal;
999     } KSAUDIO_COPY_PROTECTION, *PKSAUDIO_COPY_PROTECTION;
1000    
1001     typedef struct {
1002     LONG ActiveSpeakerPositions;
1003     } KSAUDIO_CHANNEL_CONFIG, *PKSAUDIO_CHANNEL_CONFIG;
1004    
1005     // Speaker Positions:
1006     #define SPEAKER_FRONT_LEFT 0x1
1007     #define SPEAKER_FRONT_RIGHT 0x2
1008     #define SPEAKER_FRONT_CENTER 0x4
1009     #define SPEAKER_LOW_FREQUENCY 0x8
1010     #define SPEAKER_BACK_LEFT 0x10
1011     #define SPEAKER_BACK_RIGHT 0x20
1012     #define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
1013     #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
1014     #define SPEAKER_BACK_CENTER 0x100
1015     #define SPEAKER_SIDE_LEFT 0x200
1016     #define SPEAKER_SIDE_RIGHT 0x400
1017     #define SPEAKER_TOP_CENTER 0x800
1018     #define SPEAKER_TOP_FRONT_LEFT 0x1000
1019     #define SPEAKER_TOP_FRONT_CENTER 0x2000
1020     #define SPEAKER_TOP_FRONT_RIGHT 0x4000
1021     #define SPEAKER_TOP_BACK_LEFT 0x8000
1022     #define SPEAKER_TOP_BACK_CENTER 0x10000
1023     #define SPEAKER_TOP_BACK_RIGHT 0x20000
1024    
1025     // Bit mask locations reserved for future use
1026     #define SPEAKER_RESERVED 0x7FFC0000
1027    
1028     // Used to specify that any possible permutation of speaker configurations
1029     #define SPEAKER_ALL 0x80000000
1030    
1031     // DirectSound Speaker Config
1032     #define KSAUDIO_SPEAKER_MONO (SPEAKER_FRONT_CENTER)
1033     #define KSAUDIO_SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT)
1034     #define KSAUDIO_SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1035     SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
1036     #define KSAUDIO_SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1037     SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER)
1038     #define KSAUDIO_SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1039     SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
1040     SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT)
1041     #define KSAUDIO_SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \
1042     SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \
1043     SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \
1044     SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER)
1045    
1046     // DVD Speaker Positions
1047     #define KSAUDIO_SPEAKER_GROUND_FRONT_LEFT SPEAKER_FRONT_LEFT
1048     #define KSAUDIO_SPEAKER_GROUND_FRONT_CENTER SPEAKER_FRONT_CENTER
1049     #define KSAUDIO_SPEAKER_GROUND_FRONT_RIGHT SPEAKER_FRONT_RIGHT
1050     #define KSAUDIO_SPEAKER_GROUND_REAR_LEFT SPEAKER_BACK_LEFT
1051     #define KSAUDIO_SPEAKER_GROUND_REAR_RIGHT SPEAKER_BACK_RIGHT
1052     #define KSAUDIO_SPEAKER_TOP_MIDDLE SPEAKER_TOP_CENTER
1053     #define KSAUDIO_SPEAKER_SUPER_WOOFER SPEAKER_LOW_FREQUENCY
1054    
1055     typedef struct {
1056     ULONG QuietCompression;
1057     ULONG LoudCompression;
1058     } KSAUDIO_DYNAMIC_RANGE, *PKSAUDIO_DYNAMIC_RANGE;
1059    
1060     typedef struct {
1061     BOOL Mute;
1062     LONG Level;
1063     } KSAUDIO_MIXLEVEL, *PKSAUDIO_MIXLEVEL;
1064    
1065     typedef struct {
1066     BOOL Mute;
1067     LONG Minimum;
1068     LONG Maximum;
1069     LONG Reset;
1070     } KSAUDIO_MIX_CAPS, *PKSAUDIO_MIX_CAPS;
1071    
1072     typedef struct {
1073     ULONG InputChannels;
1074     ULONG OutputChannels;
1075     KSAUDIO_MIX_CAPS Capabilities[1];
1076     } KSAUDIO_MIXCAP_TABLE, *PKSAUDIO_MIXCAP_TABLE;
1077    
1078     typedef enum {
1079     SE_TECH_NONE,
1080     SE_TECH_ANALOG_DEVICES_PHAT,
1081     SE_TECH_CREATIVE,
1082     SE_TECH_NATIONAL_SEMI,
1083     SE_TECH_YAMAHA_YMERSION,
1084     SE_TECH_BBE,
1085     SE_TECH_CRYSTAL_SEMI,
1086     SE_TECH_QSOUND_QXPANDER,
1087     SE_TECH_SPATIALIZER,
1088     SE_TECH_SRS,
1089     SE_TECH_PLATFORM_TECH,
1090     SE_TECH_AKM,
1091     SE_TECH_AUREAL,
1092     SE_TECH_AZTECH,
1093     SE_TECH_BINAURA,
1094     SE_TECH_ESS_TECH,
1095     SE_TECH_HARMAN_VMAX,
1096     SE_TECH_NVIDEA,
1097     SE_TECH_PHILIPS_INCREDIBLE,
1098     SE_TECH_TEXAS_INST,
1099     SE_TECH_VLSI_TECH
1100     } SE_TECHNIQUE;
1101    
1102     typedef struct {
1103     SE_TECHNIQUE Technique;
1104     ULONG Center;
1105     ULONG Depth;
1106     ULONG Reserved;
1107     } KSAUDIO_STEREO_ENHANCE, *PKSAUDIO_STEREO_ENHANCE;
1108    
1109     //===========================================================================
1110     // Topology Node Type GUIDs
1111    
1112     #define STATIC_KSNODETYPE_DAC\
1113     0x507AE360L, 0xC554, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1114     DEFINE_GUIDSTRUCT("507AE360-C554-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DAC);
1115     #define KSNODETYPE_DAC DEFINE_GUIDNAMED(KSNODETYPE_DAC)
1116    
1117     #define STATIC_KSNODETYPE_ADC\
1118     0x4D837FE0L, 0xC555, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1119     DEFINE_GUIDSTRUCT("4D837FE0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_ADC);
1120     #define KSNODETYPE_ADC DEFINE_GUIDNAMED(KSNODETYPE_ADC)
1121    
1122     #define STATIC_KSNODETYPE_SRC\
1123     0x9DB7B9E0L, 0xC555, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1124     DEFINE_GUIDSTRUCT("9DB7B9E0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SRC);
1125     #define KSNODETYPE_SRC DEFINE_GUIDNAMED(KSNODETYPE_SRC)
1126    
1127     #define STATIC_KSNODETYPE_SUPERMIX\
1128     0xE573ADC0L, 0xC555, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1129     DEFINE_GUIDSTRUCT("E573ADC0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SUPERMIX);
1130     #define KSNODETYPE_SUPERMIX DEFINE_GUIDNAMED(KSNODETYPE_SUPERMIX)
1131    
1132     #define STATIC_KSNODETYPE_MUX\
1133     0x2CEAF780L, 0xC556, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1134     DEFINE_GUIDSTRUCT("2CEAF780-C556-11D0-8A2B-00A0C9255AC1", KSNODETYPE_MUX);
1135     #define KSNODETYPE_MUX DEFINE_GUIDNAMED(KSNODETYPE_MUX)
1136    
1137     #define STATIC_KSNODETYPE_DEMUX\
1138     0xC0EB67D4L, 0xE807, 0x11D0, 0x95, 0x8A, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1139     DEFINE_GUIDSTRUCT("C0EB67D4-E807-11D0-958A-00C04FB925D3", KSNODETYPE_DEMUX);
1140     #define KSNODETYPE_DEMUX DEFINE_GUIDNAMED(KSNODETYPE_DEMUX)
1141    
1142     #define STATIC_KSNODETYPE_SUM\
1143     0xDA441A60L, 0xC556, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1144     DEFINE_GUIDSTRUCT("DA441A60-C556-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SUM);
1145     #define KSNODETYPE_SUM DEFINE_GUIDNAMED(KSNODETYPE_SUM)
1146    
1147     #define STATIC_KSNODETYPE_MUTE\
1148     0x02B223C0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1149     DEFINE_GUIDSTRUCT("02B223C0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_MUTE);
1150     #define KSNODETYPE_MUTE DEFINE_GUIDNAMED(KSNODETYPE_MUTE)
1151    
1152     #define STATIC_KSNODETYPE_VOLUME\
1153     0x3A5ACC00L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1154     DEFINE_GUIDSTRUCT("3A5ACC00-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_VOLUME);
1155     #define KSNODETYPE_VOLUME DEFINE_GUIDNAMED(KSNODETYPE_VOLUME)
1156    
1157     #define STATIC_KSNODETYPE_TONE\
1158     0x7607E580L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1159     DEFINE_GUIDSTRUCT("7607E580-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_TONE);
1160     #define KSNODETYPE_TONE DEFINE_GUIDNAMED(KSNODETYPE_TONE)
1161    
1162     #define STATIC_KSNODETYPE_EQUALIZER\
1163     0x9D41B4A0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1164     DEFINE_GUIDSTRUCT("9D41B4A0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_EQUALIZER);
1165     #define KSNODETYPE_EQUALIZER DEFINE_GUIDNAMED(KSNODETYPE_EQUALIZER)
1166    
1167     #define STATIC_KSNODETYPE_AGC\
1168     0xE88C9BA0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1169     DEFINE_GUIDSTRUCT("E88C9BA0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_AGC);
1170     #define KSNODETYPE_AGC DEFINE_GUIDNAMED(KSNODETYPE_AGC)
1171    
1172     #define STATIC_KSNODETYPE_NOISE_SUPPRESS\
1173     0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5
1174     DEFINE_GUIDSTRUCT("E07F903F-62FD-4e60-8CDD-DEA7236665B5", KSNODETYPE_NOISE_SUPPRESS);
1175     #define KSNODETYPE_NOISE_SUPPRESS DEFINE_GUIDNAMED(KSNODETYPE_NOISE_SUPPRESS)
1176    
1177     #define STATIC_KSNODETYPE_DELAY\
1178     0x144981E0L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1179     DEFINE_GUIDSTRUCT("144981E0-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DELAY);
1180     #define KSNODETYPE_DELAY DEFINE_GUIDNAMED(KSNODETYPE_DELAY)
1181    
1182     #define STATIC_KSNODETYPE_LOUDNESS\
1183     0x41887440L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1184     DEFINE_GUIDSTRUCT("41887440-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_LOUDNESS);
1185     #define KSNODETYPE_LOUDNESS DEFINE_GUIDNAMED(KSNODETYPE_LOUDNESS)
1186    
1187     #define STATIC_KSNODETYPE_PROLOGIC_DECODER\
1188     0x831C2C80L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1189     DEFINE_GUIDSTRUCT("831C2C80-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_PROLOGIC_DECODER);
1190     #define KSNODETYPE_PROLOGIC_DECODER DEFINE_GUIDNAMED(KSNODETYPE_PROLOGIC_DECODER)
1191    
1192     #define STATIC_KSNODETYPE_STEREO_WIDE\
1193     0xA9E69800L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1194     DEFINE_GUIDSTRUCT("A9E69800-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_STEREO_WIDE);
1195     #define KSNODETYPE_STEREO_WIDE DEFINE_GUIDNAMED(KSNODETYPE_STEREO_WIDE)
1196    
1197     #define STATIC_KSNODETYPE_STEREO_ENHANCE\
1198     0xAF6878ACL, 0xE83F, 0x11D0, 0x95, 0x8A, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1199     DEFINE_GUIDSTRUCT("AF6878AC-E83F-11D0-958A-00C04FB925D3", KSNODETYPE_STEREO_ENHANCE);
1200     #define KSNODETYPE_STEREO_ENHANCE DEFINE_GUIDNAMED(KSNODETYPE_STEREO_ENHANCE)
1201    
1202     #define STATIC_KSNODETYPE_REVERB\
1203     0xEF0328E0L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1204     DEFINE_GUIDSTRUCT("EF0328E0-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_REVERB);
1205     #define KSNODETYPE_REVERB DEFINE_GUIDNAMED(KSNODETYPE_REVERB)
1206    
1207     #define STATIC_KSNODETYPE_CHORUS\
1208     0x20173F20L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1209     DEFINE_GUIDSTRUCT("20173F20-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_CHORUS);
1210     #define KSNODETYPE_CHORUS DEFINE_GUIDNAMED(KSNODETYPE_CHORUS)
1211    
1212     #define STATIC_KSNODETYPE_3D_EFFECTS\
1213     0x55515860L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1214     DEFINE_GUIDSTRUCT("55515860-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_3D_EFFECTS);
1215     #define KSNODETYPE_3D_EFFECTS DEFINE_GUIDNAMED(KSNODETYPE_3D_EFFECTS)
1216    
1217     #define STATIC_KSNODETYPE_ACOUSTIC_ECHO_CANCEL STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL
1218     #define KSNODETYPE_ACOUSTIC_ECHO_CANCEL KSCATEGORY_ACOUSTIC_ECHO_CANCEL
1219    
1220     #define STATIC_KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR
1221     #define KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR
1222    
1223     #define STATIC_KSNODETYPE_DEV_SPECIFIC\
1224     0x941C7AC0L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1
1225     DEFINE_GUIDSTRUCT("941C7AC0-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DEV_SPECIFIC);
1226     #define KSNODETYPE_DEV_SPECIFIC DEFINE_GUIDNAMED(KSNODETYPE_DEV_SPECIFIC)
1227    
1228     #define STATIC_KSNODETYPE_SURROUND_ENCODER\
1229     0x8074C5B2L, 0x3C66, 0x11D2, 0xB4, 0x5A, 0x30, 0x78, 0x30, 0x2C, 0x20, 0x30
1230     DEFINE_GUIDSTRUCT("8074C5B2-3C66-11D2-B45A-3078302C2030", KSNODETYPE_SURROUND_ENCODER);
1231     #define KSNODETYPE_SURROUND_ENCODER DEFINE_GUIDNAMED(KSNODETYPE_SURROUND_ENCODER)
1232    
1233     #define STATIC_KSNODETYPE_PEAKMETER\
1234     0xa085651eL, 0x5f0d, 0x4b36, 0xa8, 0x69, 0xd1, 0x95, 0xd6, 0xab, 0x4b, 0x9e
1235     DEFINE_GUIDSTRUCT("A085651E-5F0D-4b36-A869-D195D6AB4B9E", KSNODETYPE_PEAKMETER);
1236     #define KSNODETYPE_PEAKMETER DEFINE_GUIDNAMED(KSNODETYPE_PEAKMETER)
1237    
1238     //===========================================================================
1239     // Topology Node Name GUIDs for common audio nodes
1240     #define STATIC_KSAUDFNAME_BASS\
1241     0x185FEDE0L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1242     DEFINE_GUIDSTRUCT("185FEDE0-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_BASS);
1243     #define KSAUDFNAME_BASS DEFINE_GUIDNAMED(KSAUDFNAME_BASS)
1244    
1245     #define STATIC_KSAUDFNAME_TREBLE\
1246     0x185FEDE1L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1247     DEFINE_GUIDSTRUCT("185FEDE1-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_TREBLE);
1248     #define KSAUDFNAME_TREBLE DEFINE_GUIDNAMED(KSAUDFNAME_TREBLE)
1249    
1250     #define STATIC_KSAUDFNAME_3D_STEREO\
1251     0x185FEDE2L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1252     DEFINE_GUIDSTRUCT("185FEDE2-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_3D_STEREO);
1253     #define KSAUDFNAME_3D_STEREO DEFINE_GUIDNAMED(KSAUDFNAME_3D_STEREO)
1254    
1255     #define STATIC_KSAUDFNAME_MASTER_VOLUME\
1256     0x185FEDE3L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1257     DEFINE_GUIDSTRUCT("185FEDE3-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MASTER_VOLUME);
1258     #define KSAUDFNAME_MASTER_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MASTER_VOLUME)
1259    
1260     #define STATIC_KSAUDFNAME_MASTER_MUTE\
1261     0x185FEDE4L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1262     DEFINE_GUIDSTRUCT("185FEDE4-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MASTER_MUTE);
1263     #define KSAUDFNAME_MASTER_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MASTER_MUTE)
1264    
1265     #define STATIC_KSAUDFNAME_WAVE_VOLUME\
1266     0x185FEDE5L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1267     DEFINE_GUIDSTRUCT("185FEDE5-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_VOLUME);
1268     #define KSAUDFNAME_WAVE_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_VOLUME)
1269    
1270     #define STATIC_KSAUDFNAME_WAVE_MUTE\
1271     0x185FEDE6L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1272     DEFINE_GUIDSTRUCT("185FEDE6-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_MUTE);
1273     #define KSAUDFNAME_WAVE_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_MUTE)
1274    
1275     #define STATIC_KSAUDFNAME_MIDI_VOLUME\
1276     0x185FEDE7L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1277     DEFINE_GUIDSTRUCT("185FEDE7-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_VOLUME);
1278     #define KSAUDFNAME_MIDI_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_VOLUME)
1279    
1280     #define STATIC_KSAUDFNAME_MIDI_MUTE\
1281     0x185FEDE8L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1282     DEFINE_GUIDSTRUCT("185FEDE8-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_MUTE);
1283     #define KSAUDFNAME_MIDI_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_MUTE)
1284    
1285     #define STATIC_KSAUDFNAME_CD_VOLUME\
1286     0x185FEDE9L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1287     DEFINE_GUIDSTRUCT("185FEDE9-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_VOLUME);
1288     #define KSAUDFNAME_CD_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_CD_VOLUME)
1289    
1290     #define STATIC_KSAUDFNAME_CD_MUTE\
1291     0x185FEDEAL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1292     DEFINE_GUIDSTRUCT("185FEDEA-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_MUTE);
1293     #define KSAUDFNAME_CD_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_CD_MUTE)
1294    
1295     #define STATIC_KSAUDFNAME_LINE_VOLUME\
1296     0x185FEDEBL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1297     DEFINE_GUIDSTRUCT("185FEDEB-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_VOLUME);
1298     #define KSAUDFNAME_LINE_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_LINE_VOLUME)
1299    
1300     #define STATIC_KSAUDFNAME_LINE_MUTE\
1301     0x185FEDECL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1302     DEFINE_GUIDSTRUCT("185FEDEC-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_MUTE);
1303     #define KSAUDFNAME_LINE_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_LINE_MUTE)
1304    
1305     #define STATIC_KSAUDFNAME_MIC_VOLUME\
1306     0x185FEDEDL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1307     DEFINE_GUIDSTRUCT("185FEDED-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_VOLUME);
1308     #define KSAUDFNAME_MIC_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIC_VOLUME)
1309    
1310     #define STATIC_KSAUDFNAME_MIC_MUTE\
1311     0x185FEDEEL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1312     DEFINE_GUIDSTRUCT("185FEDEE-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_MUTE);
1313     #define KSAUDFNAME_MIC_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MIC_MUTE)
1314    
1315     #define STATIC_KSAUDFNAME_RECORDING_SOURCE\
1316     0x185FEDEFL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1317     DEFINE_GUIDSTRUCT("185FEDEF-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_RECORDING_SOURCE);
1318     #define KSAUDFNAME_RECORDING_SOURCE DEFINE_GUIDNAMED(KSAUDFNAME_RECORDING_SOURCE)
1319    
1320     #define STATIC_KSAUDFNAME_PC_SPEAKER_VOLUME\
1321     0x185FEDF0L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1322     DEFINE_GUIDSTRUCT("185FEDF0-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER_VOLUME);
1323     #define KSAUDFNAME_PC_SPEAKER_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER_VOLUME)
1324    
1325     #define STATIC_KSAUDFNAME_PC_SPEAKER_MUTE\
1326     0x185FEDF1L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1327     DEFINE_GUIDSTRUCT("185FEDF1-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER_MUTE);
1328     #define KSAUDFNAME_PC_SPEAKER_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER_MUTE)
1329    
1330     #define STATIC_KSAUDFNAME_MIDI_IN_VOLUME\
1331     0x185FEDF2L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1332     DEFINE_GUIDSTRUCT("185FEDF2-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_IN_VOLUME);
1333     #define KSAUDFNAME_MIDI_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_IN_VOLUME)
1334    
1335     #define STATIC_KSAUDFNAME_CD_IN_VOLUME\
1336     0x185FEDF3L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1337     DEFINE_GUIDSTRUCT("185FEDF3-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_IN_VOLUME);
1338     #define KSAUDFNAME_CD_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_CD_IN_VOLUME)
1339    
1340     #define STATIC_KSAUDFNAME_LINE_IN_VOLUME\
1341     0x185FEDF4L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1342     DEFINE_GUIDSTRUCT("185FEDF4-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_IN_VOLUME);
1343     #define KSAUDFNAME_LINE_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_LINE_IN_VOLUME)
1344    
1345     #define STATIC_KSAUDFNAME_MIC_IN_VOLUME\
1346     0x185FEDF5L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1347     DEFINE_GUIDSTRUCT("185FEDF5-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_IN_VOLUME);
1348     #define KSAUDFNAME_MIC_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIC_IN_VOLUME)
1349    
1350     #define STATIC_KSAUDFNAME_WAVE_IN_VOLUME\
1351     0x185FEDF6L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1352     DEFINE_GUIDSTRUCT("185FEDF6-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_IN_VOLUME);
1353     #define KSAUDFNAME_WAVE_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_IN_VOLUME)
1354    
1355     #define STATIC_KSAUDFNAME_VOLUME_CONTROL\
1356     0x185FEDF7L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1357     DEFINE_GUIDSTRUCT("185FEDF7-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_VOLUME_CONTROL);
1358     #define KSAUDFNAME_VOLUME_CONTROL DEFINE_GUIDNAMED(KSAUDFNAME_VOLUME_CONTROL)
1359    
1360     #define STATIC_KSAUDFNAME_MIDI\
1361     0x185FEDF8L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1362     DEFINE_GUIDSTRUCT("185FEDF8-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI);
1363     #define KSAUDFNAME_MIDI DEFINE_GUIDNAMED(KSAUDFNAME_MIDI)
1364    
1365     #define STATIC_KSAUDFNAME_LINE_IN\
1366     0x185FEDF9L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1367     DEFINE_GUIDSTRUCT("185FEDF9-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_IN);
1368     #define KSAUDFNAME_LINE_IN DEFINE_GUIDNAMED(KSAUDFNAME_LINE_IN)
1369    
1370     #define STATIC_KSAUDFNAME_RECORDING_CONTROL\
1371     0x185FEDFAL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1372     DEFINE_GUIDSTRUCT("185FEDFA-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_RECORDING_CONTROL);
1373     #define KSAUDFNAME_RECORDING_CONTROL DEFINE_GUIDNAMED(KSAUDFNAME_RECORDING_CONTROL)
1374    
1375     #define STATIC_KSAUDFNAME_CD_AUDIO\
1376     0x185FEDFBL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1377     DEFINE_GUIDSTRUCT("185FEDFB-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_AUDIO);
1378     #define KSAUDFNAME_CD_AUDIO DEFINE_GUIDNAMED(KSAUDFNAME_CD_AUDIO)
1379    
1380     #define STATIC_KSAUDFNAME_AUX_VOLUME\
1381     0x185FEDFCL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1382     DEFINE_GUIDSTRUCT("185FEDFC-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX_VOLUME);
1383     #define KSAUDFNAME_AUX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_AUX_VOLUME)
1384    
1385     #define STATIC_KSAUDFNAME_AUX_MUTE\
1386     0x185FEDFDL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1387     DEFINE_GUIDSTRUCT("185FEDFD-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX_MUTE);
1388     #define KSAUDFNAME_AUX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_AUX_MUTE)
1389    
1390     #define STATIC_KSAUDFNAME_AUX\
1391     0x185FEDFEL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1392     DEFINE_GUIDSTRUCT("185FEDFE-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX);
1393     #define KSAUDFNAME_AUX DEFINE_GUIDNAMED(KSAUDFNAME_AUX)
1394    
1395     #define STATIC_KSAUDFNAME_PC_SPEAKER\
1396     0x185FEDFFL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1397     DEFINE_GUIDSTRUCT("185FEDFF-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER);
1398     #define KSAUDFNAME_PC_SPEAKER DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER)
1399    
1400     #define STATIC_KSAUDFNAME_WAVE_OUT_MIX\
1401     0x185FEE00L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1402     DEFINE_GUIDSTRUCT("185FEE00-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_OUT_MIX);
1403     #define KSAUDFNAME_WAVE_OUT_MIX DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_OUT_MIX)
1404    
1405     #define STATIC_KSAUDFNAME_MONO_OUT\
1406     0xf9b41dc3L, 0x96e2, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1407     DEFINE_GUIDSTRUCT("F9B41DC3-96E2-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT);
1408     #define KSAUDFNAME_MONO_OUT DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT)
1409    
1410     #define STATIC_KSAUDFNAME_STEREO_MIX\
1411     0xdff077L, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1412     DEFINE_GUIDSTRUCT("00DFF077-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX);
1413     #define KSAUDFNAME_STEREO_MIX DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX)
1414    
1415     #define STATIC_KSAUDFNAME_MONO_MIX\
1416     0xdff078L, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1417     DEFINE_GUIDSTRUCT("00DFF078-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX);
1418     #define KSAUDFNAME_MONO_MIX DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX)
1419    
1420     #define STATIC_KSAUDFNAME_MONO_OUT_VOLUME\
1421     0x1ad247ebL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1422     DEFINE_GUIDSTRUCT("1AD247EB-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT_VOLUME);
1423     #define KSAUDFNAME_MONO_OUT_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT_VOLUME)
1424    
1425     #define STATIC_KSAUDFNAME_MONO_OUT_MUTE\
1426     0x1ad247ecL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1427     DEFINE_GUIDSTRUCT("1AD247EC-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT_MUTE);
1428     #define KSAUDFNAME_MONO_OUT_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT_MUTE)
1429    
1430     #define STATIC_KSAUDFNAME_STEREO_MIX_VOLUME\
1431     0x1ad247edL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1432     DEFINE_GUIDSTRUCT("1AD247ED-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX_VOLUME);
1433     #define KSAUDFNAME_STEREO_MIX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX_VOLUME)
1434    
1435     #define STATIC_KSAUDFNAME_STEREO_MIX_MUTE\
1436     0x22b0eafdL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1437     DEFINE_GUIDSTRUCT("22B0EAFD-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX_MUTE);
1438     #define KSAUDFNAME_STEREO_MIX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX_MUTE)
1439    
1440     #define STATIC_KSAUDFNAME_MONO_MIX_VOLUME\
1441     0x22b0eafeL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1442     DEFINE_GUIDSTRUCT("22B0EAFE-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX_VOLUME);
1443     #define KSAUDFNAME_MONO_MIX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX_VOLUME)
1444    
1445     #define STATIC_KSAUDFNAME_MONO_MIX_MUTE\
1446     0x2bc31d69L, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1447     DEFINE_GUIDSTRUCT("2BC31D69-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX_MUTE);
1448     #define KSAUDFNAME_MONO_MIX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX_MUTE)
1449    
1450     #define STATIC_KSAUDFNAME_MICROPHONE_BOOST\
1451     0x2bc31d6aL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1452     DEFINE_GUIDSTRUCT("2BC31D6A-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MICROPHONE_BOOST);
1453     #define KSAUDFNAME_MICROPHONE_BOOST DEFINE_GUIDNAMED(KSAUDFNAME_MICROPHONE_BOOST)
1454    
1455     #define STATIC_KSAUDFNAME_ALTERNATE_MICROPHONE\
1456     0x2bc31d6bL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1457     DEFINE_GUIDSTRUCT("2BC31D6B-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_ALTERNATE_MICROPHONE);
1458     #define KSAUDFNAME_ALTERNATE_MICROPHONE DEFINE_GUIDNAMED(KSAUDFNAME_ALTERNATE_MICROPHONE)
1459    
1460     #define STATIC_KSAUDFNAME_3D_DEPTH\
1461     0x63ff5747L, 0x991f, 0x11d2, 0xac, 0x4d, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1462     DEFINE_GUIDSTRUCT("63FF5747-991F-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_3D_DEPTH);
1463     #define KSAUDFNAME_3D_DEPTH DEFINE_GUIDNAMED(KSAUDFNAME_3D_DEPTH)
1464    
1465     #define STATIC_KSAUDFNAME_3D_CENTER\
1466     0x9f0670b4L, 0x991f, 0x11d2, 0xac, 0x4d, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1467     DEFINE_GUIDSTRUCT("9F0670B4-991F-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_3D_CENTER);
1468     #define KSAUDFNAME_3D_CENTER DEFINE_GUIDNAMED(KSAUDFNAME_3D_CENTER)
1469    
1470     #define STATIC_KSAUDFNAME_VIDEO_VOLUME\
1471     0x9b46e708L, 0x992a, 0x11d2, 0xac, 0x4d, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1472     DEFINE_GUIDSTRUCT("9B46E708-992A-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_VIDEO_VOLUME);
1473     #define KSAUDFNAME_VIDEO_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO_VOLUME)
1474    
1475     #define STATIC_KSAUDFNAME_VIDEO_MUTE\
1476     0x9b46e709L, 0x992a, 0x11d2, 0xac, 0x4d, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1477     DEFINE_GUIDSTRUCT("9B46E709-992A-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_VIDEO_MUTE);
1478     #define KSAUDFNAME_VIDEO_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO_MUTE)
1479    
1480     #define STATIC_KSAUDFNAME_VIDEO\
1481     0x915daec4L, 0xa434, 0x11d2, 0xac, 0x52, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68
1482     DEFINE_GUIDSTRUCT("915DAEC4-A434-11d2-AC52-00C04F8EFB68", KSAUDFNAME_VIDEO);
1483     #define KSAUDFNAME_VIDEO DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO)
1484    
1485     #define STATIC_KSAUDFNAME_PEAKMETER\
1486     0x57e24340L, 0xfc5b, 0x4612, 0xa5, 0x62, 0x72, 0xb1, 0x1a, 0x29, 0xdf, 0xae
1487     DEFINE_GUIDSTRUCT("57E24340-FC5B-4612-A562-72B11A29DFAE", KSAUDFNAME_PEAKMETER);
1488     #define KSAUDFNAME_PEAKMETER DEFINE_GUIDNAMED(KSAUDFNAME_PEAKMETER)
1489    
1490     // Internal topology node pin definitions
1491    
1492     #define KSNODEPIN_STANDARD_IN 1
1493     #define KSNODEPIN_STANDARD_OUT 0
1494    
1495     #define KSNODEPIN_SUM_MUX_IN 1 // can be >= 1
1496     #define KSNODEPIN_SUM_MUX_OUT 0
1497    
1498     #define KSNODEPIN_DEMUX_IN 0
1499     #define KSNODEPIN_DEMUX_OUT 1 // can be >= 1
1500    
1501     #define KSNODEPIN_AEC_RENDER_IN 1
1502     #define KSNODEPIN_AEC_RENDER_OUT 0
1503     #define KSNODEPIN_AEC_CAPTURE_IN 2
1504     #define KSNODEPIN_AEC_CAPTURE_OUT 3
1505    
1506     //===========================================================================
1507     //===========================================================================
1508    
1509     #define STATIC_KSMETHODSETID_Wavetable\
1510     0xDCEF31EBL, 0xD907, 0x11D0, 0x95, 0x83, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1511     DEFINE_GUIDSTRUCT("DCEF31EB-D907-11D0-9583-00C04FB925D3", KSMETHODSETID_Wavetable);
1512     #define KSMETHODSETID_Wavetable DEFINE_GUIDNAMED(KSMETHODSETID_Wavetable)
1513    
1514     typedef enum {
1515     KSMETHOD_WAVETABLE_WAVE_ALLOC,
1516     KSMETHOD_WAVETABLE_WAVE_FREE,
1517     KSMETHOD_WAVETABLE_WAVE_FIND,
1518     KSMETHOD_WAVETABLE_WAVE_WRITE
1519     } KSMETHOD_WAVETABLE;
1520    
1521     typedef struct {
1522     KSIDENTIFIER Identifier; // wave identifier
1523     ULONG Size; // wave size
1524     BOOL Looped; // wave looped flag
1525     ULONG LoopPoint; // wave loop point
1526     BOOL InROM; // wave InROM flag
1527     KSDATAFORMAT Format; // wave format
1528     } KSWAVETABLE_WAVE_DESC, *PKSWAVETABLE_WAVE_DESC;
1529    
1530    
1531     //===========================================================================
1532     //===========================================================================
1533    
1534     /*
1535     Property sets and items
1536     */
1537    
1538     //===========================================================================
1539     //===========================================================================
1540    
1541     #define STATIC_KSPROPSETID_Itd3d\
1542     0x6429f090L, 0x9fd9, 0x11d0, 0xa7, 0x5b, 0x00, 0xa0, 0xc9, 0x03, 0x65, 0xe3
1543     DEFINE_GUIDSTRUCT("6429f090-9fd9-11d0-a75b-00a0c90365e3", KSPROPSETID_Itd3d);
1544     #define KSPROPSETID_Itd3d DEFINE_GUIDNAMED(KSPROPSETID_Itd3d)
1545    
1546     typedef enum {
1547     KSPROPERTY_ITD3D_PARAMS = 0
1548     } KSPROPERTY_ITD3D;
1549    
1550     //===========================================================================
1551     //===========================================================================
1552    
1553     #define STATIC_KSPROPSETID_Hrtf3d\
1554     0xb66decb0L, 0xa083, 0x11d0, 0x85, 0x1e, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3
1555     DEFINE_GUIDSTRUCT("b66decb0-a083-11d0-851e-00c04fd9baf3", KSPROPSETID_Hrtf3d);
1556     #define KSPROPSETID_Hrtf3d DEFINE_GUIDNAMED(KSPROPSETID_Hrtf3d)
1557    
1558     typedef enum {
1559     KSPROPERTY_HRTF3D_PARAMS = 0,
1560     KSPROPERTY_HRTF3D_INITIALIZE,
1561     KSPROPERTY_HRTF3D_FILTER_FORMAT
1562     } KSPROPERTY_HRTF3D;
1563    
1564    
1565     //===========================================================================
1566     //===========================================================================
1567    
1568     #define STATIC_KSPROPSETID_Wave_Queued\
1569     0x16a15b10L, 0x16f0, 0x11d0, 0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4
1570     DEFINE_GUIDSTRUCT("16a15b10-16f0-11d0-a195-0020afd156e4", KSPROPSETID_Wave_Queued);
1571     #define KSPROPSETID_Wave_Queued DEFINE_GUIDNAMED(KSPROPSETID_Wave_Queued)
1572    
1573     #define KSPROPERTY_WAVE_QUEUED_POSITION 0x00000001
1574    
1575     #define STATIC_KSMETHODSETID_Wave_Queued\
1576     0x7432c160L, 0x8827, 0x11cf, 0xa1, 0x02, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4
1577     DEFINE_GUIDSTRUCT("7432c160-8827-11cf-a102-0020afd156e4", KSMETHODSETID_Wave_Queued);
1578     #define KSMETHODSETID_Wave_Queued DEFINE_GUIDNAMED(KSMETHODSETID_Wave_Queued)
1579    
1580     #define KSMETHOD_WAVE_QUEUED_BREAKLOOP 0x00000001
1581    
1582     #define STATIC_KSPROPSETID_Wave\
1583     0x924e54b0L, 0x630f, 0x11cf, 0xad, 0xa7, 0x08, 0x00, 0x3e, 0x30, 0x49, 0x4a
1584     DEFINE_GUIDSTRUCT("924e54b0-630f-11cf-ada7-08003e30494a", KSPROPSETID_Wave);
1585     #define KSPROPSETID_Wave DEFINE_GUIDNAMED(KSPROPSETID_Wave)
1586    
1587     typedef enum {
1588     KSPROPERTY_WAVE_COMPATIBLE_CAPABILITIES,
1589     KSPROPERTY_WAVE_INPUT_CAPABILITIES,
1590     KSPROPERTY_WAVE_OUTPUT_CAPABILITIES,
1591     KSPROPERTY_WAVE_BUFFER,
1592     KSPROPERTY_WAVE_FREQUENCY,
1593     KSPROPERTY_WAVE_VOLUME,
1594     KSPROPERTY_WAVE_PAN
1595     } KSPROPERTY_WAVE;
1596    
1597     typedef struct {
1598     ULONG ulDeviceType;
1599     } KSWAVE_COMPATCAPS, *PKSWAVE_COMPATCAPS;
1600    
1601     #define KSWAVE_COMPATCAPS_INPUT 0x00000000
1602     #define KSWAVE_COMPATCAPS_OUTPUT 0x00000001
1603    
1604     typedef struct {
1605     ULONG MaximumChannelsPerConnection;
1606     ULONG MinimumBitsPerSample;
1607     ULONG MaximumBitsPerSample;
1608     ULONG MinimumSampleFrequency;
1609     ULONG MaximumSampleFrequency;
1610     ULONG TotalConnections;
1611     ULONG ActiveConnections;
1612     } KSWAVE_INPUT_CAPABILITIES, *PKSWAVE_INPUT_CAPABILITIES;
1613    
1614     typedef struct {
1615     ULONG MaximumChannelsPerConnection;
1616     ULONG MinimumBitsPerSample;
1617     ULONG MaximumBitsPerSample;
1618     ULONG MinimumSampleFrequency;
1619     ULONG MaximumSampleFrequency;
1620     ULONG TotalConnections;
1621     ULONG StaticConnections;
1622     ULONG StreamingConnections;
1623     ULONG ActiveConnections;
1624     ULONG ActiveStaticConnections;
1625     ULONG ActiveStreamingConnections;
1626     ULONG Total3DConnections;
1627     ULONG Static3DConnections;
1628     ULONG Streaming3DConnections;
1629     ULONG Active3DConnections;
1630     ULONG ActiveStatic3DConnections;
1631     ULONG ActiveStreaming3DConnections;
1632     ULONG TotalSampleMemory;
1633     ULONG FreeSampleMemory;
1634     ULONG LargestFreeContiguousSampleMemory;
1635     } KSWAVE_OUTPUT_CAPABILITIES, *PKSWAVE_OUTPUT_CAPABILITIES;
1636    
1637     typedef struct {
1638     LONG LeftAttenuation;
1639     LONG RightAttenuation;
1640     } KSWAVE_VOLUME, *PKSWAVE_VOLUME;
1641    
1642     #define KSWAVE_BUFFER_ATTRIBUTEF_LOOPING 0x00000001
1643     #define KSWAVE_BUFFER_ATTRIBUTEF_STATIC 0x00000002
1644    
1645     typedef struct {
1646     ULONG Attributes;
1647     ULONG BufferSize;
1648     PVOID BufferAddress;
1649     } KSWAVE_BUFFER, *PKSWAVE_BUFFER;
1650    
1651     //===========================================================================
1652     //===========================================================================
1653    
1654     #define STATIC_KSMUSIC_TECHNOLOGY_PORT\
1655     0x86C92E60L, 0x62E8, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1656     DEFINE_GUIDSTRUCT("86C92E60-62E8-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_PORT);
1657     #define KSMUSIC_TECHNOLOGY_PORT DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_PORT)
1658    
1659     #define STATIC_KSMUSIC_TECHNOLOGY_SQSYNTH\
1660     0x0ECF4380L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1661     DEFINE_GUIDSTRUCT("0ECF4380-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_SQSYNTH);
1662     #define KSMUSIC_TECHNOLOGY_SQSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_SQSYNTH)
1663    
1664     #define STATIC_KSMUSIC_TECHNOLOGY_FMSYNTH\
1665     0x252C5C80L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1666     DEFINE_GUIDSTRUCT("252C5C80-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_FMSYNTH);
1667     #define KSMUSIC_TECHNOLOGY_FMSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_FMSYNTH)
1668    
1669     #define STATIC_KSMUSIC_TECHNOLOGY_WAVETABLE\
1670     0x394EC7C0L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1671     DEFINE_GUIDSTRUCT("394EC7C0-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_WAVETABLE);
1672     #define KSMUSIC_TECHNOLOGY_WAVETABLE DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_WAVETABLE)
1673    
1674     #define STATIC_KSMUSIC_TECHNOLOGY_SWSYNTH\
1675     0x37407736L, 0x3620, 0x11D1, 0x85, 0xD3, 0x00, 0x00, 0xF8, 0x75, 0x43, 0x80
1676     DEFINE_GUIDSTRUCT("37407736-3620-11D1-85D3-0000F8754380", KSMUSIC_TECHNOLOGY_SWSYNTH);
1677     #define KSMUSIC_TECHNOLOGY_SWSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_SWSYNTH)
1678    
1679     #define STATIC_KSPROPSETID_WaveTable\
1680     0x8539E660L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1681     DEFINE_GUIDSTRUCT("8539E660-62E9-11CF-A5D6-28DB04C10000", KSPROPSETID_WaveTable);
1682     #define KSPROPSETID_WaveTable DEFINE_GUIDNAMED(KSPROPSETID_WaveTable)
1683    
1684     typedef enum {
1685     KSPROPERTY_WAVETABLE_LOAD_SAMPLE,
1686     KSPROPERTY_WAVETABLE_UNLOAD_SAMPLE,
1687     KSPROPERTY_WAVETABLE_MEMORY,
1688     KSPROPERTY_WAVETABLE_VERSION
1689     } KSPROPERTY_WAVETABLE;
1690    
1691     typedef struct {
1692     KSDATARANGE DataRange;
1693     GUID Technology;
1694     ULONG Channels;
1695     ULONG Notes;
1696     ULONG ChannelMask;
1697     } KSDATARANGE_MUSIC, *PKSDATARANGE_MUSIC;
1698    
1699     //===========================================================================
1700    
1701     #define STATIC_KSEVENTSETID_Cyclic\
1702     0x142C1AC0L, 0x072A, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1703     DEFINE_GUIDSTRUCT("142C1AC0-072A-11D0-A5D6-28DB04C10000", KSEVENTSETID_Cyclic);
1704     #define KSEVENTSETID_Cyclic DEFINE_GUIDNAMED(KSEVENTSETID_Cyclic)
1705    
1706     typedef enum {
1707     KSEVENT_CYCLIC_TIME_INTERVAL,
1708     } KSEVENT_CYCLIC_TIME;
1709    
1710     #define STATIC_KSPROPSETID_Cyclic\
1711     0x3FFEAEA0L, 0x2BEE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1712     DEFINE_GUIDSTRUCT("3FFEAEA0-2BEE-11CF-A5D6-28DB04C10000", KSPROPSETID_Cyclic);
1713     #define KSPROPSETID_Cyclic DEFINE_GUIDNAMED(KSPROPSETID_Cyclic)
1714    
1715     typedef enum {
1716     KSPROPERTY_CYCLIC_POSITION,
1717     } KSPROPERTY_CYCLIC;
1718    
1719     //===========================================================================
1720     #define STATIC_KSEVENTSETID_AudioControlChange\
1721     0xE85E9698L, 0xFA2F, 0x11D1, 0x95, 0xBD, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
1722     DEFINE_GUIDSTRUCT("E85E9698-FA2F-11D1-95BD-00C04FB925D3", KSEVENTSETID_AudioControlChange);
1723     #define KSEVENTSETID_AudioControlChange DEFINE_GUIDNAMED(KSEVENTSETID_AudioControlChange)
1724    
1725     typedef enum {
1726     KSEVENT_CONTROL_CHANGE,
1727     } KSEVENT_AUDIO_CONTROL_CHANGE;
1728    
1729     //===========================================================================
1730    
1731     #define STATIC_KSEVENTSETID_LoopedStreaming\
1732     0x4682B940L, 0xC6EF, 0x11D0, 0x96, 0xD8, 0x00, 0xAA, 0x00, 0x51, 0xE5, 0x1D
1733     DEFINE_GUIDSTRUCT("4682B940-C6EF-11D0-96D8-00AA0051E51D", KSEVENTSETID_LoopedStreaming);
1734     #define KSEVENTSETID_LoopedStreaming DEFINE_GUIDNAMED(KSEVENTSETID_LoopedStreaming)
1735    
1736     typedef enum {
1737     KSEVENT_LOOPEDSTREAMING_POSITION,
1738     } KSEVENT_LOOPEDSTREAMING;
1739    
1740     typedef struct {
1741     KSEVENTDATA KsEventData;
1742     #if defined(_NTDDK_)
1743     ULONGLONG Position;
1744     #else // !_NTDDK_
1745     DWORDLONG Position;
1746     #endif // !_NTDDK_
1747     } LOOPEDSTREAMING_POSITION_EVENT_DATA, *PLOOPEDSTREAMING_POSITION_EVENT_DATA ;
1748    
1749     #define STATIC_KSEVENTSETID_Sysaudio \
1750     0x04800320L, 0x4491, 0x11D1, 0xA0, 0x50, 0x40, 0x57, 0x05, 0xC1, 0x00, 0x00
1751     DEFINE_GUIDSTRUCT("04800320-4491-11D1-A050-405705C10000", KSEVENTSETID_Sysaudio);
1752     #define KSEVENTSETID_Sysaudio DEFINE_GUIDNAMED(KSEVENTSETID_Sysaudio)
1753    
1754     typedef enum {
1755     KSEVENT_SYSAUDIO_ADDREMOVE_DEVICE,
1756     KSEVENT_SYSAUDIO_CHANGE_DEVICE
1757     } KSEVENT_SYSAUDIO;
1758    
1759     #define STATIC_KSPROPSETID_Sysaudio\
1760     0xCBE3FAA0L, 0xCC75, 0x11D0, 0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6
1761     DEFINE_GUIDSTRUCT("CBE3FAA0-CC75-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio);
1762     #define KSPROPSETID_Sysaudio DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio)
1763    
1764     typedef enum {
1765     KSPROPERTY_SYSAUDIO_DEVICE_COUNT = 1,
1766     KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME,
1767     KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE,
1768     KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME,
1769     KSPROPERTY_SYSAUDIO_SELECT_GRAPH,
1770     KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE,
1771     KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT,
1772     KSPROPERTY_SYSAUDIO_ALWAYS_CREATE_VIRTUAL_SOURCE,
1773     KSPROPERTY_SYSAUDIO_ADDREMOVE_LOCK,
1774     KSPROPERTY_SYSAUDIO_ADDREMOVE_UNLOCK,
1775     KSPROPERTY_SYSAUDIO_RENDER_PIN_INSTANCES,
1776     KSPROPERTY_SYSAUDIO_RENDER_CONNECTION_INDEX,
1777     KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE_ONLY,
1778     KSPROPERTY_SYSAUDIO_INSTANCE_INFO,
1779     KSPROPERTY_SYSAUDIO_PREFERRED_DEVICE
1780     } KSPROPERTY_SYSAUDIO;
1781    
1782     typedef struct {
1783     KSPROPERTY Property;
1784     GUID PinCategory;
1785     GUID PinName;
1786     } SYSAUDIO_CREATE_VIRTUAL_SOURCE, *PSYSAUDIO_CREATE_VIRTUAL_SOURCE;
1787    
1788     typedef struct {
1789     KSPROPERTY Property;
1790     ULONG PinId;
1791     ULONG NodeId;
1792     ULONG Flags;
1793     ULONG Reserved;
1794     } SYSAUDIO_SELECT_GRAPH, *PSYSAUDIO_SELECT_GRAPH;
1795    
1796     typedef struct {
1797     KSPROPERTY Property;
1798     ULONG Flags;
1799     ULONG DeviceNumber;
1800     } SYSAUDIO_INSTANCE_INFO, *PSYSAUDIO_INSTANCE_INFO;
1801    
1802     #define SYSAUDIO_FLAGS_DONT_COMBINE_PINS 0x00000001
1803    
1804     typedef struct {
1805     KSPROPERTY Property;
1806     ULONG Flags;
1807     ULONG Index; // KSPROPERTY_SYSAUDIO_DEFAULT_TYPE
1808     } SYSAUDIO_PREFERRED_DEVICE, *PSYSAUDIO_PREFERRED_DEVICE;
1809    
1810     #define SYSAUDIO_FLAGS_CLEAR_PREFERRED 0x00000002
1811    
1812     typedef enum { // preferred device index
1813     KSPROPERTY_SYSAUDIO_NORMAL_DEFAULT = 0,
1814     KSPROPERTY_SYSAUDIO_PLAYBACK_DEFAULT,
1815     KSPROPERTY_SYSAUDIO_RECORD_DEFAULT,
1816     KSPROPERTY_SYSAUDIO_MIDI_DEFAULT,
1817     KSPROPERTY_SYSAUDIO_MIXER_DEFAULT
1818     } KSPROPERTY_SYSAUDIO_DEFAULT_TYPE;
1819    
1820     #define STATIC_KSPROPSETID_Sysaudio_Pin \
1821     0xA3A53220L, 0xC6E4, 0x11D0, 0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6
1822     DEFINE_GUIDSTRUCT("A3A53220-C6E4-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio_Pin);
1823     #define KSPROPSETID_Sysaudio_Pin DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio_Pin)
1824    
1825     typedef enum {
1826     KSPROPERTY_SYSAUDIO_TOPOLOGY_CONNECTION_INDEX,
1827     KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE,
1828     KSPROPERTY_SYSAUDIO_PIN_VOLUME_NODE
1829     } KSPROPERTY_SYSAUDIO_PIN;
1830    
1831     typedef struct {
1832     KSPROPERTY Property;
1833     ULONG MixerPinId;
1834     ULONG Reserved;
1835     } SYSAUDIO_ATTACH_VIRTUAL_SOURCE, *PSYSAUDIO_ATTACH_VIRTUAL_SOURCE;
1836    
1837     typedef struct {
1838     KSPROPERTY Property;
1839     ULONG NodeId;
1840     ULONG Reserved;
1841     } KSNODEPROPERTY, *PKSNODEPROPERTY;
1842    
1843     typedef struct {
1844     KSNODEPROPERTY NodeProperty;
1845     LONG Channel; // value to get or set
1846     ULONG Reserved;
1847     } KSNODEPROPERTY_AUDIO_CHANNEL, *PKSNODEPROPERTY_AUDIO_CHANNEL;
1848    
1849     typedef struct {
1850     KSNODEPROPERTY NodeProperty;
1851     ULONG DevSpecificId;
1852     ULONG DeviceInfo;
1853     ULONG Length;
1854     } KSNODEPROPERTY_AUDIO_DEV_SPECIFIC, *PKSNODEPROPERTY_AUDIO_DEV_SPECIFIC;
1855    
1856     typedef struct {
1857     KSNODEPROPERTY NodeProperty;
1858     PVOID ListenerId;
1859     #ifndef _WIN64
1860     ULONG Reserved;
1861     #endif // _WIN64
1862     } KSNODEPROPERTY_AUDIO_3D_LISTENER, *PKSNODEPROPERTY_AUDIO_3D_LISTENER;
1863    
1864     typedef struct {
1865     KSNODEPROPERTY NodeProperty;
1866     PVOID AppContext;
1867     ULONG Length;
1868     #ifndef _WIN64
1869     ULONG Reserved;
1870     #endif // _WIN64
1871     } KSNODEPROPERTY_AUDIO_PROPERTY, *PKSNODEPROPERTY_AUDIO_PROPERTY;
1872    
1873     //===========================================================================
1874    
1875     #define STATIC_KSPROPSETID_Linear\
1876     0x5A2FFE80L, 0x16B9, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1877     DEFINE_GUIDSTRUCT("5A2FFE80-16B9-11D0-A5D6-28DB04C10000", KSPROPSETID_Linear);
1878     #define KSPROPSETID_Linear DEFINE_GUIDNAMED(KSPROPSETID_Linear)
1879    
1880     typedef enum {
1881     KSPROPERTY_LINEAR_POSITION,
1882     } KSPROPERTY_LINEAR;
1883    
1884     //===========================================================================
1885    
1886     //
1887     // Midi definitions
1888     //
1889    
1890     /*
1891     Formats
1892     */
1893    
1894     #define STATIC_KSDATAFORMAT_TYPE_MUSIC\
1895     0xE725D360L, 0x62CC, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1896     DEFINE_GUIDSTRUCT("E725D360-62CC-11CF-A5D6-28DB04C10000", KSDATAFORMAT_TYPE_MUSIC);
1897     #define KSDATAFORMAT_TYPE_MUSIC DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MUSIC)
1898    
1899     // 'mids' == MEDIATYPE_Midi
1900     #define STATIC_KSDATAFORMAT_TYPE_MIDI\
1901     0x7364696DL, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
1902     DEFINE_GUIDSTRUCT("7364696D-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_MIDI);
1903     #define KSDATAFORMAT_TYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MIDI)
1904    
1905     #define STATIC_KSDATAFORMAT_SUBTYPE_MIDI\
1906     0x1D262760L, 0xE957, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1907     DEFINE_GUIDSTRUCT("1D262760-E957-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI);
1908     #define KSDATAFORMAT_SUBTYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI)
1909    
1910     #define STATIC_KSDATAFORMAT_SUBTYPE_MIDI_BUS\
1911     0x2CA15FA0L, 0x6CFE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
1912     DEFINE_GUIDSTRUCT("2CA15FA0-6CFE-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI_BUS);
1913     #define KSDATAFORMAT_SUBTYPE_MIDI_BUS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI_BUS)
1914    
1915     #define STATIC_KSDATAFORMAT_SUBTYPE_RIFFMIDI\
1916     0x4995DAF0L, 0x9EE6, 0x11D0, 0xA4, 0x0E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
1917     DEFINE_GUIDSTRUCT("4995DAF0-9EE6-11D0-A40E-00A0C9223196", KSDATAFORMAT_SUBTYPE_RIFFMIDI);
1918     #define KSDATAFORMAT_SUBTYPE_RIFFMIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFFMIDI)
1919    
1920     /*
1921     KSDATAFORMAT_SUBTYPE_DIRECTMUSIC
1922     see DMusicKS.h
1923     */
1924    
1925     // WARNING! This structure MUST be dword aligned
1926     // regardless of the number of data bytes.
1927    
1928     typedef struct {
1929     ULONG TimeDeltaMs; // Delta Milliseconds from the previous midiformat
1930     // in the packet. The first midiformat in the packet
1931     // is a delta from the PTS in the KSSTREAM_HEADER.
1932     ULONG ByteCount; // Number of bytes of data that follow this struct.
1933     } KSMUSICFORMAT, *PKSMUSICFORMAT;
1934    
1935     //
1936     // This entire set of MPEG Standard/Dialect Guids are obsolete. Do not use them.
1937     //
1938     //====================================================================================================
1939     //====================================================================================================
1940     // The following official MPEG Formats, Subtypes and Specifiers are listed as required or optional
1941     // These official MPEG GUIDs are the preferred method of supporting MPEG/AC-3 media types in new code.
1942     // Older MPEG GUIDs should also be supported for compatibilty, but these new modes are still required.
1943     //====================================================================================================
1944     //====================================================================================================
1945    
1946     /*
1947     This is a summary of what media types/specifiers will be required for all DVD+DSS+DVB+DTV MPEG decoders.
1948     These media types are what the decoder driver must accept, hardware support for all of these media types
1949     may or may not actually be provided by the decoder natively. These media types are intended to define
1950     the "officially" supported MPEG/AC-3 media types that all WHQL certified decoders must implement. This
1951     specifically includes driver and/or hardware support for all the required standards and dialects.
1952    
1953     All MPEG video decoders must support all of the MPEG video modes shown as [required] below.
1954     All MPEG audio decoders must support all of the MPEG audio modes shown as [required] below.
1955     All AC-3 audio decoders must support all of the AC-3 audio modes shown as [required] below.
1956     The line items shown as [optional] need not be implemented, but are possible formats that might be implemented.
1957    
1958     Note that the input/output pin formats are defined by 2 or 3 GUIDs: TYPE, SUBTYPE, and maybe SPECIFIER.
1959     The specifiers are included if the data format is a "dialect" that needs to be differentiated during decoding.
1960     The decoder MUST be prepared to deal with ALL requests for _required_ "Standard" formats OR _required_ "Dialects".
1961    
1962     STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM [required]
1963     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO [required]
1964     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO [optional]
1965     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO [required]
1966     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO [optional]
1967     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required]
1968     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required]
1969     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required]
1970     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [optional]
1971     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required]
1972     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional]
1973     STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET [required]
1974     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO [optional]
1975     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO [optional]
1976     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO [optional]
1977     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO [optional]
1978     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required]
1979     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required]
1980     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required]
1981     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [required]
1982     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required]
1983     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional]
1984     STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER [required]
1985     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required]
1986     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required]
1987     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required]
1988     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [optional]
1989     STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required]
1990     STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional]
1991    
1992     Note that the SPECIFIER GUIDs normally identify particular versions of MPEG such as DSS and DVD.
1993     This approach was taken to minimize the number of DSS/DVB/DVD/DTV etc. media SUBTYPES.
1994     These specifiers are currently required to disambiguate MPEG syntax _parsing_ by the decoder
1995     using alternate parsing routines or downloadable firmware or hardware decode settings.
1996    
1997     In the future these specifiers will be extended to cover new KS MPEG flavors such as DVB and DTV.
1998     Thus, the optional specifiers will be subject to clarification and/or definition as they are needed.
1999    
2000     Important note: Per the ITU MPEG specs, MPEG 2 media may contain pure MPEG 1 syntax and
2001     any "MPEG 2" PES packets may actually contain MPEG 1 payloads and MPEG 1 syntax. Some MPEG
2002     broadcasts can revert from MPEG2 to MPEG1 format data at their discretion, without warning.
2003    
2004     CAUTION: Decoders MUST attempt to process MPEG data AS SOON AS POSSIBLE after reception.
2005     In particular, elementary MPEG or MPEG PES packet streams should not be aggregated into DVD
2006     "pack headers" internally before submission to the codec hardware if AT ALL POSSIBLE. The
2007     reason is that mpeg data may need to be processed immediately but there may be no additional
2008     MPEG data forthcoming to fill up the PES packet OR DVD "pack" in a timely fashion. This is
2009     particularly true of MPEG dialects that utilize "repeat field signally" to reuse the last
2010     decoded MPEG video field.
2011    
2012     */
2013    
2014     /////////////////////////////////////////////////////////////////////////
2015     // The major data type GUIDs that define the data packet encapsulation //
2016     /////////////////////////////////////////////////////////////////////////
2017    
2018     // STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM
2019     #define STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM \
2020     0x36523b11L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2021     DEFINE_GUIDSTRUCT("36523B11-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM );
2022     #define KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM)
2023    
2024     // STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET
2025     #define STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET \
2026     0x36523b12L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2027     DEFINE_GUIDSTRUCT("36523B12-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_PES_PACKET );
2028     #define KSDATAFORMAT_TYPE_STANDARD_PES_PACKET DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_PES_PACKET)
2029    
2030     // STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER
2031     #define STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER \
2032     0x36523b13L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2033     DEFINE_GUIDSTRUCT("36523B13-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER );
2034     #define KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER)
2035    
2036     ///////////////////////////////////////////////////////////////////////////////
2037     // The minor data subtype GUIDs that define the exact class of the data type.//
2038     ///////////////////////////////////////////////////////////////////////////////
2039    
2040     // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO
2041     #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO \
2042     0x36523b21L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2043     DEFINE_GUIDSTRUCT("36523B21-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO );
2044     #define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO)
2045    
2046     // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO
2047     #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO \
2048     0x36523b22L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2049     DEFINE_GUIDSTRUCT("36523B22-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO );
2050     #define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO)
2051    
2052     // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO
2053     #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO \
2054     0x36523b23L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2055     DEFINE_GUIDSTRUCT("36523B23-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO );
2056     #define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO)
2057    
2058     // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO
2059     #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO \
2060     0x36523b24L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2061     DEFINE_GUIDSTRUCT("36523B24-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO );
2062     #define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO)
2063    
2064     // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO
2065     #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO \
2066     0x36523b25L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2067     DEFINE_GUIDSTRUCT("36523B25-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO );
2068     #define KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO)
2069    
2070     ///////////////////////////////////////////////////////////////////////////////
2071     // The low-level specifier GUIDs that define the flavor of the data subtype. //
2072     // Some SUBTYPES, notably MPEG2_VIDEO, MPEG2_AUDIO have different dialects. //
2073     // These specifiers are intended to be accompanied by a specifier structure. //
2074     ///////////////////////////////////////////////////////////////////////////////
2075    
2076     // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO
2077     #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO \
2078     0x36523b31L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2079     DEFINE_GUIDSTRUCT("36523B31-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO );
2080     #define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO)
2081    
2082     // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO
2083     #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO \
2084     0x36523b32L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2085     DEFINE_GUIDSTRUCT("36523B32-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO );
2086     #define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO)
2087    
2088     // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO Associated with KS_MPEGVIDEOINFO2 defined later
2089     #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO \
2090     0x36523b33L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2091     DEFINE_GUIDSTRUCT("36523B33-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO );
2092     #define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO)
2093    
2094     // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO Associated with KS_MPEGAUDIOINFO defined later
2095     #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO \
2096     0x36523b34L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2097     DEFINE_GUIDSTRUCT("36523B34-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO );
2098     #define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO)
2099    
2100     // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO
2101     #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO \
2102     0x36523b35L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
2103     DEFINE_GUIDSTRUCT("36523B35-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO );
2104     #define KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO)
2105    
2106     //====================================================================================================
2107     //====================================================================================================
2108     // *** COMPATIBILITY WARNING ***
2109     // The *following* older DSS, MPEG, DVD & AC-3 GUID definitions are retained for backward compability.
2110     // These MPEG GUIDs should also be supported for compatibilty, but the above newer modes are still required.
2111     //====================================================================================================
2112     //====================================================================================================
2113    
2114     //
2115     // DSS definitions
2116     //
2117    
2118     #define STATIC_KSDATAFORMAT_SUBTYPE_DSS_VIDEO\
2119     0xa0af4f81L, 0xe163, 0x11d0, 0xba, 0xd9, 0x00, 0x60, 0x97, 0x44, 0x11, 0x1a
2120     DEFINE_GUIDSTRUCT("a0af4f81-e163-11d0-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_DSS_VIDEO);
2121     #define KSDATAFORMAT_SUBTYPE_DSS_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DSS_VIDEO)
2122    
2123     #define STATIC_KSDATAFORMAT_SUBTYPE_DSS_AUDIO\
2124     0xa0af4f82L, 0xe163, 0x11d0, 0xba, 0xd9, 0x00, 0x60, 0x97, 0x44, 0x11, 0x1a
2125     DEFINE_GUIDSTRUCT("a0af4f82-e163-11d0-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_DSS_AUDIO);
2126     #define KSDATAFORMAT_SUBTYPE_DSS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DSS_AUDIO)
2127    
2128     //
2129     // End of obsolete MPEG definitions.
2130     //
2131    
2132     //
2133     // mpeg 1 definitions
2134     //
2135     #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Packet\
2136     0xe436eb80, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
2137     DEFINE_GUIDSTRUCT("e436eb80-524f-11ce-9F53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Packet);
2138     #define KSDATAFORMAT_SUBTYPE_MPEG1Packet DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Packet)
2139    
2140     #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Payload\
2141     0xe436eb81, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
2142     DEFINE_GUIDSTRUCT("e436eb81-524f-11ce-9F53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Payload);
2143     #define KSDATAFORMAT_SUBTYPE_MPEG1Payload DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Payload)
2144    
2145     // MEDIASUBTYPE_MPEG1Video
2146     #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Video\
2147     0xe436eb86, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
2148     DEFINE_GUIDSTRUCT("e436eb86-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Video);
2149     #define KSDATAFORMAT_SUBTYPE_MPEG1Video DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Video)
2150    
2151     //FORMAT_MPEGVideo
2152     #define STATIC_KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO\
2153     0x05589f82L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a
2154     DEFINE_GUIDSTRUCT("05589f82-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO);
2155     #define KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO)
2156    
2157     //
2158     // mpeg 2 definitions
2159     //
2160     #define STATIC_KSDATAFORMAT_TYPE_MPEG2_PES\
2161     0xe06d8020L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2162     DEFINE_GUIDSTRUCT("e06d8020-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_PES);
2163     #define KSDATAFORMAT_TYPE_MPEG2_PES DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_PES)
2164    
2165     #define STATIC_KSDATAFORMAT_TYPE_MPEG2_PROGRAM\
2166     0xe06d8022L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2167     DEFINE_GUIDSTRUCT("e06d8022-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_PROGRAM);
2168     #define KSDATAFORMAT_TYPE_MPEG2_PROGRAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_PROGRAM)
2169    
2170     #define STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT\
2171     0xe06d8023L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2172     DEFINE_GUIDSTRUCT("e06d8023-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_TRANSPORT);
2173     #define KSDATAFORMAT_TYPE_MPEG2_TRANSPORT DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_TRANSPORT)
2174    
2175     #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO\
2176     0xe06d8026L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2177     DEFINE_GUIDSTRUCT("e06d8026-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO);
2178     #define KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO)
2179    
2180     // use MPEGVIDEOINFO2 (defined below) with KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO
2181     #define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO\
2182     0xe06d80e3L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2183     DEFINE_GUIDSTRUCT("e06d80e3-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO);
2184     #define KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO)
2185    
2186    
2187     //
2188     // Mpeg2 video properties
2189     //
2190    
2191    
2192     #define STATIC_KSPROPSETID_Mpeg2Vid\
2193     0xC8E11B60L, 0x0CC9, 0x11D0, 0xBD, 0x69, 0x00, 0x35, 0x05, 0xC1, 0x03, 0xA9
2194     DEFINE_GUIDSTRUCT("C8E11B60-0CC9-11D0-BD69-003505C103A9", KSPROPSETID_Mpeg2Vid);
2195     #define KSPROPSETID_Mpeg2Vid DEFINE_GUIDNAMED( KSPROPSETID_Mpeg2Vid )
2196    
2197    
2198     typedef enum {
2199     KSPROPERTY_MPEG2VID_MODES, // available output modes of decoder
2200     KSPROPERTY_MPEG2VID_CUR_MODE, // current mode of the decoder
2201     KSPROPERTY_MPEG2VID_4_3_RECT, // output coordinates for 4:3 source
2202     KSPROPERTY_MPEG2VID_16_9_RECT, // output coordinates for 16:9 source
2203     KSPROPERTY_MPEG2VID_16_9_PANSCAN, // pan and scan vectors
2204     } KSPROPERTY_MPEG2VID;
2205    
2206     //
2207     // bit field definitions for MPEG2 VIDEO mode
2208     //
2209    
2210     #define KSMPEGVIDMODE_PANSCAN 0x0001
2211     #define KSMPEGVIDMODE_LTRBOX 0x0002
2212     #define KSMPEGVIDMODE_SCALE 0x0004
2213    
2214     //
2215     // rectangle definitions for the 4/3 and 16/9 cropping properties of
2216     // the MPEG2Video decoder
2217     //
2218    
2219     typedef struct _KSMPEGVID_RECT {
2220     ULONG StartX;
2221     ULONG StartY;
2222     ULONG EndX;
2223     ULONG EndY;
2224     } KSMPEGVID_RECT, *PKSMPEGVID_RECT;
2225    
2226     //
2227     // Params for pan / scan
2228     //
2229    
2230    
2231     //
2232     // MPEG2 Audio definition
2233     //
2234    
2235     #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO\
2236     0xe06d802bL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2237     DEFINE_GUIDSTRUCT("e06d802b-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO);
2238     #define KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO)
2239    
2240     #define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO\
2241     0xe06d80e5L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2242     DEFINE_GUIDSTRUCT("e06d80e5-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO);
2243     #define KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO)
2244    
2245     //
2246     // DVD LPCM Audio definition
2247     //
2248    
2249     #define STATIC_KSDATAFORMAT_SUBTYPE_LPCM_AUDIO\
2250     0xe06d8032L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2251     DEFINE_GUIDSTRUCT("e06d8032-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_LPCM_AUDIO);
2252     #define KSDATAFORMAT_SUBTYPE_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_LPCM_AUDIO)
2253    
2254     #define STATIC_KSDATAFORMAT_SPECIFIER_LPCM_AUDIO\
2255     0xe06d80e6L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2256     DEFINE_GUIDSTRUCT("e06d80e6-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_LPCM_AUDIO);
2257     #define KSDATAFORMAT_SPECIFIER_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_LPCM_AUDIO)
2258    
2259     //
2260     // AC-3 definition
2261     //
2262    
2263     #define STATIC_KSDATAFORMAT_SUBTYPE_AC3_AUDIO\
2264     0xe06d802cL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2265     DEFINE_GUIDSTRUCT("e06d802c-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_AC3_AUDIO);
2266     #define KSDATAFORMAT_SUBTYPE_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_AC3_AUDIO)
2267    
2268     #define STATIC_KSDATAFORMAT_SPECIFIER_AC3_AUDIO\
2269     0xe06d80e4L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2270     DEFINE_GUIDSTRUCT("e06d80e4-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_AC3_AUDIO);
2271     #define KSDATAFORMAT_SPECIFIER_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_AC3_AUDIO)
2272    
2273     #define STATIC_KSPROPSETID_AC3\
2274     0xBFABE720L, 0x6E1F, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00
2275     DEFINE_GUIDSTRUCT("BFABE720-6E1F-11D0-BCF2-444553540000", KSPROPSETID_AC3);
2276     #define KSPROPSETID_AC3 DEFINE_GUIDNAMED(KSPROPSETID_AC3)
2277    
2278     typedef enum {
2279     KSPROPERTY_AC3_ERROR_CONCEALMENT = 1,
2280     KSPROPERTY_AC3_ALTERNATE_AUDIO,
2281     KSPROPERTY_AC3_DOWNMIX,
2282     KSPROPERTY_AC3_BIT_STREAM_MODE,
2283     KSPROPERTY_AC3_DIALOGUE_LEVEL,
2284     KSPROPERTY_AC3_LANGUAGE_CODE,
2285     KSPROPERTY_AC3_ROOM_TYPE
2286     } KSPROPERTY_AC3;
2287    
2288     typedef struct {
2289     BOOL fRepeatPreviousBlock;
2290     BOOL fErrorInCurrentBlock;
2291     } KSAC3_ERROR_CONCEALMENT, *PKSAC3_ERROR_CONCEALMENT;
2292    
2293     typedef struct {
2294     BOOL fStereo;
2295     ULONG DualMode;
2296     } KSAC3_ALTERNATE_AUDIO, *PKSAC3_ALTERNATE_AUDIO;
2297    
2298     #define KSAC3_ALTERNATE_AUDIO_1 1
2299     #define KSAC3_ALTERNATE_AUDIO_2 2
2300     #define KSAC3_ALTERNATE_AUDIO_BOTH 3
2301    
2302     typedef struct {
2303     BOOL fDownMix;
2304     BOOL fDolbySurround;
2305     } KSAC3_DOWNMIX, *PKSAC3_DOWNMIX;
2306    
2307     typedef struct {
2308     LONG BitStreamMode;
2309     } KSAC3_BIT_STREAM_MODE, *PKSAC3_BIT_STREAM_MODE;
2310    
2311     #define KSAC3_SERVICE_MAIN_AUDIO 0
2312     #define KSAC3_SERVICE_NO_DIALOG 1
2313     #define KSAC3_SERVICE_VISUALLY_IMPAIRED 2
2314     #define KSAC3_SERVICE_HEARING_IMPAIRED 3
2315     #define KSAC3_SERVICE_DIALOG_ONLY 4
2316     #define KSAC3_SERVICE_COMMENTARY 5
2317     #define KSAC3_SERVICE_EMERGENCY_FLASH 6
2318     #define KSAC3_SERVICE_VOICE_OVER 7
2319    
2320     typedef struct {
2321     ULONG DialogueLevel;
2322     } KSAC3_DIALOGUE_LEVEL, *PKSAC3_DIALOGUE_LEVEL;
2323    
2324     typedef struct {
2325     BOOL fLargeRoom;
2326     } KSAC3_ROOM_TYPE, *PKSAC3_ROOM_TYPE;
2327    
2328    
2329     //
2330     // DTS and SDDS definitions (media subtype GUIDs)
2331     //
2332     #define STATIC_KSDATAFORMAT_SUBTYPE_DTS_AUDIO\
2333     0xe06d8033L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2334     DEFINE_GUIDSTRUCT("e06d8033-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_DTS_AUDIO);
2335     #define KSDATAFORMAT_SUBTYPE_DTS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DTS_AUDIO)
2336    
2337     #define STATIC_KSDATAFORMAT_SUBTYPE_SDDS_AUDIO\
2338     0xe06d8034L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2339     DEFINE_GUIDSTRUCT("e06d8034-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SDDS_AUDIO);
2340     #define KSDATAFORMAT_SUBTYPE_SDDS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SDDS_AUDIO)
2341    
2342    
2343     //
2344     // audio decoder output properties
2345     //
2346    
2347     #define STATIC_KSPROPSETID_AudioDecoderOut\
2348     0x6ca6e020L, 0x43bd, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9
2349     DEFINE_GUIDSTRUCT("6ca6e020-43bd-11d0-bd6a-003505c103a9", KSPROPSETID_AudioDecoderOut);
2350     #define KSPROPSETID_AudioDecoderOut DEFINE_GUIDNAMED(KSPROPSETID_AudioDecoderOut)
2351    
2352     typedef enum {
2353     KSPROPERTY_AUDDECOUT_MODES, // available output modes of decoder
2354     KSPROPERTY_AUDDECOUT_CUR_MODE, // current mode of the decoder
2355     } KSPROPERTY_AUDDECOUT;
2356    
2357     #define KSAUDDECOUTMODE_STEREO_ANALOG 0x0001
2358     #define KSAUDDECOUTMODE_PCM_51 0x0002
2359     #define KSAUDDECOUTMODE_SPDIFF 0x0004
2360    
2361    
2362    
2363     //
2364     // subpicture definition
2365     //
2366    
2367     #define STATIC_KSDATAFORMAT_SUBTYPE_SUBPICTURE\
2368     0xe06d802dL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
2369     DEFINE_GUIDSTRUCT("e06d802d-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SUBPICTURE);
2370     #define KSDATAFORMAT_SUBTYPE_SUBPICTURE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SUBPICTURE)
2371    
2372    
2373     #define STATIC_KSPROPSETID_DvdSubPic\
2374     0xac390460L, 0x43af, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9
2375     DEFINE_GUIDSTRUCT("ac390460-43af-11d0-bd6a-003505c103a9", KSPROPSETID_DvdSubPic);
2376     #define KSPROPSETID_DvdSubPic DEFINE_GUIDNAMED(KSPROPSETID_DvdSubPic)
2377    
2378     typedef enum {
2379     KSPROPERTY_DVDSUBPIC_PALETTE,
2380     KSPROPERTY_DVDSUBPIC_HLI,
2381     KSPROPERTY_DVDSUBPIC_COMPOSIT_ON, // TRUE for subpicture is displayed
2382     } KSPROPERTY_DVDSUBPIC;
2383    
2384     typedef struct _KS_DVD_YCrCb {
2385     UCHAR Reserved;
2386     UCHAR Y;
2387     UCHAR Cr;
2388     UCHAR Cb;
2389     } KS_DVD_YCrCb, *PKS_DVD_YCrCb;
2390    
2391     /* The KS_DVD_YUV structure is now superseded by KS_DVD_YCrCb above and is
2392     here for backward compatibility only */
2393    
2394     typedef struct _KS_DVD_YUV {
2395     UCHAR Reserved;
2396     UCHAR Y;
2397     UCHAR V;
2398     UCHAR U;
2399     } KS_DVD_YUV, *PKS_DVD_YUV;
2400    
2401     typedef struct _KSPROPERTY_SPPAL {
2402     KS_DVD_YUV sppal[16];
2403     } KSPROPERTY_SPPAL, *PKSPROPERTY_SPPAL;
2404    
2405     typedef struct _KS_COLCON {
2406     UCHAR emph1col:4;
2407     UCHAR emph2col:4;
2408     UCHAR backcol:4;
2409     UCHAR patcol:4;
2410     UCHAR emph1con:4;
2411     UCHAR emph2con:4;
2412     UCHAR backcon:4;
2413     UCHAR patcon:4;
2414    
2415     } KS_COLCON, *PKS_COLCON;
2416    
2417     typedef struct _KSPROPERTY_SPHLI {
2418     USHORT HLISS;
2419     USHORT Reserved;
2420     ULONG StartPTM; // start presentation time in x/90000
2421     ULONG EndPTM; // end PTM in x/90000
2422     USHORT StartX;
2423     USHORT StartY;
2424     USHORT StopX;
2425     USHORT StopY;
2426     KS_COLCON ColCon; // color contrast description (4 bytes as given in HLI)
2427     } KSPROPERTY_SPHLI, *PKSPROPERTY_SPHLI;
2428    
2429     typedef BOOL KSPROPERTY_COMPOSIT_ON, *PKSPROPERTY_COMPOSIT_ON;
2430    
2431     #define STATIC_KSPROPSETID_CopyProt \
2432     0x0E8A0A40L, 0x6AEF, 0x11D0, 0x9E, 0xD0, 0x00, 0xA0, 0x24, 0xCA, 0x19, 0xB3
2433     DEFINE_GUIDSTRUCT("0E8A0A40-6AEF-11D0-9ED0-00A024CA19B3", KSPROPSETID_CopyProt);
2434     #define KSPROPSETID_CopyProt DEFINE_GUIDNAMED(KSPROPSETID_CopyProt)
2435    
2436     typedef enum {
2437    
2438     KSPROPERTY_DVDCOPY_CHLG_KEY = 0x01,
2439     KSPROPERTY_DVDCOPY_DVD_KEY1,
2440     KSPROPERTY_DVDCOPY_DEC_KEY2,
2441     KSPROPERTY_DVDCOPY_TITLE_KEY,
2442     KSPROPERTY_COPY_MACROVISION,
2443     KSPROPERTY_DVDCOPY_REGION,
2444     KSPROPERTY_DVDCOPY_SET_COPY_STATE,
2445     KSPROPERTY_DVDCOPY_DISC_KEY = 0x80
2446    
2447     } KSPROPERTY_COPYPROT;
2448    
2449     typedef struct _KS_DVDCOPY_CHLGKEY {
2450     BYTE ChlgKey[10];
2451     BYTE Reserved[2];
2452     } KS_DVDCOPY_CHLGKEY, *PKS_DVDCOPY_CHLGKEY;
2453    
2454     typedef struct _KS_DVDCOPY_BUSKEY {
2455     BYTE BusKey[5];
2456     BYTE Reserved[1];
2457     } KS_DVDCOPY_BUSKEY, *PKS_DVDCOPY_BUSKEY;
2458    
2459    
2460     typedef struct _KS_DVDCOPY_DISCKEY {
2461     BYTE DiscKey[2048];
2462     } KS_DVDCOPY_DISCKEY, *PKS_DVDCOPY_DISCKEY;
2463    
2464     typedef struct _KS_DVDCOPY_REGION {
2465     UCHAR Reserved;
2466     UCHAR RegionData;
2467     UCHAR Reserved2[2];
2468     } KS_DVDCOPY_REGION, *PKS_DVDCOPY_REGION;
2469    
2470     typedef struct _KS_DVDCOPY_TITLEKEY {
2471     ULONG KeyFlags;
2472     ULONG ReservedNT[2];
2473     UCHAR TitleKey[6];
2474     UCHAR Reserved[2];
2475     } KS_DVDCOPY_TITLEKEY, *PKS_DVDCOPY_TITLEKEY;
2476    
2477     typedef struct _KS_COPY_MACROVISION {
2478     ULONG MACROVISIONLevel;
2479     } KS_COPY_MACROVISION, *PKS_COPY_MACROVISION;
2480    
2481     typedef struct _KS_DVDCOPY_SET_COPY_STATE {
2482     ULONG DVDCopyState;
2483     } KS_DVDCOPY_SET_COPY_STATE, *PKS_DVDCOPY_SET_COPY_STATE;
2484    
2485     typedef enum {
2486     KS_DVDCOPYSTATE_INITIALIZE, // indicates we are starting a full
2487     // copy protection sequence.
2488     KS_DVDCOPYSTATE_INITIALIZE_TITLE, // indicates we are starting a title
2489     // key copy protection sequence
2490     KS_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED,
2491     KS_DVDCOPYSTATE_AUTHENTICATION_REQUIRED,
2492     KS_DVDCOPYSTATE_DONE,
2493     } KS_DVDCOPYSTATE;
2494    
2495     typedef enum {
2496     KS_MACROVISION_DISABLED,
2497     KS_MACROVISION_LEVEL1,
2498     KS_MACROVISION_LEVEL2,
2499     KS_MACROVISION_LEVEL3
2500     } KS_COPY_MACROVISION_LEVEL, *PKS_COPY_MACROVISION_LEVEL;
2501    
2502     //
2503     // CGMS Copy Protection Flags
2504     //
2505    
2506     #define KS_DVD_CGMS_RESERVED_MASK 0x00000078
2507    
2508     #define KS_DVD_CGMS_COPY_PROTECT_MASK 0x00000018
2509     #define KS_DVD_CGMS_COPY_PERMITTED 0x00000000
2510     #define KS_DVD_CGMS_COPY_ONCE 0x00000010
2511     #define KS_DVD_CGMS_NO_COPY 0x00000018
2512    
2513     #define KS_DVD_COPYRIGHT_MASK 0x00000040
2514     #define KS_DVD_NOT_COPYRIGHTED 0x00000000
2515     #define KS_DVD_COPYRIGHTED 0x00000040
2516    
2517     #define KS_DVD_SECTOR_PROTECT_MASK 0x00000020
2518     #define KS_DVD_SECTOR_NOT_PROTECTED 0x00000000
2519     #define KS_DVD_SECTOR_PROTECTED 0x00000020
2520    
2521    
2522     //===========================================================================
2523     // The following MUST match the structures in WinGDI.h and AMVideo.h
2524     //===========================================================================
2525    
2526     #define STATIC_KSCATEGORY_TVTUNER \
2527     0xa799a800L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
2528     DEFINE_GUIDSTRUCT("a799a800-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVTUNER);
2529     #define KSCATEGORY_TVTUNER DEFINE_GUIDNAMED(KSCATEGORY_TVTUNER)
2530    
2531     #define STATIC_KSCATEGORY_CROSSBAR \
2532     0xa799a801L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
2533     DEFINE_GUIDSTRUCT("a799a801-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_CROSSBAR);
2534     #define KSCATEGORY_CROSSBAR DEFINE_GUIDNAMED(KSCATEGORY_CROSSBAR)
2535    
2536     #define STATIC_KSCATEGORY_TVAUDIO \
2537     0xa799a802L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
2538     DEFINE_GUIDSTRUCT("a799a802-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVAUDIO);
2539     #define KSCATEGORY_TVAUDIO DEFINE_GUIDNAMED(KSCATEGORY_TVAUDIO)
2540    
2541     #define STATIC_KSCATEGORY_VPMUX \
2542     0xa799a803L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
2543     DEFINE_GUIDSTRUCT("a799a803-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_VPMUX);
2544     #define KSCATEGORY_VPMUX DEFINE_GUIDNAMED(KSCATEGORY_VPMUX)
2545    
2546     #define STATIC_KSCATEGORY_VBICODEC \
2547     0x07dad660L, 0x22f1, 0x11d1, 0xa9, 0xf4, 0x00, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
2548     DEFINE_GUIDSTRUCT("07dad660-22f1-11d1-a9f4-00c04fbbde8f", KSCATEGORY_VBICODEC);
2549     #define KSCATEGORY_VBICODEC DEFINE_GUIDNAMED(KSCATEGORY_VBICODEC)
2550    
2551     // SUBTYPE_VPVideo
2552     #define STATIC_KSDATAFORMAT_SUBTYPE_VPVideo\
2553     0x5a9b6a40L, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
2554     DEFINE_GUIDSTRUCT("5a9b6a40-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVideo);
2555     #define KSDATAFORMAT_SUBTYPE_VPVideo DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVideo)
2556    
2557     // SUBTYPE_VPVBI
2558     #define STATIC_KSDATAFORMAT_SUBTYPE_VPVBI\
2559     0x5a9b6a41L, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
2560     DEFINE_GUIDSTRUCT("5a9b6a41-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVBI);
2561     #define KSDATAFORMAT_SUBTYPE_VPVBI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVBI)
2562    
2563    
2564     // FORMAT_VideoInfo
2565     #define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO\
2566     0x05589f80L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a
2567     DEFINE_GUIDSTRUCT("05589f80-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_VIDEOINFO);
2568     #define KSDATAFORMAT_SPECIFIER_VIDEOINFO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO)
2569    
2570     // FORMAT_VideoInfo2
2571     #define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2\
2572     0xf72a76A0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
2573     DEFINE_GUIDSTRUCT("f72a76A0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VIDEOINFO2);
2574     #define KSDATAFORMAT_SPECIFIER_VIDEOINFO2 DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO2)
2575    
2576     // MEDIATYPE_AnalogVideo
2577     #define STATIC_KSDATAFORMAT_TYPE_ANALOGVIDEO\
2578     0x0482dde1L, 0x7817, 0x11cf, 0x8a, 0x03, 0x00, 0xaa, 0x00, 0x6e, 0xcb, 0x65
2579     DEFINE_GUIDSTRUCT("0482dde1-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_TYPE_ANALOGVIDEO);
2580     #define KSDATAFORMAT_TYPE_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_ANALOGVIDEO)
2581    
2582     // FORMAT_AnalogVideo
2583     #define STATIC_KSDATAFORMAT_SPECIFIER_ANALOGVIDEO\
2584     0x0482dde0L, 0x7817, 0x11cf, 0x8a, 0x03, 0x00, 0xaa, 0x00, 0x6e, 0xcb, 0x65
2585     DEFINE_GUIDSTRUCT("0482dde0-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_SPECIFIER_ANALOGVIDEO);
2586     #define KSDATAFORMAT_SPECIFIER_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_ANALOGVIDEO)
2587    
2588     // FORMAT_VBI
2589     #define STATIC_KSDATAFORMAT_SPECIFIER_VBI\
2590     0xf72a76e0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
2591     DEFINE_GUIDSTRUCT("f72a76e0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VBI);
2592     #define KSDATAFORMAT_SPECIFIER_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VBI)
2593    
2594     // MEDIATYPE_VBI
2595     #define STATIC_KSDATAFORMAT_TYPE_VBI\
2596     0xf72a76e1L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
2597     DEFINE_GUIDSTRUCT("f72a76e1-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_TYPE_VBI);
2598     #define KSDATAFORMAT_TYPE_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VBI)
2599    
2600     // SUBTYPE_RAW8
2601     #define STATIC_KSDATAFORMAT_SUBTYPE_RAW8\
2602     0xca20d9a0, 0x3e3e, 0x11d1, 0x9b, 0xf9, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0xbf
2603     DEFINE_GUIDSTRUCT("ca20d9a0-3e3e-11d1-9bf9-00c04fbbdebf", KSDATAFORMAT_SUBTYPE_RAW8);
2604     #define KSDATAFORMAT_SUBTYPE_RAW8 DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RAW8)
2605    
2606     // MEDIASUBTYPE_CC
2607     #define STATIC_KSDATAFORMAT_SUBTYPE_CC\
2608     0x33214cc1, 0x11f, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
2609     DEFINE_GUIDSTRUCT("33214CC1-011F-11D2-B4B1-00A0D102CFBE", KSDATAFORMAT_SUBTYPE_CC);
2610     #define KSDATAFORMAT_SUBTYPE_CC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_CC)
2611    
2612     // MEDIASUBTYPE_NABTS
2613     #define STATIC_KSDATAFORMAT_SUBTYPE_NABTS\
2614     0xf72a76e2L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
2615     DEFINE_GUIDSTRUCT("f72a76e2-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_NABTS);
2616     #define KSDATAFORMAT_SUBTYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS)
2617    
2618     // MEDIASUBTYPE_TELETEXT
2619     #define STATIC_KSDATAFORMAT_SUBTYPE_TELETEXT\
2620     0xf72a76e3L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
2621     DEFINE_GUIDSTRUCT("f72a76e3-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_TELETEXT);
2622     #define KSDATAFORMAT_SUBTYPE_TELETEXT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_TELETEXT)
2623    
2624    
2625    
2626     /* constants for the biCompression field */
2627     #define KS_BI_RGB 0L
2628     #define KS_BI_RLE8 1L
2629     #define KS_BI_RLE4 2L
2630     #define KS_BI_BITFIELDS 3L
2631    
2632     typedef struct tagKS_RGBQUAD { // rgbq
2633     BYTE rgbBlue;
2634     BYTE rgbGreen;
2635     BYTE rgbRed;
2636     BYTE rgbReserved;
2637     } KS_RGBQUAD, *PKS_RGBQUAD;
2638    
2639     /* constants for palettes */
2640     #define KS_iPALETTE_COLORS 256 // Maximum colours in palette
2641     #define KS_iEGA_COLORS 16 // Number colours in EGA palette
2642     #define KS_iMASK_COLORS 3 // Maximum three components
2643     #define KS_iTRUECOLOR 16 // Minimum true colour device
2644     #define KS_iRED 0 // Index position for RED mask
2645     #define KS_iGREEN 1 // Index position for GREEN mask
2646     #define KS_iBLUE 2 // Index position for BLUE mask
2647     #define KS_iPALETTE 8 // Maximum colour depth using a palette
2648     #define KS_iMAXBITS 8 // Maximum bits per colour component
2649     #define KS_SIZE_EGA_PALETTE (KS_iEGA_COLORS * sizeof(KS_RGBQUAD))
2650     #define KS_SIZE_PALETTE (KS_iPALETTE_COLORS * sizeof(KS_RGBQUAD))
2651    
2652     typedef struct tagKS_BITMAPINFOHEADER{
2653     DWORD biSize;
2654     LONG biWidth;
2655     LONG biHeight;
2656     WORD biPlanes;
2657     WORD biBitCount;
2658     DWORD biCompression;
2659     DWORD biSizeImage;
2660     LONG biXPelsPerMeter;
2661     LONG biYPelsPerMeter;
2662     DWORD biClrUsed;
2663     DWORD biClrImportant;
2664     } KS_BITMAPINFOHEADER, *PKS_BITMAPINFOHEADER;
2665    
2666     // Used for true colour images that also have a palette
2667    
2668     typedef struct tag_KS_TRUECOLORINFO {
2669     DWORD dwBitMasks[KS_iMASK_COLORS];
2670     KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS];
2671     } KS_TRUECOLORINFO, *PKS_TRUECOLORINFO;
2672    
2673    
2674     #define KS_WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8)
2675     #define KS_DIBWIDTHBYTES(bi) (DWORD)KS_WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
2676     #define KS__DIBSIZE(bi) (KS_DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
2677     #define KS_DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(KS__DIBSIZE(bi)) : KS__DIBSIZE(bi))
2678    
2679     typedef LONGLONG REFERENCE_TIME;
2680    
2681     // The BITMAPINFOHEADER contains all the details about the video stream such
2682     // as the actual image dimensions and their pixel depth. A source filter may
2683     // also request that the sink take only a section of the video by providing a
2684     // clipping rectangle in rcSource. In the worst case where the sink filter
2685     // forgets to check this on connection it will simply render the whole thing
2686     // which isn't a disaster. Ideally a sink filter will check the rcSource and
2687     // if it doesn't support image extraction and the rectangle is not empty then
2688     // it will reject the connection. A filter should use SetRectEmpty to reset a
2689     // rectangle to all zeroes (and IsRectEmpty to later check the rectangle).
2690     // The rcTarget specifies the destination rectangle for the video, for most
2691     // source filters they will set this to all zeroes, a downstream filter may
2692     // request that the video be placed in a particular area of the buffers it
2693     // supplies in which case it will call QueryAccept with a non empty target
2694    
2695     typedef struct tagKS_VIDEOINFOHEADER {
2696    
2697     RECT rcSource; // The bit we really want to use
2698     RECT rcTarget; // Where the video should go
2699     DWORD dwBitRate; // Approximate bit data rate
2700     DWORD dwBitErrorRate; // Bit error rate for this stream
2701     REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
2702    
2703     KS_BITMAPINFOHEADER bmiHeader;
2704    
2705     } KS_VIDEOINFOHEADER, *PKS_VIDEOINFOHEADER;
2706    
2707     // !!! WARNING !!!
2708     // DO NOT use the following structure unless you are sure that the BITMAPINFOHEADER
2709     // has a normal biSize == sizeof(BITMAPINFOHEADER) !
2710     // !!! WARNING !!!
2711    
2712     typedef struct tagKS_VIDEOINFO {
2713    
2714     RECT rcSource; // The bit we really want to use
2715     RECT rcTarget; // Where the video should go
2716     DWORD dwBitRate; // Approximate bit data rate
2717     DWORD dwBitErrorRate; // Bit error rate for this stream
2718     REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
2719    
2720     KS_BITMAPINFOHEADER bmiHeader;
2721    
2722     union {
2723     KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS]; // Colour palette
2724     DWORD dwBitMasks[KS_iMASK_COLORS]; // True colour masks
2725     KS_TRUECOLORINFO TrueColorInfo; // Both of the above
2726     };
2727    
2728     } KS_VIDEOINFO, *PKS_VIDEOINFO;
2729    
2730    
2731     #define KS_SIZE_MASKS (KS_iMASK_COLORS * sizeof(DWORD))
2732     #define KS_SIZE_PREHEADER (FIELD_OFFSET(KS_VIDEOINFOHEADER,bmiHeader))
2733    
2734     // For normal size
2735     // #define KS_SIZE_VIDEOHEADER (sizeof(KS_BITMAPINFOHEADER) + KS_SIZE_PREHEADER)
2736     // !!! for abnormal biSizes
2737     #define KS_SIZE_VIDEOHEADER(pbmi) ((pbmi)->bmiHeader.biSize + KS_SIZE_PREHEADER)
2738    
2739     // VBI
2740     // Used for NABTS, CC, Intercast,
2741     typedef struct tagKS_VBIINFOHEADER {
2742     ULONG StartLine; // inclusive
2743     ULONG EndLine; // inclusive
2744     ULONG SamplingFrequency; // Hz.
2745     ULONG MinLineStartTime; // microSec * 100 from HSync LE
2746     ULONG MaxLineStartTime; // microSec * 100 from HSync LE
2747     ULONG ActualLineStartTime; // microSec * 100 from HSync LE
2748     ULONG ActualLineEndTime; // microSec * 100 from HSync LE
2749     ULONG VideoStandard; // KS_AnalogVideoStandard*
2750     ULONG SamplesPerLine;
2751     ULONG StrideInBytes; // May be > SamplesPerLine
2752     ULONG BufferSize; // Bytes
2753     } KS_VBIINFOHEADER, *PKS_VBIINFOHEADER;
2754    
2755     // VBI Sampling Rates
2756     #define KS_VBIDATARATE_NABTS (5727272L)
2757     #define KS_VBIDATARATE_CC ( 503493L) // ~= 1/1.986125e-6
2758     #define KS_VBISAMPLINGRATE_4X_NABTS ((long)(4*KS_VBIDATARATE_NABTS))
2759     #define KS_VBISAMPLINGRATE_47X_NABTS ((long)(27000000))
2760     #define KS_VBISAMPLINGRATE_5X_NABTS ((long)(5*KS_VBIDATARATE_NABTS))
2761    
2762     #define KS_47NABTS_SCALER (KS_VBISAMPLINGRATE_47X_NABTS/(double)KS_VBIDATARATE_NABTS)
2763    
2764     // Analog video variant - Use this when the format is FORMAT_AnalogVideo
2765     //
2766     // rcSource defines the portion of the active video signal to use
2767     // rcTarget defines the destination rectangle
2768     // both of the above are relative to the dwActiveWidth and dwActiveHeight fields
2769     // dwActiveWidth is currently set to 720 for all formats (but could change for HDTV)
2770     // dwActiveHeight is 483 for NTSC and 575 for PAL/SECAM (but could change for HDTV)
2771    
2772     typedef struct tagKS_AnalogVideoInfo {
2773     RECT rcSource; // Width max is 720, height varies w/ TransmissionStd
2774     RECT rcTarget; // Where the video should go
2775     DWORD dwActiveWidth; // Always 720 (CCIR-601 active samples per line)
2776     DWORD dwActiveHeight; // 483 for NTSC, 575 for PAL/SECAM
2777     REFERENCE_TIME AvgTimePerFrame; // Normal ActiveMovie units (100 nS)
2778     } KS_ANALOGVIDEOINFO, *PKS_ANALOGVIDEOINFO;
2779    
2780     //===========================================================================
2781     // Data packet passed on Analog video stream channel change
2782     //===========================================================================
2783    
2784     #define KS_TVTUNER_CHANGE_BEGIN_TUNE 0x0001L // Starting a tuning operation
2785     #define KS_TVTUNER_CHANGE_END_TUNE 0x0002L // Ending a tuning operation
2786    
2787     typedef struct tagKS_TVTUNER_CHANGE_INFO {
2788     DWORD dwFlags; // KS_TVTUNER_CHANGE_*
2789     DWORD dwCountryCode;
2790     DWORD dwAnalogVideoStandard; // KS_AnalogVideoStandard
2791     DWORD dwChannel;
2792     } KS_TVTUNER_CHANGE_INFO, *PKS_TVTUNER_CHANGE_INFO;
2793    
2794     //===========================================================================
2795     // Video format blocks
2796     //===========================================================================
2797    
2798     typedef enum {
2799     KS_MPEG2Level_Low,
2800     KS_MPEG2Level_Main,
2801     KS_MPEG2Level_High1440,
2802     KS_MPEG2Level_High
2803     } KS_MPEG2Level;
2804    
2805     typedef enum {
2806     KS_MPEG2Profile_Simple,
2807     KS_MPEG2Profile_Main,
2808     KS_MPEG2Profile_SNRScalable,
2809     KS_MPEG2Profile_SpatiallyScalable,
2810     KS_MPEG2Profile_High
2811     } KS_MPEG2Profile;
2812    
2813     #define KS_INTERLACE_IsInterlaced 0x00000001 // if 0, other interlace bits are irrelevent
2814     #define KS_INTERLACE_1FieldPerSample 0x00000002 // else 2 fields per media sample
2815     #define KS_INTERLACE_Field1First 0x00000004 // else Field 2 is first; top field in PAL is field 1, top field in NTSC is field 2?
2816     #define KS_INTERLACE_UNUSED 0x00000008 //
2817     #define KS_INTERLACE_FieldPatternMask 0x00000030 // use this mask with AMINTERLACE_FieldPat*
2818     #define KS_INTERLACE_FieldPatField1Only 0x00000000 // Data never contains a Field2
2819     #define KS_INTERLACE_FieldPatField2Only 0x00000010 // Data never contains a Field1
2820     #define KS_INTERLACE_FieldPatBothRegular 0x00000020 // There will be a Field2 for every Field1 (required for Weave?)
2821     #define KS_INTERLACE_FieldPatBothIrregular 0x00000030 // Random pattern of Field1s and Field2s
2822     #define KS_INTERLACE_DisplayModeMask 0x000000c0
2823     #define KS_INTERLACE_DisplayModeBobOnly 0x00000000
2824     #define KS_INTERLACE_DisplayModeWeaveOnly 0x00000040
2825     #define KS_INTERLACE_DisplayModeBobOrWeave 0x00000080
2826    
2827    
2828    
2829     #define KS_MPEG2_DoPanScan 0x00000001 //if set, the MPEG-2 video decoder should crop output image
2830     // based on pan-scan vectors in picture_display_extension
2831     // and change the picture aspect ratio accordingly.
2832     #define KS_MPEG2_DVDLine21Field1 0x00000002 //if set, the MPEG-2 decoder must be able to produce an output
2833     // pin for DVD style closed caption data found in GOP layer of field 1
2834     #define KS_MPEG2_DVDLine21Field2 0x00000004 //if set, the MPEG-2 decoder must be able to produce an output
2835     // pin for DVD style closed caption data found in GOP layer of field 2
2836     #define KS_MPEG2_SourceIsLetterboxed 0x00000008 //if set, indicates that black bars have been encoded in the top
2837     // and bottom of the video.
2838     #define KS_MPEG2_FilmCameraMode 0x00000010 //if set, indicates "film mode" used for 625/50 content. If cleared,
2839     // indicates that "camera mode" was used.
2840     #define KS_MPEG2_LetterboxAnalogOut 0x00000020 //if set and this stream is sent to an analog output, it should
2841     // be letterboxed. Streams sent to VGA should be letterboxed only by renderers.
2842     #define KS_MPEG2_DSS_UserData 0x00000040 //if set, the MPEG-2 decoder must process DSS style user data
2843     #define KS_MPEG2_DVB_UserData 0x00000080 //if set, the MPEG-2 decoder must process DVB style user data
2844     #define KS_MPEG2_27MhzTimebase 0x00000100 //if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz
2845    
2846     typedef struct tagKS_VIDEOINFOHEADER2 {
2847     RECT rcSource;
2848     RECT rcTarget;
2849     DWORD dwBitRate;
2850     DWORD dwBitErrorRate;
2851     REFERENCE_TIME AvgTimePerFrame;
2852     DWORD dwInterlaceFlags; // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
2853     DWORD dwCopyProtectFlags; // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
2854     DWORD dwPictAspectRatioX; // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
2855     DWORD dwPictAspectRatioY; // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display
2856     DWORD dwReserved1; // must be 0; reject connection otherwise
2857     DWORD dwReserved2; // must be 0; reject connection otherwise
2858     KS_BITMAPINFOHEADER bmiHeader;
2859     } KS_VIDEOINFOHEADER2, *PKS_VIDEOINFOHEADER2;
2860    
2861     typedef struct tagKS_MPEG1VIDEOINFO {
2862     KS_VIDEOINFOHEADER hdr; // Compatible with VIDEOINFO
2863     DWORD dwStartTimeCode; // 25-bit Group of pictures time code at start of data
2864     DWORD cbSequenceHeader; // Length in bytes of bSequenceHeader
2865     BYTE bSequenceHeader[1]; // Sequence header including quantization matrices if any
2866     } KS_MPEG1VIDEOINFO, *PKS_MPEG1VIDEOINFO;
2867    
2868     #define KS_MAX_SIZE_MPEG1_SEQUENCE_INFO 140
2869     #define KS_SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(KS_MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
2870     #define KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
2871    
2872     typedef struct tagKS_MPEGVIDEOINFO2 {
2873     KS_VIDEOINFOHEADER2 hdr;
2874     DWORD dwStartTimeCode; // ?? not used for DVD ??
2875     DWORD cbSequenceHeader; // is 0 for DVD (no sequence header)
2876     DWORD dwProfile; // use enum MPEG2Profile
2877     DWORD dwLevel; // use enum MPEG2Level
2878     DWORD dwFlags; // use AMMPEG2_* defines. Reject connection if undefined bits are not 0
2879     DWORD bSequenceHeader[1]; // DWORD instead of Byte for alignment purposes
2880     // For MPEG-2, if a sequence_header is included, the sequence_extension
2881     // should also be included
2882     } KS_MPEGVIDEOINFO2, *PKS_MPEGVIDEOINFO2;
2883    
2884    
2885     #define KS_SIZE_MPEGVIDEOINFO2(pv) (FIELD_OFFSET(KS_MPEGVIDEOINFO2, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
2886     #define KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
2887    
2888     //===========================================================================
2889     // Audio format blocks
2890     //===========================================================================
2891    
2892     //if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz
2893     #define KS_MPEGAUDIOINFO_27MhzTimebase 0x00000001
2894    
2895     typedef struct tagKS_MPEAUDIOINFO {
2896     DWORD dwFlags; // use KS_MPEGAUDIOINFO_* defines. Reject connection if undefined bits are not 0
2897     DWORD dwReserved1; // must be 0; reject connection otherwise
2898     DWORD dwReserved2; // must be 0; reject connection otherwise
2899     DWORD dwReserved3; // must be 0; reject connection otherwise
2900     } KS_MPEGAUDIOINFO, *PKS_MPEGAUDIOINFO;
2901    
2902     //===========================================================================
2903     // Video DATAFORMATs
2904     //===========================================================================
2905    
2906     typedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER {
2907     KSDATAFORMAT DataFormat;
2908     KS_VIDEOINFOHEADER VideoInfoHeader;
2909     } KS_DATAFORMAT_VIDEOINFOHEADER, *PKS_DATAFORMAT_VIDEOINFOHEADER;
2910    
2911     typedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER2 {
2912     KSDATAFORMAT DataFormat;
2913     KS_VIDEOINFOHEADER2 VideoInfoHeader2;
2914     } KS_DATAFORMAT_VIDEOINFOHEADER2, *PKS_DATAFORMAT_VIDEOINFOHEADER2;
2915    
2916     typedef struct tagKS_DATAFORMAT_VIDEOINFO_PALETTE {
2917     KSDATAFORMAT DataFormat;
2918     KS_VIDEOINFO VideoInfo;
2919     } KS_DATAFORMAT_VIDEOINFO_PALETTE, *PKS_DATAFORMAT_VIDEOINFO_PALETTE;
2920    
2921     typedef struct tagKS_DATAFORMAT_VBIINFOHEADER {
2922     KSDATAFORMAT DataFormat;
2923     KS_VBIINFOHEADER VBIInfoHeader;
2924     } KS_DATAFORMAT_VBIINFOHEADER, *PKS_DATAFORMAT_VBIINFOHEADER;
2925    
2926     typedef struct _KS_VIDEO_STREAM_CONFIG_CAPS {
2927     GUID guid; // will be MEDIATYPE_Video
2928     ULONG VideoStandard; // logical OR of all AnalogVideoStandards
2929     // supported
2930     SIZE InputSize; // the inherent size of the incoming signal
2931     // (every pixel unique)
2932     SIZE MinCroppingSize; // smallest rcSrc cropping rect allowed
2933     SIZE MaxCroppingSize; // largest rcSrc cropping rect allowed
2934     int CropGranularityX; // granularity of cropping size
2935     int CropGranularityY;
2936     int CropAlignX; // alignment of cropping rect
2937     int CropAlignY;
2938     SIZE MinOutputSize; // smallest bitmap stream can produce
2939     SIZE MaxOutputSize; // largest bitmap stream can produce
2940     int OutputGranularityX; // granularity of output bitmap size
2941     int OutputGranularityY;
2942     int StretchTapsX; // 0, no stretch, 1 pix dup, 2 interp, ...
2943     int StretchTapsY; // Describes quality of hardware scaler
2944     int ShrinkTapsX; //
2945     int ShrinkTapsY; //
2946     LONGLONG MinFrameInterval; // 100 nS units
2947     LONGLONG MaxFrameInterval;
2948     LONG MinBitsPerSecond;
2949     LONG MaxBitsPerSecond;
2950     } KS_VIDEO_STREAM_CONFIG_CAPS, *PKS_VIDEO_STREAM_CONFIG_CAPS;
2951    
2952     //===========================================================================
2953     // Video DATARANGEs
2954     //===========================================================================
2955    
2956     typedef struct tagKS_DATARANGE_VIDEO {
2957     KSDATARANGE DataRange;
2958     BOOL bFixedSizeSamples; // all samples same size?
2959     BOOL bTemporalCompression; // all I frames?
2960     DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
2961     DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
2962     KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
2963     KS_VIDEOINFOHEADER VideoInfoHeader; // default format
2964     } KS_DATARANGE_VIDEO, *PKS_DATARANGE_VIDEO;
2965    
2966     typedef struct tagKS_DATARANGE_VIDEO2 {
2967     KSDATARANGE DataRange;
2968     BOOL bFixedSizeSamples; // all samples same size?
2969     BOOL bTemporalCompression; // all I frames?
2970     DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
2971     DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
2972     KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
2973     KS_VIDEOINFOHEADER2 VideoInfoHeader; // default format
2974     } KS_DATARANGE_VIDEO2, *PKS_DATARANGE_VIDEO2;
2975    
2976     typedef struct tagKS_DATARANGE_MPEG1_VIDEO {
2977     KSDATARANGE DataRange;
2978     BOOL bFixedSizeSamples; // all samples same size?
2979     BOOL bTemporalCompression; // all I frames?
2980     DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
2981     DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
2982     KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
2983     KS_MPEG1VIDEOINFO VideoInfoHeader; // default format
2984     } KS_DATARANGE_MPEG1_VIDEO, *PKS_DATARANGE_MPEG1_VIDEO;
2985    
2986     typedef struct tagKS_DATARANGE_MPEG2_VIDEO {
2987     KSDATARANGE DataRange;
2988     BOOL bFixedSizeSamples; // all samples same size?
2989     BOOL bTemporalCompression; // all I frames?
2990     DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
2991     DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
2992     KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
2993     KS_MPEGVIDEOINFO2 VideoInfoHeader; // default format
2994     } KS_DATARANGE_MPEG2_VIDEO, *PKS_DATARANGE_MPEG2_VIDEO;
2995    
2996     typedef struct tagKS_DATARANGE_VIDEO_PALETTE {
2997     KSDATARANGE DataRange;
2998     BOOL bFixedSizeSamples; // all samples same size?
2999     BOOL bTemporalCompression; // all I frames?
3000     DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
3001     DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
3002     KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
3003     KS_VIDEOINFO VideoInfo; // default format
3004     } KS_DATARANGE_VIDEO_PALETTE, *PKS_DATARANGE_VIDEO_PALETTE;
3005    
3006     typedef struct tagKS_DATARANGE_VIDEO_VBI {
3007     KSDATARANGE DataRange;
3008     BOOL bFixedSizeSamples; // all samples same size?
3009     BOOL bTemporalCompression; // all I frames?
3010     DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
3011     DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
3012     KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
3013     KS_VBIINFOHEADER VBIInfoHeader; // default format
3014     } KS_DATARANGE_VIDEO_VBI, *PKS_DATARANGE_VIDEO_VBI;
3015    
3016     typedef struct tagKS_DATARANGE_ANALOGVIDEO {
3017     KSDATARANGE DataRange;
3018     KS_ANALOGVIDEOINFO AnalogVideoInfo;
3019     } KS_DATARANGE_ANALOGVIDEO, *PKS_DATARANGE_ANALOGVIDEO;
3020    
3021     //===========================================================================
3022     // StreamDescriptionFlags
3023     //
3024     // These define the "purpose" of each video stream
3025     //===========================================================================
3026    
3027     #define KS_VIDEOSTREAM_PREVIEW 0x0001 // Preview stream
3028     #define KS_VIDEOSTREAM_CAPTURE 0x0002 // Capture stream
3029     #define KS_VIDEOSTREAM_VBI 0x0010 // Field1 VBI
3030     #define KS_VIDEOSTREAM_NABTS 0x0020 // Field1 NABTS
3031     #define KS_VIDEOSTREAM_CC 0x0100 // Closed Captioning
3032     #define KS_VIDEOSTREAM_EDS 0x0200 // Extended Data Services
3033     #define KS_VIDEOSTREAM_TELETEXT 0x0400 // Field1 Teletext only
3034     #define KS_VIDEOSTREAM_STILL 0x1000 // Still image input
3035     #define KS_VIDEOSTREAM_IS_VPE 0x8000 // Is a VPE based stream?
3036    
3037     // MemoryAllocationFlags
3038     #define KS_VIDEO_ALLOC_VPE_SYSTEM 0x0001 // VPE surface in system memory
3039     #define KS_VIDEO_ALLOC_VPE_DISPLAY 0x0002 // VPE surface in display memory
3040     #define KS_VIDEO_ALLOC_VPE_AGP 0x0004 // VPE surface in AGP memory
3041    
3042     //////////////////////////////////////////////////////////////
3043     // Capture driver VBI property sets
3044     //////////////////////////////////////////////////////////////
3045    
3046     // {F162C607-7B35-496f-AD7F-2DCA3B46B718}
3047     #define STATIC_KSPROPSETID_VBICAP_PROPERTIES\
3048     0xf162c607, 0x7b35, 0x496f, 0xad, 0x7f, 0x2d, 0xca, 0x3b, 0x46, 0xb7, 0x18
3049     DEFINE_GUIDSTRUCT("F162C607-7B35-496f-AD7F-2DCA3B46B718", KSPROPSETID_VBICAP_PROPERTIES);
3050     #define KSPROPSETID_VBICAP_PROPERTIES DEFINE_GUIDNAMED(KSPROPSETID_VBICAP_PROPERTIES)
3051    
3052     typedef enum {
3053     KSPROPERTY_VBICAP_PROPERTIES_PROTECTION = 0x01,
3054     } KSPROPERTY_VBICAP;
3055    
3056     typedef struct _VBICAP_PROPERTIES_PROTECTION_S {
3057     KSPROPERTY Property;
3058     ULONG StreamIndex; // Index of stream
3059     ULONG Status;
3060     } VBICAP_PROPERTIES_PROTECTION_S, *PVBICAP_PROPERTIES_PROTECTION_S;
3061     #define KS_VBICAP_PROTECTION_MV_PRESENT 0x0001L
3062     #define KS_VBICAP_PROTECTION_MV_HARDWARE 0x0002L
3063     #define KS_VBICAP_PROTECTION_MV_DETECTED 0x0004L
3064    
3065    
3066     /***************************************************************************/
3067     /* VBI Related GUIDs, structs and properties for codecs(generic, cc, nabts)*/
3068     /***************************************************************************/
3069    
3070     ///////////////////////////////////////////////////////////////////////////////////////
3071     // IP/NABTS Protocol Reserved Group IDs - Overall Range 0x800-0x8FF [Decimal 2048-2079]
3072     // Intervening values(0-F) are used if there are multiple providers at a particular tier
3073     ///////////////////////////////////////////////////////////////////////////////////////
3074    
3075     // Used by individual content creators in show footage/data
3076     #define KS_NABTS_GROUPID_ORIGINAL_CONTENT_BASE 0x800
3077     #define KS_NABTS_GROUPID_ORIGINAL_CONTENT_ADVERTISER_BASE 0x810
3078    
3079     // Used by production company in finished show data
3080     #define KS_NABTS_GROUPID_PRODUCTION_COMPANY_CONTENT_BASE 0x820
3081     #define KS_NABTS_GROUPID_PRODUCTION_COMPANY_ADVERTISER_BASE 0x830
3082    
3083     // Used by broadcast syndicates in syndicated show data
3084     #define KS_NABTS_GROUPID_SYNDICATED_SHOW_CONTENT_BASE 0x840
3085     #define KS_NABTS_GROUPID_SYNDICATED_SHOW_ADVERTISER_BASE 0x850
3086    
3087     // Used by tv networks in network television data
3088     #define KS_NABTS_GROUPID_NETWORK_WIDE_CONTENT_BASE 0x860
3089     #define KS_NABTS_GROUPID_NETWORK_WIDE_ADVERTISER_BASE 0x870
3090    
3091     // Used by telvision stations in local programming data
3092     #define KS_NABTS_GROUPID_TELEVISION_STATION_CONTENT_BASE 0x880
3093     #define KS_NABTS_GROUPID_TELEVISION_STATION_ADVERTISER_BASE 0x890
3094    
3095     // Used by cable system in cable head-end originated data
3096     #define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_CONTENT_BASE 0x8A0
3097     #define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_ADVERTISER_BASE 0x8B0
3098    
3099     // The values between 0x8C0 - 0x8EF are reserved for future expansion
3100    
3101     // Used by Microsoft for Testing purposes (0x8F0 - 0x8FF)
3102     #define KS_NABTS_GROUPID_MICROSOFT_RESERVED_TEST_DATA_BASE 0x8F0
3103    
3104     //////////////////////////////////////////////////////////////
3105     // Stream Format FEC-corrected NABTS bundles
3106     //////////////////////////////////////////////////////////////
3107    
3108     #define STATIC_KSDATAFORMAT_TYPE_NABTS \
3109     0xe757bca0, 0x39ac, 0x11d1, 0xa9, 0xf5, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
3110     DEFINE_GUIDSTRUCT("E757BCA0-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_TYPE_NABTS);
3111     #define KSDATAFORMAT_TYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_NABTS)
3112    
3113     #define STATIC_KSDATAFORMAT_SUBTYPE_NABTS_FEC \
3114     0xe757bca1, 0x39ac, 0x11d1, 0xa9, 0xf5, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
3115     DEFINE_GUIDSTRUCT("E757BCA1-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_SUBTYPE_NABTS_FEC);
3116     #define KSDATAFORMAT_SUBTYPE_NABTS_FEC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS_FEC)
3117    
3118    
3119     //////////////////////////////////////////////////////////////
3120     // NABTS Bundle data structure definition
3121     //////////////////////////////////////////////////////////////
3122    
3123     #define MAX_NABTS_VBI_LINES_PER_FIELD 11
3124     #define NABTS_LINES_PER_BUNDLE 16
3125     #define NABTS_PAYLOAD_PER_LINE 28
3126     #define NABTS_BYTES_PER_LINE 36
3127    
3128     typedef struct _NABTSFEC_BUFFER {
3129     ULONG dataSize;
3130     USHORT groupID;
3131     USHORT Reserved;
3132     UCHAR data[NABTS_LINES_PER_BUNDLE * NABTS_PAYLOAD_PER_LINE];
3133     } NABTSFEC_BUFFER, *PNABTSFEC_BUFFER;
3134    
3135     //////////////////////////////////////////////////////////////
3136     // vbi codec filtering pin properties
3137     //////////////////////////////////////////////////////////////
3138    
3139     #define STATIC_KSPROPSETID_VBICodecFiltering \
3140     0xcafeb0caL, 0x8715, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0xc0, 0xed, 0xba, 0xbe
3141     DEFINE_GUIDSTRUCT("cafeb0ca-8715-11d0-bd6a-0035c0edbabe", KSPROPSETID_VBICodecFiltering);
3142     #define KSPROPSETID_VBICodecFiltering DEFINE_GUIDNAMED(KSPROPSETID_VBICodecFiltering)
3143    
3144     typedef enum {
3145     KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY = 0x01,
3146     KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,
3147     KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
3148     KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
3149     KSPROPERTY_VBICODECFILTERING_STATISTICS,
3150     } KSPROPERTY_VBICODECFILTERING;
3151    
3152     typedef struct _VBICODECFILTERING_SCANLINES {
3153     DWORD DwordBitArray[32]; // An array of scanline bits 0..1024(32*32)
3154     } VBICODECFILTERING_SCANLINES, *PVBICODECFILTERING_SCANLINES;
3155    
3156     typedef struct _VBICODECFILTERING_NABTS_SUBSTREAMS {
3157     DWORD SubstreamMask[128]; // An array of 4096 bits (one for each NABTS GroupID)
3158     } VBICODECFILTERING_NABTS_SUBSTREAMS, *PVBICODECFILTERING_NABTS_SUBSTREAMS;
3159    
3160     typedef struct _VBICODECFILTERING_CC_SUBSTREAMS {
3161     DWORD SubstreamMask; // An array of 32 bits (see KS_CC_SUBSTREAM *)
3162     } VBICODECFILTERING_CC_SUBSTREAMS, *PVBICODECFILTERING_CC_SUBSTREAMS;
3163    
3164     #define KS_CC_SUBSTREAM_ODD 0x0001L
3165     #define KS_CC_SUBSTREAM_EVEN 0x0002L
3166     #define KS_CC_SUBSTREAM_SERVICE_MASK_DC1 0x00F0L // DataChannel1: CC1,CC3,T1,T3
3167     #define KS_CC_SUBSTREAM_SERVICE_CC1 0x0010L
3168     #define KS_CC_SUBSTREAM_SERVICE_CC3 0x0020L
3169     #define KS_CC_SUBSTREAM_SERVICE_T1 0x0040L
3170     #define KS_CC_SUBSTREAM_SERVICE_T3 0x0080L
3171     #define KS_CC_SUBSTREAM_SERVICE_MASK_DC2 0x0F00L // DataChannel2: CC2,CC4,T2,T4
3172     #define KS_CC_SUBSTREAM_SERVICE_CC2 0x0100L
3173     #define KS_CC_SUBSTREAM_SERVICE_CC4 0x0200L
3174     #define KS_CC_SUBSTREAM_SERVICE_T2 0x0400L
3175     #define KS_CC_SUBSTREAM_SERVICE_T4 0x0800L
3176     #define KS_CC_SUBSTREAM_SERVICE_XDS 0x1000L
3177    
3178     ///////////////////////////////////////////////////////////////////
3179     // Hardware decoded CC stream format
3180     ///////////////////////////////////////////////////////////////////
3181    
3182     #define CC_MAX_HW_DECODE_LINES 12
3183     typedef struct _CC_BYTE_PAIR {
3184     BYTE Decoded[2];
3185     USHORT Reserved;
3186     } CC_BYTE_PAIR, *PCC_BYTE_PAIR;
3187    
3188     typedef struct _CC_HW_FIELD {
3189     VBICODECFILTERING_SCANLINES ScanlinesRequested;
3190     ULONG fieldFlags; // KS_VBI_FLAG_FIELD1,2
3191     LONGLONG PictureNumber;
3192     CC_BYTE_PAIR Lines[CC_MAX_HW_DECODE_LINES];
3193     } CC_HW_FIELD, *PCC_HW_FIELD;
3194    
3195     ///////////////////////////////////////////////////////////////////
3196     // Raw NABTS stream format (TYPE_NABTS, SUBTYPE_NABTS)
3197     ///////////////////////////////////////////////////////////////////
3198    
3199     // These low-level structures are byte packed( -Zp1 )
3200     #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
3201     #include <pshpack1.h>
3202     #endif
3203     typedef struct _NABTS_BUFFER_LINE {
3204     BYTE Confidence;
3205     BYTE Bytes[NABTS_BYTES_PER_LINE];
3206     } NABTS_BUFFER_LINE, *PNABTS_BUFFER_LINE;
3207    
3208     #define NABTS_BUFFER_PICTURENUMBER_SUPPORT 1
3209     typedef struct _NABTS_BUFFER {
3210     VBICODECFILTERING_SCANLINES ScanlinesRequested;
3211     LONGLONG PictureNumber;
3212     NABTS_BUFFER_LINE NabtsLines[MAX_NABTS_VBI_LINES_PER_FIELD];
3213     } NABTS_BUFFER, *PNABTS_BUFFER;
3214     #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
3215     #include <poppack.h>
3216     #endif
3217    
3218     //
3219     // Common codec statistics
3220     //
3221    
3222     typedef struct _VBICODECFILTERING_STATISTICS_COMMON {
3223     DWORD InputSRBsProcessed; // upstream SRBs received
3224     DWORD OutputSRBsProcessed; // downstream SRBs sent
3225     DWORD SRBsIgnored; // SRBs ignored due to no requests
3226     DWORD InputSRBsMissing; // SRBs dropped upstream
3227     DWORD OutputSRBsMissing; // Output dropped because no SRB pending
3228     DWORD OutputFailures; // dropped because of other failure
3229     DWORD InternalErrors; // could not process due to int. failure
3230     DWORD ExternalErrors; // could not process due to ext. failure
3231     DWORD InputDiscontinuities; // discontinuities received
3232     DWORD DSPFailures; // DSP confidence failure
3233     DWORD TvTunerChanges; // number of received KS_TVTUNER_CHANGE_BEGIN_TUNE and KS_TVTUNER_CHANGE_END_TUNE pairs.
3234     DWORD VBIHeaderChanges; // number of received KS_VBI_FLAG_VBIINFOHEADER_CHANGE
3235     DWORD LineConfidenceAvg; // Average of all DSP confidence results
3236     DWORD BytesOutput; // Bytes sent downstream
3237     } VBICODECFILTERING_STATISTICS_COMMON, *PVBICODECFILTERING_STATISTICS_COMMON;
3238    
3239     typedef struct _VBICODECFILTERING_STATISTICS_COMMON_PIN {
3240     DWORD SRBsProcessed; // SRBs sent/received
3241     DWORD SRBsIgnored; // SRBs ignored due to filtering
3242     DWORD SRBsMissing; // SRBs not sent/received
3243     DWORD InternalErrors; // could not send/receive due to int. failure
3244     DWORD ExternalErrors; // could not send/receive due to ext. failure
3245     DWORD Discontinuities; // discontinuities received/sent
3246     DWORD LineConfidenceAvg; // Average of all DSP confidence results for this pin
3247     DWORD BytesOutput; // Bytes sent downstream
3248     } VBICODECFILTERING_STATISTICS_COMMON_PIN, *PVBICODECFILTERING_STATISTICS_COMMON_PIN;
3249    
3250     //
3251     // Codec-specific statistics - NABTS
3252     //
3253    
3254     typedef struct _VBICODECFILTERING_STATISTICS_NABTS {
3255     VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics
3256     DWORD FECBundleBadLines; // Un-FEC-correctable lines
3257     DWORD FECQueueOverflows; // Number of times FEC queue overflowed
3258     DWORD FECCorrectedLines; // Lines CSUM corrected by FEC
3259     DWORD FECUncorrectableLines; // FEC input lines not CSUM correctable
3260     DWORD BundlesProcessed; // Bundles received from FEC
3261     DWORD BundlesSent2IP; // Bundles sent to IP driver
3262     DWORD FilteredLines; // Lines processed and then dropped
3263     // because no one was interested
3264     } VBICODECFILTERING_STATISTICS_NABTS, *PVBICODECFILTERING_STATISTICS_NABTS;
3265    
3266     typedef struct _VBICODECFILTERING_STATISTICS_NABTS_PIN {
3267     VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics
3268     } VBICODECFILTERING_STATISTICS_NABTS_PIN, *PVBICODECFILTERING_STATISTICS_NABTS_PIN;
3269    
3270     //
3271     // Codec-specific statistics - Closed Caption
3272     //
3273    
3274     typedef struct _VBICODECFILTERING_STATISTICS_CC {
3275     VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics
3276     } VBICODECFILTERING_STATISTICS_CC, *PVBICODECFILTERING_STATISTICS_CC;
3277    
3278    
3279     typedef struct _VBICODECFILTERING_STATISTICS_CC_PIN {
3280     VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics
3281     } VBICODECFILTERING_STATISTICS_CC_PIN, *PVBICODECFILTERING_STATISTICS_CC_PIN;
3282    
3283     ////////////////////////////////////////////////////////////////////////////
3284     // VBI codec property structures(based on KSPROPERTY_VBICODECFILTERING enum)
3285     ////////////////////////////////////////////////////////////////////////////
3286    
3287     // *** Most codecs support this property
3288     // KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY
3289     // KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,
3290     typedef struct {
3291     KSPROPERTY Property;
3292     VBICODECFILTERING_SCANLINES Scanlines;
3293     } KSPROPERTY_VBICODECFILTERING_SCANLINES_S, *PKSPROPERTY_VBICODECFILTERING_SCANLINES_S;
3294    
3295     // *** NABTS codecs support this property
3296     // KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
3297     // KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
3298     typedef struct {
3299     KSPROPERTY Property;
3300     VBICODECFILTERING_NABTS_SUBSTREAMS Substreams;
3301     } KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S, *PKSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S;
3302    
3303     // *** Closed captioning codecs support this property
3304     // KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
3305     // KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
3306     typedef struct {
3307     KSPROPERTY Property;
3308     VBICODECFILTERING_CC_SUBSTREAMS Substreams;
3309     } KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S, *PKSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S;
3310    
3311     // *** Most codecs support these versions of the global and pin properties
3312     // KSPROPERTY_VBICODECFILTERING_STATISTICS
3313     typedef struct {
3314     KSPROPERTY Property;
3315     VBICODECFILTERING_STATISTICS_COMMON Statistics;
3316     } KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S;
3317    
3318     typedef struct {
3319     KSPROPERTY Property;
3320     VBICODECFILTERING_STATISTICS_COMMON_PIN Statistics;
3321     } KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S;
3322    
3323     // *** NABTS codecs support this version of the global and pin properties
3324     // KSPROPERTY_VBICODECFILTERING_STATISTICS
3325     typedef struct {
3326     KSPROPERTY Property;
3327     VBICODECFILTERING_STATISTICS_NABTS Statistics;
3328     } KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S;
3329    
3330     typedef struct {
3331     KSPROPERTY Property;
3332     VBICODECFILTERING_STATISTICS_NABTS_PIN Statistics;
3333     } KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S;
3334    
3335     // *** Closed captioning codecs support this version of the global and pin properties
3336     // KSPROPERTY_VBICODECFILTERING_STATISTICS
3337    
3338     typedef struct {
3339     KSPROPERTY Property;
3340     VBICODECFILTERING_STATISTICS_CC Statistics;
3341     } KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S;
3342    
3343     typedef struct {
3344     KSPROPERTY Property;
3345     VBICODECFILTERING_STATISTICS_CC_PIN Statistics;
3346     } KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S;
3347    
3348     // Standard Pin Names for the video capture filter
3349     //===========================================================================
3350    
3351     #define STATIC_PINNAME_VIDEO_CAPTURE \
3352     0xfb6c4281, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3353     #define STATIC_PINNAME_CAPTURE STATIC_PINNAME_VIDEO_CAPTURE
3354     DEFINE_GUIDSTRUCT("FB6C4281-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CAPTURE);
3355     #define PINNAME_VIDEO_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CAPTURE)
3356     #define PINNAME_CAPTURE PINNAME_VIDEO_CAPTURE
3357    
3358     #define STATIC_PINNAME_VIDEO_CC_CAPTURE \
3359     0x1aad8061, 0x12d, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
3360     #define STATIC_PINNAME_CC_CAPTURE STATIC_PINNAME_VIDEO_CC_CAPTURE
3361     DEFINE_GUIDSTRUCT("1AAD8061-012D-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_CC_CAPTURE);
3362     #define PINNAME_VIDEO_CC_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CC_CAPTURE)
3363    
3364     #define STATIC_PINNAME_VIDEO_NABTS_CAPTURE \
3365     0x29703660, 0x498a, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
3366     #define STATIC_PINNAME_NABTS_CAPTURE STATIC_PINNAME_VIDEO_NABTS_CAPTURE
3367     DEFINE_GUIDSTRUCT("29703660-498A-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_NABTS_CAPTURE);
3368     #define PINNAME_VIDEO_NABTS_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS_CAPTURE)
3369    
3370     #define STATIC_PINNAME_VIDEO_PREVIEW \
3371     0xfb6c4282, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3372     #define STATIC_PINNAME_PREVIEW STATIC_PINNAME_VIDEO_PREVIEW
3373     DEFINE_GUIDSTRUCT("FB6C4282-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_PREVIEW);
3374     #define PINNAME_VIDEO_PREVIEW DEFINE_GUIDNAMED(PINNAME_VIDEO_PREVIEW)
3375     #define PINNAME_PREVIEW PINNAME_VIDEO_PREVIEW
3376    
3377     #define STATIC_PINNAME_VIDEO_ANALOGVIDEOIN \
3378     0xfb6c4283, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3379     DEFINE_GUIDSTRUCT("FB6C4283-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_ANALOGVIDEOIN);
3380     #define PINNAME_VIDEO_ANALOGVIDEOIN DEFINE_GUIDNAMED(PINNAME_VIDEO_ANALOGVIDEOIN)
3381    
3382     #define STATIC_PINNAME_VIDEO_VBI \
3383     0xfb6c4284, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3384     DEFINE_GUIDSTRUCT("FB6C4284-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VBI);
3385     #define PINNAME_VIDEO_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VBI)
3386    
3387     #define STATIC_PINNAME_VIDEO_VIDEOPORT \
3388     0xfb6c4285, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3389     DEFINE_GUIDSTRUCT("FB6C4285-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT);
3390     #define PINNAME_VIDEO_VIDEOPORT DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT)
3391    
3392     #define STATIC_PINNAME_VIDEO_NABTS \
3393     0xfb6c4286, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3394     DEFINE_GUIDSTRUCT("FB6C4286-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_NABTS);
3395     #define PINNAME_VIDEO_NABTS DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS)
3396    
3397     #define STATIC_PINNAME_VIDEO_EDS \
3398     0xfb6c4287, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3399     DEFINE_GUIDSTRUCT("FB6C4287-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_EDS);
3400     #define PINNAME_VIDEO_EDS DEFINE_GUIDNAMED(PINNAME_VIDEO_EDS)
3401    
3402     #define STATIC_PINNAME_VIDEO_TELETEXT \
3403     0xfb6c4288, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3404     DEFINE_GUIDSTRUCT("FB6C4288-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TELETEXT);
3405     #define PINNAME_VIDEO_TELETEXT DEFINE_GUIDNAMED(PINNAME_VIDEO_TELETEXT)
3406    
3407     #define STATIC_PINNAME_VIDEO_CC \
3408     0xfb6c4289, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3409     DEFINE_GUIDSTRUCT("FB6C4289-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CC);
3410     #define PINNAME_VIDEO_CC DEFINE_GUIDNAMED(PINNAME_VIDEO_CC)
3411    
3412     #define STATIC_PINNAME_VIDEO_STILL \
3413     0xfb6c428A, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3414     DEFINE_GUIDSTRUCT("FB6C428A-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_STILL);
3415     #define PINNAME_VIDEO_STILL DEFINE_GUIDNAMED(PINNAME_VIDEO_STILL)
3416    
3417     #define STATIC_PINNAME_VIDEO_TIMECODE \
3418     0xfb6c428B, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3419     DEFINE_GUIDSTRUCT("FB6C428B-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TIMECODE);
3420     #define PINNAME_VIDEO_TIMECODE DEFINE_GUIDNAMED(PINNAME_VIDEO_TIMECODE)
3421    
3422     #define STATIC_PINNAME_VIDEO_VIDEOPORT_VBI \
3423     0xfb6c428C, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3424     DEFINE_GUIDSTRUCT("FB6C428C-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT_VBI);
3425     #define PINNAME_VIDEO_VIDEOPORT_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT_VBI)
3426    
3427     //===========================================================================
3428     // KSSTREAM_HEADER extensions for digital video
3429     //===========================================================================
3430    
3431     #define KS_VIDEO_FLAG_FRAME 0x0000L // Frame or Field (default is frame)
3432     #define KS_VIDEO_FLAG_FIELD1 0x0001L
3433     #define KS_VIDEO_FLAG_FIELD2 0x0002L
3434    
3435     #define KS_VIDEO_FLAG_I_FRAME 0x0000L // I, B, or P (default is I)
3436     #define KS_VIDEO_FLAG_P_FRAME 0x0010L
3437     #define KS_VIDEO_FLAG_B_FRAME 0x0020L
3438    
3439     typedef struct tagKS_FRAME_INFO {
3440     ULONG ExtendedHeaderSize; // Size of this extended header
3441     DWORD dwFrameFlags; // Field1, Field2, or Frame
3442     LONGLONG PictureNumber;
3443     LONGLONG DropCount;
3444    
3445     // The following are only set when using OverlayMixer
3446     HANDLE hDirectDraw; // user mode DDraw handle
3447     HANDLE hSurfaceHandle; // user mode surface handle
3448     RECT DirectDrawRect; // portion of surface locked
3449     // Reserved fields, never reference these
3450     DWORD Reserved1;
3451     DWORD Reserved2;
3452     DWORD Reserved3;
3453     DWORD Reserved4;
3454     } KS_FRAME_INFO, *PKS_FRAME_INFO;
3455    
3456     //===========================================================================
3457     // KSSTREAM_HEADER extensions for VBI
3458     //===========================================================================
3459    
3460     #define KS_VBI_FLAG_FIELD1 0x0001L
3461     #define KS_VBI_FLAG_FIELD2 0x0002L
3462    
3463     #define KS_VBI_FLAG_MV_PRESENT 0x0100L
3464     #define KS_VBI_FLAG_MV_HARDWARE 0x0200L
3465     #define KS_VBI_FLAG_MV_DETECTED 0x0400L
3466    
3467     #define KS_VBI_FLAG_TVTUNER_CHANGE 0x0010L // TvTunerChangeInfo is valid
3468     #define KS_VBI_FLAG_VBIINFOHEADER_CHANGE 0x0020L // VBIInfoHeader is valid
3469    
3470     typedef struct tagKS_VBI_FRAME_INFO {
3471     ULONG ExtendedHeaderSize; // Size of this extended header
3472     DWORD dwFrameFlags; // Field1, Field2, or Frame; & etc
3473     LONGLONG PictureNumber; // Test only?
3474     LONGLONG DropCount; // Test only?
3475     DWORD dwSamplingFrequency;
3476     KS_TVTUNER_CHANGE_INFO TvTunerChangeInfo;
3477     KS_VBIINFOHEADER VBIInfoHeader;
3478     } KS_VBI_FRAME_INFO, *PKS_VBI_FRAME_INFO;
3479    
3480    
3481     //===========================================================================
3482     // Analog video formats, used with:
3483     // Analog Video Decoders
3484     // TVTuners
3485     // Analog Video Encoders
3486     //
3487     // XXX_STANDARDS_SUPPORTED returns a bitmask
3488     //===========================================================================
3489    
3490     typedef enum
3491     {
3492     KS_AnalogVideo_None = 0x00000000, // This is a digital sensor
3493     KS_AnalogVideo_NTSC_M = 0x00000001, // 75 IRE Setup
3494     KS_AnalogVideo_NTSC_M_J = 0x00000002, // Japan, 0 IRE Setup
3495     KS_AnalogVideo_NTSC_433 = 0x00000004,
3496    
3497     KS_AnalogVideo_PAL_B = 0x00000010,
3498     KS_AnalogVideo_PAL_D = 0x00000020,
3499     KS_AnalogVideo_PAL_G = 0x00000040,
3500     KS_AnalogVideo_PAL_H = 0x00000080,
3501     KS_AnalogVideo_PAL_I = 0x00000100,
3502     KS_AnalogVideo_PAL_M = 0x00000200,
3503     KS_AnalogVideo_PAL_N = 0x00000400,
3504    
3505     KS_AnalogVideo_PAL_60 = 0x00000800,
3506    
3507     KS_AnalogVideo_SECAM_B = 0x00001000,
3508     KS_AnalogVideo_SECAM_D = 0x00002000,
3509     KS_AnalogVideo_SECAM_G = 0x00004000,
3510     KS_AnalogVideo_SECAM_H = 0x00008000,
3511     KS_AnalogVideo_SECAM_K = 0x00010000,
3512     KS_AnalogVideo_SECAM_K1 = 0x00020000,
3513     KS_AnalogVideo_SECAM_L = 0x00040000,
3514     KS_AnalogVideo_SECAM_L1 = 0x00080000,
3515    
3516     KS_AnalogVideo_PAL_N_COMBO
3517     = 0x00100000
3518     } KS_AnalogVideoStandard;
3519    
3520     #define KS_AnalogVideo_NTSC_Mask 0x00000007
3521     #define KS_AnalogVideo_PAL_Mask 0x00100FF0
3522     #define KS_AnalogVideo_SECAM_Mask 0x000FF000
3523    
3524     //===========================================================================
3525     // Property set definitions
3526     // The comments show whether a given property is:
3527     // R : READ only
3528     // w : WRITE only
3529     // RW : READ / WRITE
3530     // O : Optional (return E_UNSUPPORTED if you don't handle this)
3531     //===========================================================================
3532    
3533     #define STATIC_PROPSETID_ALLOCATOR_CONTROL\
3534     0x53171960, 0x148e, 0x11d2, 0x99, 0x79, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
3535     DEFINE_GUIDSTRUCT("53171960-148E-11d2-9979-0000C0CC16BA", PROPSETID_ALLOCATOR_CONTROL);
3536     #define PROPSETID_ALLOCATOR_CONTROL DEFINE_GUIDNAMED(PROPSETID_ALLOCATOR_CONTROL)
3537     typedef enum {
3538     KSPROPERTY_ALLOCATOR_CONTROL_HONOR_COUNT, // R O (will allocate exactly this number of buffers)
3539     KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE, // R O (return 2 DWORDs specifying surface size)
3540     } KSPROPERTY_ALLOCATOR_CONTROL;
3541    
3542    
3543     //===========================================================================
3544    
3545     #define STATIC_PROPSETID_VIDCAP_VIDEOPROCAMP\
3546     0xC6E13360L, 0x30AC, 0x11d0, 0xa1, 0x8c, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
3547     DEFINE_GUIDSTRUCT("C6E13360-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOPROCAMP);
3548     #define PROPSETID_VIDCAP_VIDEOPROCAMP DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOPROCAMP)
3549    
3550     typedef enum {
3551     KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS, // RW O
3552     KSPROPERTY_VIDEOPROCAMP_CONTRAST, // RW O
3553     KSPROPERTY_VIDEOPROCAMP_HUE, // RW O
3554     KSPROPERTY_VIDEOPROCAMP_SATURATION, // RW O
3555     KSPROPERTY_VIDEOPROCAMP_SHARPNESS, // RW O
3556     KSPROPERTY_VIDEOPROCAMP_GAMMA, // RW O
3557     KSPROPERTY_VIDEOPROCAMP_COLORENABLE, // RW O
3558     KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE, // RW O
3559     KSPROPERTY_VIDEOPROCAMP_BACKLIGHT_COMPENSATION,// RW O
3560     } KSPROPERTY_VIDCAP_VIDEOPROCAMP;
3561    
3562     typedef struct {
3563     KSPROPERTY Property;
3564     LONG Value; // Value to set or get
3565     ULONG Flags; // KSPROPERTY_VIDEOPROCAMP_FLAGS_*
3566     ULONG Capabilities; // KSPROPERTY_VIDEOPROCAMP_FLAGS_*
3567     } KSPROPERTY_VIDEOPROCAMP_S, *PKSPROPERTY_VIDEOPROCAMP_S;
3568    
3569     #define KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO 0X0001L
3570     #define KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL 0X0002L
3571    
3572     //===========================================================================
3573    
3574     #define STATIC_PROPSETID_TUNER\
3575     0x6a2e0605L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
3576     DEFINE_GUIDSTRUCT("6a2e0605-28e4-11d0-a18c-00a0c9118956", PROPSETID_TUNER);
3577     #define PROPSETID_TUNER DEFINE_GUIDNAMED(PROPSETID_TUNER)
3578    
3579     typedef enum {
3580     KSPROPERTY_TUNER_CAPS, // R -overall device capabilities
3581     KSPROPERTY_TUNER_MODE_CAPS, // R -capabilities in this mode
3582     KSPROPERTY_TUNER_MODE, // RW -set a mode (TV, FM, AM, DSS)
3583     KSPROPERTY_TUNER_STANDARD, // R -get TV standard (only if TV mode)
3584     KSPROPERTY_TUNER_FREQUENCY, // RW -set/get frequency
3585     KSPROPERTY_TUNER_INPUT, // RW -select an input
3586     KSPROPERTY_TUNER_STATUS, // R -tuning status
3587     KSPROPERTY_TUNER_IF_MEDIUM // R O-Medium for IF or Transport Pin
3588     } KSPROPERTY_TUNER;
3589    
3590     typedef enum {
3591     KSPROPERTY_TUNER_MODE_TV = 0X0001,
3592     KSPROPERTY_TUNER_MODE_FM_RADIO = 0X0002,
3593     KSPROPERTY_TUNER_MODE_AM_RADIO = 0X0004,
3594     KSPROPERTY_TUNER_MODE_DSS = 0X0008,
3595     KSPROPERTY_TUNER_MODE_ATSC = 0X0010, // also used for DVB-T, DVB-C
3596     } KSPROPERTY_TUNER_MODES;
3597    
3598     // Describes how the device tunes. Only one of these flags may be set
3599     // in KSPROPERTY_TUNER_MODE_CAPS_S.Strategy
3600    
3601     // Describe how the driver should attempt to tune:
3602     // EXACT: just go to the frequency specified (no fine tuning)
3603     // FINE: (slow) do an exhaustive search for the best signal
3604     // COARSE: (fast) use larger frequency jumps to just determine if any signal
3605    
3606     typedef enum {
3607     KS_TUNER_TUNING_EXACT = 1, // No fine tuning
3608     KS_TUNER_TUNING_FINE, // Fine grained search
3609     KS_TUNER_TUNING_COARSE, // Coarse search
3610     }KS_TUNER_TUNING_FLAGS;
3611    
3612     typedef enum {
3613     KS_TUNER_STRATEGY_PLL = 0X01, // Tune by PLL offset
3614     KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0X02, // Tune by signal strength
3615     KS_TUNER_STRATEGY_DRIVER_TUNES = 0X04, // Driver does fine tuning
3616     }KS_TUNER_STRATEGY;
3617    
3618     typedef struct {
3619     KSPROPERTY Property;
3620     ULONG ModesSupported; // KS_PROPERTY_TUNER_MODES_*
3621     KSPIN_MEDIUM VideoMedium; // GUID_NULL (no pin), or GUID
3622     KSPIN_MEDIUM TVAudioMedium; // GUID_NULL (no pin), or GUID
3623     KSPIN_MEDIUM RadioAudioMedium; // GUID_NULL (no pin), or GUID
3624     } KSPROPERTY_TUNER_CAPS_S, *PKSPROPERTY_TUNER_CAPS_S;
3625    
3626     typedef struct {
3627     KSPROPERTY Property;
3628     KSPIN_MEDIUM IFMedium; // GUID_NULL (no pin), or GUID
3629     } KSPROPERTY_TUNER_IF_MEDIUM_S, *PKSPROPERTY_TUNER_IF_MEDIUM_S;
3630    
3631     typedef struct {
3632     KSPROPERTY Property;
3633     ULONG Mode; // IN: KSPROPERTY_TUNER_MODE
3634     ULONG StandardsSupported; // KS_AnalogVideo_* (if TV or DSS)
3635     ULONG MinFrequency; // Hz
3636     ULONG MaxFrequency; // Hz
3637     ULONG TuningGranularity; // Hz
3638     ULONG NumberOfInputs; // count of inputs
3639     ULONG SettlingTime; // milliSeconds
3640     ULONG Strategy; // KS_TUNER_STRATEGY
3641     } KSPROPERTY_TUNER_MODE_CAPS_S, *PKSPROPERTY_TUNER_MODE_CAPS_S;
3642    
3643     typedef struct {
3644     KSPROPERTY Property;
3645     ULONG Mode; // IN: KSPROPERTY_TUNER_MODE
3646     } KSPROPERTY_TUNER_MODE_S, *PKSPROPERTY_TUNER_MODE_S;
3647    
3648     typedef struct {
3649     KSPROPERTY Property;
3650     ULONG Frequency; // Hz
3651     ULONG LastFrequency; // Hz (last known good)
3652     ULONG TuningFlags; // KS_TUNER_TUNING_FLAGS
3653     ULONG VideoSubChannel; // DSS
3654     ULONG AudioSubChannel; // DSS
3655     ULONG Channel; // VBI decoders
3656     ULONG Country; // VBI decoders
3657     } KSPROPERTY_TUNER_FREQUENCY_S, *PKSPROPERTY_TUNER_FREQUENCY_S;
3658    
3659     typedef struct {
3660     KSPROPERTY Property;
3661     ULONG Standard; // KS_AnalogVideo_*
3662     } KSPROPERTY_TUNER_STANDARD_S, *PKSPROPERTY_TUNER_STANDARD_S;
3663    
3664     typedef struct {
3665     KSPROPERTY Property;
3666     ULONG InputIndex; // 0 to (n-1) inputs
3667     } KSPROPERTY_TUNER_INPUT_S, *PKSPROPERTY_TUNER_INPUT_S;
3668    
3669     typedef struct {
3670     KSPROPERTY Property;
3671     ULONG CurrentFrequency; // Hz
3672     ULONG PLLOffset; // if Strategy.KS_TUNER_STRATEGY_PLL
3673     ULONG SignalStrength; // if Stretegy.KS_TUNER_STRATEGY_SIGNAL_STRENGTH
3674     ULONG Busy; // TRUE if in the process of tuning
3675     } KSPROPERTY_TUNER_STATUS_S, *PKSPROPERTY_TUNER_STATUS_S;
3676    
3677     #define STATIC_EVENTSETID_TUNER\
3678     0x6a2e0606L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
3679     DEFINE_GUIDSTRUCT("6a2e0606-28e4-11d0-a18c-00a0c9118956", EVENTSETID_TUNER);
3680     #define EVENTSETID_TUNER DEFINE_GUIDNAMED(EVENTSETID_TUNER)
3681    
3682     typedef enum {
3683     KSEVENT_TUNER_CHANGED
3684     } KSEVENT_TUNER;
3685    
3686    
3687     //===========================================================================
3688    
3689     #define STATIC_PROPSETID_VIDCAP_VIDEOENCODER\
3690     0x6a2e0610L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
3691     DEFINE_GUIDSTRUCT("6a2e0610-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOENCODER);
3692     #define PROPSETID_VIDCAP_VIDEOENCODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOENCODER)
3693    
3694     typedef enum {
3695     KSPROPERTY_VIDEOENCODER_CAPS, // R
3696     KSPROPERTY_VIDEOENCODER_STANDARD, // RW
3697     KSPROPERTY_VIDEOENCODER_COPYPROTECTION, // RW O
3698     KSPROPERTY_VIDEOENCODER_CC_ENABLE, // RW O
3699     } KSPROPERTY_VIDCAP_VIDEOENCODER;
3700    
3701     typedef struct {
3702     KSPROPERTY Property;
3703     LONG Value; // value to get or set
3704     ULONG Flags; //
3705     ULONG Capabilities; //
3706     } KSPROPERTY_VIDEOENCODER_S, *PKSPROPERTY_VIDEOENCODER_S;
3707    
3708     //===========================================================================
3709    
3710     #define STATIC_PROPSETID_VIDCAP_VIDEODECODER\
3711     0xC6E13350L, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
3712     DEFINE_GUIDSTRUCT("C6E13350-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEODECODER);
3713     #define PROPSETID_VIDCAP_VIDEODECODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEODECODER)
3714    
3715     typedef enum {
3716     KSPROPERTY_VIDEODECODER_CAPS, // R
3717     KSPROPERTY_VIDEODECODER_STANDARD, // RW
3718     KSPROPERTY_VIDEODECODER_STATUS, // R
3719     KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE, // Rw O
3720     KSPROPERTY_VIDEODECODER_VCR_TIMING, // RW O
3721     } KSPROPERTY_VIDCAP_VIDEODECODER;
3722    
3723     typedef enum {
3724     KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT = 0X0001, // VP Output can tri-stae
3725     KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING = 0X0002, // VCR PLL timings
3726     KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED = 0X0004, // Can indicate valid signal
3727     }KS_VIDEODECODER_FLAGS;
3728    
3729     typedef struct {
3730     KSPROPERTY Property;
3731     ULONG StandardsSupported; // KS_AnalogVideo_*
3732     ULONG Capabilities; // KS_VIDEODECODER_FLAGS_*
3733     ULONG SettlingTime; // milliseconds
3734     ULONG HSyncPerVSync; // Number of HSync Pulses per VSync
3735     } KSPROPERTY_VIDEODECODER_CAPS_S, *PKSPROPERTY_VIDEODECODER_CAPS_S;
3736    
3737     typedef struct {
3738     KSPROPERTY Property;
3739     ULONG NumberOfLines; // 525 or 625 lines detected
3740     ULONG SignalLocked; // TRUE if signal is locked
3741     } KSPROPERTY_VIDEODECODER_STATUS_S, *PKSPROPERTY_VIDEODECODER_STATUS_S;
3742    
3743     typedef struct {
3744     KSPROPERTY Property;
3745     ULONG Value; // Get or set a value
3746     } KSPROPERTY_VIDEODECODER_S, *PKSPROPERTY_VIDEODECODER_S;
3747    
3748     #define STATIC_EVENTSETID_VIDEODECODER\
3749     0x6a2e0621L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
3750     DEFINE_GUIDSTRUCT("6a2e0621-28e4-11d0-a18c-00a0c9118956", EVENTSETID_VIDEODECODER);
3751     #define EVENTSETID_VIDEODECODER DEFINE_GUIDNAMED(EVENTSETID_VIDEODECODER)
3752    
3753     typedef enum {
3754     KSEVENT_VIDEODECODER_CHANGED
3755     } KSEVENT_VIDEODECODER;
3756    
3757     //===========================================================================
3758    
3759     #define STATIC_PROPSETID_VIDCAP_CAMERACONTROL\
3760     0xC6E13370L, 0x30AC, 0x11d0, 0xa1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
3761     DEFINE_GUIDSTRUCT("C6E13370-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_CAMERACONTROL);
3762     #define PROPSETID_VIDCAP_CAMERACONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CAMERACONTROL)
3763    
3764     typedef enum {
3765     KSPROPERTY_CAMERACONTROL_PAN, // RW O
3766     KSPROPERTY_CAMERACONTROL_TILT, // RW O
3767     KSPROPERTY_CAMERACONTROL_ROLL, // RW O
3768     KSPROPERTY_CAMERACONTROL_ZOOM, // RW O
3769     KSPROPERTY_CAMERACONTROL_EXPOSURE, // RW O
3770     KSPROPERTY_CAMERACONTROL_IRIS, // RW O
3771     KSPROPERTY_CAMERACONTROL_FOCUS, // RW O
3772     } KSPROPERTY_VIDCAP_CAMERACONTROL;
3773    
3774     typedef struct {
3775     KSPROPERTY Property;
3776     LONG Value; // value to get or set
3777     ULONG Flags; // KSPROPERTY_CAMERACONTROL_FLAGS_*
3778     ULONG Capabilities; // KSPROPERTY_CAMERACONTROL_FLAGS_*
3779     } KSPROPERTY_CAMERACONTROL_S, *PKSPROPERTY_CAMERACONTROL_S;
3780    
3781     #define KSPROPERTY_CAMERACONTROL_FLAGS_AUTO 0X0001L
3782     #define KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL 0X0002L
3783    
3784     #define KSPROPERTY_CAMERACONTROL_FLAGS_ABSOLUTE 0X0000L
3785     #define KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE 0X0010L
3786    
3787    
3788     //===========================================================================
3789    
3790     #define STATIC_PROPSETID_VIDCAP_CROSSBAR\
3791     0x6a2e0640L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
3792     DEFINE_GUIDSTRUCT("6a2e0640-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_CROSSBAR);
3793     #define PROPSETID_VIDCAP_CROSSBAR DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CROSSBAR)
3794    
3795     typedef enum {
3796     KSPROPERTY_CROSSBAR_CAPS, // R
3797     KSPROPERTY_CROSSBAR_PININFO, // R
3798     KSPROPERTY_CROSSBAR_CAN_ROUTE, // R
3799     KSPROPERTY_CROSSBAR_ROUTE, // RW
3800     } KSPROPERTY_VIDCAP_CROSSBAR;
3801    
3802     typedef struct {
3803     KSPROPERTY Property;
3804     ULONG NumberOfInputs; // the number of audio and video input pins
3805     ULONG NumberOfOutputs; // the number of audio and video output pins
3806     } KSPROPERTY_CROSSBAR_CAPS_S, *PKSPROPERTY_CROSSBAR_CAPS_S;
3807    
3808     typedef struct {
3809     KSPROPERTY Property;
3810     KSPIN_DATAFLOW Direction; // KSPIN_DATAFLOW_IN or KSPIN_DATAFLOW_OUT?
3811     ULONG Index; // Which pin to return data for?
3812     ULONG PinType; // KS_PhysConn_Video_* or KS_PhysConn_Audio_*
3813     ULONG RelatedPinIndex; // For video pins, this is the related audio pin
3814     KSPIN_MEDIUM Medium; // Identifies the hardware connection
3815     } KSPROPERTY_CROSSBAR_PININFO_S, *PKSPROPERTY_CROSSBAR_PININFO_S;
3816    
3817     typedef struct {
3818     KSPROPERTY Property;
3819     ULONG IndexInputPin; // Zero based index of the input pin
3820     ULONG IndexOutputPin; // Zero based index of the output pin
3821     ULONG CanRoute; // returns non-zero on CAN_ROUTE if routing is possible
3822     } KSPROPERTY_CROSSBAR_ROUTE_S, *PKSPROPERTY_CROSSBAR_ROUTE_S;
3823    
3824     #define STATIC_EVENTSETID_CROSSBAR\
3825     0x6a2e0641L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
3826     DEFINE_GUIDSTRUCT("6a2e0641-28e4-11d0-a18c-00a0c9118956", EVENTSETID_CROSSBAR);
3827     #define EVENTSETID_CROSSBAR DEFINE_GUIDNAMED(EVENTSETID_CROSSBAR)
3828    
3829     typedef enum {
3830     KSEVENT_CROSSBAR_CHANGED
3831     } KSEVENT_CROSSBAR;
3832    
3833     // The following IDs should match the AM equivalents
3834     typedef enum {
3835     KS_PhysConn_Video_Tuner = 1,
3836     KS_PhysConn_Video_Composite,
3837     KS_PhysConn_Video_SVideo,
3838     KS_PhysConn_Video_RGB,
3839     KS_PhysConn_Video_YRYBY,
3840     KS_PhysConn_Video_SerialDigital,
3841     KS_PhysConn_Video_ParallelDigital,
3842     KS_PhysConn_Video_SCSI,
3843     KS_PhysConn_Video_AUX,
3844     KS_PhysConn_Video_1394,
3845     KS_PhysConn_Video_USB,
3846     KS_PhysConn_Video_VideoDecoder,
3847     KS_PhysConn_Video_VideoEncoder,
3848     KS_PhysConn_Video_SCART,
3849    
3850     KS_PhysConn_Audio_Tuner = 4096,
3851     KS_PhysConn_Audio_Line,
3852     KS_PhysConn_Audio_Mic,
3853     KS_PhysConn_Audio_AESDigital,
3854     KS_PhysConn_Audio_SPDIFDigital,
3855     KS_PhysConn_Audio_SCSI,
3856     KS_PhysConn_Audio_AUX,
3857     KS_PhysConn_Audio_1394,
3858     KS_PhysConn_Audio_USB,
3859     KS_PhysConn_Audio_AudioDecoder,
3860     } KS_PhysicalConnectorType;
3861    
3862    
3863     //===========================================================================
3864    
3865     #define STATIC_PROPSETID_VIDCAP_TVAUDIO\
3866     0x6a2e0650L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
3867     DEFINE_GUIDSTRUCT("6a2e0650-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_TVAUDIO);
3868     #define PROPSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(PROPSETID_VIDCAP_TVAUDIO)
3869    
3870     typedef enum {
3871     KSPROPERTY_TVAUDIO_CAPS, // R
3872     KSPROPERTY_TVAUDIO_MODE, // RW
3873     KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES // R
3874     } KSPROPERTY_VIDCAP_TVAUDIO;
3875    
3876     #define KS_TVAUDIO_MODE_MONO 0x0001 // Mono
3877     #define KS_TVAUDIO_MODE_STEREO 0x0002 // Stereo
3878     #define KS_TVAUDIO_MODE_LANG_A 0x0010 // Primary language
3879     #define KS_TVAUDIO_MODE_LANG_B 0x0020 // 2nd avail language
3880     #define KS_TVAUDIO_MODE_LANG_C 0x0040 // 3rd avail language
3881    
3882     typedef struct {
3883     KSPROPERTY Property;
3884     ULONG Capabilities; // Bitmask of KS_TVAUDIO_MODE_*
3885     KSPIN_MEDIUM InputMedium;
3886     KSPIN_MEDIUM OutputMedium;
3887     } KSPROPERTY_TVAUDIO_CAPS_S, *PKSPROPERTY_TVAUDIO_CAPS_S;
3888    
3889     typedef struct {
3890     KSPROPERTY Property;
3891     ULONG Mode; // KS_TVAUDIO_MODE_*
3892     } KSPROPERTY_TVAUDIO_S, *PKSPROPERTY_TVAUDIO_S;
3893    
3894    
3895     #define STATIC_KSEVENTSETID_VIDCAP_TVAUDIO\
3896     0x6a2e0651L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
3897     DEFINE_GUIDSTRUCT("6a2e0651-28e4-11d0-a18c-00a0c9118956", KSEVENTSETID_VIDCAP_TVAUDIO);
3898     #define KSEVENTSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAP_TVAUDIO)
3899    
3900     typedef enum {
3901     KSEVENT_TVAUDIO_CHANGED,
3902     } KSEVENT_TVAUDIO;
3903    
3904     //===========================================================================
3905     #define STATIC_PROPSETID_VIDCAP_VIDEOCOMPRESSION\
3906     0xC6E13343L, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
3907     DEFINE_GUIDSTRUCT("C6E13343-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOCOMPRESSION);
3908     #define PROPSETID_VIDCAP_VIDEOCOMPRESSION DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCOMPRESSION)
3909    
3910     typedef enum {
3911     KSPROPERTY_VIDEOCOMPRESSION_GETINFO, // R
3912     KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE, // RW
3913     KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME, // RW
3914     KSPROPERTY_VIDEOCOMPRESSION_QUALITY, // RW
3915     KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_KEYFRAME, // W
3916     KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_FRAME_SIZE, // W
3917     KSPROPERTY_VIDEOCOMPRESSION_WINDOWSIZE, // RW
3918     } KSPROPERTY_VIDCAP_VIDEOCOMPRESSION;
3919    
3920     typedef enum {
3921     KS_CompressionCaps_CanQuality = 1,
3922     KS_CompressionCaps_CanCrunch = 2,
3923     KS_CompressionCaps_CanKeyFrame = 4,
3924     KS_CompressionCaps_CanBFrame = 8,
3925     KS_CompressionCaps_CanWindow = 0x10,
3926     } KS_CompressionCaps;
3927    
3928     typedef struct {
3929     KSPROPERTY Property;
3930     // Note, no VersionString!
3931     // Note, no DescriptionString!
3932     ULONG StreamIndex; // zero based index of stream
3933     LONG DefaultKeyFrameRate; // Key frame rate
3934     LONG DefaultPFrameRate; // Predeicted frames per Key frame
3935     LONG DefaultQuality; // 0 to 10000
3936     LONG NumberOfQualitySettings; // How many discreet quality settings?
3937     LONG Capabilities; // KS_CompressionCaps_*
3938     } KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S, *PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S;
3939    
3940     typedef struct {
3941     KSPROPERTY Property;
3942     ULONG StreamIndex; // zero based index of stream
3943     LONG Value; // value to get or set
3944     } KSPROPERTY_VIDEOCOMPRESSION_S, *PKSPROPERTY_VIDEOCOMPRESSION_S;
3945    
3946     //===========================================================================
3947     // MEDIASUBTYPE_Overlay
3948     #define STATIC_KSDATAFORMAT_SUBTYPE_OVERLAY\
3949     0xe436eb7fL, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
3950     DEFINE_GUIDSTRUCT("e436eb7f-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_OVERLAY);
3951     #define KSDATAFORMAT_SUBTYPE_OVERLAY DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_OVERLAY)
3952    
3953     #define STATIC_KSPROPSETID_OverlayUpdate\
3954     0x490EA5CFL, 0x7681, 0x11D1, 0xA2, 0x1C, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
3955     DEFINE_GUIDSTRUCT("490EA5CF-7681-11D1-A21C-00A0C9223196", KSPROPSETID_OverlayUpdate);
3956     #define KSPROPSETID_OverlayUpdate DEFINE_GUIDNAMED(KSPROPSETID_OverlayUpdate)
3957    
3958     typedef enum {
3959     KSPROPERTY_OVERLAYUPDATE_INTERESTS,
3960     KSPROPERTY_OVERLAYUPDATE_CLIPLIST = 0x1,
3961     KSPROPERTY_OVERLAYUPDATE_PALETTE = 0x2,
3962     KSPROPERTY_OVERLAYUPDATE_COLORKEY = 0x4,
3963     KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION = 0x8,
3964     KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE = 0x10,
3965     KSPROPERTY_OVERLAYUPDATE_COLORREF = 0x10000000
3966     } KSPROPERTY_OVERLAYUPDATE;
3967    
3968     typedef struct {
3969     ULONG PelsWidth;
3970     ULONG PelsHeight;
3971     ULONG BitsPerPel;
3972     WCHAR DeviceID[1];
3973     } KSDISPLAYCHANGE, *PKSDISPLAYCHANGE;
3974    
3975     #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_INTERESTS(Handler)\
3976     DEFINE_KSPROPERTY_ITEM(\
3977     KSPROPERTY_OVERLAYUPDATE_INTERESTS,\
3978     (Handler),\
3979     sizeof(KSPROPERTY),\
3980     sizeof(ULONG),\
3981     NULL, NULL, 0, NULL, NULL, 0)
3982    
3983     #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_PALETTE(Handler)\
3984     DEFINE_KSPROPERTY_ITEM(\
3985     KSPROPERTY_OVERLAYUPDATE_PALETTE,\
3986     NULL,\
3987     sizeof(KSPROPERTY),\
3988     0,\
3989     (Handler),\
3990     NULL, 0, NULL, NULL, 0)
3991    
3992     #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORKEY(Handler)\
3993     DEFINE_KSPROPERTY_ITEM(\
3994     KSPROPERTY_OVERLAYUPDATE_COLORKEY,\
3995     NULL,\
3996     sizeof(KSPROPERTY),\
3997     sizeof(COLORKEY),\
3998     (Handler),\
3999     NULL, 0, NULL, NULL, 0)
4000    
4001     #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_CLIPLIST(Handler)\
4002     DEFINE_KSPROPERTY_ITEM(\
4003     KSPROPERTY_OVERLAYUPDATE_CLIPLIST,\
4004     NULL,\
4005     sizeof(KSPROPERTY),\
4006     2 * sizeof(RECT) + sizeof(RGNDATAHEADER),\
4007     (Handler),\
4008     NULL, 0, NULL, NULL, 0)
4009    
4010     #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_VIDEOPOSITION(Handler)\
4011     DEFINE_KSPROPERTY_ITEM(\
4012     KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION,\
4013     NULL,\
4014     sizeof(KSPROPERTY),\
4015     2 * sizeof(RECT),\
4016     (Handler),\
4017     NULL, 0, NULL, NULL, 0)
4018    
4019     #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_DISPLAYCHANGE(Handler)\
4020     DEFINE_KSPROPERTY_ITEM(\
4021     KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE,\
4022     NULL,\
4023     sizeof(KSPROPERTY),\
4024     sizeof(KSDISPLAYCHANGE),\
4025     (Handler),\
4026     NULL, 0, NULL, NULL, 0)
4027    
4028     #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORREF(Handler)\
4029     DEFINE_KSPROPERTY_ITEM(\
4030     KSPROPERTY_OVERLAYUPDATE_COLORREF,\
4031     (Handler),\
4032     sizeof(KSPROPERTY),\
4033     sizeof(COLORREF),\
4034     NULL,\
4035     NULL, 0, NULL, NULL, 0)
4036    
4037     //===========================================================================
4038     #define STATIC_PROPSETID_VIDCAP_VIDEOCONTROL\
4039     0x6a2e0670L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
4040     DEFINE_GUIDSTRUCT("6a2e0670-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOCONTROL);
4041     #define PROPSETID_VIDCAP_VIDEOCONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCONTROL)
4042    
4043     typedef enum {
4044     KSPROPERTY_VIDEOCONTROL_CAPS, // R
4045     KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE, // R O
4046     KSPROPERTY_VIDEOCONTROL_FRAME_RATES, // R O
4047     KSPROPERTY_VIDEOCONTROL_MODE, // RWO
4048     } KSPROPERTY_VIDCAP_VIDEOCONTROL;
4049    
4050     typedef enum {
4051     KS_VideoControlFlag_FlipHorizontal = 0x0001,
4052     KS_VideoControlFlag_FlipVertical = 0x0002,
4053     KS_Obsolete_VideoControlFlag_ExternalTriggerEnable = 0x0010, // ***WARNING *** Flag msimatch with DSHOW.
4054     KS_Obsolete_VideoControlFlag_Trigger = 0x0020, // ***WARNING *** Flag msimatch with DSHOW.
4055     KS_VideoControlFlag_ExternalTriggerEnable = 0x0004,
4056     KS_VideoControlFlag_Trigger = 0x0008,
4057     } KS_VideoControlFlags;
4058    
4059     typedef struct {
4060     KSPROPERTY Property;
4061     ULONG StreamIndex;
4062     ULONG VideoControlCaps; // KS_VideoControlFlags_*
4063     } KSPROPERTY_VIDEOCONTROL_CAPS_S, *PKSPROPERTY_VIDEOCONTROL_CAPS_S;
4064    
4065     typedef struct {
4066     KSPROPERTY Property;
4067     ULONG StreamIndex;
4068     LONG Mode; // KS_VideoControlFlags_*
4069     } KSPROPERTY_VIDEOCONTROL_MODE_S, *PKSPROPERTY_VIDEOCONTROL_MODE_S;
4070    
4071     typedef struct {
4072     KSPROPERTY Property;
4073     ULONG StreamIndex; // Index of stream
4074     ULONG RangeIndex; // Index of range
4075     SIZE Dimensions; // Size of image
4076     LONGLONG CurrentActualFrameRate; // Only correct if pin is open
4077     LONGLONG CurrentMaxAvailableFrameRate; // Max Rate temporarily limited on USB or 1394?
4078     } KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S, *PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S;
4079    
4080     // KSPROPERTY_VIDEOCONTROL_FRAME_RATES returns a list of available frame rates in 100 nS units
4081     typedef struct {
4082     KSPROPERTY Property;
4083     ULONG StreamIndex; // Index of stream
4084     ULONG RangeIndex; // Index of range
4085     SIZE Dimensions; // Size of image
4086     } KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S, *PKSPROPERTY_VIDEOCONTROL_FRAME_RATES_S;
4087    
4088     //===========================================================================
4089     #define STATIC_PROPSETID_VIDCAP_DROPPEDFRAMES\
4090     0xC6E13344L, 0x30AC, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
4091     DEFINE_GUIDSTRUCT("C6E13344-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_DROPPEDFRAMES);
4092     #define PROPSETID_VIDCAP_DROPPEDFRAMES DEFINE_GUIDNAMED(PROPSETID_VIDCAP_DROPPEDFRAMES)
4093    
4094     typedef enum {
4095     KSPROPERTY_DROPPEDFRAMES_CURRENT // R
4096     } KSPROPERTY_VIDCAP_DROPPEDFRAMES;
4097    
4098     typedef struct {
4099     KSPROPERTY Property;
4100     LONGLONG PictureNumber; // Current Picture Number
4101     LONGLONG DropCount; // Count of frames dropped
4102     ULONG AverageFrameSize; // Average size of frames captured
4103     } KSPROPERTY_DROPPEDFRAMES_CURRENT_S, *PKSPROPERTY_DROPPEDFRAMES_CURRENT_S;
4104    
4105     //===========================================================================
4106     // VPE
4107    
4108     #define STATIC_KSPROPSETID_VPConfig\
4109     0xbc29a660L, 0x30e3, 0x11d0, 0x9e, 0x69, 0x00, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b
4110     DEFINE_GUIDSTRUCT("bc29a660-30e3-11d0-9e69-00c04fd7c15b", KSPROPSETID_VPConfig);
4111     #define KSPROPSETID_VPConfig DEFINE_GUIDNAMED(KSPROPSETID_VPConfig)
4112    
4113     #define STATIC_KSPROPSETID_VPVBIConfig\
4114     0xec529b00L, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
4115     DEFINE_GUIDSTRUCT("ec529b00-1a1f-11d1-bad9-00609744111a", KSPROPSETID_VPVBIConfig);
4116     #define KSPROPSETID_VPVBIConfig DEFINE_GUIDNAMED(KSPROPSETID_VPVBIConfig)
4117    
4118     // Both of the above property sets use the same list of properties below
4119    
4120     typedef enum {
4121     KSPROPERTY_VPCONFIG_NUMCONNECTINFO,
4122     KSPROPERTY_VPCONFIG_GETCONNECTINFO,
4123     KSPROPERTY_VPCONFIG_SETCONNECTINFO,
4124     KSPROPERTY_VPCONFIG_VPDATAINFO,
4125     KSPROPERTY_VPCONFIG_MAXPIXELRATE,
4126     KSPROPERTY_VPCONFIG_INFORMVPINPUT,
4127     KSPROPERTY_VPCONFIG_NUMVIDEOFORMAT,
4128     KSPROPERTY_VPCONFIG_GETVIDEOFORMAT,
4129     KSPROPERTY_VPCONFIG_SETVIDEOFORMAT,
4130     KSPROPERTY_VPCONFIG_INVERTPOLARITY,
4131     KSPROPERTY_VPCONFIG_DECIMATIONCAPABILITY, // E_NOTIMPL for VBI
4132     KSPROPERTY_VPCONFIG_SCALEFACTOR, // E_NOTIMPL for VBI
4133     KSPROPERTY_VPCONFIG_DDRAWHANDLE,
4134     KSPROPERTY_VPCONFIG_VIDEOPORTID,
4135     KSPROPERTY_VPCONFIG_DDRAWSURFACEHANDLE,
4136     KSPROPERTY_VPCONFIG_SURFACEPARAMS
4137     } KSPROPERTY_VPCONFIG;
4138    
4139     //=========================
4140     // IBasicAudio
4141     //
4142     #define STATIC_CLSID_KsIBasicAudioInterfaceHandler\
4143     0xb9f8ac3e, 0x0f71, 0x11d2, 0xb7, 0x2c, 0x00, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d
4144     DEFINE_GUIDSTRUCT("b9f8ac3e-0f71-11d2-b72c-00c04fb6bd3d", CLSID_KsIBasicAudioInterfaceHandler);
4145     #define CLSID_KsIBasicAudioInterfaceHandler DEFINE_GUIDNAMED(CLSID_KsIBasicAudioInterfaceHandler)
4146    
4147    
4148     #if defined(__IVPType__)
4149    
4150     typedef struct {
4151     AMVPSIZE Size;
4152     DWORD MaxPixelsPerSecond;
4153     DWORD Reserved;
4154     } KSVPMAXPIXELRATE, *PKSVPMAXPIXELRATE;
4155    
4156     typedef struct {
4157     KSPROPERTY Property;
4158     AMVPSIZE Size;
4159     } KSVPSIZE_PROP, *PKSVPSIZE_PROP;
4160    
4161     typedef struct {
4162     DWORD dwPitch;
4163     DWORD dwXOrigin;
4164     DWORD dwYOrigin;
4165     } KSVPSURFACEPARAMS, *PKSVPSURFACEPARAMS;
4166    
4167     #else // !defined(__IVPType__)
4168    
4169     #if !defined(__DDRAW_INCLUDED__)
4170    
4171     //==========================================================================
4172     // The following definitions must be in sync with DDraw.h in DirectX SDK
4173     //==========================================================================
4174    
4175     /*
4176     * The FourCC code is valid.
4177     */
4178     #define DDPF_FOURCC 0x00000004l
4179    
4180    
4181     typedef struct _DDPIXELFORMAT
4182     {
4183     DWORD dwSize; // size of structure
4184     DWORD dwFlags; // pixel format flags
4185     DWORD dwFourCC; // (FOURCC code)
4186     union
4187     {
4188     DWORD dwRGBBitCount; // how many bits per pixel (BD_1,2,4,8,16,24,32)
4189     DWORD dwYUVBitCount; // how many bits per pixel (BD_4,8,16,24,32)
4190     DWORD dwZBufferBitDepth; // how many bits for z buffers (BD_8,16,24,32)
4191     DWORD dwAlphaBitDepth; // how many bits for alpha channels (BD_1,2,4,8)
4192     };
4193     union
4194     {
4195     DWORD dwRBitMask; // mask for red bit
4196     DWORD dwYBitMask; // mask for Y bits
4197     };
4198     union
4199     {
4200     DWORD dwGBitMask; // mask for green bits
4201     DWORD dwUBitMask; // mask for U bits
4202     };
4203     union
4204     {
4205     DWORD dwBBitMask; // mask for blue bits
4206     DWORD dwVBitMask; // mask for V bits
4207     };
4208     union
4209     {
4210     DWORD dwRGBAlphaBitMask; // mask for alpha channel
4211     DWORD dwYUVAlphaBitMask; // mask for alpha channel
4212     DWORD dwRGBZBitMask; // mask for Z channel
4213     DWORD dwYUVZBitMask; // mask for Z channel
4214     };
4215     } DDPIXELFORMAT, * LPDDPIXELFORMAT;
4216    
4217     #endif // !defined(__DDRAW_INCLUDED__)
4218    
4219     //==========================================================================
4220     // End of DDraw.h header info
4221     //==========================================================================
4222    
4223     //==========================================================================
4224     // The following definitions must be in sync with DVP.h in DirectX SDK
4225     //==========================================================================
4226    
4227     #if !defined(__DVP_INCLUDED__)
4228    
4229     typedef struct _DDVIDEOPORTCONNECT {
4230     DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure
4231     DWORD dwPortWidth; // Width of the video port
4232     GUID guidTypeID; // Description of video port connection
4233     DWORD dwFlags; // Connection flags
4234     DWORD dwReserved1; // Reserved, set to zero.
4235     } DDVIDEOPORTCONNECT, * LPDDVIDEOPORTCONNECT;
4236    
4237     #define DDVPTYPE_E_HREFH_VREFH \
4238     0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8
4239    
4240     #define DDVPTYPE_E_HREFL_VREFL \
4241     0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8
4242    
4243     #endif // !defined(__DVP_INCLUDED__)
4244    
4245     //==========================================================================
4246     // End of DVP.h header info
4247     //==========================================================================
4248    
4249    
4250     //==========================================================================
4251     // The following definitions must be in sync with VPType.h in AM 2.0 SDK
4252     //==========================================================================
4253    
4254     // pixel aspect ratios corresponding to a 720x480 NTSC image or a 720x576 image
4255     typedef enum // AMPixAspectRatio
4256     {
4257     KS_PixAspectRatio_NTSC4x3,
4258     KS_PixAspectRatio_NTSC16x9,
4259     KS_PixAspectRatio_PAL4x3,
4260     KS_PixAspectRatio_PAL16x9,
4261     } KS_AMPixAspectRatio ;
4262    
4263     typedef enum // AMVP_SELECTFORMATBY
4264     {
4265     KS_AMVP_DO_NOT_CARE,
4266     KS_AMVP_BEST_BANDWIDTH,
4267     KS_AMVP_INPUT_SAME_AS_OUTPUT
4268     } KS_AMVP_SELECTFORMATBY;
4269    
4270     typedef enum // AMVP_MODE
4271     {
4272     KS_AMVP_MODE_WEAVE,
4273     KS_AMVP_MODE_BOBINTERLEAVED,
4274     KS_AMVP_MODE_BOBNONINTERLEAVED,
4275     KS_AMVP_MODE_SKIPEVEN,
4276     KS_AMVP_MODE_SKIPODD
4277     } KS_AMVP_MODE ;
4278    
4279     typedef struct tagKS_AMVPDIMINFO // AMVPDIMINFO
4280     {
4281     DWORD dwFieldWidth ; // [out] field width
4282     DWORD dwFieldHeight ; // [out] field height
4283     DWORD dwVBIWidth ; // [out] VBI data width
4284     DWORD dwVBIHeight ; // [out] VBI data height
4285     RECT rcValidRegion ; // [out] valid rect for data cropping
4286     } KS_AMVPDIMINFO, *PKS_AMVPDIMINFO ;
4287    
4288     typedef struct tagKS_AMVPDATAINFO // AMVPDATAINFO
4289     {
4290     DWORD dwSize; // Size of the struct
4291     DWORD dwMicrosecondsPerField; // Time taken by each field
4292     KS_AMVPDIMINFO amvpDimInfo; // Dimensional Information
4293     DWORD dwPictAspectRatioX; // Pict aspect ratio in X dimn
4294     DWORD dwPictAspectRatioY; // Pict aspect ratio in Y dimn
4295     BOOL bEnableDoubleClock; // Videoport should enable double clocking
4296     BOOL bEnableVACT; // Videoport should use an external VACT signal
4297     BOOL bDataIsInterlaced; // Indicates that the signal is interlaced
4298     LONG lHalfLinesOdd; // number of halflines in the odd field
4299     BOOL bFieldPolarityInverted; // Device inverts the polarity by default
4300     DWORD dwNumLinesInVREF; // Number of lines of data in VREF
4301     LONG lHalfLinesEven; // number of halflines in the even field
4302     DWORD dwReserved1; // Reserved for future use
4303     } KS_AMVPDATAINFO, *PKS_AMVPDATAINFO;
4304    
4305     typedef struct tagKS_AMVPSIZE // AMVPSIZE
4306     {
4307     DWORD dwWidth ; // [in] width in pixels
4308     DWORD dwHeight ; // [in] height in pixels
4309     } KS_AMVPSIZE, *PKS_AMVPSIZE ;
4310    
4311     //==========================================================================
4312     // End of VPType.h header info
4313     //==========================================================================
4314    
4315     typedef struct {
4316     KS_AMVPSIZE Size;
4317     DWORD MaxPixelsPerSecond;
4318     DWORD Reserved;
4319     } KSVPMAXPIXELRATE, *PKSVPMAXPIXELRATE;
4320    
4321     typedef struct {
4322     KSPROPERTY Property;
4323     KS_AMVPSIZE Size;
4324     } KSVPSIZE_PROP, *PKSVPSIZE_PROP;
4325    
4326     typedef struct {
4327     DWORD dwPitch;
4328     DWORD dwXOrigin;
4329     DWORD dwYOrigin;
4330     } KSVPSURFACEPARAMS, *PKSVPSURFACEPARAMS;
4331    
4332     #endif // !defined(__IVPType__)
4333    
4334     //
4335     // IVPNotify event notification
4336     //
4337     #define STATIC_KSEVENTSETID_VPNotify\
4338     0x20c5598eL, 0xd3c8, 0x11d0, 0x8d, 0xfc, 0x00, 0xc0, 0x4f, 0xd7, 0xc0, 0x8b
4339     DEFINE_GUIDSTRUCT("20c5598e-d3c8-11d0-8dfc-00c04fd7c08b", KSEVENTSETID_VPNotify);
4340     #define KSEVENTSETID_VPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VPNotify)
4341    
4342     typedef enum {
4343     KSEVENT_VPNOTIFY_FORMATCHANGE,
4344     } KSEVENT_VPNOTIFY;
4345    
4346     //
4347     // VIDCAPTOSTI event notification
4348     //
4349     #define STATIC_KSEVENTSETID_VIDCAPTOSTI\
4350     0xdb47de20, 0xf628, 0x11d1, 0xba, 0x41, 0x0, 0xa0, 0xc9, 0xd, 0x2b, 0x5
4351     DEFINE_GUIDSTRUCT("DB47DE20-F628-11d1-BA41-00A0C90D2B05", KSEVENTSETID_VIDCAPTOSTI);
4352     #define KSEVENTSETID_VIDCAPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAPTOSTI)
4353    
4354     typedef enum {
4355     KSEVENT_VIDCAPTOSTI_EXT_TRIGGER,
4356     } KSEVENT_VIDCAPTOSTI;
4357    
4358    
4359     //
4360     // IVPVBINotify event notification
4361     //
4362     #define STATIC_KSEVENTSETID_VPVBINotify\
4363     0xec529b01L, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
4364     DEFINE_GUIDSTRUCT("ec529b01-1a1f-11d1-bad9-00609744111a", KSEVENTSETID_VPVBINotify);
4365     #define KSEVENTSETID_VPVBINotify DEFINE_GUIDNAMED(KSEVENTSETID_VPVBINotify)
4366    
4367     typedef enum {
4368     KSEVENT_VPVBINOTIFY_FORMATCHANGE,
4369     } KSEVENT_VPVBINOTIFY;
4370    
4371    
4372     //
4373     // closed caption information
4374     //
4375    
4376     #define STATIC_KSDATAFORMAT_TYPE_AUXLine21Data \
4377     0x670aea80L, 0x3a82, 0x11d0, 0xb7, 0x9b, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
4378     DEFINE_GUIDSTRUCT("670aea80-3a82-11d0-b79b-00aa003767a7", KSDATAFORMAT_TYPE_AUXLine21Data);
4379     #define KSDATAFORMAT_TYPE_AUXLine21Data DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUXLine21Data)
4380    
4381     #define STATIC_KSDATAFORMAT_SUBTYPE_Line21_BytePair \
4382     0x6e8d4a22L, 0x310c, 0x11d0, 0xb7, 0x9a, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
4383     DEFINE_GUIDSTRUCT("6e8d4a22-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_BytePair);
4384     #define KSDATAFORMAT_SUBTYPE_Line21_BytePair DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_BytePair)
4385    
4386     #define STATIC_KSDATAFORMAT_SUBTYPE_Line21_GOPPacket \
4387     0x6e8d4a23L, 0x310c, 0x11d0, 0xb7, 0x9a, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
4388     DEFINE_GUIDSTRUCT("6e8d4a23-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_GOPPacket);
4389     #define KSDATAFORMAT_SUBTYPE_Line21_GOPPacket DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_GOPPacket)
4390    
4391     typedef struct _KSGOP_USERDATA {
4392     ULONG sc;
4393     ULONG reserved1;
4394     BYTE cFields;
4395     CHAR l21Data[3];
4396     } KSGOP_USERDATA, *PKSGOP_USERDATA;
4397    
4398     //
4399     // DVD encrypted PACK format type definition
4400     //
4401    
4402     #define STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK\
4403     0xed0b916a, 0x044d, 0x11d1, 0xaa, 0x78, 0x00, 0xc0, 0x4f, 0xc3, 0x1d, 0x60
4404     DEFINE_GUIDSTRUCT("ed0b916a-044d-11d1-aa78-00c04fc31d60", KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK);
4405     #define KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK)
4406    
4407     #define KS_AM_UseNewCSSKey 0x1
4408    
4409    
4410     // -----------------------------------------------------------------------
4411     // KS_AM_KSPROPSETID_TSRateChange property set definitions for time stamp
4412     // rate changes.
4413     // -----------------------------------------------------------------------
4414    
4415    
4416     #define STATIC_KSPROPSETID_TSRateChange\
4417     0xa503c5c0, 0x1d1d, 0x11d1, 0xad, 0x80, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0
4418    
4419     DEFINE_GUIDSTRUCT("A503C5C0-1D1D-11D1-AD80-444553540000", KSPROPSETID_TSRateChange);
4420     #define KSPROPSETID_TSRateChange DEFINE_GUIDNAMED(KSPROPSETID_TSRateChange)
4421     typedef enum {
4422     KS_AM_RATE_SimpleRateChange=1, // rw, use KS_AM_SimpleRateChange
4423     KS_AM_RATE_ExactRateChange=2, // rw, use KS_AM_ExactRateChange
4424     KS_AM_RATE_MaxFullDataRate=3, // r, use KS_AM_MaxFullDataRate
4425     KS_AM_RATE_Step=4 // w, use KS_AM_Step
4426     } KS_AM_PROPERTY_TS_RATE_CHANGE;
4427    
4428     typedef struct {
4429     // this is the simplest mechanism to set a time stamp rate change on
4430     // a filter (simplest for the person setting the rate change, harder
4431     // for the filter doing the rate change).
4432     REFERENCE_TIME StartTime; //stream time at which to start this rate
4433     LONG Rate; //new rate * 10000 (decimal)
4434     } KS_AM_SimpleRateChange, *PKS_AM_SimpleRateChange;
4435    
4436     typedef struct {
4437     REFERENCE_TIME OutputZeroTime; //input TS that maps to zero output TS
4438     LONG Rate; //new rate * 10000 (decimal)
4439     } KS_AM_ExactRateChange, *PKS_AM_ExactRateChange;
4440    
4441     typedef LONG KS_AM_MaxFullDataRate; //rate * 10000 (decimal)
4442    
4443     typedef DWORD KS_AM_Step; // number of frame to step
4444    
4445    
4446     #endif // !defined(_KSMEDIA_)

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26