• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
27 #ifndef _MSACMDRV_H_
28 #define _MSACMDRV_H_
29 
30 
31 #include <mmreg.h>
32 #include <msacm.h>
33 
34 #include "pshpack1.h"   /* Assume byte packing throughout */
35 
36 
37 typedef  unsigned long ULONG_PTR, *PULONG_PTR;
38 
39 
40 
41 typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
42 
43 
44 #undef ACMDRIVERDETAILS
45 #undef PACMDRIVERDETAILS
46 #undef LPACMDRIVERDETAILS
47 
48 #define ACMDRIVERDETAILS        ACMDRIVERDETAILSW
49 #define PACMDRIVERDETAILS       PACMDRIVERDETAILSW
50 #define LPACMDRIVERDETAILS      LPACMDRIVERDETAILSW
51 
52 #undef ACMFORMATTAGDETAILS
53 #undef PACMFORMATTAGDETAILS
54 #undef LPACMFORMATTAGDETAILS
55 
56 #define ACMFORMATTAGDETAILS     ACMFORMATTAGDETAILSW
57 #define PACMFORMATTAGDETAILS    PACMFORMATTAGDETAILSW
58 #define LPACMFORMATTAGDETAILS   LPACMFORMATTAGDETAILSW
59 
60 #undef ACMFORMATDETAILS
61 #undef PACMFORMATDETAILS
62 #undef LPACMFORMATDETAILS
63 
64 #define ACMFORMATDETAILS	ACMFORMATDETAILSW
65 #define PACMFORMATDETAILS	PACMFORMATDETAILSW
66 #define LPACMFORMATDETAILS	LPACMFORMATDETAILSW
67 
68 
69 #define MAKE_ACM_VERSION(mjr, mnr, bld) (((long)(mjr)<<24)| \
70                                          ((long)(mnr)<<16)| \
71                                          ((long)bld))
72 
73 #define VERSION_MSACM       MAKE_ACM_VERSION(3, 50, 0)
74 #define VERSION_ACM_DRIVER  MAKE_ACM_VERSION(4,  0, 0)
75 
76 
77 #define ACMDM_DRIVER_NOTIFY             (ACMDM_BASE + 1)
78 #define ACMDM_DRIVER_DETAILS            (ACMDM_BASE + 10)
79 
80 #define ACMDM_HARDWARE_WAVE_CAPS_INPUT  (ACMDM_BASE + 20)
81 #define ACMDM_HARDWARE_WAVE_CAPS_OUTPUT (ACMDM_BASE + 21)
82 
83 #define ACMDM_FORMATTAG_DETAILS         (ACMDM_BASE + 25)
84 #define ACMDM_FORMAT_DETAILS            (ACMDM_BASE + 26)
85 #define ACMDM_FORMAT_SUGGEST            (ACMDM_BASE + 27)
86 
87 #define ACMDM_FILTERTAG_DETAILS         (ACMDM_BASE + 50)
88 #define ACMDM_FILTER_DETAILS            (ACMDM_BASE + 51)
89 
90 #define ACMDM_STREAM_OPEN               (ACMDM_BASE + 76)
91 #define ACMDM_STREAM_CLOSE              (ACMDM_BASE + 77)
92 #define ACMDM_STREAM_SIZE               (ACMDM_BASE + 78)
93 #define ACMDM_STREAM_CONVERT            (ACMDM_BASE + 79)
94 #define ACMDM_STREAM_RESET              (ACMDM_BASE + 80)
95 #define ACMDM_STREAM_PREPARE            (ACMDM_BASE + 81)
96 #define ACMDM_STREAM_UNPREPARE          (ACMDM_BASE + 82)
97 
98 typedef struct tACMDRVFORMATSUGGEST
99 {
100     DWORD               cbStruct;           // sizeof(ACMDRVFORMATSUGGEST)
101     DWORD               fdwSuggest;         // Suggest flags
102     LPWAVEFORMATEX      pwfxSrc;            // Source Format
103     DWORD               cbwfxSrc;           // Source Size
104     LPWAVEFORMATEX      pwfxDst;            // Dest format
105     DWORD               cbwfxDst;           // Dest Size
106 
107 } ACMDRVFORMATSUGGEST, *PACMDRVFORMATSUGGEST, FAR *LPACMDRVFORMATSUGGEST;
108 
109 
110 
111 
112 typedef struct tACMDRVOPENDESC
113 {
114     DWORD           cbStruct;       // sizeof(ACMDRVOPENDESC)
115     FOURCC          fccType;        // 'audc'
116     FOURCC          fccComp;        // sub-type (not used--must be 0)
117     DWORD           dwVersion;      // current version of ACM opening you
118     DWORD           dwFlags;        //
119     DWORD           dwError;        // result from DRV_OPEN request
120     LPCWSTR         pszSectionName; // see DRVCONFIGINFO.lpszDCISectionName
121     LPCWSTR         pszAliasName;   // see DRVCONFIGINFO.lpszDCIAliasName
122     DWORD           dnDevNode;	    // devnode id for pnp drivers.
123 
124 } ACMDRVOPENDESC, *PACMDRVOPENDESC, FAR *LPACMDRVOPENDESC;
125 
126 
127 typedef struct tACMDRVSTREAMINSTANCE
128 {
129     DWORD               cbStruct;
130     LPWAVEFORMATEX      pwfxSrc;
131     LPWAVEFORMATEX      pwfxDst;
132     LPWAVEFILTER        pwfltr;
133     DWORD_PTR           dwCallback;
134     DWORD_PTR           dwInstance;
135     DWORD               fdwOpen;
136     DWORD               fdwDriver;
137     DWORD_PTR           dwDriver;
138     HACMSTREAM          has;
139 
140 } ACMDRVSTREAMINSTANCE, *PACMDRVSTREAMINSTANCE, FAR *LPACMDRVSTREAMINSTANCE;
141 
142 typedef struct tACMDRVSTREAMSIZE
143 {
144     DWORD               cbStruct;
145     DWORD               fdwSize;
146     DWORD               cbSrcLength;
147     DWORD               cbDstLength;
148 
149 } ACMDRVSTREAMSIZE, *PACMDRVSTREAMSIZE, FAR *LPACMDRVSTREAMSIZE;
150 
151 typedef struct tACMDRVSTREAMHEADER FAR *LPACMDRVSTREAMHEADER;
152 typedef struct tACMDRVSTREAMHEADER
153 {
154     DWORD                   cbStruct;
155     DWORD                   fdwStatus;
156     DWORD_PTR               dwUser;
157     LPBYTE                  pbSrc;
158     DWORD                   cbSrcLength;
159     DWORD                   cbSrcLengthUsed;
160     DWORD_PTR               dwSrcUser;
161     LPBYTE                  pbDst;
162     DWORD                   cbDstLength;
163     DWORD                   cbDstLengthUsed;
164     DWORD_PTR               dwDstUser;
165 
166     DWORD                   fdwConvert;     // flags passed from convert func
167     LPACMDRVSTREAMHEADER    padshNext;      // for async driver queueing
168     DWORD                   fdwDriver;      // driver instance flags
169     DWORD_PTR               dwDriver;       // driver instance data
170 
171     //
172     //  all remaining fields are used by the ACM for bookkeeping purposes.
173     //  an ACM driver should never use these fields (though than can be
174     //  helpful for debugging)--note that the meaning of these fields
175     //  may change, so do NOT rely on them in shipping code.
176     //
177     DWORD                   fdwPrepared;
178     DWORD_PTR               dwPrepared;
179     LPBYTE                  pbPreparedSrc;
180     DWORD                   cbPreparedSrcLength;
181     LPBYTE                  pbPreparedDst;
182     DWORD                   cbPreparedDstLength;
183 
184 } ACMDRVSTREAMHEADER, *PACMDRVSTREAMHEADER;
185 
186 #include "poppack.h"    /* Revert to default packing */
187 
188 #endif
189