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.

4686 lines
207 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. #define STATIC_KSPROPSETID_Wave\
  1442. 0x924e54b0L, 0x630f, 0x11cf, 0xad, 0xa7, 0x08, 0x00, 0x3e, 0x30, 0x49, 0x4a
  1443. DEFINE_GUIDSTRUCT("924e54b0-630f-11cf-ada7-08003e30494a", KSPROPSETID_Wave);
  1444. #define KSPROPSETID_Wave DEFINE_GUIDNAMED(KSPROPSETID_Wave)
  1445. typedef enum {
  1446. KSPROPERTY_WAVE_COMPATIBLE_CAPABILITIES,
  1447. KSPROPERTY_WAVE_INPUT_CAPABILITIES,
  1448. KSPROPERTY_WAVE_OUTPUT_CAPABILITIES,
  1449. KSPROPERTY_WAVE_BUFFER,
  1450. KSPROPERTY_WAVE_FREQUENCY,
  1451. KSPROPERTY_WAVE_VOLUME,
  1452. KSPROPERTY_WAVE_PAN
  1453. } KSPROPERTY_WAVE;
  1454. typedef struct {
  1455. ULONG ulDeviceType;
  1456. } KSWAVE_COMPATCAPS, *PKSWAVE_COMPATCAPS;
  1457. #define KSWAVE_COMPATCAPS_INPUT 0x00000000
  1458. #define KSWAVE_COMPATCAPS_OUTPUT 0x00000001
  1459. typedef struct {
  1460. ULONG MaximumChannelsPerConnection;
  1461. ULONG MinimumBitsPerSample;
  1462. ULONG MaximumBitsPerSample;
  1463. ULONG MinimumSampleFrequency;
  1464. ULONG MaximumSampleFrequency;
  1465. ULONG TotalConnections;
  1466. ULONG ActiveConnections;
  1467. } KSWAVE_INPUT_CAPABILITIES, *PKSWAVE_INPUT_CAPABILITIES;
  1468. typedef struct {
  1469. ULONG MaximumChannelsPerConnection;
  1470. ULONG MinimumBitsPerSample;
  1471. ULONG MaximumBitsPerSample;
  1472. ULONG MinimumSampleFrequency;
  1473. ULONG MaximumSampleFrequency;
  1474. ULONG TotalConnections;
  1475. ULONG StaticConnections;
  1476. ULONG StreamingConnections;
  1477. ULONG ActiveConnections;
  1478. ULONG ActiveStaticConnections;
  1479. ULONG ActiveStreamingConnections;
  1480. ULONG Total3DConnections;
  1481. ULONG Static3DConnections;
  1482. ULONG Streaming3DConnections;
  1483. ULONG Active3DConnections;
  1484. ULONG ActiveStatic3DConnections;
  1485. ULONG ActiveStreaming3DConnections;
  1486. ULONG TotalSampleMemory;
  1487. ULONG FreeSampleMemory;
  1488. ULONG LargestFreeContiguousSampleMemory;
  1489. } KSWAVE_OUTPUT_CAPABILITIES, *PKSWAVE_OUTPUT_CAPABILITIES;
  1490. typedef struct {
  1491. LONG LeftAttenuation;
  1492. LONG RightAttenuation;
  1493. } KSWAVE_VOLUME, *PKSWAVE_VOLUME;
  1494. #define KSWAVE_BUFFER_ATTRIBUTEF_LOOPING 0x00000001
  1495. #define KSWAVE_BUFFER_ATTRIBUTEF_STATIC 0x00000002
  1496. typedef struct {
  1497. ULONG Attributes;
  1498. ULONG BufferSize;
  1499. PVOID BufferAddress;
  1500. } KSWAVE_BUFFER, *PKSWAVE_BUFFER;
  1501. //===========================================================================
  1502. //===========================================================================
  1503. #define STATIC_KSMUSIC_TECHNOLOGY_PORT\
  1504. 0x86C92E60L, 0x62E8, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  1505. DEFINE_GUIDSTRUCT("86C92E60-62E8-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_PORT);
  1506. #define KSMUSIC_TECHNOLOGY_PORT DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_PORT)
  1507. #define STATIC_KSMUSIC_TECHNOLOGY_SQSYNTH\
  1508. 0x0ECF4380L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  1509. DEFINE_GUIDSTRUCT("0ECF4380-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_SQSYNTH);
  1510. #define KSMUSIC_TECHNOLOGY_SQSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_SQSYNTH)
  1511. #define STATIC_KSMUSIC_TECHNOLOGY_FMSYNTH\
  1512. 0x252C5C80L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  1513. DEFINE_GUIDSTRUCT("252C5C80-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_FMSYNTH);
  1514. #define KSMUSIC_TECHNOLOGY_FMSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_FMSYNTH)
  1515. #define STATIC_KSMUSIC_TECHNOLOGY_WAVETABLE\
  1516. 0x394EC7C0L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  1517. DEFINE_GUIDSTRUCT("394EC7C0-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_WAVETABLE);
  1518. #define KSMUSIC_TECHNOLOGY_WAVETABLE DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_WAVETABLE)
  1519. #define STATIC_KSMUSIC_TECHNOLOGY_SWSYNTH\
  1520. 0x37407736L, 0x3620, 0x11D1, 0x85, 0xD3, 0x00, 0x00, 0xF8, 0x75, 0x43, 0x80
  1521. DEFINE_GUIDSTRUCT("37407736-3620-11D1-85D3-0000F8754380", KSMUSIC_TECHNOLOGY_SWSYNTH);
  1522. #define KSMUSIC_TECHNOLOGY_SWSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_SWSYNTH)
  1523. typedef struct {
  1524. KSDATARANGE DataRange;
  1525. GUID Technology;
  1526. ULONG Channels;
  1527. ULONG Notes;
  1528. ULONG ChannelMask;
  1529. } KSDATARANGE_MUSIC, *PKSDATARANGE_MUSIC;
  1530. //===========================================================================
  1531. #define STATIC_KSEVENTSETID_Cyclic\
  1532. 0x142C1AC0L, 0x072A, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  1533. DEFINE_GUIDSTRUCT("142C1AC0-072A-11D0-A5D6-28DB04C10000", KSEVENTSETID_Cyclic);
  1534. #define KSEVENTSETID_Cyclic DEFINE_GUIDNAMED(KSEVENTSETID_Cyclic)
  1535. typedef enum {
  1536. KSEVENT_CYCLIC_TIME_INTERVAL,
  1537. } KSEVENT_CYCLIC_TIME;
  1538. //===========================================================================
  1539. #define STATIC_KSEVENTSETID_AudioControlChange\
  1540. 0xE85E9698L, 0xFA2F, 0x11D1, 0x95, 0xBD, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3
  1541. DEFINE_GUIDSTRUCT("E85E9698-FA2F-11D1-95BD-00C04FB925D3", KSEVENTSETID_AudioControlChange);
  1542. #define KSEVENTSETID_AudioControlChange DEFINE_GUIDNAMED(KSEVENTSETID_AudioControlChange)
  1543. typedef enum {
  1544. KSEVENT_CONTROL_CHANGE,
  1545. } KSEVENT_AUDIO_CONTROL_CHANGE;
  1546. //===========================================================================
  1547. #define STATIC_KSEVENTSETID_LoopedStreaming\
  1548. 0x4682B940L, 0xC6EF, 0x11D0, 0x96, 0xD8, 0x00, 0xAA, 0x00, 0x51, 0xE5, 0x1D
  1549. DEFINE_GUIDSTRUCT("4682B940-C6EF-11D0-96D8-00AA0051E51D", KSEVENTSETID_LoopedStreaming);
  1550. #define KSEVENTSETID_LoopedStreaming DEFINE_GUIDNAMED(KSEVENTSETID_LoopedStreaming)
  1551. typedef enum {
  1552. KSEVENT_LOOPEDSTREAMING_POSITION,
  1553. } KSEVENT_LOOPEDSTREAMING;
  1554. typedef struct {
  1555. KSEVENTDATA KsEventData;
  1556. #if defined(_NTDDK_)
  1557. ULONGLONG Position;
  1558. #else // !_NTDDK_
  1559. DWORDLONG Position;
  1560. #endif // !_NTDDK_
  1561. } LOOPEDSTREAMING_POSITION_EVENT_DATA, *PLOOPEDSTREAMING_POSITION_EVENT_DATA ;
  1562. //===========================================================================
  1563. #define STATIC_KSPROPSETID_Sysaudio\
  1564. 0xCBE3FAA0L, 0xCC75, 0x11D0, 0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6
  1565. DEFINE_GUIDSTRUCT("CBE3FAA0-CC75-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio);
  1566. #define KSPROPSETID_Sysaudio DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio)
  1567. typedef enum {
  1568. KSPROPERTY_SYSAUDIO_DEVICE_COUNT = 1,
  1569. KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME = 2,
  1570. KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE = 3,
  1571. KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME = 4,
  1572. KSPROPERTY_SYSAUDIO_SELECT_GRAPH = 5,
  1573. KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE = 6,
  1574. KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT = 7,
  1575. KSPROPERTY_SYSAUDIO_INSTANCE_INFO = 14,
  1576. KSPROPERTY_SYSAUDIO_COMPONENT_ID = 16,
  1577. } KSPROPERTY_SYSAUDIO;
  1578. typedef struct {
  1579. KSPROPERTY Property;
  1580. GUID PinCategory;
  1581. GUID PinName;
  1582. } SYSAUDIO_CREATE_VIRTUAL_SOURCE, *PSYSAUDIO_CREATE_VIRTUAL_SOURCE;
  1583. typedef struct {
  1584. KSPROPERTY Property;
  1585. ULONG PinId;
  1586. ULONG NodeId;
  1587. ULONG Flags;
  1588. ULONG Reserved;
  1589. } SYSAUDIO_SELECT_GRAPH, *PSYSAUDIO_SELECT_GRAPH;
  1590. typedef struct {
  1591. KSPROPERTY Property;
  1592. ULONG Flags;
  1593. ULONG DeviceNumber;
  1594. } SYSAUDIO_INSTANCE_INFO, *PSYSAUDIO_INSTANCE_INFO;
  1595. #define SYSAUDIO_FLAGS_DONT_COMBINE_PINS 0x00000001
  1596. #define STATIC_KSPROPSETID_Sysaudio_Pin \
  1597. 0xA3A53220L, 0xC6E4, 0x11D0, 0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6
  1598. DEFINE_GUIDSTRUCT("A3A53220-C6E4-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio_Pin);
  1599. #define KSPROPSETID_Sysaudio_Pin DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio_Pin)
  1600. typedef enum {
  1601. KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE = 1,
  1602. } KSPROPERTY_SYSAUDIO_PIN;
  1603. typedef struct {
  1604. KSPROPERTY Property;
  1605. ULONG MixerPinId;
  1606. ULONG Reserved;
  1607. } SYSAUDIO_ATTACH_VIRTUAL_SOURCE, *PSYSAUDIO_ATTACH_VIRTUAL_SOURCE;
  1608. //===========================================================================
  1609. typedef struct {
  1610. KSPROPERTY Property;
  1611. ULONG NodeId;
  1612. ULONG Reserved;
  1613. } KSNODEPROPERTY, *PKSNODEPROPERTY;
  1614. typedef struct {
  1615. KSNODEPROPERTY NodeProperty;
  1616. LONG Channel; // value to get or set
  1617. ULONG Reserved;
  1618. } KSNODEPROPERTY_AUDIO_CHANNEL, *PKSNODEPROPERTY_AUDIO_CHANNEL;
  1619. typedef struct {
  1620. KSNODEPROPERTY NodeProperty;
  1621. ULONG DevSpecificId;
  1622. ULONG DeviceInfo;
  1623. ULONG Length;
  1624. } KSNODEPROPERTY_AUDIO_DEV_SPECIFIC, *PKSNODEPROPERTY_AUDIO_DEV_SPECIFIC;
  1625. typedef struct {
  1626. KSNODEPROPERTY NodeProperty;
  1627. PVOID ListenerId;
  1628. #ifndef _WIN64
  1629. ULONG Reserved;
  1630. #endif // _WIN64
  1631. } KSNODEPROPERTY_AUDIO_3D_LISTENER, *PKSNODEPROPERTY_AUDIO_3D_LISTENER;
  1632. typedef struct {
  1633. KSNODEPROPERTY NodeProperty;
  1634. PVOID AppContext;
  1635. ULONG Length;
  1636. #ifndef _WIN64
  1637. ULONG Reserved;
  1638. #endif // _WIN64
  1639. } KSNODEPROPERTY_AUDIO_PROPERTY, *PKSNODEPROPERTY_AUDIO_PROPERTY;
  1640. //===========================================================================
  1641. // {79A9312E-59AE-43b0-A350-8B05284CAB24}
  1642. #define STATIC_KSPROPSETID_AudioGfx\
  1643. 0x79a9312eL, 0x59ae, 0x43b0, 0xa3, 0x50, 0x8b, 0x5, 0x28, 0x4c, 0xab, 0x24
  1644. DEFINE_GUIDSTRUCT("79A9312E-59AE-43b0-A350-8B05284CAB24", KSPROPSETID_AudioGfx);
  1645. #define KSPROPSETID_AudioGfx DEFINE_GUIDNAMED(KSPROPSETID_AudioGfx)
  1646. typedef enum {
  1647. KSPROPERTY_AUDIOGFX_RENDERTARGETDEVICEID,
  1648. KSPROPERTY_AUDIOGFX_CAPTURETARGETDEVICEID
  1649. } KSPROPERTY_AUDIOGFX;
  1650. //===========================================================================
  1651. //
  1652. // Midi definitions
  1653. //
  1654. /*
  1655. Formats
  1656. */
  1657. #define STATIC_KSDATAFORMAT_TYPE_MUSIC\
  1658. 0xE725D360L, 0x62CC, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  1659. DEFINE_GUIDSTRUCT("E725D360-62CC-11CF-A5D6-28DB04C10000", KSDATAFORMAT_TYPE_MUSIC);
  1660. #define KSDATAFORMAT_TYPE_MUSIC DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MUSIC)
  1661. // 'mids' == MEDIATYPE_Midi
  1662. #define STATIC_KSDATAFORMAT_TYPE_MIDI\
  1663. 0x7364696DL, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
  1664. DEFINE_GUIDSTRUCT("7364696D-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_MIDI);
  1665. #define KSDATAFORMAT_TYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MIDI)
  1666. #define STATIC_KSDATAFORMAT_SUBTYPE_MIDI\
  1667. 0x1D262760L, 0xE957, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  1668. DEFINE_GUIDSTRUCT("1D262760-E957-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI);
  1669. #define KSDATAFORMAT_SUBTYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI)
  1670. #define STATIC_KSDATAFORMAT_SUBTYPE_MIDI_BUS\
  1671. 0x2CA15FA0L, 0x6CFE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
  1672. DEFINE_GUIDSTRUCT("2CA15FA0-6CFE-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI_BUS);
  1673. #define KSDATAFORMAT_SUBTYPE_MIDI_BUS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI_BUS)
  1674. #define STATIC_KSDATAFORMAT_SUBTYPE_RIFFMIDI\
  1675. 0x4995DAF0L, 0x9EE6, 0x11D0, 0xA4, 0x0E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  1676. DEFINE_GUIDSTRUCT("4995DAF0-9EE6-11D0-A40E-00A0C9223196", KSDATAFORMAT_SUBTYPE_RIFFMIDI);
  1677. #define KSDATAFORMAT_SUBTYPE_RIFFMIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFFMIDI)
  1678. /*
  1679. KSDATAFORMAT_SUBTYPE_DIRECTMUSIC
  1680. see DMusicKS.h
  1681. */
  1682. // WARNING! This structure MUST be dword aligned
  1683. // regardless of the number of data bytes.
  1684. typedef struct {
  1685. ULONG TimeDeltaMs; // Delta Milliseconds from the previous midiformat
  1686. // in the packet. The first midiformat in the packet
  1687. // is a delta from the PTS in the KSSTREAM_HEADER.
  1688. ULONG ByteCount; // Number of bytes of data that follow this struct.
  1689. } KSMUSICFORMAT, *PKSMUSICFORMAT;
  1690. //
  1691. // This entire set of MPEG Standard/Dialect Guids are obsolete. Do not use them.
  1692. //
  1693. //====================================================================================================
  1694. //====================================================================================================
  1695. // The following official MPEG Formats, Subtypes and Specifiers are listed as required or optional
  1696. // These official MPEG GUIDs are the preferred method of supporting MPEG/AC-3 media types in new code.
  1697. // Older MPEG GUIDs should also be supported for compatibilty, but these new modes are still required.
  1698. //====================================================================================================
  1699. //====================================================================================================
  1700. /*
  1701. This is a summary of what media types/specifiers will be required for all DVD+DSS+DVB+DTV MPEG decoders.
  1702. These media types are what the decoder driver must accept, hardware support for all of these media types
  1703. may or may not actually be provided by the decoder natively. These media types are intended to define
  1704. the "officially" supported MPEG/AC-3 media types that all WHQL certified decoders must implement. This
  1705. specifically includes driver and/or hardware support for all the required standards and dialects.
  1706. All MPEG video decoders must support all of the MPEG video modes shown as [required] below.
  1707. All MPEG audio decoders must support all of the MPEG audio modes shown as [required] below.
  1708. All AC-3 audio decoders must support all of the AC-3 audio modes shown as [required] below.
  1709. The line items shown as [optional] need not be implemented, but are possible formats that might be implemented.
  1710. Note that the input/output pin formats are defined by 2 or 3 GUIDs: TYPE, SUBTYPE, and maybe SPECIFIER.
  1711. The specifiers are included if the data format is a "dialect" that needs to be differentiated during decoding.
  1712. The decoder MUST be prepared to deal with ALL requests for _required_ "Standard" formats OR _required_ "Dialects".
  1713. STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM [required]
  1714. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO [required]
  1715. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO [optional]
  1716. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO [required]
  1717. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO [optional]
  1718. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required]
  1719. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required]
  1720. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required]
  1721. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [optional]
  1722. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required]
  1723. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional]
  1724. STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET [required]
  1725. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO [optional]
  1726. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO [optional]
  1727. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO [optional]
  1728. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO [optional]
  1729. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required]
  1730. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required]
  1731. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required]
  1732. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [required]
  1733. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required]
  1734. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional]
  1735. STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER [required]
  1736. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required]
  1737. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required]
  1738. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required]
  1739. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [optional]
  1740. STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required]
  1741. STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional]
  1742. Note that the SPECIFIER GUIDs normally identify particular versions of MPEG such as DSS and DVD.
  1743. This approach was taken to minimize the number of DSS/DVB/DVD/DTV etc. media SUBTYPES.
  1744. These specifiers are currently required to disambiguate MPEG syntax _parsing_ by the decoder
  1745. using alternate parsing routines or downloadable firmware or hardware decode settings.
  1746. In the future these specifiers will be extended to cover new KS MPEG flavors such as DVB and DTV.
  1747. Thus, the optional specifiers will be subject to clarification and/or definition as they are needed.
  1748. Important note: Per the ITU MPEG specs, MPEG 2 media may contain pure MPEG 1 syntax and
  1749. any "MPEG 2" PES packets may actually contain MPEG 1 payloads and MPEG 1 syntax. Some MPEG
  1750. broadcasts can revert from MPEG2 to MPEG1 format data at their discretion, without warning.
  1751. CAUTION: Decoders MUST attempt to process MPEG data AS SOON AS POSSIBLE after reception.
  1752. In particular, elementary MPEG or MPEG PES packet streams should not be aggregated into DVD
  1753. "pack headers" internally before submission to the codec hardware if AT ALL POSSIBLE. The
  1754. reason is that mpeg data may need to be processed immediately but there may be no additional
  1755. MPEG data forthcoming to fill up the PES packet OR DVD "pack" in a timely fashion. This is
  1756. particularly true of MPEG dialects that utilize "repeat field signally" to reuse the last
  1757. decoded MPEG video field.
  1758. */
  1759. /////////////////////////////////////////////////////////////////////////
  1760. // The major data type GUIDs that define the data packet encapsulation //
  1761. /////////////////////////////////////////////////////////////////////////
  1762. // STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM
  1763. #define STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM \
  1764. 0x36523b11L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1765. DEFINE_GUIDSTRUCT("36523B11-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM );
  1766. #define KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM)
  1767. // STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET
  1768. #define STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET \
  1769. 0x36523b12L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1770. DEFINE_GUIDSTRUCT("36523B12-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_PES_PACKET );
  1771. #define KSDATAFORMAT_TYPE_STANDARD_PES_PACKET DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_PES_PACKET)
  1772. // STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER
  1773. #define STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER \
  1774. 0x36523b13L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1775. DEFINE_GUIDSTRUCT("36523B13-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER );
  1776. #define KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER)
  1777. ///////////////////////////////////////////////////////////////////////////////
  1778. // The minor data subtype GUIDs that define the exact class of the data type.//
  1779. ///////////////////////////////////////////////////////////////////////////////
  1780. // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO
  1781. #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO \
  1782. 0x36523b21L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1783. DEFINE_GUIDSTRUCT("36523B21-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO );
  1784. #define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO)
  1785. // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO
  1786. #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO \
  1787. 0x36523b22L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1788. DEFINE_GUIDSTRUCT("36523B22-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO );
  1789. #define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO)
  1790. // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO
  1791. #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO \
  1792. 0x36523b23L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1793. DEFINE_GUIDSTRUCT("36523B23-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO );
  1794. #define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO)
  1795. // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO
  1796. #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO \
  1797. 0x36523b24L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1798. DEFINE_GUIDSTRUCT("36523B24-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO );
  1799. #define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO)
  1800. // STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO
  1801. #define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO \
  1802. 0x36523b25L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1803. DEFINE_GUIDSTRUCT("36523B25-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO );
  1804. #define KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO)
  1805. ///////////////////////////////////////////////////////////////////////////////
  1806. // The low-level specifier GUIDs that define the flavor of the data subtype. //
  1807. // Some SUBTYPES, notably MPEG2_VIDEO, MPEG2_AUDIO have different dialects. //
  1808. // These specifiers are intended to be accompanied by a specifier structure. //
  1809. ///////////////////////////////////////////////////////////////////////////////
  1810. // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO
  1811. #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO \
  1812. 0x36523b31L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1813. DEFINE_GUIDSTRUCT("36523B31-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO );
  1814. #define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO)
  1815. // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO
  1816. #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO \
  1817. 0x36523b32L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1818. DEFINE_GUIDSTRUCT("36523B32-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO );
  1819. #define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO)
  1820. // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO Associated with KS_MPEGVIDEOINFO2 defined later
  1821. #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO \
  1822. 0x36523b33L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1823. DEFINE_GUIDSTRUCT("36523B33-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO );
  1824. #define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO)
  1825. // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO Associated with KS_MPEGAUDIOINFO defined later
  1826. #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO \
  1827. 0x36523b34L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1828. DEFINE_GUIDSTRUCT("36523B34-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO );
  1829. #define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO)
  1830. // STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO
  1831. #define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO \
  1832. 0x36523b35L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a
  1833. DEFINE_GUIDSTRUCT("36523B35-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO );
  1834. #define KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO)
  1835. //====================================================================================================
  1836. //====================================================================================================
  1837. // *** COMPATIBILITY WARNING ***
  1838. // The *following* older DSS, MPEG, DVD & AC-3 GUID definitions are retained for backward compability.
  1839. // These MPEG GUIDs should also be supported for compatibilty, but the above newer modes are still required.
  1840. //====================================================================================================
  1841. //====================================================================================================
  1842. //
  1843. // DSS definitions
  1844. //
  1845. #define STATIC_KSDATAFORMAT_SUBTYPE_DSS_VIDEO\
  1846. 0xa0af4f81L, 0xe163, 0x11d0, 0xba, 0xd9, 0x00, 0x60, 0x97, 0x44, 0x11, 0x1a
  1847. DEFINE_GUIDSTRUCT("a0af4f81-e163-11d0-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_DSS_VIDEO);
  1848. #define KSDATAFORMAT_SUBTYPE_DSS_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DSS_VIDEO)
  1849. #define STATIC_KSDATAFORMAT_SUBTYPE_DSS_AUDIO\
  1850. 0xa0af4f82L, 0xe163, 0x11d0, 0xba, 0xd9, 0x00, 0x60, 0x97, 0x44, 0x11, 0x1a
  1851. DEFINE_GUIDSTRUCT("a0af4f82-e163-11d0-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_DSS_AUDIO);
  1852. #define KSDATAFORMAT_SUBTYPE_DSS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DSS_AUDIO)
  1853. //
  1854. // End of obsolete MPEG definitions.
  1855. //
  1856. //
  1857. // mpeg 1 definitions
  1858. //
  1859. #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Packet\
  1860. 0xe436eb80, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
  1861. DEFINE_GUIDSTRUCT("e436eb80-524f-11ce-9F53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Packet);
  1862. #define KSDATAFORMAT_SUBTYPE_MPEG1Packet DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Packet)
  1863. #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Payload\
  1864. 0xe436eb81, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
  1865. DEFINE_GUIDSTRUCT("e436eb81-524f-11ce-9F53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Payload);
  1866. #define KSDATAFORMAT_SUBTYPE_MPEG1Payload DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Payload)
  1867. // MEDIASUBTYPE_MPEG1Video
  1868. #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Video\
  1869. 0xe436eb86, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
  1870. DEFINE_GUIDSTRUCT("e436eb86-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Video);
  1871. #define KSDATAFORMAT_SUBTYPE_MPEG1Video DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Video)
  1872. //FORMAT_MPEGVideo
  1873. #define STATIC_KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO\
  1874. 0x05589f82L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a
  1875. DEFINE_GUIDSTRUCT("05589f82-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO);
  1876. #define KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO)
  1877. //
  1878. // mpeg 2 definitions
  1879. //
  1880. #define STATIC_KSDATAFORMAT_TYPE_MPEG2_PES\
  1881. 0xe06d8020L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1882. DEFINE_GUIDSTRUCT("e06d8020-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_PES);
  1883. #define KSDATAFORMAT_TYPE_MPEG2_PES DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_PES)
  1884. #define STATIC_KSDATAFORMAT_TYPE_MPEG2_PROGRAM\
  1885. 0xe06d8022L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1886. DEFINE_GUIDSTRUCT("e06d8022-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_PROGRAM);
  1887. #define KSDATAFORMAT_TYPE_MPEG2_PROGRAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_PROGRAM)
  1888. #define STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT\
  1889. 0xe06d8023L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1890. DEFINE_GUIDSTRUCT("e06d8023-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_TRANSPORT);
  1891. #define KSDATAFORMAT_TYPE_MPEG2_TRANSPORT DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_TRANSPORT)
  1892. #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO\
  1893. 0xe06d8026L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1894. DEFINE_GUIDSTRUCT("e06d8026-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO);
  1895. #define KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO)
  1896. // use MPEGVIDEOINFO2 (defined below) with KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO
  1897. #define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO\
  1898. 0xe06d80e3L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1899. DEFINE_GUIDSTRUCT("e06d80e3-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO);
  1900. #define KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO)
  1901. //
  1902. // Mpeg2 video properties
  1903. //
  1904. #define STATIC_KSPROPSETID_Mpeg2Vid\
  1905. 0xC8E11B60L, 0x0CC9, 0x11D0, 0xBD, 0x69, 0x00, 0x35, 0x05, 0xC1, 0x03, 0xA9
  1906. DEFINE_GUIDSTRUCT("C8E11B60-0CC9-11D0-BD69-003505C103A9", KSPROPSETID_Mpeg2Vid);
  1907. #define KSPROPSETID_Mpeg2Vid DEFINE_GUIDNAMED( KSPROPSETID_Mpeg2Vid )
  1908. typedef enum {
  1909. KSPROPERTY_MPEG2VID_MODES, // available output modes of decoder
  1910. KSPROPERTY_MPEG2VID_CUR_MODE, // current mode of the decoder
  1911. KSPROPERTY_MPEG2VID_4_3_RECT, // output coordinates for 4:3 source
  1912. KSPROPERTY_MPEG2VID_16_9_RECT, // output coordinates for 16:9 source
  1913. KSPROPERTY_MPEG2VID_16_9_PANSCAN, // pan and scan vectors
  1914. } KSPROPERTY_MPEG2VID;
  1915. //
  1916. // bit field definitions for MPEG2 VIDEO mode
  1917. //
  1918. #define KSMPEGVIDMODE_PANSCAN 0x0001
  1919. #define KSMPEGVIDMODE_LTRBOX 0x0002
  1920. #define KSMPEGVIDMODE_SCALE 0x0004
  1921. //
  1922. // rectangle definitions for the 4/3 and 16/9 cropping properties of
  1923. // the MPEG2Video decoder
  1924. //
  1925. typedef struct _KSMPEGVID_RECT {
  1926. ULONG StartX;
  1927. ULONG StartY;
  1928. ULONG EndX;
  1929. ULONG EndY;
  1930. } KSMPEGVID_RECT, *PKSMPEGVID_RECT;
  1931. //
  1932. // Params for pan / scan
  1933. //
  1934. //
  1935. // MPEG2 Audio definition
  1936. //
  1937. #define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO\
  1938. 0xe06d802bL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1939. DEFINE_GUIDSTRUCT("e06d802b-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO);
  1940. #define KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO)
  1941. #define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO\
  1942. 0xe06d80e5L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1943. DEFINE_GUIDSTRUCT("e06d80e5-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO);
  1944. #define KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO)
  1945. //
  1946. // DVD LPCM Audio definition
  1947. //
  1948. #define STATIC_KSDATAFORMAT_SUBTYPE_LPCM_AUDIO\
  1949. 0xe06d8032L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1950. DEFINE_GUIDSTRUCT("e06d8032-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_LPCM_AUDIO);
  1951. #define KSDATAFORMAT_SUBTYPE_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_LPCM_AUDIO)
  1952. #define STATIC_KSDATAFORMAT_SPECIFIER_LPCM_AUDIO\
  1953. 0xe06d80e6L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1954. DEFINE_GUIDSTRUCT("e06d80e6-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_LPCM_AUDIO);
  1955. #define KSDATAFORMAT_SPECIFIER_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_LPCM_AUDIO)
  1956. //
  1957. // AC-3 definition
  1958. //
  1959. #define STATIC_KSDATAFORMAT_SUBTYPE_AC3_AUDIO\
  1960. 0xe06d802cL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1961. DEFINE_GUIDSTRUCT("e06d802c-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_AC3_AUDIO);
  1962. #define KSDATAFORMAT_SUBTYPE_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_AC3_AUDIO)
  1963. #define STATIC_KSDATAFORMAT_SPECIFIER_AC3_AUDIO\
  1964. 0xe06d80e4L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  1965. DEFINE_GUIDSTRUCT("e06d80e4-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_AC3_AUDIO);
  1966. #define KSDATAFORMAT_SPECIFIER_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_AC3_AUDIO)
  1967. #define STATIC_KSPROPSETID_AC3\
  1968. 0xBFABE720L, 0x6E1F, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00
  1969. DEFINE_GUIDSTRUCT("BFABE720-6E1F-11D0-BCF2-444553540000", KSPROPSETID_AC3);
  1970. #define KSPROPSETID_AC3 DEFINE_GUIDNAMED(KSPROPSETID_AC3)
  1971. typedef enum {
  1972. KSPROPERTY_AC3_ERROR_CONCEALMENT = 1,
  1973. KSPROPERTY_AC3_ALTERNATE_AUDIO,
  1974. KSPROPERTY_AC3_DOWNMIX,
  1975. KSPROPERTY_AC3_BIT_STREAM_MODE,
  1976. KSPROPERTY_AC3_DIALOGUE_LEVEL,
  1977. KSPROPERTY_AC3_LANGUAGE_CODE,
  1978. KSPROPERTY_AC3_ROOM_TYPE
  1979. } KSPROPERTY_AC3;
  1980. typedef struct {
  1981. BOOL fRepeatPreviousBlock;
  1982. BOOL fErrorInCurrentBlock;
  1983. } KSAC3_ERROR_CONCEALMENT, *PKSAC3_ERROR_CONCEALMENT;
  1984. typedef struct {
  1985. BOOL fStereo;
  1986. ULONG DualMode;
  1987. } KSAC3_ALTERNATE_AUDIO, *PKSAC3_ALTERNATE_AUDIO;
  1988. #define KSAC3_ALTERNATE_AUDIO_1 1
  1989. #define KSAC3_ALTERNATE_AUDIO_2 2
  1990. #define KSAC3_ALTERNATE_AUDIO_BOTH 3
  1991. typedef struct {
  1992. BOOL fDownMix;
  1993. BOOL fDolbySurround;
  1994. } KSAC3_DOWNMIX, *PKSAC3_DOWNMIX;
  1995. typedef struct {
  1996. LONG BitStreamMode;
  1997. } KSAC3_BIT_STREAM_MODE, *PKSAC3_BIT_STREAM_MODE;
  1998. #define KSAC3_SERVICE_MAIN_AUDIO 0
  1999. #define KSAC3_SERVICE_NO_DIALOG 1
  2000. #define KSAC3_SERVICE_VISUALLY_IMPAIRED 2
  2001. #define KSAC3_SERVICE_HEARING_IMPAIRED 3
  2002. #define KSAC3_SERVICE_DIALOG_ONLY 4
  2003. #define KSAC3_SERVICE_COMMENTARY 5
  2004. #define KSAC3_SERVICE_EMERGENCY_FLASH 6
  2005. #define KSAC3_SERVICE_VOICE_OVER 7
  2006. typedef struct {
  2007. ULONG DialogueLevel;
  2008. } KSAC3_DIALOGUE_LEVEL, *PKSAC3_DIALOGUE_LEVEL;
  2009. typedef struct {
  2010. BOOL fLargeRoom;
  2011. } KSAC3_ROOM_TYPE, *PKSAC3_ROOM_TYPE;
  2012. //
  2013. // DTS and SDDS definitions (media subtype GUIDs)
  2014. //
  2015. #define STATIC_KSDATAFORMAT_SUBTYPE_DTS_AUDIO\
  2016. 0xe06d8033L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  2017. DEFINE_GUIDSTRUCT("e06d8033-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_DTS_AUDIO);
  2018. #define KSDATAFORMAT_SUBTYPE_DTS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DTS_AUDIO)
  2019. #define STATIC_KSDATAFORMAT_SUBTYPE_SDDS_AUDIO\
  2020. 0xe06d8034L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  2021. DEFINE_GUIDSTRUCT("e06d8034-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SDDS_AUDIO);
  2022. #define KSDATAFORMAT_SUBTYPE_SDDS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SDDS_AUDIO)
  2023. //
  2024. // audio decoder output properties
  2025. //
  2026. #define STATIC_KSPROPSETID_AudioDecoderOut\
  2027. 0x6ca6e020L, 0x43bd, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9
  2028. DEFINE_GUIDSTRUCT("6ca6e020-43bd-11d0-bd6a-003505c103a9", KSPROPSETID_AudioDecoderOut);
  2029. #define KSPROPSETID_AudioDecoderOut DEFINE_GUIDNAMED(KSPROPSETID_AudioDecoderOut)
  2030. typedef enum {
  2031. KSPROPERTY_AUDDECOUT_MODES, // available output modes of decoder
  2032. KSPROPERTY_AUDDECOUT_CUR_MODE, // current mode of the decoder
  2033. } KSPROPERTY_AUDDECOUT;
  2034. #define KSAUDDECOUTMODE_STEREO_ANALOG 0x0001
  2035. #define KSAUDDECOUTMODE_PCM_51 0x0002
  2036. #define KSAUDDECOUTMODE_SPDIFF 0x0004
  2037. //
  2038. // subpicture definition
  2039. //
  2040. #define STATIC_KSDATAFORMAT_SUBTYPE_SUBPICTURE\
  2041. 0xe06d802dL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea
  2042. DEFINE_GUIDSTRUCT("e06d802d-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SUBPICTURE);
  2043. #define KSDATAFORMAT_SUBTYPE_SUBPICTURE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SUBPICTURE)
  2044. #define STATIC_KSPROPSETID_DvdSubPic\
  2045. 0xac390460L, 0x43af, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9
  2046. DEFINE_GUIDSTRUCT("ac390460-43af-11d0-bd6a-003505c103a9", KSPROPSETID_DvdSubPic);
  2047. #define KSPROPSETID_DvdSubPic DEFINE_GUIDNAMED(KSPROPSETID_DvdSubPic)
  2048. typedef enum {
  2049. KSPROPERTY_DVDSUBPIC_PALETTE,
  2050. KSPROPERTY_DVDSUBPIC_HLI,
  2051. KSPROPERTY_DVDSUBPIC_COMPOSIT_ON, // TRUE for subpicture is displayed
  2052. } KSPROPERTY_DVDSUBPIC;
  2053. typedef struct _KS_DVD_YCrCb {
  2054. UCHAR Reserved;
  2055. UCHAR Y;
  2056. UCHAR Cr;
  2057. UCHAR Cb;
  2058. } KS_DVD_YCrCb, *PKS_DVD_YCrCb;
  2059. /* The KS_DVD_YUV structure is now superseded by KS_DVD_YCrCb above and is
  2060. here for backward compatibility only */
  2061. typedef struct _KS_DVD_YUV {
  2062. UCHAR Reserved;
  2063. UCHAR Y;
  2064. UCHAR V;
  2065. UCHAR U;
  2066. } KS_DVD_YUV, *PKS_DVD_YUV;
  2067. typedef struct _KSPROPERTY_SPPAL {
  2068. KS_DVD_YUV sppal[16];
  2069. } KSPROPERTY_SPPAL, *PKSPROPERTY_SPPAL;
  2070. typedef struct _KS_COLCON {
  2071. UCHAR emph1col:4;
  2072. UCHAR emph2col:4;
  2073. UCHAR backcol:4;
  2074. UCHAR patcol:4;
  2075. UCHAR emph1con:4;
  2076. UCHAR emph2con:4;
  2077. UCHAR backcon:4;
  2078. UCHAR patcon:4;
  2079. } KS_COLCON, *PKS_COLCON;
  2080. typedef struct _KSPROPERTY_SPHLI {
  2081. USHORT HLISS;
  2082. USHORT Reserved;
  2083. ULONG StartPTM; // start presentation time in x/90000
  2084. ULONG EndPTM; // end PTM in x/90000
  2085. USHORT StartX;
  2086. USHORT StartY;
  2087. USHORT StopX;
  2088. USHORT StopY;
  2089. KS_COLCON ColCon; // color contrast description (4 bytes as given in HLI)
  2090. } KSPROPERTY_SPHLI, *PKSPROPERTY_SPHLI;
  2091. typedef BOOL KSPROPERTY_COMPOSIT_ON, *PKSPROPERTY_COMPOSIT_ON;
  2092. #define STATIC_KSPROPSETID_CopyProt \
  2093. 0x0E8A0A40L, 0x6AEF, 0x11D0, 0x9E, 0xD0, 0x00, 0xA0, 0x24, 0xCA, 0x19, 0xB3
  2094. DEFINE_GUIDSTRUCT("0E8A0A40-6AEF-11D0-9ED0-00A024CA19B3", KSPROPSETID_CopyProt);
  2095. #define KSPROPSETID_CopyProt DEFINE_GUIDNAMED(KSPROPSETID_CopyProt)
  2096. typedef enum {
  2097. KSPROPERTY_DVDCOPY_CHLG_KEY = 0x01,
  2098. KSPROPERTY_DVDCOPY_DVD_KEY1,
  2099. KSPROPERTY_DVDCOPY_DEC_KEY2,
  2100. KSPROPERTY_DVDCOPY_TITLE_KEY,
  2101. KSPROPERTY_COPY_MACROVISION,
  2102. KSPROPERTY_DVDCOPY_REGION,
  2103. KSPROPERTY_DVDCOPY_SET_COPY_STATE,
  2104. KSPROPERTY_DVDCOPY_DISC_KEY = 0x80
  2105. } KSPROPERTY_COPYPROT;
  2106. typedef struct _KS_DVDCOPY_CHLGKEY {
  2107. BYTE ChlgKey[10];
  2108. BYTE Reserved[2];
  2109. } KS_DVDCOPY_CHLGKEY, *PKS_DVDCOPY_CHLGKEY;
  2110. typedef struct _KS_DVDCOPY_BUSKEY {
  2111. BYTE BusKey[5];
  2112. BYTE Reserved[1];
  2113. } KS_DVDCOPY_BUSKEY, *PKS_DVDCOPY_BUSKEY;
  2114. typedef struct _KS_DVDCOPY_DISCKEY {
  2115. BYTE DiscKey[2048];
  2116. } KS_DVDCOPY_DISCKEY, *PKS_DVDCOPY_DISCKEY;
  2117. typedef struct _KS_DVDCOPY_REGION {
  2118. UCHAR Reserved;
  2119. UCHAR RegionData;
  2120. UCHAR Reserved2[2];
  2121. } KS_DVDCOPY_REGION, *PKS_DVDCOPY_REGION;
  2122. typedef struct _KS_DVDCOPY_TITLEKEY {
  2123. ULONG KeyFlags;
  2124. ULONG ReservedNT[2];
  2125. UCHAR TitleKey[6];
  2126. UCHAR Reserved[2];
  2127. } KS_DVDCOPY_TITLEKEY, *PKS_DVDCOPY_TITLEKEY;
  2128. typedef struct _KS_COPY_MACROVISION {
  2129. ULONG MACROVISIONLevel;
  2130. } KS_COPY_MACROVISION, *PKS_COPY_MACROVISION;
  2131. typedef struct _KS_DVDCOPY_SET_COPY_STATE {
  2132. ULONG DVDCopyState;
  2133. } KS_DVDCOPY_SET_COPY_STATE, *PKS_DVDCOPY_SET_COPY_STATE;
  2134. typedef enum {
  2135. KS_DVDCOPYSTATE_INITIALIZE, // indicates we are starting a full
  2136. // copy protection sequence.
  2137. KS_DVDCOPYSTATE_INITIALIZE_TITLE, // indicates we are starting a title
  2138. // key copy protection sequence
  2139. KS_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED,
  2140. KS_DVDCOPYSTATE_AUTHENTICATION_REQUIRED,
  2141. KS_DVDCOPYSTATE_DONE,
  2142. } KS_DVDCOPYSTATE;
  2143. typedef enum {
  2144. KS_MACROVISION_DISABLED,
  2145. KS_MACROVISION_LEVEL1,
  2146. KS_MACROVISION_LEVEL2,
  2147. KS_MACROVISION_LEVEL3
  2148. } KS_COPY_MACROVISION_LEVEL, *PKS_COPY_MACROVISION_LEVEL;
  2149. //
  2150. // CGMS Copy Protection Flags
  2151. //
  2152. #define KS_DVD_CGMS_RESERVED_MASK 0x00000078
  2153. #define KS_DVD_CGMS_COPY_PROTECT_MASK 0x00000018
  2154. #define KS_DVD_CGMS_COPY_PERMITTED 0x00000000
  2155. #define KS_DVD_CGMS_COPY_ONCE 0x00000010
  2156. #define KS_DVD_CGMS_NO_COPY 0x00000018
  2157. #define KS_DVD_COPYRIGHT_MASK 0x00000040
  2158. #define KS_DVD_NOT_COPYRIGHTED 0x00000000
  2159. #define KS_DVD_COPYRIGHTED 0x00000040
  2160. #define KS_DVD_SECTOR_PROTECT_MASK 0x00000020
  2161. #define KS_DVD_SECTOR_NOT_PROTECTED 0x00000000
  2162. #define KS_DVD_SECTOR_PROTECTED 0x00000020
  2163. //===========================================================================
  2164. // The following MUST match the structures in WinGDI.h and AMVideo.h
  2165. //===========================================================================
  2166. #define STATIC_KSCATEGORY_TVTUNER \
  2167. 0xa799a800L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
  2168. DEFINE_GUIDSTRUCT("a799a800-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVTUNER);
  2169. #define KSCATEGORY_TVTUNER DEFINE_GUIDNAMED(KSCATEGORY_TVTUNER)
  2170. #define STATIC_KSCATEGORY_CROSSBAR \
  2171. 0xa799a801L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
  2172. DEFINE_GUIDSTRUCT("a799a801-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_CROSSBAR);
  2173. #define KSCATEGORY_CROSSBAR DEFINE_GUIDNAMED(KSCATEGORY_CROSSBAR)
  2174. #define STATIC_KSCATEGORY_TVAUDIO \
  2175. 0xa799a802L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
  2176. DEFINE_GUIDSTRUCT("a799a802-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVAUDIO);
  2177. #define KSCATEGORY_TVAUDIO DEFINE_GUIDNAMED(KSCATEGORY_TVAUDIO)
  2178. #define STATIC_KSCATEGORY_VPMUX \
  2179. 0xa799a803L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4
  2180. DEFINE_GUIDSTRUCT("a799a803-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_VPMUX);
  2181. #define KSCATEGORY_VPMUX DEFINE_GUIDNAMED(KSCATEGORY_VPMUX)
  2182. #define STATIC_KSCATEGORY_VBICODEC \
  2183. 0x07dad660L, 0x22f1, 0x11d1, 0xa9, 0xf4, 0x00, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
  2184. DEFINE_GUIDSTRUCT("07dad660-22f1-11d1-a9f4-00c04fbbde8f", KSCATEGORY_VBICODEC);
  2185. #define KSCATEGORY_VBICODEC DEFINE_GUIDNAMED(KSCATEGORY_VBICODEC)
  2186. // SUBTYPE_VPVideo
  2187. #define STATIC_KSDATAFORMAT_SUBTYPE_VPVideo\
  2188. 0x5a9b6a40L, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
  2189. DEFINE_GUIDSTRUCT("5a9b6a40-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVideo);
  2190. #define KSDATAFORMAT_SUBTYPE_VPVideo DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVideo)
  2191. // SUBTYPE_VPVBI
  2192. #define STATIC_KSDATAFORMAT_SUBTYPE_VPVBI\
  2193. 0x5a9b6a41L, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
  2194. DEFINE_GUIDSTRUCT("5a9b6a41-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVBI);
  2195. #define KSDATAFORMAT_SUBTYPE_VPVBI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVBI)
  2196. // FORMAT_VideoInfo
  2197. #define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO\
  2198. 0x05589f80L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a
  2199. DEFINE_GUIDSTRUCT("05589f80-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_VIDEOINFO);
  2200. #define KSDATAFORMAT_SPECIFIER_VIDEOINFO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO)
  2201. // FORMAT_VideoInfo2
  2202. #define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2\
  2203. 0xf72a76A0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  2204. DEFINE_GUIDSTRUCT("f72a76A0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VIDEOINFO2);
  2205. #define KSDATAFORMAT_SPECIFIER_VIDEOINFO2 DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO2)
  2206. // MEDIATYPE_AnalogVideo
  2207. #define STATIC_KSDATAFORMAT_TYPE_ANALOGVIDEO\
  2208. 0x0482dde1L, 0x7817, 0x11cf, 0x8a, 0x03, 0x00, 0xaa, 0x00, 0x6e, 0xcb, 0x65
  2209. DEFINE_GUIDSTRUCT("0482dde1-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_TYPE_ANALOGVIDEO);
  2210. #define KSDATAFORMAT_TYPE_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_ANALOGVIDEO)
  2211. // FORMAT_AnalogVideo
  2212. #define STATIC_KSDATAFORMAT_SPECIFIER_ANALOGVIDEO\
  2213. 0x0482dde0L, 0x7817, 0x11cf, 0x8a, 0x03, 0x00, 0xaa, 0x00, 0x6e, 0xcb, 0x65
  2214. DEFINE_GUIDSTRUCT("0482dde0-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_SPECIFIER_ANALOGVIDEO);
  2215. #define KSDATAFORMAT_SPECIFIER_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_ANALOGVIDEO)
  2216. // FORMAT_VBI
  2217. #define STATIC_KSDATAFORMAT_SPECIFIER_VBI\
  2218. 0xf72a76e0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  2219. DEFINE_GUIDSTRUCT("f72a76e0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VBI);
  2220. #define KSDATAFORMAT_SPECIFIER_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VBI)
  2221. // MEDIATYPE_VBI
  2222. #define STATIC_KSDATAFORMAT_TYPE_VBI\
  2223. 0xf72a76e1L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  2224. DEFINE_GUIDSTRUCT("f72a76e1-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_TYPE_VBI);
  2225. #define KSDATAFORMAT_TYPE_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VBI)
  2226. // SUBTYPE_RAW8
  2227. #define STATIC_KSDATAFORMAT_SUBTYPE_RAW8\
  2228. 0xca20d9a0, 0x3e3e, 0x11d1, 0x9b, 0xf9, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0xbf
  2229. DEFINE_GUIDSTRUCT("ca20d9a0-3e3e-11d1-9bf9-00c04fbbdebf", KSDATAFORMAT_SUBTYPE_RAW8);
  2230. #define KSDATAFORMAT_SUBTYPE_RAW8 DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RAW8)
  2231. // MEDIASUBTYPE_CC
  2232. #define STATIC_KSDATAFORMAT_SUBTYPE_CC\
  2233. 0x33214cc1, 0x11f, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
  2234. DEFINE_GUIDSTRUCT("33214CC1-011F-11D2-B4B1-00A0D102CFBE", KSDATAFORMAT_SUBTYPE_CC);
  2235. #define KSDATAFORMAT_SUBTYPE_CC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_CC)
  2236. // MEDIASUBTYPE_NABTS
  2237. #define STATIC_KSDATAFORMAT_SUBTYPE_NABTS\
  2238. 0xf72a76e2L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  2239. DEFINE_GUIDSTRUCT("f72a76e2-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_NABTS);
  2240. #define KSDATAFORMAT_SUBTYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS)
  2241. // MEDIASUBTYPE_TELETEXT
  2242. #define STATIC_KSDATAFORMAT_SUBTYPE_TELETEXT\
  2243. 0xf72a76e3L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba
  2244. DEFINE_GUIDSTRUCT("f72a76e3-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_TELETEXT);
  2245. #define KSDATAFORMAT_SUBTYPE_TELETEXT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_TELETEXT)
  2246. /* constants for the biCompression field */
  2247. #define KS_BI_RGB 0L
  2248. #define KS_BI_RLE8 1L
  2249. #define KS_BI_RLE4 2L
  2250. #define KS_BI_BITFIELDS 3L
  2251. typedef struct tagKS_RGBQUAD { // rgbq
  2252. BYTE rgbBlue;
  2253. BYTE rgbGreen;
  2254. BYTE rgbRed;
  2255. BYTE rgbReserved;
  2256. } KS_RGBQUAD, *PKS_RGBQUAD;
  2257. /* constants for palettes */
  2258. #define KS_iPALETTE_COLORS 256 // Maximum colours in palette
  2259. #define KS_iEGA_COLORS 16 // Number colours in EGA palette
  2260. #define KS_iMASK_COLORS 3 // Maximum three components
  2261. #define KS_iTRUECOLOR 16 // Minimum true colour device
  2262. #define KS_iRED 0 // Index position for RED mask
  2263. #define KS_iGREEN 1 // Index position for GREEN mask
  2264. #define KS_iBLUE 2 // Index position for BLUE mask
  2265. #define KS_iPALETTE 8 // Maximum colour depth using a palette
  2266. #define KS_iMAXBITS 8 // Maximum bits per colour component
  2267. #define KS_SIZE_EGA_PALETTE (KS_iEGA_COLORS * sizeof(KS_RGBQUAD))
  2268. #define KS_SIZE_PALETTE (KS_iPALETTE_COLORS * sizeof(KS_RGBQUAD))
  2269. typedef struct tagKS_BITMAPINFOHEADER{
  2270. DWORD biSize;
  2271. LONG biWidth;
  2272. LONG biHeight;
  2273. WORD biPlanes;
  2274. WORD biBitCount;
  2275. DWORD biCompression;
  2276. DWORD biSizeImage;
  2277. LONG biXPelsPerMeter;
  2278. LONG biYPelsPerMeter;
  2279. DWORD biClrUsed;
  2280. DWORD biClrImportant;
  2281. } KS_BITMAPINFOHEADER, *PKS_BITMAPINFOHEADER;
  2282. // Used for true colour images that also have a palette
  2283. typedef struct tag_KS_TRUECOLORINFO {
  2284. DWORD dwBitMasks[KS_iMASK_COLORS];
  2285. KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS];
  2286. } KS_TRUECOLORINFO, *PKS_TRUECOLORINFO;
  2287. #define KS_WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8)
  2288. #define KS_DIBWIDTHBYTES(bi) (DWORD)KS_WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
  2289. #define KS__DIBSIZE(bi) (KS_DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
  2290. #define KS_DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(KS__DIBSIZE(bi)) : KS__DIBSIZE(bi))
  2291. typedef LONGLONG REFERENCE_TIME;
  2292. // The BITMAPINFOHEADER contains all the details about the video stream such
  2293. // as the actual image dimensions and their pixel depth. A source filter may
  2294. // also request that the sink take only a section of the video by providing a
  2295. // clipping rectangle in rcSource. In the worst case where the sink filter
  2296. // forgets to check this on connection it will simply render the whole thing
  2297. // which isn't a disaster. Ideally a sink filter will check the rcSource and
  2298. // if it doesn't support image extraction and the rectangle is not empty then
  2299. // it will reject the connection. A filter should use SetRectEmpty to reset a
  2300. // rectangle to all zeroes (and IsRectEmpty to later check the rectangle).
  2301. // The rcTarget specifies the destination rectangle for the video, for most
  2302. // source filters they will set this to all zeroes, a downstream filter may
  2303. // request that the video be placed in a particular area of the buffers it
  2304. // supplies in which case it will call QueryAccept with a non empty target
  2305. typedef struct tagKS_VIDEOINFOHEADER {
  2306. RECT rcSource; // The bit we really want to use
  2307. RECT rcTarget; // Where the video should go
  2308. DWORD dwBitRate; // Approximate bit data rate
  2309. DWORD dwBitErrorRate; // Bit error rate for this stream
  2310. REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  2311. KS_BITMAPINFOHEADER bmiHeader;
  2312. } KS_VIDEOINFOHEADER, *PKS_VIDEOINFOHEADER;
  2313. // !!! WARNING !!!
  2314. // DO NOT use the following structure unless you are sure that the BITMAPINFOHEADER
  2315. // has a normal biSize == sizeof(BITMAPINFOHEADER) !
  2316. // !!! WARNING !!!
  2317. typedef struct tagKS_VIDEOINFO {
  2318. RECT rcSource; // The bit we really want to use
  2319. RECT rcTarget; // Where the video should go
  2320. DWORD dwBitRate; // Approximate bit data rate
  2321. DWORD dwBitErrorRate; // Bit error rate for this stream
  2322. REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
  2323. KS_BITMAPINFOHEADER bmiHeader;
  2324. union {
  2325. KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS]; // Colour palette
  2326. DWORD dwBitMasks[KS_iMASK_COLORS]; // True colour masks
  2327. KS_TRUECOLORINFO TrueColorInfo; // Both of the above
  2328. };
  2329. } KS_VIDEOINFO, *PKS_VIDEOINFO;
  2330. #define KS_SIZE_MASKS (KS_iMASK_COLORS * sizeof(DWORD))
  2331. #define KS_SIZE_PREHEADER (FIELD_OFFSET(KS_VIDEOINFOHEADER,bmiHeader))
  2332. // For normal size
  2333. // #define KS_SIZE_VIDEOHEADER (sizeof(KS_BITMAPINFOHEADER) + KS_SIZE_PREHEADER)
  2334. // !!! for abnormal biSizes
  2335. #define KS_SIZE_VIDEOHEADER(pbmi) ((pbmi)->bmiHeader.biSize + KS_SIZE_PREHEADER)
  2336. // VBI
  2337. // Used for NABTS, CC, Intercast, WST
  2338. typedef struct tagKS_VBIINFOHEADER {
  2339. ULONG StartLine; // inclusive
  2340. ULONG EndLine; // inclusive
  2341. ULONG SamplingFrequency; // Hz.
  2342. ULONG MinLineStartTime; // microSec * 100 from HSync LE
  2343. ULONG MaxLineStartTime; // microSec * 100 from HSync LE
  2344. ULONG ActualLineStartTime; // microSec * 100 from HSync LE
  2345. ULONG ActualLineEndTime; // microSec * 100 from HSync LE
  2346. ULONG VideoStandard; // KS_AnalogVideoStandard*
  2347. ULONG SamplesPerLine;
  2348. ULONG StrideInBytes; // May be > SamplesPerLine
  2349. ULONG BufferSize; // Bytes
  2350. } KS_VBIINFOHEADER, *PKS_VBIINFOHEADER;
  2351. // VBI Sampling Rates
  2352. #define KS_VBIDATARATE_NABTS (5727272L)
  2353. #define KS_VBIDATARATE_CC ( 503493L) // ~= 1/1.986125e-6
  2354. #define KS_VBISAMPLINGRATE_4X_NABTS ((long)(4*KS_VBIDATARATE_NABTS))
  2355. #define KS_VBISAMPLINGRATE_47X_NABTS ((long)(27000000))
  2356. #define KS_VBISAMPLINGRATE_5X_NABTS ((long)(5*KS_VBIDATARATE_NABTS))
  2357. #define KS_47NABTS_SCALER (KS_VBISAMPLINGRATE_47X_NABTS/(double)KS_VBIDATARATE_NABTS)
  2358. // Analog video variant - Use this when the format is FORMAT_AnalogVideo
  2359. //
  2360. // rcSource defines the portion of the active video signal to use
  2361. // rcTarget defines the destination rectangle
  2362. // both of the above are relative to the dwActiveWidth and dwActiveHeight fields
  2363. // dwActiveWidth is currently set to 720 for all formats (but could change for HDTV)
  2364. // dwActiveHeight is 483 for NTSC and 575 for PAL/SECAM (but could change for HDTV)
  2365. typedef struct tagKS_AnalogVideoInfo {
  2366. RECT rcSource; // Width max is 720, height varies w/ TransmissionStd
  2367. RECT rcTarget; // Where the video should go
  2368. DWORD dwActiveWidth; // Always 720 (CCIR-601 active samples per line)
  2369. DWORD dwActiveHeight; // 483 for NTSC, 575 for PAL/SECAM
  2370. REFERENCE_TIME AvgTimePerFrame; // Normal ActiveMovie units (100 nS)
  2371. } KS_ANALOGVIDEOINFO, *PKS_ANALOGVIDEOINFO;
  2372. //===========================================================================
  2373. // Data packet passed on Analog video stream channel change
  2374. //===========================================================================
  2375. #define KS_TVTUNER_CHANGE_BEGIN_TUNE 0x0001L // Starting a tuning operation
  2376. #define KS_TVTUNER_CHANGE_END_TUNE 0x0002L // Ending a tuning operation
  2377. typedef struct tagKS_TVTUNER_CHANGE_INFO {
  2378. DWORD dwFlags; // KS_TVTUNER_CHANGE_*
  2379. DWORD dwCountryCode;
  2380. DWORD dwAnalogVideoStandard; // KS_AnalogVideoStandard
  2381. DWORD dwChannel;
  2382. } KS_TVTUNER_CHANGE_INFO, *PKS_TVTUNER_CHANGE_INFO;
  2383. //===========================================================================
  2384. // Video format blocks
  2385. //===========================================================================
  2386. typedef enum {
  2387. KS_MPEG2Level_Low,
  2388. KS_MPEG2Level_Main,
  2389. KS_MPEG2Level_High1440,
  2390. KS_MPEG2Level_High
  2391. } KS_MPEG2Level;
  2392. typedef enum {
  2393. KS_MPEG2Profile_Simple,
  2394. KS_MPEG2Profile_Main,
  2395. KS_MPEG2Profile_SNRScalable,
  2396. KS_MPEG2Profile_SpatiallyScalable,
  2397. KS_MPEG2Profile_High
  2398. } KS_MPEG2Profile;
  2399. #define KS_INTERLACE_IsInterlaced 0x00000001 // if 0, other interlace bits are irrelevent
  2400. #define KS_INTERLACE_1FieldPerSample 0x00000002 // else 2 fields per media sample
  2401. #define KS_INTERLACE_Field1First 0x00000004 // else Field 2 is first; top field in PAL is field 1, top field in NTSC is field 2?
  2402. #define KS_INTERLACE_UNUSED 0x00000008 //
  2403. #define KS_INTERLACE_FieldPatternMask 0x00000030 // use this mask with AMINTERLACE_FieldPat*
  2404. #define KS_INTERLACE_FieldPatField1Only 0x00000000 // Data never contains a Field2
  2405. #define KS_INTERLACE_FieldPatField2Only 0x00000010 // Data never contains a Field1
  2406. #define KS_INTERLACE_FieldPatBothRegular 0x00000020 // There will be a Field2 for every Field1 (required for Weave?)
  2407. #define KS_INTERLACE_FieldPatBothIrregular 0x00000030 // Random pattern of Field1s and Field2s
  2408. #define KS_INTERLACE_DisplayModeMask 0x000000c0
  2409. #define KS_INTERLACE_DisplayModeBobOnly 0x00000000
  2410. #define KS_INTERLACE_DisplayModeWeaveOnly 0x00000040
  2411. #define KS_INTERLACE_DisplayModeBobOrWeave 0x00000080
  2412. #define KS_MPEG2_DoPanScan 0x00000001 //if set, the MPEG-2 video decoder should crop output image
  2413. // based on pan-scan vectors in picture_display_extension
  2414. // and change the picture aspect ratio accordingly.
  2415. #define KS_MPEG2_DVDLine21Field1 0x00000002 //if set, the MPEG-2 decoder must be able to produce an output
  2416. // pin for DVD style closed caption data found in GOP layer of field 1
  2417. #define KS_MPEG2_DVDLine21Field2 0x00000004 //if set, the MPEG-2 decoder must be able to produce an output
  2418. // pin for DVD style closed caption data found in GOP layer of field 2
  2419. #define KS_MPEG2_SourceIsLetterboxed 0x00000008 //if set, indicates that black bars have been encoded in the top
  2420. // and bottom of the video.
  2421. #define KS_MPEG2_FilmCameraMode 0x00000010 //if set, indicates "film mode" used for 625/50 content. If cleared,
  2422. // indicates that "camera mode" was used.
  2423. #define KS_MPEG2_LetterboxAnalogOut 0x00000020 //if set and this stream is sent to an analog output, it should
  2424. // be letterboxed. Streams sent to VGA should be letterboxed only by renderers.
  2425. #define KS_MPEG2_DSS_UserData 0x00000040 //if set, the MPEG-2 decoder must process DSS style user data
  2426. #define KS_MPEG2_DVB_UserData 0x00000080 //if set, the MPEG-2 decoder must process DVB style user data
  2427. #define KS_MPEG2_27MhzTimebase 0x00000100 //if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz
  2428. typedef struct tagKS_VIDEOINFOHEADER2 {
  2429. RECT rcSource;
  2430. RECT rcTarget;
  2431. DWORD dwBitRate;
  2432. DWORD dwBitErrorRate;
  2433. REFERENCE_TIME AvgTimePerFrame;
  2434. DWORD dwInterlaceFlags; // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
  2435. DWORD dwCopyProtectFlags; // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
  2436. DWORD dwPictAspectRatioX; // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
  2437. DWORD dwPictAspectRatioY; // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display
  2438. DWORD dwReserved1; // must be 0; reject connection otherwise
  2439. DWORD dwReserved2; // must be 0; reject connection otherwise
  2440. KS_BITMAPINFOHEADER bmiHeader;
  2441. } KS_VIDEOINFOHEADER2, *PKS_VIDEOINFOHEADER2;
  2442. typedef struct tagKS_MPEG1VIDEOINFO {
  2443. KS_VIDEOINFOHEADER hdr; // Compatible with VIDEOINFO
  2444. DWORD dwStartTimeCode; // 25-bit Group of pictures time code at start of data
  2445. DWORD cbSequenceHeader; // Length in bytes of bSequenceHeader
  2446. BYTE bSequenceHeader[1]; // Sequence header including quantization matrices if any
  2447. } KS_MPEG1VIDEOINFO, *PKS_MPEG1VIDEOINFO;
  2448. #define KS_MAX_SIZE_MPEG1_SEQUENCE_INFO 140
  2449. #define KS_SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(KS_MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
  2450. #define KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
  2451. typedef struct tagKS_MPEGVIDEOINFO2 {
  2452. KS_VIDEOINFOHEADER2 hdr;
  2453. DWORD dwStartTimeCode; // ?? not used for DVD ??
  2454. DWORD cbSequenceHeader; // is 0 for DVD (no sequence header)
  2455. DWORD dwProfile; // use enum MPEG2Profile
  2456. DWORD dwLevel; // use enum MPEG2Level
  2457. DWORD dwFlags; // use AMMPEG2_* defines. Reject connection if undefined bits are not 0
  2458. DWORD bSequenceHeader[1]; // DWORD instead of Byte for alignment purposes
  2459. // For MPEG-2, if a sequence_header is included, the sequence_extension
  2460. // should also be included
  2461. } KS_MPEGVIDEOINFO2, *PKS_MPEGVIDEOINFO2;
  2462. #define KS_SIZE_MPEGVIDEOINFO2(pv) (FIELD_OFFSET(KS_MPEGVIDEOINFO2, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
  2463. #define KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
  2464. //===========================================================================
  2465. // Audio format blocks
  2466. //===========================================================================
  2467. //if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz
  2468. #define KS_MPEGAUDIOINFO_27MhzTimebase 0x00000001
  2469. typedef struct tagKS_MPEAUDIOINFO {
  2470. DWORD dwFlags; // use KS_MPEGAUDIOINFO_* defines. Reject connection if undefined bits are not 0
  2471. DWORD dwReserved1; // must be 0; reject connection otherwise
  2472. DWORD dwReserved2; // must be 0; reject connection otherwise
  2473. DWORD dwReserved3; // must be 0; reject connection otherwise
  2474. } KS_MPEGAUDIOINFO, *PKS_MPEGAUDIOINFO;
  2475. //===========================================================================
  2476. // Video DATAFORMATs
  2477. //===========================================================================
  2478. typedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER {
  2479. KSDATAFORMAT DataFormat;
  2480. KS_VIDEOINFOHEADER VideoInfoHeader;
  2481. } KS_DATAFORMAT_VIDEOINFOHEADER, *PKS_DATAFORMAT_VIDEOINFOHEADER;
  2482. typedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER2 {
  2483. KSDATAFORMAT DataFormat;
  2484. KS_VIDEOINFOHEADER2 VideoInfoHeader2;
  2485. } KS_DATAFORMAT_VIDEOINFOHEADER2, *PKS_DATAFORMAT_VIDEOINFOHEADER2;
  2486. typedef struct tagKS_DATAFORMAT_VIDEOINFO_PALETTE {
  2487. KSDATAFORMAT DataFormat;
  2488. KS_VIDEOINFO VideoInfo;
  2489. } KS_DATAFORMAT_VIDEOINFO_PALETTE, *PKS_DATAFORMAT_VIDEOINFO_PALETTE;
  2490. typedef struct tagKS_DATAFORMAT_VBIINFOHEADER {
  2491. KSDATAFORMAT DataFormat;
  2492. KS_VBIINFOHEADER VBIInfoHeader;
  2493. } KS_DATAFORMAT_VBIINFOHEADER, *PKS_DATAFORMAT_VBIINFOHEADER;
  2494. typedef struct _KS_VIDEO_STREAM_CONFIG_CAPS {
  2495. GUID guid; // will be MEDIATYPE_Video
  2496. ULONG VideoStandard; // logical OR of all AnalogVideoStandards
  2497. // supported
  2498. SIZE InputSize; // the inherent size of the incoming signal
  2499. // (every pixel unique)
  2500. SIZE MinCroppingSize; // smallest rcSrc cropping rect allowed
  2501. SIZE MaxCroppingSize; // largest rcSrc cropping rect allowed
  2502. int CropGranularityX; // granularity of cropping size
  2503. int CropGranularityY;
  2504. int CropAlignX; // alignment of cropping rect
  2505. int CropAlignY;
  2506. SIZE MinOutputSize; // smallest bitmap stream can produce
  2507. SIZE MaxOutputSize; // largest bitmap stream can produce
  2508. int OutputGranularityX; // granularity of output bitmap size
  2509. int OutputGranularityY;
  2510. int StretchTapsX; // 0, no stretch, 1 pix dup, 2 interp, ...
  2511. int StretchTapsY; // Describes quality of hardware scaler
  2512. int ShrinkTapsX; //
  2513. int ShrinkTapsY; //
  2514. LONGLONG MinFrameInterval; // 100 nS units
  2515. LONGLONG MaxFrameInterval;
  2516. LONG MinBitsPerSecond;
  2517. LONG MaxBitsPerSecond;
  2518. } KS_VIDEO_STREAM_CONFIG_CAPS, *PKS_VIDEO_STREAM_CONFIG_CAPS;
  2519. //===========================================================================
  2520. // Video DATARANGEs
  2521. //===========================================================================
  2522. typedef struct tagKS_DATARANGE_VIDEO {
  2523. KSDATARANGE DataRange;
  2524. BOOL bFixedSizeSamples; // all samples same size?
  2525. BOOL bTemporalCompression; // all I frames?
  2526. DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
  2527. DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
  2528. KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
  2529. KS_VIDEOINFOHEADER VideoInfoHeader; // default format
  2530. } KS_DATARANGE_VIDEO, *PKS_DATARANGE_VIDEO;
  2531. typedef struct tagKS_DATARANGE_VIDEO2 {
  2532. KSDATARANGE DataRange;
  2533. BOOL bFixedSizeSamples; // all samples same size?
  2534. BOOL bTemporalCompression; // all I frames?
  2535. DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
  2536. DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
  2537. KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
  2538. KS_VIDEOINFOHEADER2 VideoInfoHeader; // default format
  2539. } KS_DATARANGE_VIDEO2, *PKS_DATARANGE_VIDEO2;
  2540. typedef struct tagKS_DATARANGE_MPEG1_VIDEO {
  2541. KSDATARANGE DataRange;
  2542. BOOL bFixedSizeSamples; // all samples same size?
  2543. BOOL bTemporalCompression; // all I frames?
  2544. DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
  2545. DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
  2546. KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
  2547. KS_MPEG1VIDEOINFO VideoInfoHeader; // default format
  2548. } KS_DATARANGE_MPEG1_VIDEO, *PKS_DATARANGE_MPEG1_VIDEO;
  2549. typedef struct tagKS_DATARANGE_MPEG2_VIDEO {
  2550. KSDATARANGE DataRange;
  2551. BOOL bFixedSizeSamples; // all samples same size?
  2552. BOOL bTemporalCompression; // all I frames?
  2553. DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
  2554. DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
  2555. KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
  2556. KS_MPEGVIDEOINFO2 VideoInfoHeader; // default format
  2557. } KS_DATARANGE_MPEG2_VIDEO, *PKS_DATARANGE_MPEG2_VIDEO;
  2558. typedef struct tagKS_DATARANGE_VIDEO_PALETTE {
  2559. KSDATARANGE DataRange;
  2560. BOOL bFixedSizeSamples; // all samples same size?
  2561. BOOL bTemporalCompression; // all I frames?
  2562. DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
  2563. DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
  2564. KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
  2565. KS_VIDEOINFO VideoInfo; // default format
  2566. } KS_DATARANGE_VIDEO_PALETTE, *PKS_DATARANGE_VIDEO_PALETTE;
  2567. typedef struct tagKS_DATARANGE_VIDEO_VBI {
  2568. KSDATARANGE DataRange;
  2569. BOOL bFixedSizeSamples; // all samples same size?
  2570. BOOL bTemporalCompression; // all I frames?
  2571. DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_*
  2572. DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_*
  2573. KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
  2574. KS_VBIINFOHEADER VBIInfoHeader; // default format
  2575. } KS_DATARANGE_VIDEO_VBI, *PKS_DATARANGE_VIDEO_VBI;
  2576. typedef struct tagKS_DATARANGE_ANALOGVIDEO {
  2577. KSDATARANGE DataRange;
  2578. KS_ANALOGVIDEOINFO AnalogVideoInfo;
  2579. } KS_DATARANGE_ANALOGVIDEO, *PKS_DATARANGE_ANALOGVIDEO;
  2580. //===========================================================================
  2581. // StreamDescriptionFlags
  2582. //
  2583. // These define the "purpose" of each video stream
  2584. //===========================================================================
  2585. #define KS_VIDEOSTREAM_PREVIEW 0x0001 // Preview stream
  2586. #define KS_VIDEOSTREAM_CAPTURE 0x0002 // Capture stream
  2587. #define KS_VIDEOSTREAM_VBI 0x0010 // Field1 VBI
  2588. #define KS_VIDEOSTREAM_NABTS 0x0020 // Field1 NABTS
  2589. #define KS_VIDEOSTREAM_CC 0x0100 // Closed Captioning
  2590. #define KS_VIDEOSTREAM_EDS 0x0200 // Extended Data Services
  2591. #define KS_VIDEOSTREAM_TELETEXT 0x0400 // Field1 Teletext only
  2592. #define KS_VIDEOSTREAM_STILL 0x1000 // Still image input
  2593. #define KS_VIDEOSTREAM_IS_VPE 0x8000 // Is a VPE based stream?
  2594. // MemoryAllocationFlags
  2595. #define KS_VIDEO_ALLOC_VPE_SYSTEM 0x0001 // VPE surface in system memory
  2596. #define KS_VIDEO_ALLOC_VPE_DISPLAY 0x0002 // VPE surface in display memory
  2597. #define KS_VIDEO_ALLOC_VPE_AGP 0x0004 // VPE surface in AGP memory
  2598. //////////////////////////////////////////////////////////////
  2599. // Capture driver VBI property sets
  2600. //////////////////////////////////////////////////////////////
  2601. // {F162C607-7B35-496f-AD7F-2DCA3B46B718}
  2602. #define STATIC_KSPROPSETID_VBICAP_PROPERTIES\
  2603. 0xf162c607, 0x7b35, 0x496f, 0xad, 0x7f, 0x2d, 0xca, 0x3b, 0x46, 0xb7, 0x18
  2604. DEFINE_GUIDSTRUCT("F162C607-7B35-496f-AD7F-2DCA3B46B718", KSPROPSETID_VBICAP_PROPERTIES);
  2605. #define KSPROPSETID_VBICAP_PROPERTIES DEFINE_GUIDNAMED(KSPROPSETID_VBICAP_PROPERTIES)
  2606. typedef enum {
  2607. KSPROPERTY_VBICAP_PROPERTIES_PROTECTION = 0x01,
  2608. } KSPROPERTY_VBICAP;
  2609. typedef struct _VBICAP_PROPERTIES_PROTECTION_S {
  2610. KSPROPERTY Property;
  2611. ULONG StreamIndex; // Index of stream
  2612. ULONG Status;
  2613. } VBICAP_PROPERTIES_PROTECTION_S, *PVBICAP_PROPERTIES_PROTECTION_S;
  2614. #define KS_VBICAP_PROTECTION_MV_PRESENT 0x0001L
  2615. #define KS_VBICAP_PROTECTION_MV_HARDWARE 0x0002L
  2616. #define KS_VBICAP_PROTECTION_MV_DETECTED 0x0004L
  2617. /***************************************************************************/
  2618. /* VBI Related GUIDs, structs and properties for codecs(generic, cc, nabts)*/
  2619. /***************************************************************************/
  2620. ///////////////////////////////////////////////////////////////////////////////////////
  2621. // IP/NABTS Protocol Reserved Group IDs - Overall Range 0x800-0x8FF [Decimal 2048-2079]
  2622. // Intervening values(0-F) are used if there are multiple providers at a particular tier
  2623. ///////////////////////////////////////////////////////////////////////////////////////
  2624. // Used by individual content creators in show footage/data
  2625. #define KS_NABTS_GROUPID_ORIGINAL_CONTENT_BASE 0x800
  2626. #define KS_NABTS_GROUPID_ORIGINAL_CONTENT_ADVERTISER_BASE 0x810
  2627. // Used by production company in finished show data
  2628. #define KS_NABTS_GROUPID_PRODUCTION_COMPANY_CONTENT_BASE 0x820
  2629. #define KS_NABTS_GROUPID_PRODUCTION_COMPANY_ADVERTISER_BASE 0x830
  2630. // Used by broadcast syndicates in syndicated show data
  2631. #define KS_NABTS_GROUPID_SYNDICATED_SHOW_CONTENT_BASE 0x840
  2632. #define KS_NABTS_GROUPID_SYNDICATED_SHOW_ADVERTISER_BASE 0x850
  2633. // Used by tv networks in network television data
  2634. #define KS_NABTS_GROUPID_NETWORK_WIDE_CONTENT_BASE 0x860
  2635. #define KS_NABTS_GROUPID_NETWORK_WIDE_ADVERTISER_BASE 0x870
  2636. // Used by telvision stations in local programming data
  2637. #define KS_NABTS_GROUPID_TELEVISION_STATION_CONTENT_BASE 0x880
  2638. #define KS_NABTS_GROUPID_TELEVISION_STATION_ADVERTISER_BASE 0x890
  2639. // Used by cable system in cable head-end originated data
  2640. #define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_CONTENT_BASE 0x8A0
  2641. #define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_ADVERTISER_BASE 0x8B0
  2642. // The values between 0x8C0 - 0x8EF are reserved for future expansion
  2643. // Used by Microsoft for Testing purposes (0x8F0 - 0x8FF)
  2644. #define KS_NABTS_GROUPID_MICROSOFT_RESERVED_TEST_DATA_BASE 0x8F0
  2645. //////////////////////////////////////////////////////////////
  2646. // Stream Format FEC-corrected NABTS bundles
  2647. //////////////////////////////////////////////////////////////
  2648. #define STATIC_KSDATAFORMAT_TYPE_NABTS \
  2649. 0xe757bca0, 0x39ac, 0x11d1, 0xa9, 0xf5, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
  2650. DEFINE_GUIDSTRUCT("E757BCA0-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_TYPE_NABTS);
  2651. #define KSDATAFORMAT_TYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_NABTS)
  2652. #define STATIC_KSDATAFORMAT_SUBTYPE_NABTS_FEC \
  2653. 0xe757bca1, 0x39ac, 0x11d1, 0xa9, 0xf5, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0x8f
  2654. DEFINE_GUIDSTRUCT("E757BCA1-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_SUBTYPE_NABTS_FEC);
  2655. #define KSDATAFORMAT_SUBTYPE_NABTS_FEC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS_FEC)
  2656. //////////////////////////////////////////////////////////////
  2657. // NABTS Bundle data structure definition
  2658. //////////////////////////////////////////////////////////////
  2659. #define MAX_NABTS_VBI_LINES_PER_FIELD 11
  2660. #define NABTS_LINES_PER_BUNDLE 16
  2661. #define NABTS_PAYLOAD_PER_LINE 28
  2662. #define NABTS_BYTES_PER_LINE 36
  2663. typedef struct _NABTSFEC_BUFFER {
  2664. ULONG dataSize;
  2665. USHORT groupID;
  2666. USHORT Reserved;
  2667. UCHAR data[NABTS_LINES_PER_BUNDLE * NABTS_PAYLOAD_PER_LINE];
  2668. } NABTSFEC_BUFFER, *PNABTSFEC_BUFFER;
  2669. //////////////////////////////////////////////////////////////
  2670. // vbi codec filtering pin properties
  2671. //////////////////////////////////////////////////////////////
  2672. #define STATIC_KSPROPSETID_VBICodecFiltering \
  2673. 0xcafeb0caL, 0x8715, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0xc0, 0xed, 0xba, 0xbe
  2674. DEFINE_GUIDSTRUCT("cafeb0ca-8715-11d0-bd6a-0035c0edbabe", KSPROPSETID_VBICodecFiltering);
  2675. #define KSPROPSETID_VBICodecFiltering DEFINE_GUIDNAMED(KSPROPSETID_VBICodecFiltering)
  2676. typedef enum {
  2677. KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY = 0x01,
  2678. KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,
  2679. KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
  2680. KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
  2681. KSPROPERTY_VBICODECFILTERING_STATISTICS,
  2682. } KSPROPERTY_VBICODECFILTERING;
  2683. typedef struct _VBICODECFILTERING_SCANLINES {
  2684. DWORD DwordBitArray[32]; // An array of scanline bits 0..1024(32*32)
  2685. } VBICODECFILTERING_SCANLINES, *PVBICODECFILTERING_SCANLINES;
  2686. typedef struct _VBICODECFILTERING_NABTS_SUBSTREAMS {
  2687. DWORD SubstreamMask[128]; // An array of 4096 bits (one for each NABTS GroupID)
  2688. } VBICODECFILTERING_NABTS_SUBSTREAMS, *PVBICODECFILTERING_NABTS_SUBSTREAMS;
  2689. typedef struct _VBICODECFILTERING_CC_SUBSTREAMS {
  2690. DWORD SubstreamMask; // An array of 32 bits (see KS_CC_SUBSTREAM *)
  2691. } VBICODECFILTERING_CC_SUBSTREAMS, *PVBICODECFILTERING_CC_SUBSTREAMS;
  2692. // These KS_CC_SUBSTREAM_* bitmasks are used with VBICODECFILTERING_CC_SUBSTREAMS
  2693. #define KS_CC_SUBSTREAM_ODD 0x0001L // Unfiltered Field 1 Data
  2694. #define KS_CC_SUBSTREAM_EVEN 0x0002L // Unfiltered Field 2 Data
  2695. // The following flags describe CC field 1 substreams: CC1,CC2,TT1,TT2
  2696. #define KS_CC_SUBSTREAM_FIELD1_MASK 0x00F0L
  2697. #define KS_CC_SUBSTREAM_SERVICE_CC1 0x0010L
  2698. #define KS_CC_SUBSTREAM_SERVICE_CC2 0x0020L
  2699. #define KS_CC_SUBSTREAM_SERVICE_T1 0x0040L
  2700. #define KS_CC_SUBSTREAM_SERVICE_T2 0x0080L
  2701. // The following flags describe CC field 2 substreams: CC3,CC4,TT3,TT4,XDS
  2702. #define KS_CC_SUBSTREAM_FIELD2_MASK 0x1F00L
  2703. #define KS_CC_SUBSTREAM_SERVICE_CC3 0x0100L
  2704. #define KS_CC_SUBSTREAM_SERVICE_CC4 0x0200L
  2705. #define KS_CC_SUBSTREAM_SERVICE_T3 0x0400L
  2706. #define KS_CC_SUBSTREAM_SERVICE_T4 0x0800L
  2707. #define KS_CC_SUBSTREAM_SERVICE_XDS 0x1000L
  2708. // Special Note: field 1 or 2 substreams are usually on found on field 1 and 2 respectively
  2709. // If the VBI odd/even polarity is reversed, the correct filtered data will still be found.
  2710. ///////////////////////////////////////////////////////////////////
  2711. // Hardware decoded CC stream format
  2712. ///////////////////////////////////////////////////////////////////
  2713. #define CC_MAX_HW_DECODE_LINES 12
  2714. typedef struct _CC_BYTE_PAIR {
  2715. BYTE Decoded[2];
  2716. USHORT Reserved;
  2717. } CC_BYTE_PAIR, *PCC_BYTE_PAIR;
  2718. typedef struct _CC_HW_FIELD {
  2719. VBICODECFILTERING_SCANLINES ScanlinesRequested;
  2720. ULONG fieldFlags; // KS_VBI_FLAG_FIELD1,2
  2721. LONGLONG PictureNumber;
  2722. CC_BYTE_PAIR Lines[CC_MAX_HW_DECODE_LINES];
  2723. } CC_HW_FIELD, *PCC_HW_FIELD;
  2724. ///////////////////////////////////////////////////////////////////
  2725. // Raw NABTS stream format (TYPE_NABTS, SUBTYPE_NABTS)
  2726. ///////////////////////////////////////////////////////////////////
  2727. // These low-level structures are byte packed( -Zp1 )
  2728. #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
  2729. #include <pshpack1.h>
  2730. #endif
  2731. typedef struct _NABTS_BUFFER_LINE {
  2732. BYTE Confidence;
  2733. BYTE Bytes[NABTS_BYTES_PER_LINE];
  2734. } NABTS_BUFFER_LINE, *PNABTS_BUFFER_LINE;
  2735. #define NABTS_BUFFER_PICTURENUMBER_SUPPORT 1
  2736. typedef struct _NABTS_BUFFER {
  2737. VBICODECFILTERING_SCANLINES ScanlinesRequested;
  2738. LONGLONG PictureNumber;
  2739. NABTS_BUFFER_LINE NabtsLines[MAX_NABTS_VBI_LINES_PER_FIELD];
  2740. } NABTS_BUFFER, *PNABTS_BUFFER;
  2741. #if !defined( PACK_PRAGMAS_NOT_SUPPORTED )
  2742. #include <poppack.h>
  2743. #endif
  2744. //////////////////////////////////////////////////////////////
  2745. // WST Codec Teletext Media Sample Format
  2746. //////////////////////////////////////////////////////////////
  2747. #define WST_TVTUNER_CHANGE_BEGIN_TUNE 0x1000L // Starting a tuning operation
  2748. #define WST_TVTUNER_CHANGE_END_TUNE 0x2000L // Ending a tuning operation
  2749. #define MAX_WST_VBI_LINES_PER_FIELD 17
  2750. #define WST_BYTES_PER_LINE 42
  2751. typedef struct _WST_BUFFER_LINE {
  2752. BYTE Confidence;
  2753. BYTE Bytes[WST_BYTES_PER_LINE];
  2754. } WST_BUFFER_LINE, *PWST_BUFFER_LINE;
  2755. typedef struct _WST_BUFFER {
  2756. VBICODECFILTERING_SCANLINES ScanlinesRequested;
  2757. WST_BUFFER_LINE WstLines[MAX_WST_VBI_LINES_PER_FIELD];
  2758. } WST_BUFFER, *PWST_BUFFER;
  2759. //
  2760. // Common codec statistics
  2761. //
  2762. typedef struct _VBICODECFILTERING_STATISTICS_COMMON {
  2763. DWORD InputSRBsProcessed; // upstream SRBs received
  2764. DWORD OutputSRBsProcessed; // downstream SRBs sent
  2765. DWORD SRBsIgnored; // SRBs ignored due to no requests
  2766. DWORD InputSRBsMissing; // SRBs dropped upstream
  2767. DWORD OutputSRBsMissing; // Output dropped because no SRB pending
  2768. DWORD OutputFailures; // dropped because of other failure
  2769. DWORD InternalErrors; // could not process due to int. failure
  2770. DWORD ExternalErrors; // could not process due to ext. failure
  2771. DWORD InputDiscontinuities; // discontinuities received
  2772. DWORD DSPFailures; // DSP confidence failure
  2773. DWORD TvTunerChanges; // number of received KS_TVTUNER_CHANGE_BEGIN_TUNE and KS_TVTUNER_CHANGE_END_TUNE pairs.
  2774. DWORD VBIHeaderChanges; // number of received KS_VBI_FLAG_VBIINFOHEADER_CHANGE
  2775. DWORD LineConfidenceAvg; // Average of all DSP confidence results
  2776. DWORD BytesOutput; // Bytes sent downstream
  2777. } VBICODECFILTERING_STATISTICS_COMMON, *PVBICODECFILTERING_STATISTICS_COMMON;
  2778. typedef struct _VBICODECFILTERING_STATISTICS_COMMON_PIN {
  2779. DWORD SRBsProcessed; // SRBs sent/received
  2780. DWORD SRBsIgnored; // SRBs ignored due to filtering
  2781. DWORD SRBsMissing; // SRBs not sent/received
  2782. DWORD InternalErrors; // could not send/receive due to int. failure
  2783. DWORD ExternalErrors; // could not send/receive due to ext. failure
  2784. DWORD Discontinuities; // discontinuities received/sent
  2785. DWORD LineConfidenceAvg; // Average of all DSP confidence results for this pin
  2786. DWORD BytesOutput; // Bytes sent downstream
  2787. } VBICODECFILTERING_STATISTICS_COMMON_PIN, *PVBICODECFILTERING_STATISTICS_COMMON_PIN;
  2788. //
  2789. // Codec-specific statistics - NABTS
  2790. //
  2791. typedef struct _VBICODECFILTERING_STATISTICS_NABTS {
  2792. VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics
  2793. DWORD FECBundleBadLines; // Un-FEC-correctable lines
  2794. DWORD FECQueueOverflows; // Number of times FEC queue overflowed
  2795. DWORD FECCorrectedLines; // Lines CSUM corrected by FEC
  2796. DWORD FECUncorrectableLines; // FEC input lines not CSUM correctable
  2797. DWORD BundlesProcessed; // Bundles received from FEC
  2798. DWORD BundlesSent2IP; // Bundles sent to IP driver
  2799. DWORD FilteredLines; // Lines processed and then dropped
  2800. // because no one was interested
  2801. } VBICODECFILTERING_STATISTICS_NABTS, *PVBICODECFILTERING_STATISTICS_NABTS;
  2802. typedef struct _VBICODECFILTERING_STATISTICS_NABTS_PIN {
  2803. VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics
  2804. } VBICODECFILTERING_STATISTICS_NABTS_PIN, *PVBICODECFILTERING_STATISTICS_NABTS_PIN;
  2805. //
  2806. // Codec-specific statistics - Closed Caption
  2807. //
  2808. typedef struct _VBICODECFILTERING_STATISTICS_CC {
  2809. VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics
  2810. } VBICODECFILTERING_STATISTICS_CC, *PVBICODECFILTERING_STATISTICS_CC;
  2811. typedef struct _VBICODECFILTERING_STATISTICS_CC_PIN {
  2812. VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics
  2813. } VBICODECFILTERING_STATISTICS_CC_PIN, *PVBICODECFILTERING_STATISTICS_CC_PIN;
  2814. //
  2815. // Codec-specific statistics - Closed Caption
  2816. //
  2817. typedef struct _VBICODECFILTERING_STATISTICS_TELETEXT {
  2818. VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics
  2819. } VBICODECFILTERING_STATISTICS_TELETEXT, *PVBICODECFILTERING_STATISTICS_TELETEXT;
  2820. typedef struct _VBICODECFILTERING_STATISTICS_TELETEXT_PIN {
  2821. VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics
  2822. } VBICODECFILTERING_STATISTICS_TELETEXT_PIN, *PVBICODECFILTERING_STATISTICS_TELETEXT_PIN;
  2823. ////////////////////////////////////////////////////////////////////////////
  2824. // VBI codec property structures(based on KSPROPERTY_VBICODECFILTERING enum)
  2825. ////////////////////////////////////////////////////////////////////////////
  2826. // *** Most codecs support this property
  2827. // KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY
  2828. // KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY,
  2829. typedef struct {
  2830. KSPROPERTY Property;
  2831. VBICODECFILTERING_SCANLINES Scanlines;
  2832. } KSPROPERTY_VBICODECFILTERING_SCANLINES_S, *PKSPROPERTY_VBICODECFILTERING_SCANLINES_S;
  2833. // *** NABTS codecs support this property
  2834. // KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
  2835. // KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
  2836. typedef struct {
  2837. KSPROPERTY Property;
  2838. VBICODECFILTERING_NABTS_SUBSTREAMS Substreams;
  2839. } KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S, *PKSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S;
  2840. // *** Closed captioning codecs support this property
  2841. // KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY,
  2842. // KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY,
  2843. typedef struct {
  2844. KSPROPERTY Property;
  2845. VBICODECFILTERING_CC_SUBSTREAMS Substreams;
  2846. } KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S, *PKSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S;
  2847. // *** Most codecs support these versions of the global and pin properties
  2848. // KSPROPERTY_VBICODECFILTERING_STATISTICS
  2849. typedef struct {
  2850. KSPROPERTY Property;
  2851. VBICODECFILTERING_STATISTICS_COMMON Statistics;
  2852. } KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S;
  2853. typedef struct {
  2854. KSPROPERTY Property;
  2855. VBICODECFILTERING_STATISTICS_COMMON_PIN Statistics;
  2856. } KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S;
  2857. // *** NABTS codecs support this version of the global and pin properties
  2858. // KSPROPERTY_VBICODECFILTERING_STATISTICS
  2859. typedef struct {
  2860. KSPROPERTY Property;
  2861. VBICODECFILTERING_STATISTICS_NABTS Statistics;
  2862. } KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S;
  2863. typedef struct {
  2864. KSPROPERTY Property;
  2865. VBICODECFILTERING_STATISTICS_NABTS_PIN Statistics;
  2866. } KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S;
  2867. // *** Closed captioning codecs support this version of the global and pin properties
  2868. // KSPROPERTY_VBICODECFILTERING_STATISTICS
  2869. typedef struct {
  2870. KSPROPERTY Property;
  2871. VBICODECFILTERING_STATISTICS_CC Statistics;
  2872. } KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S;
  2873. typedef struct {
  2874. KSPROPERTY Property;
  2875. VBICODECFILTERING_STATISTICS_CC_PIN Statistics;
  2876. } KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S;
  2877. // Standard Pin Names for the video capture filter
  2878. //===========================================================================
  2879. #define STATIC_PINNAME_VIDEO_CAPTURE \
  2880. 0xfb6c4281, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2881. #define STATIC_PINNAME_CAPTURE STATIC_PINNAME_VIDEO_CAPTURE
  2882. DEFINE_GUIDSTRUCT("FB6C4281-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CAPTURE);
  2883. #define PINNAME_VIDEO_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CAPTURE)
  2884. #define PINNAME_CAPTURE PINNAME_VIDEO_CAPTURE
  2885. #define STATIC_PINNAME_VIDEO_CC_CAPTURE \
  2886. 0x1aad8061, 0x12d, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
  2887. #define STATIC_PINNAME_CC_CAPTURE STATIC_PINNAME_VIDEO_CC_CAPTURE
  2888. DEFINE_GUIDSTRUCT("1AAD8061-012D-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_CC_CAPTURE);
  2889. #define PINNAME_VIDEO_CC_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CC_CAPTURE)
  2890. #define STATIC_PINNAME_VIDEO_NABTS_CAPTURE \
  2891. 0x29703660, 0x498a, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe
  2892. #define STATIC_PINNAME_NABTS_CAPTURE STATIC_PINNAME_VIDEO_NABTS_CAPTURE
  2893. DEFINE_GUIDSTRUCT("29703660-498A-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_NABTS_CAPTURE);
  2894. #define PINNAME_VIDEO_NABTS_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS_CAPTURE)
  2895. #define STATIC_PINNAME_VIDEO_PREVIEW \
  2896. 0xfb6c4282, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2897. #define STATIC_PINNAME_PREVIEW STATIC_PINNAME_VIDEO_PREVIEW
  2898. DEFINE_GUIDSTRUCT("FB6C4282-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_PREVIEW);
  2899. #define PINNAME_VIDEO_PREVIEW DEFINE_GUIDNAMED(PINNAME_VIDEO_PREVIEW)
  2900. #define PINNAME_PREVIEW PINNAME_VIDEO_PREVIEW
  2901. #define STATIC_PINNAME_VIDEO_ANALOGVIDEOIN \
  2902. 0xfb6c4283, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2903. DEFINE_GUIDSTRUCT("FB6C4283-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_ANALOGVIDEOIN);
  2904. #define PINNAME_VIDEO_ANALOGVIDEOIN DEFINE_GUIDNAMED(PINNAME_VIDEO_ANALOGVIDEOIN)
  2905. #define STATIC_PINNAME_VIDEO_VBI \
  2906. 0xfb6c4284, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2907. DEFINE_GUIDSTRUCT("FB6C4284-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VBI);
  2908. #define PINNAME_VIDEO_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VBI)
  2909. #define STATIC_PINNAME_VIDEO_VIDEOPORT \
  2910. 0xfb6c4285, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2911. DEFINE_GUIDSTRUCT("FB6C4285-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT);
  2912. #define PINNAME_VIDEO_VIDEOPORT DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT)
  2913. #define STATIC_PINNAME_VIDEO_NABTS \
  2914. 0xfb6c4286, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2915. DEFINE_GUIDSTRUCT("FB6C4286-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_NABTS);
  2916. #define PINNAME_VIDEO_NABTS DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS)
  2917. #define STATIC_PINNAME_VIDEO_EDS \
  2918. 0xfb6c4287, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2919. DEFINE_GUIDSTRUCT("FB6C4287-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_EDS);
  2920. #define PINNAME_VIDEO_EDS DEFINE_GUIDNAMED(PINNAME_VIDEO_EDS)
  2921. #define STATIC_PINNAME_VIDEO_TELETEXT \
  2922. 0xfb6c4288, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2923. DEFINE_GUIDSTRUCT("FB6C4288-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TELETEXT);
  2924. #define PINNAME_VIDEO_TELETEXT DEFINE_GUIDNAMED(PINNAME_VIDEO_TELETEXT)
  2925. #define STATIC_PINNAME_VIDEO_CC \
  2926. 0xfb6c4289, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2927. DEFINE_GUIDSTRUCT("FB6C4289-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CC);
  2928. #define PINNAME_VIDEO_CC DEFINE_GUIDNAMED(PINNAME_VIDEO_CC)
  2929. #define STATIC_PINNAME_VIDEO_STILL \
  2930. 0xfb6c428A, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2931. DEFINE_GUIDSTRUCT("FB6C428A-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_STILL);
  2932. #define PINNAME_VIDEO_STILL DEFINE_GUIDNAMED(PINNAME_VIDEO_STILL)
  2933. #define STATIC_PINNAME_VIDEO_TIMECODE \
  2934. 0xfb6c428B, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2935. DEFINE_GUIDSTRUCT("FB6C428B-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TIMECODE);
  2936. #define PINNAME_VIDEO_TIMECODE DEFINE_GUIDNAMED(PINNAME_VIDEO_TIMECODE)
  2937. #define STATIC_PINNAME_VIDEO_VIDEOPORT_VBI \
  2938. 0xfb6c428C, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  2939. DEFINE_GUIDSTRUCT("FB6C428C-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT_VBI);
  2940. #define PINNAME_VIDEO_VIDEOPORT_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT_VBI)
  2941. //===========================================================================
  2942. // KSSTREAM_HEADER extensions for digital video
  2943. //===========================================================================
  2944. #define KS_VIDEO_FLAG_FRAME 0x0000L // Frame or Field (default is frame)
  2945. #define KS_VIDEO_FLAG_FIELD1 0x0001L
  2946. #define KS_VIDEO_FLAG_FIELD2 0x0002L
  2947. #define KS_VIDEO_FLAG_I_FRAME 0x0000L // I, B, or P (default is I)
  2948. #define KS_VIDEO_FLAG_P_FRAME 0x0010L
  2949. #define KS_VIDEO_FLAG_B_FRAME 0x0020L
  2950. typedef struct tagKS_FRAME_INFO {
  2951. ULONG ExtendedHeaderSize; // Size of this extended header
  2952. DWORD dwFrameFlags; // Field1, Field2, or Frame
  2953. LONGLONG PictureNumber;
  2954. LONGLONG DropCount;
  2955. // The following are only set when using OverlayMixer
  2956. HANDLE hDirectDraw; // user mode DDraw handle
  2957. HANDLE hSurfaceHandle; // user mode surface handle
  2958. RECT DirectDrawRect; // portion of surface locked
  2959. // Reserved fields, never reference these
  2960. DWORD Reserved1;
  2961. DWORD Reserved2;
  2962. DWORD Reserved3;
  2963. DWORD Reserved4;
  2964. } KS_FRAME_INFO, *PKS_FRAME_INFO;
  2965. //===========================================================================
  2966. // KSSTREAM_HEADER extensions for VBI
  2967. //===========================================================================
  2968. #define KS_VBI_FLAG_FIELD1 0x0001L
  2969. #define KS_VBI_FLAG_FIELD2 0x0002L
  2970. #define KS_VBI_FLAG_MV_PRESENT 0x0100L
  2971. #define KS_VBI_FLAG_MV_HARDWARE 0x0200L
  2972. #define KS_VBI_FLAG_MV_DETECTED 0x0400L
  2973. #define KS_VBI_FLAG_TVTUNER_CHANGE 0x0010L // TvTunerChangeInfo is valid
  2974. #define KS_VBI_FLAG_VBIINFOHEADER_CHANGE 0x0020L // VBIInfoHeader is valid
  2975. typedef struct tagKS_VBI_FRAME_INFO {
  2976. ULONG ExtendedHeaderSize; // Size of this extended header
  2977. DWORD dwFrameFlags; // Field1, Field2, or Frame; & etc
  2978. LONGLONG PictureNumber; // Test only?
  2979. LONGLONG DropCount; // Test only?
  2980. DWORD dwSamplingFrequency;
  2981. KS_TVTUNER_CHANGE_INFO TvTunerChangeInfo;
  2982. KS_VBIINFOHEADER VBIInfoHeader;
  2983. } KS_VBI_FRAME_INFO, *PKS_VBI_FRAME_INFO;
  2984. //===========================================================================
  2985. // Analog video formats, used with:
  2986. // Analog Video Decoders
  2987. // TVTuners
  2988. // Analog Video Encoders
  2989. //
  2990. // XXX_STANDARDS_SUPPORTED returns a bitmask
  2991. //===========================================================================
  2992. typedef enum
  2993. {
  2994. KS_AnalogVideo_None = 0x00000000, // This is a digital sensor
  2995. KS_AnalogVideo_NTSC_M = 0x00000001, // 75 IRE Setup
  2996. KS_AnalogVideo_NTSC_M_J = 0x00000002, // Japan, 0 IRE Setup
  2997. KS_AnalogVideo_NTSC_433 = 0x00000004,
  2998. KS_AnalogVideo_PAL_B = 0x00000010,
  2999. KS_AnalogVideo_PAL_D = 0x00000020,
  3000. KS_AnalogVideo_PAL_G = 0x00000040,
  3001. KS_AnalogVideo_PAL_H = 0x00000080,
  3002. KS_AnalogVideo_PAL_I = 0x00000100,
  3003. KS_AnalogVideo_PAL_M = 0x00000200,
  3004. KS_AnalogVideo_PAL_N = 0x00000400,
  3005. KS_AnalogVideo_PAL_60 = 0x00000800,
  3006. KS_AnalogVideo_SECAM_B = 0x00001000,
  3007. KS_AnalogVideo_SECAM_D = 0x00002000,
  3008. KS_AnalogVideo_SECAM_G = 0x00004000,
  3009. KS_AnalogVideo_SECAM_H = 0x00008000,
  3010. KS_AnalogVideo_SECAM_K = 0x00010000,
  3011. KS_AnalogVideo_SECAM_K1 = 0x00020000,
  3012. KS_AnalogVideo_SECAM_L = 0x00040000,
  3013. KS_AnalogVideo_SECAM_L1 = 0x00080000,
  3014. KS_AnalogVideo_PAL_N_COMBO
  3015. = 0x00100000
  3016. } KS_AnalogVideoStandard;
  3017. #define KS_AnalogVideo_NTSC_Mask 0x00000007
  3018. #define KS_AnalogVideo_PAL_Mask 0x00100FF0
  3019. #define KS_AnalogVideo_SECAM_Mask 0x000FF000
  3020. //===========================================================================
  3021. // Property set definitions
  3022. // The comments show whether a given property is:
  3023. // R : READ only
  3024. // w : WRITE only
  3025. // RW : READ / WRITE
  3026. // O : Optional (return E_UNSUPPORTED if you don't handle this)
  3027. //===========================================================================
  3028. #define STATIC_PROPSETID_ALLOCATOR_CONTROL\
  3029. 0x53171960, 0x148e, 0x11d2, 0x99, 0x79, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba
  3030. DEFINE_GUIDSTRUCT("53171960-148E-11d2-9979-0000C0CC16BA", PROPSETID_ALLOCATOR_CONTROL);
  3031. #define PROPSETID_ALLOCATOR_CONTROL DEFINE_GUIDNAMED(PROPSETID_ALLOCATOR_CONTROL)
  3032. typedef enum {
  3033. KSPROPERTY_ALLOCATOR_CONTROL_HONOR_COUNT, // R O (will allocate exactly this number of buffers)
  3034. KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE, // R O (return 2 DWORDs specifying surface size)
  3035. // W I (informn a capture driver whether interleave capture is possible or
  3036. // not - a value of 1 means that interleaved capture is supported)
  3037. KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS,
  3038. // R O (if value == 1, then the ovmixer will turn on the DDVP_INTERLEAVE
  3039. // flag thus allowing interleaved capture of the video)
  3040. KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE,
  3041. } KSPROPERTY_ALLOCATOR_CONTROL;
  3042. typedef struct {
  3043. //KSPROPERTY Property;
  3044. ULONG CX;
  3045. ULONG CY;
  3046. } KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S, *PKSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE_S;
  3047. typedef struct {
  3048. //KSPROPERTY Property;
  3049. ULONG InterleavedCapSupported;
  3050. } KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S, *PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_CAPS_S;
  3051. typedef struct {
  3052. //KSPROPERTY Property;
  3053. ULONG InterleavedCapPossible;
  3054. } KSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S, *PKSPROPERTY_ALLOCATOR_CONTROL_CAPTURE_INTERLEAVE_S;
  3055. //===========================================================================
  3056. #define STATIC_PROPSETID_VIDCAP_VIDEOPROCAMP\
  3057. 0xC6E13360L, 0x30AC, 0x11d0, 0xa1, 0x8c, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
  3058. DEFINE_GUIDSTRUCT("C6E13360-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOPROCAMP);
  3059. #define PROPSETID_VIDCAP_VIDEOPROCAMP DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOPROCAMP)
  3060. typedef enum {
  3061. KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS, // RW O
  3062. KSPROPERTY_VIDEOPROCAMP_CONTRAST, // RW O
  3063. KSPROPERTY_VIDEOPROCAMP_HUE, // RW O
  3064. KSPROPERTY_VIDEOPROCAMP_SATURATION, // RW O
  3065. KSPROPERTY_VIDEOPROCAMP_SHARPNESS, // RW O
  3066. KSPROPERTY_VIDEOPROCAMP_GAMMA, // RW O
  3067. KSPROPERTY_VIDEOPROCAMP_COLORENABLE, // RW O
  3068. KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE, // RW O
  3069. KSPROPERTY_VIDEOPROCAMP_BACKLIGHT_COMPENSATION,// RW O
  3070. KSPROPERTY_VIDEOPROCAMP_GAIN, // RW O
  3071. } KSPROPERTY_VIDCAP_VIDEOPROCAMP;
  3072. typedef struct {
  3073. KSPROPERTY Property;
  3074. LONG Value; // Value to set or get
  3075. ULONG Flags; // KSPROPERTY_VIDEOPROCAMP_FLAGS_*
  3076. ULONG Capabilities; // KSPROPERTY_VIDEOPROCAMP_FLAGS_*
  3077. } KSPROPERTY_VIDEOPROCAMP_S, *PKSPROPERTY_VIDEOPROCAMP_S;
  3078. #define KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO 0X0001L
  3079. #define KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL 0X0002L
  3080. //===========================================================================
  3081. #define STATIC_PROPSETID_TUNER\
  3082. 0x6a2e0605L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3083. DEFINE_GUIDSTRUCT("6a2e0605-28e4-11d0-a18c-00a0c9118956", PROPSETID_TUNER);
  3084. #define PROPSETID_TUNER DEFINE_GUIDNAMED(PROPSETID_TUNER)
  3085. typedef enum {
  3086. KSPROPERTY_TUNER_CAPS, // R -overall device capabilities
  3087. KSPROPERTY_TUNER_MODE_CAPS, // R -capabilities in this mode
  3088. KSPROPERTY_TUNER_MODE, // RW -set a mode (TV, FM, AM, DSS)
  3089. KSPROPERTY_TUNER_STANDARD, // R -get TV standard (only if TV mode)
  3090. KSPROPERTY_TUNER_FREQUENCY, // RW -set/get frequency
  3091. KSPROPERTY_TUNER_INPUT, // RW -select an input
  3092. KSPROPERTY_TUNER_STATUS, // R -tuning status
  3093. KSPROPERTY_TUNER_IF_MEDIUM // R O-Medium for IF or Transport Pin
  3094. } KSPROPERTY_TUNER;
  3095. typedef enum {
  3096. KSPROPERTY_TUNER_MODE_TV = 0X0001,
  3097. KSPROPERTY_TUNER_MODE_FM_RADIO = 0X0002,
  3098. KSPROPERTY_TUNER_MODE_AM_RADIO = 0X0004,
  3099. KSPROPERTY_TUNER_MODE_DSS = 0X0008,
  3100. KSPROPERTY_TUNER_MODE_ATSC = 0X0010, // also used for DVB-T, DVB-C
  3101. } KSPROPERTY_TUNER_MODES;
  3102. // Describes how the device tunes. Only one of these flags may be set
  3103. // in KSPROPERTY_TUNER_MODE_CAPS_S.Strategy
  3104. // Describe how the driver should attempt to tune:
  3105. // EXACT: just go to the frequency specified (no fine tuning)
  3106. // FINE: (slow) do an exhaustive search for the best signal
  3107. // COARSE: (fast) use larger frequency jumps to just determine if any signal
  3108. typedef enum {
  3109. KS_TUNER_TUNING_EXACT = 1, // No fine tuning
  3110. KS_TUNER_TUNING_FINE, // Fine grained search
  3111. KS_TUNER_TUNING_COARSE, // Coarse search
  3112. }KS_TUNER_TUNING_FLAGS;
  3113. typedef enum {
  3114. KS_TUNER_STRATEGY_PLL = 0X01, // Tune by PLL offset
  3115. KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0X02, // Tune by signal strength
  3116. KS_TUNER_STRATEGY_DRIVER_TUNES = 0X04, // Driver does fine tuning
  3117. }KS_TUNER_STRATEGY;
  3118. typedef struct {
  3119. KSPROPERTY Property;
  3120. ULONG ModesSupported; // KS_PROPERTY_TUNER_MODES_*
  3121. KSPIN_MEDIUM VideoMedium; // GUID_NULL (no pin), or GUID
  3122. KSPIN_MEDIUM TVAudioMedium; // GUID_NULL (no pin), or GUID
  3123. KSPIN_MEDIUM RadioAudioMedium; // GUID_NULL (no pin), or GUID
  3124. } KSPROPERTY_TUNER_CAPS_S, *PKSPROPERTY_TUNER_CAPS_S;
  3125. typedef struct {
  3126. KSPROPERTY Property;
  3127. KSPIN_MEDIUM IFMedium; // GUID_NULL (no pin), or GUID
  3128. } KSPROPERTY_TUNER_IF_MEDIUM_S, *PKSPROPERTY_TUNER_IF_MEDIUM_S;
  3129. typedef struct {
  3130. KSPROPERTY Property;
  3131. ULONG Mode; // IN: KSPROPERTY_TUNER_MODE
  3132. ULONG StandardsSupported; // KS_AnalogVideo_* (if TV or DSS)
  3133. ULONG MinFrequency; // Hz
  3134. ULONG MaxFrequency; // Hz
  3135. ULONG TuningGranularity; // Hz
  3136. ULONG NumberOfInputs; // count of inputs
  3137. ULONG SettlingTime; // milliSeconds
  3138. ULONG Strategy; // KS_TUNER_STRATEGY
  3139. } KSPROPERTY_TUNER_MODE_CAPS_S, *PKSPROPERTY_TUNER_MODE_CAPS_S;
  3140. typedef struct {
  3141. KSPROPERTY Property;
  3142. ULONG Mode; // IN: KSPROPERTY_TUNER_MODE
  3143. } KSPROPERTY_TUNER_MODE_S, *PKSPROPERTY_TUNER_MODE_S;
  3144. typedef struct {
  3145. KSPROPERTY Property;
  3146. ULONG Frequency; // Hz
  3147. ULONG LastFrequency; // Hz (last known good)
  3148. ULONG TuningFlags; // KS_TUNER_TUNING_FLAGS
  3149. ULONG VideoSubChannel; // DSS
  3150. ULONG AudioSubChannel; // DSS
  3151. ULONG Channel; // VBI decoders
  3152. ULONG Country; // VBI decoders
  3153. } KSPROPERTY_TUNER_FREQUENCY_S, *PKSPROPERTY_TUNER_FREQUENCY_S;
  3154. typedef struct {
  3155. KSPROPERTY Property;
  3156. ULONG Standard; // KS_AnalogVideo_*
  3157. } KSPROPERTY_TUNER_STANDARD_S, *PKSPROPERTY_TUNER_STANDARD_S;
  3158. typedef struct {
  3159. KSPROPERTY Property;
  3160. ULONG InputIndex; // 0 to (n-1) inputs
  3161. } KSPROPERTY_TUNER_INPUT_S, *PKSPROPERTY_TUNER_INPUT_S;
  3162. typedef struct {
  3163. KSPROPERTY Property;
  3164. ULONG CurrentFrequency; // Hz
  3165. ULONG PLLOffset; // if Strategy.KS_TUNER_STRATEGY_PLL
  3166. ULONG SignalStrength; // if Stretegy.KS_TUNER_STRATEGY_SIGNAL_STRENGTH
  3167. ULONG Busy; // TRUE if in the process of tuning
  3168. } KSPROPERTY_TUNER_STATUS_S, *PKSPROPERTY_TUNER_STATUS_S;
  3169. #define STATIC_EVENTSETID_TUNER\
  3170. 0x6a2e0606L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3171. DEFINE_GUIDSTRUCT("6a2e0606-28e4-11d0-a18c-00a0c9118956", EVENTSETID_TUNER);
  3172. #define EVENTSETID_TUNER DEFINE_GUIDNAMED(EVENTSETID_TUNER)
  3173. typedef enum {
  3174. KSEVENT_TUNER_CHANGED
  3175. } KSEVENT_TUNER;
  3176. //===========================================================================
  3177. #define STATIC_PROPSETID_VIDCAP_VIDEOENCODER\
  3178. 0x6a2e0610L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3179. DEFINE_GUIDSTRUCT("6a2e0610-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOENCODER);
  3180. #define PROPSETID_VIDCAP_VIDEOENCODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOENCODER)
  3181. typedef enum {
  3182. KSPROPERTY_VIDEOENCODER_CAPS, // R
  3183. KSPROPERTY_VIDEOENCODER_STANDARD, // RW
  3184. KSPROPERTY_VIDEOENCODER_COPYPROTECTION, // RW O
  3185. KSPROPERTY_VIDEOENCODER_CC_ENABLE, // RW O
  3186. } KSPROPERTY_VIDCAP_VIDEOENCODER;
  3187. typedef struct {
  3188. KSPROPERTY Property;
  3189. LONG Value; // value to get or set
  3190. ULONG Flags; //
  3191. ULONG Capabilities; //
  3192. } KSPROPERTY_VIDEOENCODER_S, *PKSPROPERTY_VIDEOENCODER_S;
  3193. //===========================================================================
  3194. #define STATIC_PROPSETID_VIDCAP_VIDEODECODER\
  3195. 0xC6E13350L, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
  3196. DEFINE_GUIDSTRUCT("C6E13350-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEODECODER);
  3197. #define PROPSETID_VIDCAP_VIDEODECODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEODECODER)
  3198. typedef enum {
  3199. KSPROPERTY_VIDEODECODER_CAPS, // R
  3200. KSPROPERTY_VIDEODECODER_STANDARD, // RW
  3201. KSPROPERTY_VIDEODECODER_STATUS, // R
  3202. KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE, // Rw O
  3203. KSPROPERTY_VIDEODECODER_VCR_TIMING, // RW O
  3204. } KSPROPERTY_VIDCAP_VIDEODECODER;
  3205. typedef enum {
  3206. KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT = 0X0001, // VP Output can tri-stae
  3207. KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING = 0X0002, // VCR PLL timings
  3208. KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED = 0X0004, // Can indicate valid signal
  3209. }KS_VIDEODECODER_FLAGS;
  3210. typedef struct {
  3211. KSPROPERTY Property;
  3212. ULONG StandardsSupported; // KS_AnalogVideo_*
  3213. ULONG Capabilities; // KS_VIDEODECODER_FLAGS_*
  3214. ULONG SettlingTime; // milliseconds
  3215. ULONG HSyncPerVSync; // Number of HSync Pulses per VSync
  3216. } KSPROPERTY_VIDEODECODER_CAPS_S, *PKSPROPERTY_VIDEODECODER_CAPS_S;
  3217. typedef struct {
  3218. KSPROPERTY Property;
  3219. ULONG NumberOfLines; // 525 or 625 lines detected
  3220. ULONG SignalLocked; // TRUE if signal is locked
  3221. } KSPROPERTY_VIDEODECODER_STATUS_S, *PKSPROPERTY_VIDEODECODER_STATUS_S;
  3222. typedef struct {
  3223. KSPROPERTY Property;
  3224. ULONG Value; // Get or set a value
  3225. } KSPROPERTY_VIDEODECODER_S, *PKSPROPERTY_VIDEODECODER_S;
  3226. #define STATIC_EVENTSETID_VIDEODECODER\
  3227. 0x6a2e0621L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3228. DEFINE_GUIDSTRUCT("6a2e0621-28e4-11d0-a18c-00a0c9118956", EVENTSETID_VIDEODECODER);
  3229. #define EVENTSETID_VIDEODECODER DEFINE_GUIDNAMED(EVENTSETID_VIDEODECODER)
  3230. typedef enum {
  3231. KSEVENT_VIDEODECODER_CHANGED
  3232. } KSEVENT_VIDEODECODER;
  3233. //===========================================================================
  3234. #define STATIC_PROPSETID_VIDCAP_CAMERACONTROL\
  3235. 0xC6E13370L, 0x30AC, 0x11d0, 0xa1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
  3236. DEFINE_GUIDSTRUCT("C6E13370-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_CAMERACONTROL);
  3237. #define PROPSETID_VIDCAP_CAMERACONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CAMERACONTROL)
  3238. typedef enum {
  3239. KSPROPERTY_CAMERACONTROL_PAN, // RW O
  3240. KSPROPERTY_CAMERACONTROL_TILT, // RW O
  3241. KSPROPERTY_CAMERACONTROL_ROLL, // RW O
  3242. KSPROPERTY_CAMERACONTROL_ZOOM, // RW O
  3243. KSPROPERTY_CAMERACONTROL_EXPOSURE, // RW O
  3244. KSPROPERTY_CAMERACONTROL_IRIS, // RW O
  3245. KSPROPERTY_CAMERACONTROL_FOCUS, // RW O
  3246. } KSPROPERTY_VIDCAP_CAMERACONTROL;
  3247. typedef struct {
  3248. KSPROPERTY Property;
  3249. LONG Value; // value to get or set
  3250. ULONG Flags; // KSPROPERTY_CAMERACONTROL_FLAGS_*
  3251. ULONG Capabilities; // KSPROPERTY_CAMERACONTROL_FLAGS_*
  3252. } KSPROPERTY_CAMERACONTROL_S, *PKSPROPERTY_CAMERACONTROL_S;
  3253. #define KSPROPERTY_CAMERACONTROL_FLAGS_AUTO 0X0001L
  3254. #define KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL 0X0002L
  3255. #define KSPROPERTY_CAMERACONTROL_FLAGS_ABSOLUTE 0X0000L
  3256. #define KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE 0X0010L
  3257. //===========================================================================
  3258. #define STATIC_PROPSETID_VIDCAP_CROSSBAR\
  3259. 0x6a2e0640L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3260. DEFINE_GUIDSTRUCT("6a2e0640-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_CROSSBAR);
  3261. #define PROPSETID_VIDCAP_CROSSBAR DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CROSSBAR)
  3262. typedef enum {
  3263. KSPROPERTY_CROSSBAR_CAPS, // R
  3264. KSPROPERTY_CROSSBAR_PININFO, // R
  3265. KSPROPERTY_CROSSBAR_CAN_ROUTE, // R
  3266. KSPROPERTY_CROSSBAR_ROUTE, // RW
  3267. } KSPROPERTY_VIDCAP_CROSSBAR;
  3268. typedef struct {
  3269. KSPROPERTY Property;
  3270. ULONG NumberOfInputs; // the number of audio and video input pins
  3271. ULONG NumberOfOutputs; // the number of audio and video output pins
  3272. } KSPROPERTY_CROSSBAR_CAPS_S, *PKSPROPERTY_CROSSBAR_CAPS_S;
  3273. typedef struct {
  3274. KSPROPERTY Property;
  3275. KSPIN_DATAFLOW Direction; // KSPIN_DATAFLOW_IN or KSPIN_DATAFLOW_OUT?
  3276. ULONG Index; // Which pin to return data for?
  3277. ULONG PinType; // KS_PhysConn_Video_* or KS_PhysConn_Audio_*
  3278. ULONG RelatedPinIndex; // For video pins, this is the related audio pin
  3279. KSPIN_MEDIUM Medium; // Identifies the hardware connection
  3280. } KSPROPERTY_CROSSBAR_PININFO_S, *PKSPROPERTY_CROSSBAR_PININFO_S;
  3281. typedef struct {
  3282. KSPROPERTY Property;
  3283. ULONG IndexInputPin; // Zero based index of the input pin
  3284. ULONG IndexOutputPin; // Zero based index of the output pin
  3285. ULONG CanRoute; // returns non-zero on CAN_ROUTE if routing is possible
  3286. } KSPROPERTY_CROSSBAR_ROUTE_S, *PKSPROPERTY_CROSSBAR_ROUTE_S;
  3287. #define STATIC_EVENTSETID_CROSSBAR\
  3288. 0x6a2e0641L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3289. DEFINE_GUIDSTRUCT("6a2e0641-28e4-11d0-a18c-00a0c9118956", EVENTSETID_CROSSBAR);
  3290. #define EVENTSETID_CROSSBAR DEFINE_GUIDNAMED(EVENTSETID_CROSSBAR)
  3291. typedef enum {
  3292. KSEVENT_CROSSBAR_CHANGED
  3293. } KSEVENT_CROSSBAR;
  3294. // The following IDs should match the AM equivalents
  3295. typedef enum {
  3296. KS_PhysConn_Video_Tuner = 1,
  3297. KS_PhysConn_Video_Composite,
  3298. KS_PhysConn_Video_SVideo,
  3299. KS_PhysConn_Video_RGB,
  3300. KS_PhysConn_Video_YRYBY,
  3301. KS_PhysConn_Video_SerialDigital,
  3302. KS_PhysConn_Video_ParallelDigital,
  3303. KS_PhysConn_Video_SCSI,
  3304. KS_PhysConn_Video_AUX,
  3305. KS_PhysConn_Video_1394,
  3306. KS_PhysConn_Video_USB,
  3307. KS_PhysConn_Video_VideoDecoder,
  3308. KS_PhysConn_Video_VideoEncoder,
  3309. KS_PhysConn_Video_SCART,
  3310. KS_PhysConn_Audio_Tuner = 4096,
  3311. KS_PhysConn_Audio_Line,
  3312. KS_PhysConn_Audio_Mic,
  3313. KS_PhysConn_Audio_AESDigital,
  3314. KS_PhysConn_Audio_SPDIFDigital,
  3315. KS_PhysConn_Audio_SCSI,
  3316. KS_PhysConn_Audio_AUX,
  3317. KS_PhysConn_Audio_1394,
  3318. KS_PhysConn_Audio_USB,
  3319. KS_PhysConn_Audio_AudioDecoder,
  3320. } KS_PhysicalConnectorType;
  3321. //===========================================================================
  3322. #define STATIC_PROPSETID_VIDCAP_TVAUDIO\
  3323. 0x6a2e0650L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3324. DEFINE_GUIDSTRUCT("6a2e0650-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_TVAUDIO);
  3325. #define PROPSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(PROPSETID_VIDCAP_TVAUDIO)
  3326. typedef enum {
  3327. KSPROPERTY_TVAUDIO_CAPS, // R
  3328. KSPROPERTY_TVAUDIO_MODE, // RW
  3329. KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES // R
  3330. } KSPROPERTY_VIDCAP_TVAUDIO;
  3331. #define KS_TVAUDIO_MODE_MONO 0x0001 // Mono
  3332. #define KS_TVAUDIO_MODE_STEREO 0x0002 // Stereo
  3333. #define KS_TVAUDIO_MODE_LANG_A 0x0010 // Primary language
  3334. #define KS_TVAUDIO_MODE_LANG_B 0x0020 // 2nd avail language
  3335. #define KS_TVAUDIO_MODE_LANG_C 0x0040 // 3rd avail language
  3336. typedef struct {
  3337. KSPROPERTY Property;
  3338. ULONG Capabilities; // Bitmask of KS_TVAUDIO_MODE_*
  3339. KSPIN_MEDIUM InputMedium;
  3340. KSPIN_MEDIUM OutputMedium;
  3341. } KSPROPERTY_TVAUDIO_CAPS_S, *PKSPROPERTY_TVAUDIO_CAPS_S;
  3342. typedef struct {
  3343. KSPROPERTY Property;
  3344. ULONG Mode; // KS_TVAUDIO_MODE_*
  3345. } KSPROPERTY_TVAUDIO_S, *PKSPROPERTY_TVAUDIO_S;
  3346. #define STATIC_KSEVENTSETID_VIDCAP_TVAUDIO\
  3347. 0x6a2e0651L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3348. DEFINE_GUIDSTRUCT("6a2e0651-28e4-11d0-a18c-00a0c9118956", KSEVENTSETID_VIDCAP_TVAUDIO);
  3349. #define KSEVENTSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAP_TVAUDIO)
  3350. typedef enum {
  3351. KSEVENT_TVAUDIO_CHANGED,
  3352. } KSEVENT_TVAUDIO;
  3353. //===========================================================================
  3354. #define STATIC_PROPSETID_VIDCAP_VIDEOCOMPRESSION\
  3355. 0xC6E13343L, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56
  3356. DEFINE_GUIDSTRUCT("C6E13343-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOCOMPRESSION);
  3357. #define PROPSETID_VIDCAP_VIDEOCOMPRESSION DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCOMPRESSION)
  3358. typedef enum {
  3359. KSPROPERTY_VIDEOCOMPRESSION_GETINFO, // R
  3360. KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE, // RW
  3361. KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME, // RW
  3362. KSPROPERTY_VIDEOCOMPRESSION_QUALITY, // RW
  3363. KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_KEYFRAME, // W
  3364. KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_FRAME_SIZE, // W
  3365. KSPROPERTY_VIDEOCOMPRESSION_WINDOWSIZE, // RW
  3366. } KSPROPERTY_VIDCAP_VIDEOCOMPRESSION;
  3367. typedef enum {
  3368. KS_CompressionCaps_CanQuality = 1,
  3369. KS_CompressionCaps_CanCrunch = 2,
  3370. KS_CompressionCaps_CanKeyFrame = 4,
  3371. KS_CompressionCaps_CanBFrame = 8,
  3372. KS_CompressionCaps_CanWindow = 0x10,
  3373. } KS_CompressionCaps;
  3374. typedef struct {
  3375. KSPROPERTY Property;
  3376. // Note, no VersionString!
  3377. // Note, no DescriptionString!
  3378. ULONG StreamIndex; // zero based index of stream
  3379. LONG DefaultKeyFrameRate; // Key frame rate
  3380. LONG DefaultPFrameRate; // Predeicted frames per Key frame
  3381. LONG DefaultQuality; // 0 to 10000
  3382. LONG NumberOfQualitySettings; // How many discreet quality settings?
  3383. LONG Capabilities; // KS_CompressionCaps_*
  3384. } KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S, *PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S;
  3385. typedef struct {
  3386. KSPROPERTY Property;
  3387. ULONG StreamIndex; // zero based index of stream
  3388. LONG Value; // value to get or set
  3389. } KSPROPERTY_VIDEOCOMPRESSION_S, *PKSPROPERTY_VIDEOCOMPRESSION_S;
  3390. //===========================================================================
  3391. // MEDIASUBTYPE_Overlay
  3392. #define STATIC_KSDATAFORMAT_SUBTYPE_OVERLAY\
  3393. 0xe436eb7fL, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70
  3394. DEFINE_GUIDSTRUCT("e436eb7f-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_OVERLAY);
  3395. #define KSDATAFORMAT_SUBTYPE_OVERLAY DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_OVERLAY)
  3396. #define STATIC_KSPROPSETID_OverlayUpdate\
  3397. 0x490EA5CFL, 0x7681, 0x11D1, 0xA2, 0x1C, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
  3398. DEFINE_GUIDSTRUCT("490EA5CF-7681-11D1-A21C-00A0C9223196", KSPROPSETID_OverlayUpdate);
  3399. #define KSPROPSETID_OverlayUpdate DEFINE_GUIDNAMED(KSPROPSETID_OverlayUpdate)
  3400. typedef enum {
  3401. KSPROPERTY_OVERLAYUPDATE_INTERESTS,
  3402. KSPROPERTY_OVERLAYUPDATE_CLIPLIST = 0x1,
  3403. KSPROPERTY_OVERLAYUPDATE_PALETTE = 0x2,
  3404. KSPROPERTY_OVERLAYUPDATE_COLORKEY = 0x4,
  3405. KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION = 0x8,
  3406. KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE = 0x10,
  3407. KSPROPERTY_OVERLAYUPDATE_COLORREF = 0x10000000
  3408. } KSPROPERTY_OVERLAYUPDATE;
  3409. typedef struct {
  3410. ULONG PelsWidth;
  3411. ULONG PelsHeight;
  3412. ULONG BitsPerPel;
  3413. WCHAR DeviceID[1];
  3414. } KSDISPLAYCHANGE, *PKSDISPLAYCHANGE;
  3415. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_INTERESTS(Handler)\
  3416. DEFINE_KSPROPERTY_ITEM(\
  3417. KSPROPERTY_OVERLAYUPDATE_INTERESTS,\
  3418. (Handler),\
  3419. sizeof(KSPROPERTY),\
  3420. sizeof(ULONG),\
  3421. NULL, NULL, 0, NULL, NULL, 0)
  3422. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_PALETTE(Handler)\
  3423. DEFINE_KSPROPERTY_ITEM(\
  3424. KSPROPERTY_OVERLAYUPDATE_PALETTE,\
  3425. NULL,\
  3426. sizeof(KSPROPERTY),\
  3427. 0,\
  3428. (Handler),\
  3429. NULL, 0, NULL, NULL, 0)
  3430. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORKEY(Handler)\
  3431. DEFINE_KSPROPERTY_ITEM(\
  3432. KSPROPERTY_OVERLAYUPDATE_COLORKEY,\
  3433. NULL,\
  3434. sizeof(KSPROPERTY),\
  3435. sizeof(COLORKEY),\
  3436. (Handler),\
  3437. NULL, 0, NULL, NULL, 0)
  3438. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_CLIPLIST(Handler)\
  3439. DEFINE_KSPROPERTY_ITEM(\
  3440. KSPROPERTY_OVERLAYUPDATE_CLIPLIST,\
  3441. NULL,\
  3442. sizeof(KSPROPERTY),\
  3443. 2 * sizeof(RECT) + sizeof(RGNDATAHEADER),\
  3444. (Handler),\
  3445. NULL, 0, NULL, NULL, 0)
  3446. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_VIDEOPOSITION(Handler)\
  3447. DEFINE_KSPROPERTY_ITEM(\
  3448. KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION,\
  3449. NULL,\
  3450. sizeof(KSPROPERTY),\
  3451. 2 * sizeof(RECT),\
  3452. (Handler),\
  3453. NULL, 0, NULL, NULL, 0)
  3454. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_DISPLAYCHANGE(Handler)\
  3455. DEFINE_KSPROPERTY_ITEM(\
  3456. KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE,\
  3457. NULL,\
  3458. sizeof(KSPROPERTY),\
  3459. sizeof(KSDISPLAYCHANGE),\
  3460. (Handler),\
  3461. NULL, 0, NULL, NULL, 0)
  3462. #define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORREF(Handler)\
  3463. DEFINE_KSPROPERTY_ITEM(\
  3464. KSPROPERTY_OVERLAYUPDATE_COLORREF,\
  3465. (Handler),\
  3466. sizeof(KSPROPERTY),\
  3467. sizeof(COLORREF),\
  3468. NULL,\
  3469. NULL, 0, NULL, NULL, 0)
  3470. //===========================================================================
  3471. #define STATIC_PROPSETID_VIDCAP_VIDEOCONTROL\
  3472. 0x6a2e0670L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3473. DEFINE_GUIDSTRUCT("6a2e0670-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOCONTROL);
  3474. #define PROPSETID_VIDCAP_VIDEOCONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCONTROL)
  3475. typedef enum {
  3476. KSPROPERTY_VIDEOCONTROL_CAPS, // R
  3477. KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE, // R O
  3478. KSPROPERTY_VIDEOCONTROL_FRAME_RATES, // R O
  3479. KSPROPERTY_VIDEOCONTROL_MODE, // RWO
  3480. } KSPROPERTY_VIDCAP_VIDEOCONTROL;
  3481. typedef enum {
  3482. KS_VideoControlFlag_FlipHorizontal = 0x0001,
  3483. KS_VideoControlFlag_FlipVertical = 0x0002,
  3484. KS_Obsolete_VideoControlFlag_ExternalTriggerEnable = 0x0010, // ***WARNING *** Flag msimatch with DSHOW.
  3485. KS_Obsolete_VideoControlFlag_Trigger = 0x0020, // ***WARNING *** Flag msimatch with DSHOW.
  3486. KS_VideoControlFlag_ExternalTriggerEnable = 0x0004,
  3487. KS_VideoControlFlag_Trigger = 0x0008,
  3488. } KS_VideoControlFlags;
  3489. typedef struct {
  3490. KSPROPERTY Property;
  3491. ULONG StreamIndex;
  3492. ULONG VideoControlCaps; // KS_VideoControlFlags_*
  3493. } KSPROPERTY_VIDEOCONTROL_CAPS_S, *PKSPROPERTY_VIDEOCONTROL_CAPS_S;
  3494. typedef struct {
  3495. KSPROPERTY Property;
  3496. ULONG StreamIndex;
  3497. LONG Mode; // KS_VideoControlFlags_*
  3498. } KSPROPERTY_VIDEOCONTROL_MODE_S, *PKSPROPERTY_VIDEOCONTROL_MODE_S;
  3499. typedef struct {
  3500. KSPROPERTY Property;
  3501. ULONG StreamIndex; // Index of stream
  3502. ULONG RangeIndex; // Index of range
  3503. SIZE Dimensions; // Size of image
  3504. LONGLONG CurrentActualFrameRate; // Only correct if pin is open
  3505. LONGLONG CurrentMaxAvailableFrameRate; // Max Rate temporarily limited on USB or 1394?
  3506. } KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S, *PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S;
  3507. // KSPROPERTY_VIDEOCONTROL_FRAME_RATES returns a list of available frame rates in 100 nS units
  3508. typedef struct {
  3509. KSPROPERTY Property;
  3510. ULONG StreamIndex; // Index of stream
  3511. ULONG RangeIndex; // Index of range
  3512. SIZE Dimensions; // Size of image
  3513. } KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S, *PKSPROPERTY_VIDEOCONTROL_FRAME_RATES_S;
  3514. //===========================================================================
  3515. #define STATIC_PROPSETID_VIDCAP_DROPPEDFRAMES\
  3516. 0xC6E13344L, 0x30AC, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56
  3517. DEFINE_GUIDSTRUCT("C6E13344-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_DROPPEDFRAMES);
  3518. #define PROPSETID_VIDCAP_DROPPEDFRAMES DEFINE_GUIDNAMED(PROPSETID_VIDCAP_DROPPEDFRAMES)
  3519. typedef enum {
  3520. KSPROPERTY_DROPPEDFRAMES_CURRENT // R
  3521. } KSPROPERTY_VIDCAP_DROPPEDFRAMES;
  3522. typedef struct {
  3523. KSPROPERTY Property;
  3524. LONGLONG PictureNumber; // Current Picture Number
  3525. LONGLONG DropCount; // Count of frames dropped
  3526. ULONG AverageFrameSize; // Average size of frames captured
  3527. } KSPROPERTY_DROPPEDFRAMES_CURRENT_S, *PKSPROPERTY_DROPPEDFRAMES_CURRENT_S;
  3528. //===========================================================================
  3529. // VPE
  3530. #define STATIC_KSPROPSETID_VPConfig\
  3531. 0xbc29a660L, 0x30e3, 0x11d0, 0x9e, 0x69, 0x00, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b
  3532. DEFINE_GUIDSTRUCT("bc29a660-30e3-11d0-9e69-00c04fd7c15b", KSPROPSETID_VPConfig);
  3533. #define KSPROPSETID_VPConfig DEFINE_GUIDNAMED(KSPROPSETID_VPConfig)
  3534. #define STATIC_KSPROPSETID_VPVBIConfig\
  3535. 0xec529b00L, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
  3536. DEFINE_GUIDSTRUCT("ec529b00-1a1f-11d1-bad9-00609744111a", KSPROPSETID_VPVBIConfig);
  3537. #define KSPROPSETID_VPVBIConfig DEFINE_GUIDNAMED(KSPROPSETID_VPVBIConfig)
  3538. // Both of the above property sets use the same list of properties below
  3539. typedef enum {
  3540. KSPROPERTY_VPCONFIG_NUMCONNECTINFO,
  3541. KSPROPERTY_VPCONFIG_GETCONNECTINFO,
  3542. KSPROPERTY_VPCONFIG_SETCONNECTINFO,
  3543. KSPROPERTY_VPCONFIG_VPDATAINFO,
  3544. KSPROPERTY_VPCONFIG_MAXPIXELRATE,
  3545. KSPROPERTY_VPCONFIG_INFORMVPINPUT,
  3546. KSPROPERTY_VPCONFIG_NUMVIDEOFORMAT,
  3547. KSPROPERTY_VPCONFIG_GETVIDEOFORMAT,
  3548. KSPROPERTY_VPCONFIG_SETVIDEOFORMAT,
  3549. KSPROPERTY_VPCONFIG_INVERTPOLARITY,
  3550. KSPROPERTY_VPCONFIG_DECIMATIONCAPABILITY, // E_NOTIMPL for VBI
  3551. KSPROPERTY_VPCONFIG_SCALEFACTOR, // E_NOTIMPL for VBI
  3552. KSPROPERTY_VPCONFIG_DDRAWHANDLE,
  3553. KSPROPERTY_VPCONFIG_VIDEOPORTID,
  3554. KSPROPERTY_VPCONFIG_DDRAWSURFACEHANDLE,
  3555. KSPROPERTY_VPCONFIG_SURFACEPARAMS
  3556. } KSPROPERTY_VPCONFIG;
  3557. //=========================
  3558. // IBasicAudio
  3559. //
  3560. #define STATIC_CLSID_KsIBasicAudioInterfaceHandler\
  3561. 0xb9f8ac3e, 0x0f71, 0x11d2, 0xb7, 0x2c, 0x00, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d
  3562. DEFINE_GUIDSTRUCT("b9f8ac3e-0f71-11d2-b72c-00c04fb6bd3d", CLSID_KsIBasicAudioInterfaceHandler);
  3563. #define CLSID_KsIBasicAudioInterfaceHandler DEFINE_GUIDNAMED(CLSID_KsIBasicAudioInterfaceHandler)
  3564. #if defined(__IVPType__)
  3565. typedef struct {
  3566. AMVPSIZE Size;
  3567. DWORD MaxPixelsPerSecond;
  3568. DWORD Reserved;
  3569. } KSVPMAXPIXELRATE, *PKSVPMAXPIXELRATE;
  3570. typedef struct {
  3571. KSPROPERTY Property;
  3572. AMVPSIZE Size;
  3573. } KSVPSIZE_PROP, *PKSVPSIZE_PROP;
  3574. typedef struct {
  3575. DWORD dwPitch;
  3576. DWORD dwXOrigin;
  3577. DWORD dwYOrigin;
  3578. } KSVPSURFACEPARAMS, *PKSVPSURFACEPARAMS;
  3579. #else // !defined(__IVPType__)
  3580. #if !defined(__DDRAW_INCLUDED__)
  3581. //==========================================================================
  3582. // The following definitions must be in sync with DDraw.h in DirectX SDK
  3583. //==========================================================================
  3584. /*
  3585. * The FourCC code is valid.
  3586. */
  3587. #define DDPF_FOURCC 0x00000004l
  3588. typedef struct _DDPIXELFORMAT
  3589. {
  3590. DWORD dwSize; // size of structure
  3591. DWORD dwFlags; // pixel format flags
  3592. DWORD dwFourCC; // (FOURCC code)
  3593. union
  3594. {
  3595. DWORD dwRGBBitCount; // how many bits per pixel (BD_1,2,4,8,16,24,32)
  3596. DWORD dwYUVBitCount; // how many bits per pixel (BD_4,8,16,24,32)
  3597. DWORD dwZBufferBitDepth; // how many bits for z buffers (BD_8,16,24,32)
  3598. DWORD dwAlphaBitDepth; // how many bits for alpha channels (BD_1,2,4,8)
  3599. };
  3600. union
  3601. {
  3602. DWORD dwRBitMask; // mask for red bit
  3603. DWORD dwYBitMask; // mask for Y bits
  3604. };
  3605. union
  3606. {
  3607. DWORD dwGBitMask; // mask for green bits
  3608. DWORD dwUBitMask; // mask for U bits
  3609. };
  3610. union
  3611. {
  3612. DWORD dwBBitMask; // mask for blue bits
  3613. DWORD dwVBitMask; // mask for V bits
  3614. };
  3615. union
  3616. {
  3617. DWORD dwRGBAlphaBitMask; // mask for alpha channel
  3618. DWORD dwYUVAlphaBitMask; // mask for alpha channel
  3619. DWORD dwRGBZBitMask; // mask for Z channel
  3620. DWORD dwYUVZBitMask; // mask for Z channel
  3621. };
  3622. } DDPIXELFORMAT, * LPDDPIXELFORMAT;
  3623. #endif // !defined(__DDRAW_INCLUDED__)
  3624. //==========================================================================
  3625. // End of DDraw.h header info
  3626. //==========================================================================
  3627. //==========================================================================
  3628. // The following definitions must be in sync with DVP.h in DirectX SDK
  3629. //==========================================================================
  3630. #if !defined(__DVP_INCLUDED__)
  3631. typedef struct _DDVIDEOPORTCONNECT {
  3632. DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure
  3633. DWORD dwPortWidth; // Width of the video port
  3634. GUID guidTypeID; // Description of video port connection
  3635. DWORD dwFlags; // Connection flags
  3636. DWORD dwReserved1; // Reserved, set to zero.
  3637. } DDVIDEOPORTCONNECT, * LPDDVIDEOPORTCONNECT;
  3638. #define DDVPTYPE_E_HREFH_VREFH \
  3639. 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8
  3640. #define DDVPTYPE_E_HREFL_VREFL \
  3641. 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8
  3642. #endif // !defined(__DVP_INCLUDED__)
  3643. //==========================================================================
  3644. // End of DVP.h header info
  3645. //==========================================================================
  3646. //==========================================================================
  3647. // The following definitions must be in sync with VPType.h in AM 2.0 SDK
  3648. //==========================================================================
  3649. // pixel aspect ratios corresponding to a 720x480 NTSC image or a 720x576 image
  3650. typedef enum // AMPixAspectRatio
  3651. {
  3652. KS_PixAspectRatio_NTSC4x3,
  3653. KS_PixAspectRatio_NTSC16x9,
  3654. KS_PixAspectRatio_PAL4x3,
  3655. KS_PixAspectRatio_PAL16x9,
  3656. } KS_AMPixAspectRatio ;
  3657. typedef enum // AMVP_SELECTFORMATBY
  3658. {
  3659. KS_AMVP_DO_NOT_CARE,
  3660. KS_AMVP_BEST_BANDWIDTH,
  3661. KS_AMVP_INPUT_SAME_AS_OUTPUT
  3662. } KS_AMVP_SELECTFORMATBY;
  3663. typedef enum // AMVP_MODE
  3664. {
  3665. KS_AMVP_MODE_WEAVE,
  3666. KS_AMVP_MODE_BOBINTERLEAVED,
  3667. KS_AMVP_MODE_BOBNONINTERLEAVED,
  3668. KS_AMVP_MODE_SKIPEVEN,
  3669. KS_AMVP_MODE_SKIPODD
  3670. } KS_AMVP_MODE ;
  3671. typedef struct tagKS_AMVPDIMINFO // AMVPDIMINFO
  3672. {
  3673. DWORD dwFieldWidth ; // [out] field width
  3674. DWORD dwFieldHeight ; // [out] field height
  3675. DWORD dwVBIWidth ; // [out] VBI data width
  3676. DWORD dwVBIHeight ; // [out] VBI data height
  3677. RECT rcValidRegion ; // [out] valid rect for data cropping
  3678. } KS_AMVPDIMINFO, *PKS_AMVPDIMINFO ;
  3679. typedef struct tagKS_AMVPDATAINFO // AMVPDATAINFO
  3680. {
  3681. DWORD dwSize; // Size of the struct
  3682. DWORD dwMicrosecondsPerField; // Time taken by each field
  3683. KS_AMVPDIMINFO amvpDimInfo; // Dimensional Information
  3684. DWORD dwPictAspectRatioX; // Pict aspect ratio in X dimn
  3685. DWORD dwPictAspectRatioY; // Pict aspect ratio in Y dimn
  3686. BOOL bEnableDoubleClock; // Videoport should enable double clocking
  3687. BOOL bEnableVACT; // Videoport should use an external VACT signal
  3688. BOOL bDataIsInterlaced; // Indicates that the signal is interlaced
  3689. LONG lHalfLinesOdd; // number of halflines in the odd field
  3690. BOOL bFieldPolarityInverted; // Device inverts the polarity by default
  3691. DWORD dwNumLinesInVREF; // Number of lines of data in VREF
  3692. LONG lHalfLinesEven; // number of halflines in the even field
  3693. DWORD dwReserved1; // Reserved for future use
  3694. } KS_AMVPDATAINFO, *PKS_AMVPDATAINFO;
  3695. typedef struct tagKS_AMVPSIZE // AMVPSIZE
  3696. {
  3697. DWORD dwWidth ; // [in] width in pixels
  3698. DWORD dwHeight ; // [in] height in pixels
  3699. } KS_AMVPSIZE, *PKS_AMVPSIZE ;
  3700. //==========================================================================
  3701. // End of VPType.h header info
  3702. //==========================================================================
  3703. typedef struct {
  3704. KS_AMVPSIZE Size;
  3705. DWORD MaxPixelsPerSecond;
  3706. DWORD Reserved;
  3707. } KSVPMAXPIXELRATE, *PKSVPMAXPIXELRATE;
  3708. typedef struct {
  3709. KSPROPERTY Property;
  3710. KS_AMVPSIZE Size;
  3711. } KSVPSIZE_PROP, *PKSVPSIZE_PROP;
  3712. typedef struct {
  3713. DWORD dwPitch;
  3714. DWORD dwXOrigin;
  3715. DWORD dwYOrigin;
  3716. } KSVPSURFACEPARAMS, *PKSVPSURFACEPARAMS;
  3717. #endif // !defined(__IVPType__)
  3718. //
  3719. // IVPNotify event notification
  3720. //
  3721. #define STATIC_KSEVENTSETID_VPNotify\
  3722. 0x20c5598eL, 0xd3c8, 0x11d0, 0x8d, 0xfc, 0x00, 0xc0, 0x4f, 0xd7, 0xc0, 0x8b
  3723. DEFINE_GUIDSTRUCT("20c5598e-d3c8-11d0-8dfc-00c04fd7c08b", KSEVENTSETID_VPNotify);
  3724. #define KSEVENTSETID_VPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VPNotify)
  3725. typedef enum {
  3726. KSEVENT_VPNOTIFY_FORMATCHANGE,
  3727. } KSEVENT_VPNOTIFY;
  3728. //
  3729. // VIDCAPTOSTI event notification
  3730. //
  3731. #define STATIC_KSEVENTSETID_VIDCAPTOSTI\
  3732. 0xdb47de20, 0xf628, 0x11d1, 0xba, 0x41, 0x0, 0xa0, 0xc9, 0xd, 0x2b, 0x5
  3733. DEFINE_GUIDSTRUCT("DB47DE20-F628-11d1-BA41-00A0C90D2B05", KSEVENTSETID_VIDCAPTOSTI);
  3734. #define KSEVENTSETID_VIDCAPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAPTOSTI)
  3735. typedef enum {
  3736. KSEVENT_VIDCAPTOSTI_EXT_TRIGGER,
  3737. } KSEVENT_VIDCAPTOSTI;
  3738. //
  3739. // IVPVBINotify event notification
  3740. //
  3741. #define STATIC_KSEVENTSETID_VPVBINotify\
  3742. 0xec529b01L, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a
  3743. DEFINE_GUIDSTRUCT("ec529b01-1a1f-11d1-bad9-00609744111a", KSEVENTSETID_VPVBINotify);
  3744. #define KSEVENTSETID_VPVBINotify DEFINE_GUIDNAMED(KSEVENTSETID_VPVBINotify)
  3745. typedef enum {
  3746. KSEVENT_VPVBINOTIFY_FORMATCHANGE,
  3747. } KSEVENT_VPVBINOTIFY;
  3748. //
  3749. // closed caption information
  3750. //
  3751. #define STATIC_KSDATAFORMAT_TYPE_AUXLine21Data \
  3752. 0x670aea80L, 0x3a82, 0x11d0, 0xb7, 0x9b, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
  3753. DEFINE_GUIDSTRUCT("670aea80-3a82-11d0-b79b-00aa003767a7", KSDATAFORMAT_TYPE_AUXLine21Data);
  3754. #define KSDATAFORMAT_TYPE_AUXLine21Data DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUXLine21Data)
  3755. #define STATIC_KSDATAFORMAT_SUBTYPE_Line21_BytePair \
  3756. 0x6e8d4a22L, 0x310c, 0x11d0, 0xb7, 0x9a, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
  3757. DEFINE_GUIDSTRUCT("6e8d4a22-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_BytePair);
  3758. #define KSDATAFORMAT_SUBTYPE_Line21_BytePair DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_BytePair)
  3759. #define STATIC_KSDATAFORMAT_SUBTYPE_Line21_GOPPacket \
  3760. 0x6e8d4a23L, 0x310c, 0x11d0, 0xb7, 0x9a, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7
  3761. DEFINE_GUIDSTRUCT("6e8d4a23-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_GOPPacket);
  3762. #define KSDATAFORMAT_SUBTYPE_Line21_GOPPacket DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_GOPPacket)
  3763. typedef struct _KSGOP_USERDATA {
  3764. ULONG sc;
  3765. ULONG reserved1;
  3766. BYTE cFields;
  3767. CHAR l21Data[3];
  3768. } KSGOP_USERDATA, *PKSGOP_USERDATA;
  3769. //
  3770. // DVD encrypted PACK format type definition
  3771. //
  3772. #define STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK\
  3773. 0xed0b916a, 0x044d, 0x11d1, 0xaa, 0x78, 0x00, 0xc0, 0x4f, 0xc3, 0x1d, 0x60
  3774. DEFINE_GUIDSTRUCT("ed0b916a-044d-11d1-aa78-00c04fc31d60", KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK);
  3775. #define KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK)
  3776. #define KS_AM_UseNewCSSKey 0x1
  3777. // -----------------------------------------------------------------------
  3778. // KS_AM_KSPROPSETID_TSRateChange property set definitions for time stamp
  3779. // rate changes.
  3780. // -----------------------------------------------------------------------
  3781. #define STATIC_KSPROPSETID_TSRateChange\
  3782. 0xa503c5c0, 0x1d1d, 0x11d1, 0xad, 0x80, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0
  3783. DEFINE_GUIDSTRUCT("A503C5C0-1D1D-11D1-AD80-444553540000", KSPROPSETID_TSRateChange);
  3784. #define KSPROPSETID_TSRateChange DEFINE_GUIDNAMED(KSPROPSETID_TSRateChange)
  3785. typedef enum {
  3786. KS_AM_RATE_SimpleRateChange=1, // rw, use KS_AM_SimpleRateChange
  3787. KS_AM_RATE_ExactRateChange=2, // rw, use KS_AM_ExactRateChange
  3788. KS_AM_RATE_MaxFullDataRate=3, // r, use KS_AM_MaxFullDataRate
  3789. KS_AM_RATE_Step=4 // w, use KS_AM_Step
  3790. } KS_AM_PROPERTY_TS_RATE_CHANGE;
  3791. typedef struct {
  3792. // this is the simplest mechanism to set a time stamp rate change on
  3793. // a filter (simplest for the person setting the rate change, harder
  3794. // for the filter doing the rate change).
  3795. REFERENCE_TIME StartTime; //stream time at which to start this rate
  3796. LONG Rate; //new rate * 10000 (decimal)
  3797. } KS_AM_SimpleRateChange, *PKS_AM_SimpleRateChange;
  3798. typedef struct {
  3799. REFERENCE_TIME OutputZeroTime; //input TS that maps to zero output TS
  3800. LONG Rate; //new rate * 10000 (decimal)
  3801. } KS_AM_ExactRateChange, *PKS_AM_ExactRateChange;
  3802. typedef LONG KS_AM_MaxFullDataRate; //rate * 10000 (decimal)
  3803. typedef DWORD KS_AM_Step; // number of frame to step
  3804. //===========================================================================
  3805. //ENCODER API DEFINITIONS
  3806. //===========================================================================
  3807. #define STATIC_KSCATEGORY_ENCODER \
  3808. 0x19689bf6, 0xc384, 0x48fd, 0xad, 0x51, 0x90, 0xe5, 0x8c, 0x79, 0xf7, 0xb
  3809. DEFINE_GUIDSTRUCT("19689BF6-C384-48fd-AD51-90E58C79F70B", KSCATEGORY_ENCODER);
  3810. #define KSCATEGORY_ENCODER DEFINE_GUIDNAMED(KSCATEGORY_ENCODER)
  3811. #define STATIC_KSCATEGORY_MULTIPLEXER \
  3812. 0x7a5de1d3, 0x1a1, 0x452c, 0xb4, 0x81, 0x4f, 0xa2, 0xb9, 0x62, 0x71, 0xe8
  3813. DEFINE_GUIDSTRUCT("7A5DE1D3-01A1-452c-B481-4FA2B96271E8", KSCATEGORY_MULTIPLEXER);
  3814. #define KSCATEGORY_MULTIPLEXER DEFINE_GUIDNAMED(KSCATEGORY_MULTIPLEXER)
  3815. #ifndef __ENCODER_API_GUIDS__
  3816. #define __ENCODER_API_GUIDS__
  3817. #define STATIC_ENCAPIPARAM_BITRATE \
  3818. 0x49cc4c43, 0xca83, 0x4ad4, 0xa9, 0xaf, 0xf3, 0x69, 0x6a, 0xf6, 0x66, 0xdf
  3819. DEFINE_GUIDSTRUCT("49CC4C43-CA83-4ad4-A9AF-F3696AF666DF", ENCAPIPARAM_BITRATE);
  3820. #define ENCAPIPARAM_BITRATE DEFINE_GUIDNAMED(ENCAPIPARAM_BITRATE)
  3821. #define STATIC_ENCAPIPARAM_PEAK_BITRATE \
  3822. 0x703f16a9, 0x3d48, 0x44a1, 0xb0, 0x77, 0x1, 0x8d, 0xff, 0x91, 0x5d, 0x19
  3823. DEFINE_GUIDSTRUCT("703F16A9-3D48-44a1-B077-018DFF915D19", ENCAPIPARAM_PEAK_BITRATE);
  3824. #define ENCAPIPARAM_PEAK_BITRATE DEFINE_GUIDNAMED(ENCAPIPARAM_PEAK_BITRATE)
  3825. #define STATIC_ENCAPIPARAM_BITRATE_MODE \
  3826. 0xee5fb25c, 0xc713, 0x40d1, 0x9d, 0x58, 0xc0, 0xd7, 0x24, 0x1e, 0x25, 0xf
  3827. DEFINE_GUIDSTRUCT("EE5FB25C-C713-40d1-9D58-C0D7241E250F", ENCAPIPARAM_BITRATE_MODE);
  3828. #define ENCAPIPARAM_BITRATE_MODE DEFINE_GUIDNAMED(ENCAPIPARAM_BITRATE_MODE)
  3829. #endif // __ENCODER_API_GUIDS__
  3830. #ifndef __ENCODER_API_DEFINES__
  3831. #define __ENCODER_API_DEFINES__
  3832. typedef enum {
  3833. //
  3834. // Bit rate used for encoding is constant
  3835. //
  3836. ConstantBitRate = 0,
  3837. //
  3838. // Bit rate used for encoding is variable with the specified bitrate used
  3839. // as a guaranteed average over a specified window. The default window
  3840. // size is considered to be 5 minutes.
  3841. //
  3842. VariableBitRateAverage,
  3843. //
  3844. // Bit rate used for encoding is variable with the specified bitrate used
  3845. // as an average with a peak not to exceed the specified peak bitrate over
  3846. // a specified window. The default window size is considered to be 500ms
  3847. // (classically one GOP).
  3848. //
  3849. VariableBitRatePeak
  3850. } VIDEOENCODER_BITRATE_MODE;
  3851. #endif // __ENCODER_API_DEFINES__
  3852. #endif // !defined(_KSMEDIA_)