1545
|
1 #ifndef DS_INTERFACES_H
|
|
2 #define DS_INTERFACES_H
|
|
3
|
168
|
4 /*
|
|
5
|
1545
|
6 Definition of important DirectShow interfaces.
|
|
7 Created using freely-available DirectX 8.0 SDK
|
|
8 ( http://msdn.microsoft.com )
|
168
|
9
|
|
10 */
|
|
11
|
3056
|
12 #include "iunk.h"
|
2069
|
13 #include "com.h"
|
1545
|
14
|
3056
|
15 //typedef GUID& REFIID;
|
168
|
16 typedef GUID CLSID;
|
|
17 typedef GUID IID;
|
|
18
|
|
19 /* Sh*t. MSVC++ and g++ use different methods of storing vtables. */
|
|
20
|
3056
|
21 typedef struct _IReferenceClock IReferenceClock;
|
|
22 typedef struct _IFilterGraph IFilterGraph;
|
168
|
23
|
|
24 enum PIN_DIRECTION;
|
|
25
|
3056
|
26 typedef struct _IEnumMediaTypes IEnumMediaTypes;
|
|
27 typedef struct IEnumMediaTypes_vt
|
168
|
28 {
|
3056
|
29 INHERIT_IUNKNOWN();
|
168
|
30
|
3056
|
31 HRESULT STDCALL ( *Next )(IEnumMediaTypes* This,
|
|
32 /* [in] */ unsigned long cMediaTypes,
|
|
33 /* [size_is][out] */ AM_MEDIA_TYPE** ppMediaTypes,
|
|
34 /* [out] */ unsigned long* pcFetched);
|
|
35 HRESULT STDCALL ( *Skip )(IEnumMediaTypes* This,
|
|
36 /* [in] */ unsigned long cMediaTypes);
|
|
37 HRESULT STDCALL ( *Reset )(IEnumMediaTypes* This);
|
|
38 HRESULT STDCALL ( *Clone )(IEnumMediaTypes* This,
|
|
39 /* [out] */ IEnumMediaTypes** ppEnum);
|
|
40 } IEnumMediaTypes_vt;
|
|
41 struct _IEnumMediaTypes { IEnumMediaTypes_vt* vt; };
|
168
|
42
|
1545
|
43
|
3056
|
44
|
|
45 typedef struct _IPin IPin;
|
|
46 typedef struct IPin_vt
|
168
|
47 {
|
3056
|
48 INHERIT_IUNKNOWN();
|
168
|
49
|
1545
|
50 HRESULT STDCALL ( *Connect )(IPin * This,
|
|
51 /* [in] */ IPin *pReceivePin,
|
|
52 /* [in] */ /*const*/ AM_MEDIA_TYPE *pmt);
|
|
53 HRESULT STDCALL ( *ReceiveConnection )(IPin * This,
|
|
54 /* [in] */ IPin *pConnector,
|
|
55 /* [in] */ const AM_MEDIA_TYPE *pmt);
|
|
56 HRESULT STDCALL ( *Disconnect )(IPin * This);
|
|
57 HRESULT STDCALL ( *ConnectedTo )(IPin * This, /* [out] */ IPin **pPin);
|
|
58 HRESULT STDCALL ( *ConnectionMediaType )(IPin * This,
|
|
59 /* [out] */ AM_MEDIA_TYPE *pmt);
|
|
60 HRESULT STDCALL ( *QueryPinInfo )(IPin * This, /* [out] */ PIN_INFO *pInfo);
|
|
61 HRESULT STDCALL ( *QueryDirection )(IPin * This,
|
|
62 /* [out] */ PIN_DIRECTION *pPinDir);
|
|
63 HRESULT STDCALL ( *QueryId )(IPin * This, /* [out] */ unsigned short* *Id);
|
|
64 HRESULT STDCALL ( *QueryAccept )(IPin * This,
|
|
65 /* [in] */ const AM_MEDIA_TYPE *pmt);
|
|
66 HRESULT STDCALL ( *EnumMediaTypes )(IPin * This,
|
|
67 /* [out] */ IEnumMediaTypes **ppEnum);
|
|
68 HRESULT STDCALL ( *QueryInternalConnections )(IPin * This,
|
|
69 /* [out] */ IPin **apPin,
|
|
70 /* [out][in] */ unsigned long *nPin);
|
|
71 HRESULT STDCALL ( *EndOfStream )(IPin * This);
|
|
72 HRESULT STDCALL ( *BeginFlush )(IPin * This);
|
|
73 HRESULT STDCALL ( *EndFlush )(IPin * This);
|
|
74 HRESULT STDCALL ( *NewSegment )(IPin * This,
|
|
75 /* [in] */ REFERENCE_TIME tStart,
|
|
76 /* [in] */ REFERENCE_TIME tStop,
|
|
77 /* [in] */ double dRate);
|
3056
|
78 } IPin_vt;
|
|
79 struct _IPin { IPin_vt *vt; };
|
|
80
|
|
81
|
|
82 typedef struct _IEnumPins IEnumPins;
|
|
83 typedef struct IEnumPins_vt
|
|
84 {
|
|
85 INHERIT_IUNKNOWN();
|
|
86
|
3467
|
87 // retrieves a specified number of pins in the enumeration sequence..
|
3056
|
88 HRESULT STDCALL ( *Next )(IEnumPins* This,
|
|
89 /* [in] */ unsigned long cPins,
|
|
90 /* [size_is][out] */ IPin** ppPins,
|
|
91 /* [out] */ unsigned long* pcFetched);
|
3467
|
92 // skips over a specified number of pins.
|
3056
|
93 HRESULT STDCALL ( *Skip )(IEnumPins* This,
|
|
94 /* [in] */ unsigned long cPins);
|
3467
|
95 // resets the enumeration sequence to the beginning.
|
3056
|
96 HRESULT STDCALL ( *Reset )(IEnumPins* This);
|
3467
|
97 // makes a copy of the enumerator with the same enumeration state.
|
3056
|
98 HRESULT STDCALL ( *Clone )(IEnumPins* This,
|
|
99 /* [out] */ IEnumPins** ppEnum);
|
|
100 } IEnumPins_vt;
|
|
101 struct _IEnumPins { struct IEnumPins_vt* vt; };
|
|
102
|
|
103
|
|
104 typedef struct _IMediaSample IMediaSample;
|
|
105 typedef struct IMediaSample_vt
|
|
106 {
|
|
107 INHERIT_IUNKNOWN();
|
168
|
108
|
3056
|
109 HRESULT STDCALL ( *GetPointer )(IMediaSample* This,
|
|
110 /* [out] */ unsigned char** ppBuffer);
|
|
111 LONG STDCALL ( *GetSize )(IMediaSample* This);
|
|
112 HRESULT STDCALL ( *GetTime )(IMediaSample* This,
|
|
113 /* [out] */ REFERENCE_TIME* pTimeStart,
|
|
114 /* [out] */ REFERENCE_TIME* pTimeEnd);
|
|
115 HRESULT STDCALL ( *SetTime )(IMediaSample* This,
|
|
116 /* [in] */ REFERENCE_TIME* pTimeStart,
|
|
117 /* [in] */ REFERENCE_TIME* pTimeEnd);
|
3467
|
118
|
|
119 // sync-point property. If true, then the beginning of this
|
|
120 // sample is a sync-point. (note that if AM_MEDIA_TYPE.bTemporalCompression
|
|
121 // is false then all samples are sync points). A filter can start
|
|
122 // a stream at any sync point. S_FALSE if not sync-point, S_OK if true.
|
3056
|
123 HRESULT STDCALL ( *IsSyncPoint )(IMediaSample* This);
|
|
124 HRESULT STDCALL ( *SetSyncPoint )(IMediaSample* This,
|
|
125 long bIsSyncPoint);
|
3467
|
126
|
|
127 // preroll property. If true, this sample is for preroll only and
|
|
128 // shouldn't be displayed.
|
3056
|
129 HRESULT STDCALL ( *IsPreroll )(IMediaSample* This);
|
|
130 HRESULT STDCALL ( *SetPreroll )(IMediaSample* This,
|
|
131 long bIsPreroll);
|
3467
|
132
|
3056
|
133 LONG STDCALL ( *GetActualDataLength )(IMediaSample* This);
|
|
134 HRESULT STDCALL ( *SetActualDataLength )(IMediaSample* This,
|
|
135 long __MIDL_0010);
|
3467
|
136
|
|
137 // these allow for limited format changes in band - if no format change
|
|
138 // has been made when you receive a sample GetMediaType will return S_FALSE
|
3056
|
139 HRESULT STDCALL ( *GetMediaType )(IMediaSample* This,
|
|
140 AM_MEDIA_TYPE** ppMediaType);
|
|
141 HRESULT STDCALL ( *SetMediaType )(IMediaSample* This,
|
|
142 AM_MEDIA_TYPE* pMediaType);
|
3467
|
143
|
|
144 // returns S_OK if there is a discontinuity in the data (this frame is
|
|
145 // not a continuation of the previous stream of data
|
|
146 // - there has been a seek or some dropped samples).
|
3056
|
147 HRESULT STDCALL ( *IsDiscontinuity )(IMediaSample* This);
|
|
148 HRESULT STDCALL ( *SetDiscontinuity )(IMediaSample* This,
|
|
149 long bDiscontinuity);
|
3467
|
150
|
|
151 // get the media times for this sample
|
3056
|
152 HRESULT STDCALL ( *GetMediaTime )(IMediaSample* This,
|
|
153 /* [out] */ long long* pTimeStart,
|
|
154 /* [out] */ long long* pTimeEnd);
|
3467
|
155 // Set the media times for this sample
|
|
156 // pTimeStart==pTimeEnd==NULL will invalidate the media time stamps in
|
|
157 // this sample
|
3056
|
158 HRESULT STDCALL ( *SetMediaTime )(IMediaSample* This,
|
|
159 /* [in] */ long long* pTimeStart,
|
|
160 /* [in] */ long long* pTimeEnd);
|
|
161 } IMediaSample_vt;
|
|
162 struct _IMediaSample { struct IMediaSample_vt* vt; };
|
|
163
|
168
|
164
|
1545
|
165
|
3056
|
166 //typedef struct _IBaseFilter IBaseFilter;
|
|
167 typedef struct IBaseFilter_vt
|
168
|
168 {
|
3056
|
169 INHERIT_IUNKNOWN();
|
168
|
170
|
3056
|
171 HRESULT STDCALL ( *GetClassID )(IBaseFilter * This,
|
|
172 /* [out] */ CLSID *pClassID);
|
|
173 HRESULT STDCALL ( *Stop )(IBaseFilter * This);
|
|
174 HRESULT STDCALL ( *Pause )(IBaseFilter * This);
|
|
175 HRESULT STDCALL ( *Run )(IBaseFilter * This,
|
|
176 REFERENCE_TIME tStart);
|
|
177 HRESULT STDCALL ( *GetState )(IBaseFilter * This,
|
|
178 /* [in] */ unsigned long dwMilliSecsTimeout,
|
|
179 ///* [out] */ FILTER_STATE *State);
|
|
180 void* State);
|
|
181 HRESULT STDCALL ( *SetSyncSource )(IBaseFilter* This,
|
|
182 /* [in] */ IReferenceClock *pClock);
|
|
183 HRESULT STDCALL ( *GetSyncSource )(IBaseFilter* This,
|
|
184 /* [out] */ IReferenceClock **pClock);
|
|
185 HRESULT STDCALL ( *EnumPins )(IBaseFilter* This,
|
|
186 /* [out] */ IEnumPins **ppEnum);
|
|
187 HRESULT STDCALL ( *FindPin )(IBaseFilter* This,
|
|
188 /* [string][in] */ const unsigned short* Id,
|
|
189 /* [out] */ IPin** ppPin);
|
|
190 HRESULT STDCALL ( *QueryFilterInfo )(IBaseFilter* This,
|
|
191 // /* [out] */ FILTER_INFO *pInfo);
|
|
192 void* pInfo);
|
|
193 HRESULT STDCALL ( *JoinFilterGraph )(IBaseFilter* This,
|
|
194 /* [in] */ IFilterGraph* pGraph,
|
|
195 /* [string][in] */ const unsigned short* pName);
|
|
196 HRESULT STDCALL ( *QueryVendorInfo )(IBaseFilter* This,
|
|
197 /* [string][out] */ unsigned short** pVendorInfo);
|
|
198 } IBaseFilter_vt;
|
|
199 struct _IBaseFilter { struct IBaseFilter_vt* vt; };
|
168
|
200
|
1545
|
201
|
3056
|
202
|
|
203 typedef struct _IMemAllocator IMemAllocator;
|
|
204 typedef struct IMemAllocator_vt
|
168
|
205 {
|
3056
|
206 INHERIT_IUNKNOWN();
|
|
207
|
3467
|
208 // specifies the number of buffers to allocate and the size of each buffer.
|
3056
|
209 HRESULT STDCALL ( *SetProperties )(IMemAllocator* This,
|
|
210 /* [in] */ ALLOCATOR_PROPERTIES *pRequest,
|
|
211 /* [out] */ ALLOCATOR_PROPERTIES *pActual);
|
3467
|
212 // retrieves the number of buffers that the allocator will create, and the buffer properties.
|
3056
|
213 HRESULT STDCALL ( *GetProperties )(IMemAllocator* This,
|
|
214 /* [out] */ ALLOCATOR_PROPERTIES *pProps);
|
3467
|
215 // allocates the buffer memory.
|
3056
|
216 HRESULT STDCALL ( *Commit )(IMemAllocator* This);
|
3467
|
217 // releases the memory for the buffers.
|
3056
|
218 HRESULT STDCALL ( *Decommit )(IMemAllocator* This);
|
3467
|
219 // retrieves a media sample that contains an empty buffer.
|
3056
|
220 HRESULT STDCALL ( *GetBuffer )(IMemAllocator* This,
|
|
221 /* [out] */ IMediaSample** ppBuffer,
|
|
222 /* [in] */ REFERENCE_TIME* pStartTime,
|
|
223 /* [in] */ REFERENCE_TIME* pEndTime,
|
|
224 /* [in] */ unsigned long dwFlags);
|
3467
|
225 // releases a media sample.
|
3056
|
226 HRESULT STDCALL ( *ReleaseBuffer )(IMemAllocator* This,
|
|
227 /* [in] */ IMediaSample* pBuffer);
|
|
228 } IMemAllocator_vt;
|
|
229 struct _IMemAllocator { IMemAllocator_vt* vt; };
|
|
230
|
|
231
|
|
232
|
|
233 typedef struct _IMemInputPin IMemInputPin;
|
|
234 typedef struct IMemInputPin_vt
|
|
235 {
|
|
236 INHERIT_IUNKNOWN();
|
|
237
|
1545
|
238 HRESULT STDCALL ( *GetAllocator )(IMemInputPin * This,
|
|
239 /* [out] */ IMemAllocator **ppAllocator);
|
|
240 HRESULT STDCALL ( *NotifyAllocator )(IMemInputPin * This,
|
|
241 /* [in] */ IMemAllocator *pAllocator,
|
|
242 /* [in] */ int bReadOnly);
|
|
243 HRESULT STDCALL ( *GetAllocatorRequirements )(IMemInputPin * This,
|
|
244 /* [out] */ ALLOCATOR_PROPERTIES *pProps);
|
|
245 HRESULT STDCALL ( *Receive )(IMemInputPin * This,
|
|
246 /* [in] */ IMediaSample *pSample);
|
|
247 HRESULT STDCALL ( *ReceiveMultiple )(IMemInputPin * This,
|
|
248 /* [size_is][in] */ IMediaSample **pSamples,
|
|
249 /* [in] */ long nSamples,
|
|
250 /* [out] */ long *nSamplesProcessed);
|
|
251 HRESULT STDCALL ( *ReceiveCanBlock )(IMemInputPin * This);
|
3056
|
252 } IMemInputPin_vt;
|
|
253 struct _IMemInputPin { IMemInputPin_vt* vt; };
|
168
|
254
|
|
255
|
3056
|
256 typedef struct _IHidden IHidden;
|
|
257 typedef struct IHidden_vt
|
168
|
258 {
|
3056
|
259 INHERIT_IUNKNOWN();
|
168
|
260
|
3056
|
261 HRESULT STDCALL ( *GetSmth )(IHidden* This, int* pv);
|
|
262 HRESULT STDCALL ( *SetSmth )(IHidden* This, int v1, int v2);
|
|
263 HRESULT STDCALL ( *GetSmth2 )(IHidden* This, int* pv);
|
|
264 HRESULT STDCALL ( *SetSmth2 )(IHidden* This, int v1, int v2);
|
|
265 HRESULT STDCALL ( *GetSmth3 )(IHidden* This, int* pv);
|
|
266 HRESULT STDCALL ( *SetSmth3 )(IHidden* This, int v1, int v2);
|
|
267 HRESULT STDCALL ( *GetSmth4 )(IHidden* This, int* pv);
|
|
268 HRESULT STDCALL ( *SetSmth4 )(IHidden* This, int v1, int v2);
|
|
269 HRESULT STDCALL ( *GetSmth5 )(IHidden* This, int* pv);
|
|
270 HRESULT STDCALL ( *SetSmth5 )(IHidden* This, int v1, int v2);
|
|
271 HRESULT STDCALL ( *GetSmth6 )(IHidden* This, int* pv);
|
|
272 } IHidden_vt;
|
|
273 struct _IHidden { struct IHidden_vt* vt; };
|
168
|
274
|
1545
|
275
|
3056
|
276 typedef struct _IHidden2 IHidden2;
|
|
277 typedef struct IHidden2_vt
|
168
|
278 {
|
3056
|
279 INHERIT_IUNKNOWN();
|
168
|
280
|
3056
|
281 HRESULT STDCALL ( *unk1 )(void);
|
|
282 HRESULT STDCALL ( *unk2 )(void);
|
|
283 HRESULT STDCALL ( *unk3 )(void);
|
|
284 HRESULT STDCALL ( *DecodeGet )(IHidden2* This, int* region);
|
|
285 HRESULT STDCALL ( *unk5 )(void);
|
|
286 HRESULT STDCALL ( *DecodeSet )(IHidden2* This, int* region);
|
|
287 HRESULT STDCALL ( *unk7 )(void);
|
|
288 HRESULT STDCALL ( *unk8 )(void);
|
|
289 } IHidden2_vt;
|
|
290 struct _IHidden2 { struct IHidden2_vt* vt; };
|
168
|
291
|
1545
|
292
|
3056
|
293 // fixme
|
|
294 typedef struct IDivxFilterInterface {
|
|
295 struct IDivxFilterInterface_vt* vt;
|
|
296 } IDivxFilterInterface;
|
1545
|
297
|
3056
|
298 struct IDivxFilterInterface_vt
|
168
|
299 {
|
3056
|
300 INHERIT_IUNKNOWN();
|
168
|
301
|
3056
|
302 HRESULT STDCALL ( *get_PPLevel )(IDivxFilterInterface* This, int* PPLevel); // current postprocessing level
|
|
303 HRESULT STDCALL ( *put_PPLevel )(IDivxFilterInterface* This, int PPLevel); // new postprocessing level
|
|
304 HRESULT STDCALL ( *put_DefaultPPLevel )(IDivxFilterInterface* This);
|
|
305 HRESULT STDCALL ( *put_MaxDelayAllowed )(IDivxFilterInterface* This, int maxdelayallowed);
|
|
306 HRESULT STDCALL ( *put_Brightness )(IDivxFilterInterface* This, int brightness);
|
|
307 HRESULT STDCALL ( *put_Contrast )(IDivxFilterInterface* This, int contrast);
|
|
308 HRESULT STDCALL ( *put_Saturation )(IDivxFilterInterface* This, int saturation);
|
|
309 HRESULT STDCALL ( *get_MaxDelayAllowed )(IDivxFilterInterface* This, int* maxdelayallowed);
|
|
310 HRESULT STDCALL ( *get_Brightness)(IDivxFilterInterface* This, int* brightness);
|
|
311 HRESULT STDCALL ( *get_Contrast)(IDivxFilterInterface* This, int* contrast);
|
|
312 HRESULT STDCALL ( *get_Saturation )(IDivxFilterInterface* This, int* saturation);
|
|
313 HRESULT STDCALL ( *put_AspectRatio )(IDivxFilterInterface* This, int x, IDivxFilterInterface* Thisit, int y);
|
|
314 HRESULT STDCALL ( *get_AspectRatio )(IDivxFilterInterface* This, int* x, IDivxFilterInterface* Thisit, int* y);
|
168
|
315 };
|
1545
|
316
|
|
317 #endif /* DS_INTERFACES_H */
|