msacmdrv.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. /**
  2. *
  3. * Alternative msacmdrv.h file, for use in the Lame project.
  4. * File from the FFDshow project, released under LGPL by permission
  5. * from Milan Cutka.
  6. * Modified by Gabriel Bouvigne to allow compilation of Lame.
  7. *
  8. * Copyright (c) 2003 Milan Cutka
  9. * Copyright (c) 2003 Gabriel Bouvigne
  10. *
  11. * This library is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU Lesser General Public
  13. * License as published by the Free Software Foundation; either
  14. * version 2.1 of the License, or (at your option) any later version.
  15. *
  16. * This library is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * Lesser General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Lesser General Public
  22. * License along with this library; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  24. *
  25. */
  26. #ifndef _MSACMDRV_H_
  27. #define _MSACMDRV_H_
  28. #include <mmreg.h>
  29. #include <msacm.h>
  30. typedef unsigned long ULONG_PTR, *PULONG_PTR;
  31. typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
  32. #undef ACMDRIVERDETAILS
  33. #undef PACMDRIVERDETAILS
  34. #undef LPACMDRIVERDETAILS
  35. #define ACMDRIVERDETAILS ACMDRIVERDETAILSW
  36. #define PACMDRIVERDETAILS PACMDRIVERDETAILSW
  37. #define LPACMDRIVERDETAILS LPACMDRIVERDETAILSW
  38. #undef ACMFORMATTAGDETAILS
  39. #undef PACMFORMATTAGDETAILS
  40. #undef LPACMFORMATTAGDETAILS
  41. #define ACMFORMATTAGDETAILS ACMFORMATTAGDETAILSW
  42. #define PACMFORMATTAGDETAILS PACMFORMATTAGDETAILSW
  43. #define LPACMFORMATTAGDETAILS LPACMFORMATTAGDETAILSW
  44. #undef ACMFORMATDETAILS
  45. #undef PACMFORMATDETAILS
  46. #undef LPACMFORMATDETAILS
  47. #define ACMFORMATDETAILS ACMFORMATDETAILSW
  48. #define PACMFORMATDETAILS PACMFORMATDETAILSW
  49. #define LPACMFORMATDETAILS LPACMFORMATDETAILSW
  50. #define MAKE_ACM_VERSION(mjr, mnr, bld) (((long)(mjr)<<24)| \
  51. ((long)(mnr)<<16)| \
  52. ((long)bld))
  53. #define VERSION_MSACM MAKE_ACM_VERSION(3, 50, 0)
  54. #define VERSION_ACM_DRIVER MAKE_ACM_VERSION(4, 0, 0)
  55. #define ACMDM_DRIVER_NOTIFY (ACMDM_BASE + 1)
  56. #define ACMDM_DRIVER_DETAILS (ACMDM_BASE + 10)
  57. #define ACMDM_HARDWARE_WAVE_CAPS_INPUT (ACMDM_BASE + 20)
  58. #define ACMDM_HARDWARE_WAVE_CAPS_OUTPUT (ACMDM_BASE + 21)
  59. #define ACMDM_FORMATTAG_DETAILS (ACMDM_BASE + 25)
  60. #define ACMDM_FORMAT_DETAILS (ACMDM_BASE + 26)
  61. #define ACMDM_FORMAT_SUGGEST (ACMDM_BASE + 27)
  62. #define ACMDM_FILTERTAG_DETAILS (ACMDM_BASE + 50)
  63. #define ACMDM_FILTER_DETAILS (ACMDM_BASE + 51)
  64. #define ACMDM_STREAM_OPEN (ACMDM_BASE + 76)
  65. #define ACMDM_STREAM_CLOSE (ACMDM_BASE + 77)
  66. #define ACMDM_STREAM_SIZE (ACMDM_BASE + 78)
  67. #define ACMDM_STREAM_CONVERT (ACMDM_BASE + 79)
  68. #define ACMDM_STREAM_RESET (ACMDM_BASE + 80)
  69. #define ACMDM_STREAM_PREPARE (ACMDM_BASE + 81)
  70. #define ACMDM_STREAM_UNPREPARE (ACMDM_BASE + 82)
  71. typedef struct tACMDRVFORMATSUGGEST
  72. {
  73. DWORD cbStruct; // sizeof(ACMDRVFORMATSUGGEST)
  74. DWORD fdwSuggest; // Suggest flags
  75. LPWAVEFORMATEX pwfxSrc; // Source Format
  76. DWORD cbwfxSrc; // Source Size
  77. LPWAVEFORMATEX pwfxDst; // Dest format
  78. DWORD cbwfxDst; // Dest Size
  79. } ACMDRVFORMATSUGGEST, *PACMDRVFORMATSUGGEST, FAR *LPACMDRVFORMATSUGGEST;
  80. typedef struct tACMDRVOPENDESC
  81. {
  82. DWORD cbStruct; // sizeof(ACMDRVOPENDESC)
  83. FOURCC fccType; // 'audc'
  84. FOURCC fccComp; // sub-type (not used--must be 0)
  85. DWORD dwVersion; // current version of ACM opening you
  86. DWORD dwFlags; //
  87. DWORD dwError; // result from DRV_OPEN request
  88. LPCWSTR pszSectionName; // see DRVCONFIGINFO.lpszDCISectionName
  89. LPCWSTR pszAliasName; // see DRVCONFIGINFO.lpszDCIAliasName
  90. DWORD dnDevNode; // devnode id for pnp drivers.
  91. } ACMDRVOPENDESC, *PACMDRVOPENDESC, FAR *LPACMDRVOPENDESC;
  92. typedef struct tACMDRVSTREAMINSTANCE
  93. {
  94. DWORD cbStruct;
  95. LPWAVEFORMATEX pwfxSrc;
  96. LPWAVEFORMATEX pwfxDst;
  97. LPWAVEFILTER pwfltr;
  98. DWORD_PTR dwCallback;
  99. DWORD_PTR dwInstance;
  100. DWORD fdwOpen;
  101. DWORD fdwDriver;
  102. DWORD_PTR dwDriver;
  103. HACMSTREAM has;
  104. } ACMDRVSTREAMINSTANCE, *PACMDRVSTREAMINSTANCE, FAR *LPACMDRVSTREAMINSTANCE;
  105. typedef struct tACMDRVSTREAMSIZE
  106. {
  107. DWORD cbStruct;
  108. DWORD fdwSize;
  109. DWORD cbSrcLength;
  110. DWORD cbDstLength;
  111. } ACMDRVSTREAMSIZE, *PACMDRVSTREAMSIZE, FAR *LPACMDRVSTREAMSIZE;
  112. typedef struct tACMDRVSTREAMHEADER FAR *LPACMDRVSTREAMHEADER;
  113. typedef struct tACMDRVSTREAMHEADER
  114. {
  115. DWORD cbStruct;
  116. DWORD fdwStatus;
  117. DWORD_PTR dwUser;
  118. LPBYTE pbSrc;
  119. DWORD cbSrcLength;
  120. DWORD cbSrcLengthUsed;
  121. DWORD_PTR dwSrcUser;
  122. LPBYTE pbDst;
  123. DWORD cbDstLength;
  124. DWORD cbDstLengthUsed;
  125. DWORD_PTR dwDstUser;
  126. DWORD fdwConvert; // flags passed from convert func
  127. LPACMDRVSTREAMHEADER padshNext; // for async driver queueing
  128. DWORD fdwDriver; // driver instance flags
  129. DWORD_PTR dwDriver; // driver instance data
  130. //
  131. // all remaining fields are used by the ACM for bookkeeping purposes.
  132. // an ACM driver should never use these fields (though than can be
  133. // helpful for debugging)--note that the meaning of these fields
  134. // may change, so do NOT rely on them in shipping code.
  135. //
  136. DWORD fdwPrepared;
  137. DWORD_PTR dwPrepared;
  138. LPBYTE pbPreparedSrc;
  139. DWORD cbPreparedSrcLength;
  140. LPBYTE pbPreparedDst;
  141. DWORD cbPreparedDstLength;
  142. } ACMDRVSTREAMHEADER, *PACMDRVSTREAMHEADER;
  143. #endif