Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4769 lines
211 KiB

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