Debian Codegraph @

dshow/iaudioprops.h

raw
1 /*
2 * LAME MP3 encoder for DirectShow
3 * Interface definition
4 *
5 * Copyright (c) 2000-2005 Marie Orlova, Peter Gubanov, Vitaly Ivanov, Elecard Ltd.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23 // A custom interface to allow the user to modify audio
24 // encoder properties
25 #ifndef __IAUDIOPROPERTIES__
26 #define __IAUDIOPROPERTIES__
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 // {ca7e9ef0-1cbe-11d3-8d29-00a0c94bbfee}
31 DEFINE_GUID(IID_IAudioEncoderProperties,
32 0xca7e9ef0, 0x1cbe, 0x11d3, 0x8d, 0x29, 0x00, 0xa0, 0xc9, 0x4b, 0xbf, 0xee);
33 //
34 // Configuring MPEG audio encoder parameters with unspecified
35 // input stream type may lead to misbehaviour and confusing
36 // results. In most cases the specified parameters will be
37 // overridden by defaults for the input media type.
38 // To archive proper results use this interface on the
39 // audio encoder filter with input pin connected to the valid
40 // source.
41 //
42 DECLARE_INTERFACE_(IAudioEncoderProperties, IUnknown)
43 {
44 // Is PES output enabled? Return TRUE or FALSE
45 STDMETHOD(get_PESOutputEnabled) (THIS_
46 DWORD *dwEnabled
47 ) PURE;
48 // Enable/disable PES output
49 STDMETHOD(set_PESOutputEnabled) (THIS_
50 DWORD dwEnabled
51 ) PURE;
52 // Get target compression bitrate in Kbits/s
53 STDMETHOD(get_Bitrate) (THIS_
54 DWORD *dwBitrate
55 ) PURE;
56 // Set target compression bitrate in Kbits/s
57 // Not all numbers available! See spec for details!
58 STDMETHOD(set_Bitrate) (THIS_
59 DWORD dwBitrate
60 ) PURE;
61 // Get variable bitrate flag
62 STDMETHOD(get_Variable) (THIS_
63 DWORD *dwVariable
64 ) PURE;
65 // Set variable bitrate flag
66 STDMETHOD(set_Variable) (THIS_
67 DWORD dwVariable
68 ) PURE;
69 // Get variable bitrate in Kbits/s
70 STDMETHOD(get_VariableMin) (THIS_
71 DWORD *dwmin
72 ) PURE;
73 // Set variable bitrate in Kbits/s
74 // Not all numbers available! See spec for details!
75 STDMETHOD(set_VariableMin) (THIS_
76 DWORD dwmin
77 ) PURE;
78 // Get variable bitrate in Kbits/s
79 STDMETHOD(get_VariableMax) (THIS_
80 DWORD *dwmax
81 ) PURE;
82 // Set variable bitrate in Kbits/s
83 // Not all numbers available! See spec for details!
84 STDMETHOD(set_VariableMax) (THIS_
85 DWORD dwmax
86 ) PURE;
87 // Get compression quality
88 STDMETHOD(get_Quality) (THIS_
89 DWORD *dwQuality
90 ) PURE;
91 // Set compression quality
92 // Not all numbers available! See spec for details!
93 STDMETHOD(set_Quality) (THIS_
94 DWORD dwQuality
95 ) PURE;
96 // Get VBR quality
97 STDMETHOD(get_VariableQ) (THIS_
98 DWORD *dwVBRq
99 ) PURE;
100 // Set VBR quality
101 // Not all numbers available! See spec for details!
102 STDMETHOD(set_VariableQ) (THIS_
103 DWORD dwVBRq
104 ) PURE;
105 // Get source sample rate. Return E_FAIL if input pin
106 // in not connected.
107 STDMETHOD(get_SourceSampleRate) (THIS_
108 DWORD *dwSampleRate
109 ) PURE;
110 // Get source number of channels. Return E_FAIL if
111 // input pin is not connected.
112 STDMETHOD(get_SourceChannels) (THIS_
113 DWORD *dwChannels
114 ) PURE;
115 // Get sample rate for compressed audio bitstream
116 STDMETHOD(get_SampleRate) (THIS_
117 DWORD *dwSampleRate
118 ) PURE;
119 // Set sample rate. See genaudio spec for details
120 STDMETHOD(set_SampleRate) (THIS_
121 DWORD dwSampleRate
122 ) PURE;
123 // Get channel mode. See genaudio.h for details
124 STDMETHOD(get_ChannelMode) (THIS_
125 DWORD *dwChannelMode
126 ) PURE;
127 // Set channel mode
128 STDMETHOD(set_ChannelMode) (THIS_
129 DWORD dwChannelMode
130 ) PURE;
131 // Is CRC enabled?
132 STDMETHOD(get_CRCFlag) (THIS_
133 DWORD *dwFlag
134 ) PURE;
135 // Enable/disable CRC
136 STDMETHOD(set_CRCFlag) (THIS_
137 DWORD dwFlag
138 ) PURE;
139 // Force mono
140 STDMETHOD(get_ForceMono) (THIS_
141 DWORD *dwFlag
142 ) PURE;
143 // Force mono
144 STDMETHOD(set_ForceMono) (THIS_
145 DWORD dwFlag
146 ) PURE;
147 // Set duration
148 STDMETHOD(get_SetDuration) (THIS_
149 DWORD *dwFlag
150 ) PURE;
151 // Set duration
152 STDMETHOD(set_SetDuration) (THIS_
153 DWORD dwFlag
154 ) PURE;
155 // Control 'original' flag
156 STDMETHOD(get_OriginalFlag) (THIS_
157 DWORD *dwFlag
158 ) PURE;
159 STDMETHOD(set_OriginalFlag) (THIS_
160 DWORD dwFlag
161 ) PURE;
162 // Control 'copyright' flag
163 STDMETHOD(get_CopyrightFlag) (THIS_
164 DWORD *dwFlag
165 ) PURE;
166 STDMETHOD(set_CopyrightFlag) (THIS_
167 DWORD dwFlag
168 ) PURE;
169 // Control 'Enforce VBR Minimum bitrate' flag
170 STDMETHOD(get_EnforceVBRmin) (THIS_
171 DWORD *dwFlag
172 ) PURE;
173 STDMETHOD(set_EnforceVBRmin) (THIS_
174 DWORD dwFlag
175 ) PURE;
176 // Control 'Voice' flag
177 STDMETHOD(get_VoiceMode) (THIS_
178 DWORD *dwFlag
179 ) PURE;
180 STDMETHOD(set_VoiceMode) (THIS_
181 DWORD dwFlag
182 ) PURE;
183 // Control 'Keep All Frequencies' flag
184 STDMETHOD(get_KeepAllFreq) (THIS_
185 DWORD *dwFlag
186 ) PURE;
187 STDMETHOD(set_KeepAllFreq) (THIS_
188 DWORD dwFlag
189 ) PURE;
190 // Control 'Strict ISO complience' flag
191 STDMETHOD(get_StrictISO) (THIS_
192 DWORD *dwFlag
193 ) PURE;
194 STDMETHOD(set_StrictISO) (THIS_
195 DWORD dwFlag
196 ) PURE;
197 // Control 'Disable short block' flag
198 STDMETHOD(get_NoShortBlock) (THIS_
199 DWORD *dwDisable
200 ) PURE;
201 STDMETHOD(set_NoShortBlock) (THIS_
202 DWORD dwDisable
203 ) PURE;
204 // Control 'Xing VBR Tag' flag
205 STDMETHOD(get_XingTag) (THIS_
206 DWORD *dwXingTag
207 ) PURE;
208 STDMETHOD(set_XingTag) (THIS_
209 DWORD dwXingTag
210 ) PURE;
211 // Control 'Forced mid/ side stereo' flag
212 STDMETHOD(get_ForceMS) (THIS_
213 DWORD *dwFlag
214 ) PURE;
215 STDMETHOD(set_ForceMS) (THIS_
216 DWORD dwFlag
217 ) PURE;
218 // Control 'ModeFixed' flag
219 STDMETHOD(get_ModeFixed) (THIS_
220 DWORD *dwFlag
221 ) PURE;
222 STDMETHOD(set_ModeFixed) (THIS_
223 DWORD dwFlag
224 ) PURE;
225
226 //Receive the block of encoder
227 //configuration parametres
228 STDMETHOD(get_ParameterBlockSize) (THIS_
229 BYTE *pcBlock, DWORD *pdwSize
230 ) PURE;
231 // Set encoder configuration parametres
232 STDMETHOD(set_ParameterBlockSize) (THIS_
233 BYTE *pcBlock, DWORD dwSize
234 ) PURE;
235 // Set default audio encoder parameters depending
236 // on current input stream type
237 STDMETHOD(DefaultAudioEncoderProperties) (THIS_
238 ) PURE;
239 // By default the modified properties are not saved to
240 // the registry immediately, so the filter needs to be
241 // forced to do this. Omitting this step may lead to
242 // misbehavior and confusing results.
243 STDMETHOD(LoadAudioEncoderPropertiesFromRegistry) (THIS_
244 ) PURE;
245 STDMETHOD(SaveAudioEncoderPropertiesToRegistry) (THIS_
246 ) PURE;
247 // Determine whether the filter can be configured. If this
248 // function returns E_FAIL then input format hasn't been
249 // specified and filter behavior is unpredictable. If S_OK,
250 // the filter could be configured with correct values.
251 STDMETHOD(InputTypeDefined) (THIS_
252 ) PURE;
253 // Reconnects output pin (crucial for Fraunhofer MPEG Layer-3 Decoder)
254 STDMETHOD(ApplyChanges) (THIS_
255 ) PURE;
256
257 // Allow output sample overlap in terms of DirectShow
258 // timestamps (i.e. when sample's start time is less
259 // than previous sample's end time). Avi Mux doesn't like this
260 STDMETHOD(set_SampleOverlap) (THIS_
261 DWORD dwFlag
262 ) PURE;
263 STDMETHOD(get_SampleOverlap) (THIS_
264 DWORD *dwFlag
265 ) PURE;
266 };
267 #ifdef __cplusplus
268 }
269 #endif
270 #endif // __IAUDIOPROPERTIES__
271
272
273