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.

310 lines
10 KiB

  1. //==========================================================================;
  2. //
  3. // msacmdrv.h
  4. //
  5. // Copyright (c) 1992-1999 Microsoft Corporation. All Rights Reserved.
  6. //
  7. // Description:
  8. // Audio Compression Manager Public Header File for Drivers
  9. //
  10. // History:
  11. //
  12. //==========================================================================;
  13. #ifndef _INC_ACMDRV
  14. #define _INC_ACMDRV /* #defined if msacmdrv.h has been included */
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18. #if !defined(_INC_ACM)
  19. #ifndef RC_INVOKED
  20. #error MSACM.H to be included first
  21. #endif
  22. #endif
  23. #include "pshpack1.h" /* Assume byte packing throughout */
  24. #ifdef __cplusplus
  25. extern "C" { /* Assume C declarations for C++ */
  26. #endif /* __cplusplus */
  27. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  28. //
  29. // ACM Driver Version:
  30. //
  31. // the version is a 32 bit number that is broken into three parts as
  32. // follows:
  33. //
  34. // bits 24 - 31: 8 bit _major_ version number
  35. // bits 16 - 23: 8 bit _minor_ version number
  36. // bits 0 - 15: 16 bit build number
  37. //
  38. // this is then displayed as follows:
  39. //
  40. // bMajor = (BYTE)(dwVersion >> 24)
  41. // bMinor = (BYTE)(dwVersion >> 16) &
  42. // wBuild = LOWORD(dwVersion)
  43. //
  44. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  45. #define MAKE_ACM_VERSION(mjr, mnr, bld) (((long)(mjr)<<24)| \
  46. ((long)(mnr)<<16)| \
  47. ((long)bld))
  48. #ifdef WIN32
  49. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  50. //
  51. // under WIN32 all drivers use unicode structures. these have already
  52. // been #defined in MSACM.H. however, regardless of whether UNICODE is
  53. // defined, we will define these structures as unicode structures for use
  54. // in 32-bit drivers.
  55. //
  56. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  57. #undef ACMDRIVERDETAILS
  58. #undef PACMDRIVERDETAILS
  59. #undef LPACMDRIVERDETAILS
  60. #undef ACMFORMATTAGDETAILS
  61. #undef PACMFORMATTAGDETAILS
  62. #undef LPACMFORMATTAGDETAILS
  63. #undef ACMFORMATDETAILS
  64. #undef PACMFORMATDETAILS
  65. #undef LPACMFORMATDETAILS
  66. #undef ACMFORMATCHOOSE
  67. #undef PACMFORMATCHOOSE
  68. #undef LPACMFORMATCHOOSE
  69. #undef ACMFILTERTAGDETAILS
  70. #undef PACMFILTERTAGDETAILS
  71. #undef LPACMFILTERTAGDETAILS
  72. #undef ACMFILTERDETAILS
  73. #undef PACMFILTERDETAILS
  74. #undef LPACMFILTERDETAILS
  75. #undef ACMFILTERCHOOSE
  76. #undef PACMFILTERCHOOSE
  77. #undef LPACMFILTERCHOOSE
  78. #define ACMDRIVERDETAILS ACMDRIVERDETAILSW
  79. #define PACMDRIVERDETAILS PACMDRIVERDETAILSW
  80. #define LPACMDRIVERDETAILS LPACMDRIVERDETAILSW
  81. #define ACMFORMATTAGDETAILS ACMFORMATTAGDETAILSW
  82. #define PACMFORMATTAGDETAILS PACMFORMATTAGDETAILSW
  83. #define LPACMFORMATTAGDETAILS LPACMFORMATTAGDETAILSW
  84. #define ACMFORMATDETAILS ACMFORMATDETAILSW
  85. #define PACMFORMATDETAILS PACMFORMATDETAILSW
  86. #define LPACMFORMATDETAILS LPACMFORMATDETAILSW
  87. #define ACMFORMATCHOOSE ACMFORMATCHOOSEW
  88. #define PACMFORMATCHOOSE PACMFORMATCHOOSEW
  89. #define LPACMFORMATCHOOSE LPACMFORMATCHOOSEW
  90. #define ACMFILTERTAGDETAILS ACMFILTERTAGDETAILSW
  91. #define PACMFILTERTAGDETAILS PACMFILTERTAGDETAILSW
  92. #define LPACMFILTERTAGDETAILS LPACMFILTERTAGDETAILSW
  93. #define ACMFILTERDETAILS ACMFILTERDETAILSW
  94. #define PACMFILTERDETAILS PACMFILTERDETAILSW
  95. #define LPACMFILTERDETAILS LPACMFILTERDETAILSW
  96. #define ACMFILTERCHOOSE ACMFILTERCHOOSEW
  97. #define PACMFILTERCHOOSE PACMFILTERCHOOSEW
  98. #define LPACMFILTERCHOOSE LPACMFILTERCHOOSEW
  99. #endif
  100. //
  101. //
  102. //
  103. //
  104. //
  105. #define ACMDRVOPENDESC_SECTIONNAME_CHARS
  106. #ifdef _WIN32
  107. typedef struct tACMDRVOPENDESCA
  108. {
  109. DWORD cbStruct; // sizeof(ACMDRVOPENDESC)
  110. FOURCC fccType; // 'audc'
  111. FOURCC fccComp; // sub-type (not used--must be 0)
  112. DWORD dwVersion; // current version of ACM opening you
  113. DWORD dwFlags; //
  114. DWORD dwError; // result from DRV_OPEN request
  115. LPCSTR pszSectionName; // see DRVCONFIGINFO.lpszDCISectionName
  116. LPCSTR pszAliasName; // see DRVCONFIGINFO.lpszDCIAliasName
  117. DWORD dnDevNode; // devnode id for pnp drivers.
  118. } ACMDRVOPENDESCA, *PACMDRVOPENDESCA, FAR *LPACMDRVOPENDESCA;
  119. typedef struct tACMDRVOPENDESCW
  120. {
  121. DWORD cbStruct; // sizeof(ACMDRVOPENDESC)
  122. FOURCC fccType; // 'audc'
  123. FOURCC fccComp; // sub-type (not used--must be 0)
  124. DWORD dwVersion; // current version of ACM opening you
  125. DWORD dwFlags; //
  126. DWORD dwError; // result from DRV_OPEN request
  127. LPCWSTR pszSectionName; // see DRVCONFIGINFO.lpszDCISectionName
  128. LPCWSTR pszAliasName; // see DRVCONFIGINFO.lpszDCIAliasName
  129. DWORD dnDevNode; // devnode id for pnp drivers.
  130. } ACMDRVOPENDESCW, *PACMDRVOPENDESCW, FAR *LPACMDRVOPENDESCW;
  131. #define ACMDRVOPENDESC ACMDRVOPENDESCW
  132. #define PACMDRVOPENDESC PACMDRVOPENDESCW
  133. #define LPACMDRVOPENDESC LPACMDRVOPENDESCW
  134. #else
  135. typedef struct tACMDRVOPENDESC
  136. {
  137. DWORD cbStruct; // sizeof(ACMDRVOPENDESC)
  138. FOURCC fccType; // 'audc'
  139. FOURCC fccComp; // sub-type (not used--must be 0)
  140. DWORD dwVersion; // current version of ACM opening you
  141. DWORD dwFlags; //
  142. DWORD dwError; // result from DRV_OPEN request
  143. LPCSTR pszSectionName; // see DRVCONFIGINFO.lpszDCISectionName
  144. LPCSTR pszAliasName; // see DRVCONFIGINFO.lpszDCIAliasName
  145. DWORD dnDevNode; // devnode id for pnp drivers.
  146. } ACMDRVOPENDESC, *PACMDRVOPENDESC, FAR *LPACMDRVOPENDESC;
  147. #endif
  148. //
  149. //
  150. //
  151. //
  152. //
  153. typedef struct tACMDRVSTREAMINSTANCE
  154. {
  155. DWORD cbStruct;
  156. LPWAVEFORMATEX pwfxSrc;
  157. LPWAVEFORMATEX pwfxDst;
  158. LPWAVEFILTER pwfltr;
  159. DWORD_PTR dwCallback;
  160. DWORD_PTR dwInstance;
  161. DWORD fdwOpen;
  162. DWORD fdwDriver;
  163. DWORD_PTR dwDriver;
  164. HACMSTREAM has;
  165. } ACMDRVSTREAMINSTANCE, *PACMDRVSTREAMINSTANCE, FAR *LPACMDRVSTREAMINSTANCE;
  166. //
  167. // NOTE! this structure must match the ACMSTREAMHEADER in msacm.h but
  168. // defines more information for the driver writing convenience
  169. //
  170. typedef struct tACMDRVSTREAMHEADER FAR *LPACMDRVSTREAMHEADER;
  171. typedef struct tACMDRVSTREAMHEADER
  172. {
  173. DWORD cbStruct;
  174. DWORD fdwStatus;
  175. DWORD_PTR dwUser;
  176. LPBYTE pbSrc;
  177. DWORD cbSrcLength;
  178. DWORD cbSrcLengthUsed;
  179. DWORD_PTR dwSrcUser;
  180. LPBYTE pbDst;
  181. DWORD cbDstLength;
  182. DWORD cbDstLengthUsed;
  183. DWORD_PTR dwDstUser;
  184. DWORD fdwConvert; // flags passed from convert func
  185. LPACMDRVSTREAMHEADER padshNext; // for async driver queueing
  186. DWORD fdwDriver; // driver instance flags
  187. DWORD_PTR dwDriver; // driver instance data
  188. //
  189. // all remaining fields are used by the ACM for bookkeeping purposes.
  190. // an ACM driver should never use these fields (though than can be
  191. // helpful for debugging)--note that the meaning of these fields
  192. // may change, so do NOT rely on them in shipping code.
  193. //
  194. DWORD fdwPrepared;
  195. DWORD_PTR dwPrepared;
  196. LPBYTE pbPreparedSrc;
  197. DWORD cbPreparedSrcLength;
  198. LPBYTE pbPreparedDst;
  199. DWORD cbPreparedDstLength;
  200. } ACMDRVSTREAMHEADER, *PACMDRVSTREAMHEADER;
  201. //
  202. // structure for ACMDM_STREAM_SIZE message
  203. //
  204. //
  205. typedef struct tACMDRVSTREAMSIZE
  206. {
  207. DWORD cbStruct;
  208. DWORD fdwSize;
  209. DWORD cbSrcLength;
  210. DWORD cbDstLength;
  211. } ACMDRVSTREAMSIZE, *PACMDRVSTREAMSIZE, FAR *LPACMDRVSTREAMSIZE;
  212. //
  213. // structure containing the information for the ACMDM_FORMAT_SUGGEST message
  214. //
  215. //
  216. typedef struct tACMDRVFORMATSUGGEST
  217. {
  218. DWORD cbStruct; // sizeof(ACMDRVFORMATSUGGEST)
  219. DWORD fdwSuggest; // Suggest flags
  220. LPWAVEFORMATEX pwfxSrc; // Source Format
  221. DWORD cbwfxSrc; // Source Size
  222. LPWAVEFORMATEX pwfxDst; // Dest format
  223. DWORD cbwfxDst; // Dest Size
  224. } ACMDRVFORMATSUGGEST, *PACMDRVFORMATSUGGEST, FAR *LPACMDRVFORMATSUGGEST;
  225. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  226. //
  227. // ACM Driver Messages
  228. //
  229. //
  230. //
  231. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;
  232. #define ACMDM_DRIVER_NOTIFY (ACMDM_BASE + 1)
  233. #define ACMDM_DRIVER_DETAILS (ACMDM_BASE + 10)
  234. #define ACMDM_HARDWARE_WAVE_CAPS_INPUT (ACMDM_BASE + 20)
  235. #define ACMDM_HARDWARE_WAVE_CAPS_OUTPUT (ACMDM_BASE + 21)
  236. #define ACMDM_FORMATTAG_DETAILS (ACMDM_BASE + 25)
  237. #define ACMDM_FORMAT_DETAILS (ACMDM_BASE + 26)
  238. #define ACMDM_FORMAT_SUGGEST (ACMDM_BASE + 27)
  239. #define ACMDM_FILTERTAG_DETAILS (ACMDM_BASE + 50)
  240. #define ACMDM_FILTER_DETAILS (ACMDM_BASE + 51)
  241. #define ACMDM_STREAM_OPEN (ACMDM_BASE + 76)
  242. #define ACMDM_STREAM_CLOSE (ACMDM_BASE + 77)
  243. #define ACMDM_STREAM_SIZE (ACMDM_BASE + 78)
  244. #define ACMDM_STREAM_CONVERT (ACMDM_BASE + 79)
  245. #define ACMDM_STREAM_RESET (ACMDM_BASE + 80)
  246. #define ACMDM_STREAM_PREPARE (ACMDM_BASE + 81)
  247. #define ACMDM_STREAM_UNPREPARE (ACMDM_BASE + 82)
  248. #define ACMDM_STREAM_UPDATE (ACMDM_BASE + 83)
  249. #include "poppack.h" /* Revert to default packing */
  250. #ifdef __cplusplus
  251. } /* End of extern "C" { */
  252. #endif /* __cplusplus */
  253. #endif /* _INC_ACMDRV */