168
|
1 /*
|
|
2
|
|
3 Definition of important DirectShow interfaces.
|
|
4 Created using freely-available DirectX 8.0 SDK
|
|
5 ( http://msdn.microsoft.com )
|
|
6
|
|
7 */
|
|
8 #ifndef INTERFACES_H
|
|
9 #define INTERFACES_H
|
|
10
|
|
11 #include "guids.h"
|
|
12 #include "default.h"
|
|
13 #include <com.h>
|
|
14 #ifndef STDCALL
|
|
15 #define STDCALL __attribute__((__stdcall__))
|
|
16 #endif
|
|
17
|
|
18 typedef GUID& REFIID;
|
|
19 typedef GUID CLSID;
|
|
20 typedef GUID IID;
|
|
21
|
|
22 /* Sh*t. MSVC++ and g++ use different methods of storing vtables. */
|
|
23
|
|
24 struct IBaseFilter;
|
|
25 struct IReferenceClock;
|
|
26 struct IEnumPins;
|
|
27 struct IEnumMediaTypes;
|
|
28 struct IPin;
|
|
29 struct IFilterGraph;
|
|
30 struct IMemInputPin;
|
|
31 struct IMemAllocator;
|
|
32 struct IMediaSample;
|
|
33
|
|
34 enum PIN_DIRECTION;
|
|
35
|
|
36 class IClassFactory2
|
|
37 {
|
|
38 public:
|
|
39 virtual long STDCALL QueryInterface(GUID* iid, void** ppv) =0;
|
|
40 virtual long STDCALL AddRef() =0;
|
|
41 virtual long STDCALL Release() =0;
|
|
42 virtual long STDCALL CreateInstance(IUnknown* pUnkOuter, GUID* riid, void** ppvObject) =0;
|
|
43 };
|
|
44
|
|
45 struct IBaseFilter_vt: IUnknown_vt
|
|
46 {
|
|
47 HRESULT STDCALL ( *GetClassID )(
|
|
48 IBaseFilter * This,
|
|
49 /* [out] */ CLSID *pClassID);
|
|
50
|
|
51 HRESULT STDCALL ( *Stop )(
|
|
52 IBaseFilter * This);
|
|
53
|
|
54 HRESULT STDCALL ( *Pause )(
|
|
55 IBaseFilter * This);
|
|
56
|
|
57 HRESULT STDCALL ( *Run )(
|
|
58 IBaseFilter * This,
|
|
59 REFERENCE_TIME tStart);
|
|
60
|
|
61 HRESULT STDCALL ( *GetState )(
|
|
62 IBaseFilter * This,
|
|
63 /* [in] */ unsigned long dwMilliSecsTimeout,
|
|
64 // /* [out] */ FILTER_STATE *State);
|
|
65 void* State);
|
|
66
|
|
67 HRESULT STDCALL ( *SetSyncSource )(
|
|
68 IBaseFilter * This,
|
|
69 /* [in] */ IReferenceClock *pClock);
|
|
70
|
|
71 HRESULT STDCALL ( *GetSyncSource )(
|
|
72 IBaseFilter * This,
|
|
73 /* [out] */ IReferenceClock **pClock);
|
|
74
|
|
75 HRESULT STDCALL ( *EnumPins )(
|
|
76 IBaseFilter * This,
|
|
77 /* [out] */ IEnumPins **ppEnum);
|
|
78
|
|
79 HRESULT STDCALL ( *FindPin )(
|
|
80 IBaseFilter * This,
|
|
81 /* [string][in] */ const unsigned short* Id,
|
|
82 /* [out] */ IPin **ppPin);
|
|
83
|
|
84 HRESULT STDCALL ( *QueryFilterInfo )(
|
|
85 IBaseFilter * This,
|
|
86 // /* [out] */ FILTER_INFO *pInfo);
|
|
87 void* pInfo);
|
|
88
|
|
89 HRESULT STDCALL ( *JoinFilterGraph )(
|
|
90 IBaseFilter * This,
|
|
91 /* [in] */ IFilterGraph *pGraph,
|
|
92 /* [string][in] */ const unsigned short* pName);
|
|
93
|
|
94 HRESULT STDCALL ( *QueryVendorInfo )(
|
|
95 IBaseFilter * This,
|
|
96 /* [string][out] */ unsigned short* *pVendorInfo);
|
|
97
|
|
98 };
|
|
99
|
|
100 struct IBaseFilter
|
|
101 {
|
|
102 struct IBaseFilter_vt *vt;
|
|
103 };
|
|
104
|
|
105 struct IEnumPins_vt: IUnknown_vt
|
|
106 {
|
|
107 HRESULT STDCALL ( *Next )(
|
|
108 IEnumPins * This,
|
|
109 /* [in] */ unsigned long cPins,
|
|
110 /* [size_is][out] */ IPin **ppPins,
|
|
111 /* [out] */ unsigned long *pcFetched);
|
|
112
|
|
113 HRESULT STDCALL ( *Skip )(
|
|
114 IEnumPins * This,
|
|
115 /* [in] */ unsigned long cPins);
|
|
116
|
|
117 HRESULT STDCALL ( *Reset )(
|
|
118 IEnumPins * This);
|
|
119
|
|
120 HRESULT STDCALL ( *Clone )(
|
|
121 IEnumPins * This,
|
|
122 /* [out] */ IEnumPins **ppEnum);
|
|
123
|
|
124 };
|
|
125
|
|
126 struct IEnumPins
|
|
127 {
|
|
128 struct IEnumPins_vt *vt;
|
|
129 };
|
|
130
|
|
131
|
|
132 struct IPin_vt: IUnknown_vt
|
|
133 {
|
|
134 HRESULT STDCALL ( *Connect )(
|
|
135 IPin * This,
|
|
136 /* [in] */ IPin *pReceivePin,
|
|
137 /* [in] */ /*const*/ AM_MEDIA_TYPE *pmt);
|
|
138
|
|
139 HRESULT STDCALL ( *ReceiveConnection )(
|
|
140 IPin * This,
|
|
141 /* [in] */ IPin *pConnector,
|
|
142 /* [in] */ const AM_MEDIA_TYPE *pmt);
|
|
143
|
|
144 HRESULT STDCALL ( *Disconnect )(
|
|
145 IPin * This);
|
|
146
|
|
147 HRESULT STDCALL ( *ConnectedTo )(
|
|
148 IPin * This,
|
|
149 /* [out] */ IPin **pPin);
|
|
150
|
|
151 HRESULT STDCALL ( *ConnectionMediaType )(
|
|
152 IPin * This,
|
|
153 /* [out] */ AM_MEDIA_TYPE *pmt);
|
|
154
|
|
155 HRESULT STDCALL ( *QueryPinInfo )(
|
|
156 IPin * This,
|
|
157 /* [out] */ PIN_INFO *pInfo);
|
|
158
|
|
159 HRESULT STDCALL ( *QueryDirection )(
|
|
160 IPin * This,
|
|
161 /* [out] */ PIN_DIRECTION *pPinDir);
|
|
162
|
|
163 HRESULT STDCALL ( *QueryId )(
|
|
164 IPin * This,
|
|
165 /* [out] */ unsigned short* *Id);
|
|
166
|
|
167 HRESULT STDCALL ( *QueryAccept )(
|
|
168 IPin * This,
|
|
169 /* [in] */ const AM_MEDIA_TYPE *pmt);
|
|
170
|
|
171 HRESULT STDCALL ( *EnumMediaTypes )(
|
|
172 IPin * This,
|
|
173 /* [out] */ IEnumMediaTypes **ppEnum);
|
|
174
|
|
175 HRESULT STDCALL ( *QueryInternalConnections )(
|
|
176 IPin * This,
|
|
177 /* [out] */ IPin **apPin,
|
|
178 /* [out][in] */ unsigned long *nPin);
|
|
179
|
|
180 HRESULT STDCALL ( *EndOfStream )(
|
|
181 IPin * This);
|
|
182
|
|
183 HRESULT STDCALL ( *BeginFlush )(
|
|
184 IPin * This);
|
|
185
|
|
186 HRESULT STDCALL ( *EndFlush )(
|
|
187 IPin * This);
|
|
188
|
|
189 HRESULT STDCALL ( *NewSegment )(
|
|
190 IPin * This,
|
|
191 /* [in] */ REFERENCE_TIME tStart,
|
|
192 /* [in] */ REFERENCE_TIME tStop,
|
|
193 /* [in] */ double dRate);
|
|
194
|
|
195 };
|
|
196
|
|
197 struct IPin
|
|
198 {
|
|
199 IPin_vt *vt;
|
|
200 };
|
|
201
|
|
202 struct IEnumMediaTypes_vt: IUnknown_vt
|
|
203 {
|
|
204 HRESULT STDCALL ( *Next )(
|
|
205 IEnumMediaTypes * This,
|
|
206 /* [in] */ unsigned long cMediaTypes,
|
|
207 /* [size_is][out] */ AM_MEDIA_TYPE **ppMediaTypes,
|
|
208 /* [out] */ unsigned long *pcFetched);
|
|
209
|
|
210 HRESULT STDCALL ( *Skip )(
|
|
211 IEnumMediaTypes * This,
|
|
212 /* [in] */ unsigned long cMediaTypes);
|
|
213
|
|
214 HRESULT STDCALL ( *Reset )(
|
|
215 IEnumMediaTypes * This);
|
|
216
|
|
217 HRESULT STDCALL ( *Clone )(
|
|
218 IEnumMediaTypes * This,
|
|
219 /* [out] */ IEnumMediaTypes **ppEnum);
|
|
220 };
|
|
221
|
|
222 struct IEnumMediaTypes
|
|
223 {
|
|
224 IEnumMediaTypes_vt *vt;
|
|
225 };
|
|
226
|
|
227
|
|
228 struct IMemInputPin_vt: IUnknown_vt
|
|
229 {
|
|
230 HRESULT STDCALL ( *GetAllocator )(
|
|
231 IMemInputPin * This,
|
|
232 /* [out] */ IMemAllocator **ppAllocator);
|
|
233
|
|
234 HRESULT STDCALL ( *NotifyAllocator )(
|
|
235 IMemInputPin * This,
|
|
236 /* [in] */ IMemAllocator *pAllocator,
|
|
237 /* [in] */ int bReadOnly);
|
|
238
|
|
239 HRESULT STDCALL ( *GetAllocatorRequirements )(
|
|
240 IMemInputPin * This,
|
|
241 /* [out] */ ALLOCATOR_PROPERTIES *pProps);
|
|
242
|
|
243 HRESULT STDCALL ( *Receive )(
|
|
244 IMemInputPin * This,
|
|
245 /* [in] */ IMediaSample *pSample);
|
|
246
|
|
247 HRESULT STDCALL ( *ReceiveMultiple )(
|
|
248 IMemInputPin * This,
|
|
249 /* [size_is][in] */ IMediaSample **pSamples,
|
|
250 /* [in] */ long nSamples,
|
|
251 /* [out] */ long *nSamplesProcessed);
|
|
252
|
|
253 HRESULT STDCALL ( *ReceiveCanBlock )(
|
|
254 IMemInputPin * This);
|
|
255 };
|
|
256
|
|
257 struct IMemInputPin
|
|
258 {
|
|
259 IMemInputPin_vt *vt;
|
|
260 };
|
|
261
|
|
262
|
|
263
|
|
264 struct IMemAllocator_vt: IUnknown_vt
|
|
265 {
|
|
266 HRESULT STDCALL ( *SetProperties )(
|
|
267 IMemAllocator * This,
|
|
268 /* [in] */ ALLOCATOR_PROPERTIES *pRequest,
|
|
269 /* [out] */ ALLOCATOR_PROPERTIES *pActual);
|
|
270
|
|
271 HRESULT STDCALL ( *GetProperties )(
|
|
272 IMemAllocator * This,
|
|
273 /* [out] */ ALLOCATOR_PROPERTIES *pProps);
|
|
274
|
|
275 HRESULT STDCALL ( *Commit )(
|
|
276 IMemAllocator * This);
|
|
277
|
|
278 HRESULT STDCALL ( *Decommit )(
|
|
279 IMemAllocator * This);
|
|
280
|
|
281 HRESULT STDCALL ( *GetBuffer )(
|
|
282 IMemAllocator * This,
|
|
283 /* [out] */ IMediaSample **ppBuffer,
|
|
284 /* [in] */ REFERENCE_TIME *pStartTime,
|
|
285 /* [in] */ REFERENCE_TIME *pEndTime,
|
|
286 /* [in] */ unsigned long dwFlags);
|
|
287
|
|
288 HRESULT STDCALL ( *ReleaseBuffer )(
|
|
289 IMemAllocator * This,
|
|
290 /* [in] */ IMediaSample *pBuffer);
|
|
291 };
|
|
292
|
|
293 struct IMemAllocator
|
|
294 {
|
|
295 IMemAllocator_vt *vt;
|
|
296 };
|
|
297
|
|
298 struct IMediaSample_vt: IUnknown_vt
|
|
299 {
|
|
300 HRESULT STDCALL ( *GetPointer )(
|
|
301 IMediaSample * This,
|
|
302 /* [out] */ unsigned char **ppBuffer);
|
|
303
|
|
304 long STDCALL ( *GetSize )(
|
|
305 IMediaSample * This);
|
|
306
|
|
307 HRESULT STDCALL ( *GetTime )(
|
|
308 IMediaSample * This,
|
|
309 /* [out] */ REFERENCE_TIME *pTimeStart,
|
|
310 /* [out] */ REFERENCE_TIME *pTimeEnd);
|
|
311
|
|
312 HRESULT STDCALL ( *SetTime )(
|
|
313 IMediaSample * This,
|
|
314 /* [in] */ REFERENCE_TIME *pTimeStart,
|
|
315 /* [in] */ REFERENCE_TIME *pTimeEnd);
|
|
316
|
|
317 HRESULT STDCALL ( *IsSyncPoint )(
|
|
318 IMediaSample * This);
|
|
319
|
|
320 HRESULT STDCALL ( *SetSyncPoint )(
|
|
321 IMediaSample * This,
|
|
322 long bIsSyncPoint);
|
|
323
|
|
324 HRESULT STDCALL ( *IsPreroll )(
|
|
325 IMediaSample * This);
|
|
326
|
|
327 HRESULT STDCALL ( *SetPreroll )(
|
|
328 IMediaSample * This,
|
|
329 long bIsPreroll);
|
|
330
|
|
331 long STDCALL ( *GetActualDataLength )(
|
|
332 IMediaSample * This);
|
|
333
|
|
334 HRESULT STDCALL ( *SetActualDataLength )(
|
|
335 IMediaSample * This,
|
|
336 long __MIDL_0010);
|
|
337
|
|
338 HRESULT STDCALL ( *GetMediaType )(
|
|
339 IMediaSample * This,
|
|
340 AM_MEDIA_TYPE **ppMediaType);
|
|
341
|
|
342 HRESULT STDCALL ( *SetMediaType )(
|
|
343 IMediaSample * This,
|
|
344 AM_MEDIA_TYPE *pMediaType);
|
|
345
|
|
346 HRESULT STDCALL ( *IsDiscontinuity )(
|
|
347 IMediaSample * This);
|
|
348
|
|
349 HRESULT STDCALL ( *SetDiscontinuity )(
|
|
350 IMediaSample * This,
|
|
351 long bDiscontinuity);
|
|
352
|
|
353 HRESULT STDCALL ( *GetMediaTime )(
|
|
354 IMediaSample * This,
|
|
355 /* [out] */ long long *pTimeStart,
|
|
356 /* [out] */ long long *pTimeEnd);
|
|
357
|
|
358 HRESULT STDCALL ( *SetMediaTime )(
|
|
359 IMediaSample * This,
|
|
360 /* [in] */ long long *pTimeStart,
|
|
361 /* [in] */ long long *pTimeEnd);
|
|
362 };
|
|
363
|
|
364 struct IMediaSample
|
|
365 {
|
|
366 struct IMediaSample_vt *vt;
|
|
367 };
|
|
368
|
|
369 struct IHidden;
|
|
370 struct IHidden_vt: IUnknown_vt
|
|
371 {
|
|
372 HRESULT STDCALL ( *GetSmth )(IHidden * This,
|
|
373 int* pv);
|
|
374 HRESULT STDCALL ( *SetSmth )(IHidden * This,
|
|
375 int v1, int v2);
|
|
376 HRESULT STDCALL ( *GetSmth2 )(IHidden * This,
|
|
377 int* pv);
|
|
378 HRESULT STDCALL ( *SetSmth2 )(IHidden * This,
|
|
379 int v1, int v2);
|
|
380 HRESULT STDCALL ( *GetSmth3 )(IHidden * This,
|
|
381 int* pv);
|
|
382 HRESULT STDCALL ( *SetSmth3 )(IHidden * This,
|
|
383 int v1, int v2);
|
|
384 HRESULT STDCALL ( *GetSmth4 )(IHidden * This,
|
|
385 int* pv);
|
|
386 HRESULT STDCALL ( *SetSmth4 )(IHidden * This,
|
|
387 int v1, int v2);
|
|
388 HRESULT STDCALL ( *GetSmth5 )(IHidden * This,
|
|
389 int* pv);
|
|
390 HRESULT STDCALL ( *SetSmth5 )(IHidden * This,
|
|
391 int v1, int v2);
|
|
392 HRESULT STDCALL ( *GetSmth6 )(IHidden * This,
|
|
393 int* pv);
|
|
394 };
|
|
395
|
|
396 struct IHidden
|
|
397 {
|
|
398 struct IHidden_vt *vt;
|
|
399 };
|
|
400
|
|
401 struct IHidden2;
|
|
402 struct IHidden2_vt: IUnknown_vt
|
|
403 {
|
|
404 HRESULT STDCALL (*unk1) ();
|
|
405 HRESULT STDCALL (*unk2) ();
|
|
406 HRESULT STDCALL (*unk3) ();
|
|
407 HRESULT STDCALL (*DecodeGet) (IHidden2* This, int* region);
|
|
408 HRESULT STDCALL (*unk5) ();
|
|
409 HRESULT STDCALL (*DecodeSet) (IHidden2* This, int* region);
|
|
410 HRESULT STDCALL (*unk7) ();
|
|
411 HRESULT STDCALL (*unk8) ();
|
|
412 };
|
|
413 struct IHidden2
|
|
414 {
|
|
415 struct IHidden2_vt *vt;
|
|
416 };
|
302
|
417 #endif
|