168
|
1 #ifndef INPUTPIN_H
|
|
2 #define INPUTPIN_H
|
|
3 #include "interfaces.h"
|
|
4 #include "guids.h"
|
|
5 #include "iunk.h"
|
|
6
|
|
7 class CBaseFilter2;
|
|
8 class CBaseFilter: public IBaseFilter
|
|
9 {
|
|
10 IPin* pin;
|
|
11 IPin* unused_pin;
|
|
12 static GUID interfaces[];
|
|
13 DECLARE_IUNKNOWN(CBaseFilter)
|
|
14 public:
|
|
15 CBaseFilter(const AM_MEDIA_TYPE& vhdr, CBaseFilter2* parent);
|
|
16 ~CBaseFilter(){delete vt;pin->vt->Release((IUnknown*)pin);unused_pin->vt->Release((IUnknown*)unused_pin);}
|
|
17
|
|
18 IPin* GetPin() {return pin;}
|
|
19 IPin* GetUnusedPin() {return unused_pin;}
|
|
20 // static long STDCALL QueryInterface(IUnknown* This, GUID* iid, void** ppv);
|
|
21 // static long STDCALL AddRef(IUnknown* This);
|
|
22 // static long STDCALL Release(IUnknown* This);
|
|
23
|
|
24 static long STDCALL GetClassID (
|
|
25 IBaseFilter * This,
|
|
26 /* [out] */ CLSID *pClassID);
|
|
27
|
|
28 static long STDCALL Stop (
|
|
29 IBaseFilter * This);
|
|
30
|
|
31 static long STDCALL Pause (
|
|
32 IBaseFilter * This);
|
|
33
|
|
34 static long STDCALL Run (
|
|
35 IBaseFilter * This,
|
|
36 REFERENCE_TIME tStart);
|
|
37
|
|
38 static long STDCALL GetState (
|
|
39 IBaseFilter * This,
|
|
40 /* [in] */ unsigned long dwMilliSecsTimeout,
|
|
41 // /* [out] */ FILTER_STATE *State);
|
|
42 void* State);
|
|
43
|
|
44 static long STDCALL SetSyncSource (
|
|
45 IBaseFilter * This,
|
|
46 /* [in] */ IReferenceClock *pClock);
|
|
47
|
|
48 static long STDCALL GetSyncSource (
|
|
49 IBaseFilter * This,
|
|
50 /* [out] */ IReferenceClock **pClock);
|
|
51
|
|
52 static long STDCALL EnumPins (
|
|
53 IBaseFilter * This,
|
|
54 /* [out] */ IEnumPins **ppEnum);
|
|
55
|
|
56 static long STDCALL FindPin (
|
|
57 IBaseFilter * This,
|
|
58 /* [string][in] */ const unsigned short* Id,
|
|
59 /* [out] */ IPin **ppPin);
|
|
60
|
|
61 static long STDCALL QueryFilterInfo (
|
|
62 IBaseFilter * This,
|
|
63 // /* [out] */ FILTER_INFO *pInfo);
|
|
64 void* pInfo);
|
|
65
|
|
66 static long STDCALL JoinFilterGraph (
|
|
67 IBaseFilter * This,
|
|
68 /* [in] */ IFilterGraph *pGraph,
|
|
69 /* [string][in] */ const unsigned short* pName);
|
|
70
|
|
71 static long STDCALL QueryVendorInfo (
|
|
72 IBaseFilter * This,
|
|
73 /* [string][out] */ unsigned short* *pVendorInfo);
|
|
74 };
|
|
75 class CInputPin: public IPin
|
|
76 {
|
|
77 AM_MEDIA_TYPE type;
|
|
78 CBaseFilter* parent;
|
|
79 static GUID interfaces[];
|
|
80 DECLARE_IUNKNOWN(CInputPin)
|
|
81 public:
|
|
82 CInputPin(CBaseFilter* parent, const AM_MEDIA_TYPE& vhdr);
|
|
83 ~CInputPin(){delete vt;}
|
|
84 // IPin* GetPin();
|
|
85
|
|
86 // static long STDCALL QueryInterface(IUnknown* This, GUID* iid, void** ppv);
|
|
87 // static long STDCALL AddRef(IUnknown* This);
|
|
88 // static long STDCALL Release(IUnknown* This);
|
|
89
|
|
90 static long STDCALL Connect (
|
|
91 IPin * This,
|
|
92 /* [in] */ IPin *pReceivePin,
|
|
93 /* [in] */ AM_MEDIA_TYPE *pmt);
|
|
94
|
|
95 static long STDCALL ReceiveConnection (
|
|
96 IPin * This,
|
|
97 /* [in] */ IPin *pConnector,
|
|
98 /* [in] */ const AM_MEDIA_TYPE *pmt);
|
|
99
|
|
100 static long STDCALL Disconnect (
|
|
101 IPin * This);
|
|
102
|
|
103 static long STDCALL ConnectedTo (
|
|
104 IPin * This,
|
|
105 /* [out] */ IPin **pPin);
|
|
106
|
|
107 static long STDCALL ConnectionMediaType (
|
|
108 IPin * This,
|
|
109 /* [out] */ AM_MEDIA_TYPE *pmt);
|
|
110
|
|
111 static long STDCALL QueryPinInfo (
|
|
112 IPin * This,
|
|
113 /* [out] */ PIN_INFO *pInfo);
|
|
114
|
|
115 static long STDCALL QueryDirection (
|
|
116 IPin * This,
|
|
117 /* [out] */ PIN_DIRECTION *pPinDir);
|
|
118
|
|
119 static long STDCALL QueryId (
|
|
120 IPin * This,
|
|
121 /* [out] */ unsigned short* *Id);
|
|
122
|
|
123 static long STDCALL QueryAccept (
|
|
124 IPin * This,
|
|
125 /* [in] */ const AM_MEDIA_TYPE *pmt);
|
|
126
|
|
127 static long STDCALL EnumMediaTypes (
|
|
128 IPin * This,
|
|
129 /* [out] */ IEnumMediaTypes **ppEnum);
|
|
130
|
|
131 static long STDCALL QueryInternalConnections (
|
|
132 IPin * This,
|
|
133 /* [out] */ IPin **apPin,
|
|
134 /* [out][in] */ unsigned long *nPin);
|
|
135
|
|
136 static long STDCALL EndOfStream (
|
|
137 IPin * This);
|
|
138
|
|
139 static long STDCALL BeginFlush (
|
|
140 IPin * This);
|
|
141
|
|
142 static long STDCALL EndFlush (
|
|
143 IPin * This);
|
|
144
|
|
145 static long STDCALL NewSegment (
|
|
146 IPin * This,
|
|
147 /* [in] */ REFERENCE_TIME tStart,
|
|
148 /* [in] */ REFERENCE_TIME tStop,
|
|
149 /* [in] */ double dRate);
|
|
150 };
|
|
151
|
|
152 class CBaseFilter2: public IBaseFilter
|
|
153 {
|
|
154 IPin* pin;
|
|
155 static GUID interfaces[];
|
|
156 DECLARE_IUNKNOWN(CBaseFilter2)
|
|
157 public:
|
|
158 CBaseFilter2();
|
|
159 ~CBaseFilter2(){delete vt;pin->vt->Release((IUnknown*)pin);}
|
|
160 IPin* GetPin() {return pin;}
|
|
161
|
|
162 // static long STDCALL QueryInterface(IUnknown* This, GUID* iid, void** ppv);
|
|
163 // static long STDCALL AddRef(IUnknown* This);
|
|
164 // static long STDCALL Release(IUnknown* This);
|
|
165 static long STDCALL GetClassID (
|
|
166 IBaseFilter * This,
|
|
167 /* [out] */ CLSID *pClassID);
|
|
168
|
|
169 static long STDCALL Stop (
|
|
170 IBaseFilter * This);
|
|
171
|
|
172 static long STDCALL Pause (
|
|
173 IBaseFilter * This);
|
|
174
|
|
175 static long STDCALL Run (
|
|
176 IBaseFilter * This,
|
|
177 REFERENCE_TIME tStart);
|
|
178
|
|
179 static long STDCALL GetState (
|
|
180 IBaseFilter * This,
|
|
181 /* [in] */ unsigned long dwMilliSecsTimeout,
|
|
182 // /* [out] */ FILTER_STATE *State);
|
|
183 void* State);
|
|
184
|
|
185 static long STDCALL SetSyncSource (
|
|
186 IBaseFilter * This,
|
|
187 /* [in] */ IReferenceClock *pClock);
|
|
188
|
|
189 static long STDCALL GetSyncSource (
|
|
190 IBaseFilter * This,
|
|
191 /* [out] */ IReferenceClock **pClock);
|
|
192
|
|
193 static long STDCALL EnumPins (
|
|
194 IBaseFilter * This,
|
|
195 /* [out] */ IEnumPins **ppEnum);
|
|
196
|
|
197 static long STDCALL FindPin (
|
|
198 IBaseFilter * This,
|
|
199 /* [string][in] */ const unsigned short* Id,
|
|
200 /* [out] */ IPin **ppPin);
|
|
201
|
|
202 static long STDCALL QueryFilterInfo (
|
|
203 IBaseFilter * This,
|
|
204 // /* [out] */ FILTER_INFO *pInfo);
|
|
205 void* pInfo);
|
|
206
|
|
207 static long STDCALL JoinFilterGraph (
|
|
208 IBaseFilter * This,
|
|
209 /* [in] */ IFilterGraph *pGraph,
|
|
210 /* [string][in] */ const unsigned short* pName);
|
|
211
|
|
212 static long STDCALL QueryVendorInfo (
|
|
213 IBaseFilter * This,
|
|
214 /* [string][out] */ unsigned short* *pVendorInfo);
|
|
215 };
|
|
216
|
|
217 class CRemotePin: public IPin
|
|
218 {
|
|
219 CBaseFilter* parent;
|
|
220 IPin* remote_pin;
|
|
221 static GUID interfaces[];
|
|
222 DECLARE_IUNKNOWN(CRemotePin)
|
|
223 public:
|
|
224 CRemotePin(CBaseFilter* pt, IPin* rpin);
|
|
225 ~CRemotePin(){delete vt;}
|
|
226
|
|
227 // static long STDCALL QueryInterface(IUnknown* This, GUID* iid, void** ppv);
|
|
228 // static long STDCALL AddRef(IUnknown* This);
|
|
229 // static long STDCALL Release(IUnknown* This);
|
|
230
|
|
231 static long STDCALL ConnectedTo (
|
|
232 IPin * This,
|
|
233 /* [out] */ IPin **pPin);
|
|
234
|
|
235 static long STDCALL QueryDirection (
|
|
236 IPin * This,
|
|
237 /* [out] */ PIN_DIRECTION *pPinDir);
|
|
238
|
|
239 static long STDCALL ConnectionMediaType (
|
|
240 IPin * This,
|
|
241 /* [out] */ AM_MEDIA_TYPE *pmt);
|
|
242
|
|
243 static long STDCALL QueryPinInfo (
|
|
244 IPin * This,
|
|
245 /* [out] */ PIN_INFO *pInfo);
|
|
246
|
|
247 };
|
|
248
|
|
249
|
|
250 class CRemotePin2: public IPin
|
|
251 {
|
|
252 CBaseFilter2* parent;
|
|
253 static GUID interfaces[];
|
|
254 DECLARE_IUNKNOWN(CRemotePin2)
|
|
255 public:
|
|
256 CRemotePin2(CBaseFilter2* parent);
|
|
257 ~CRemotePin2(){delete vt;}
|
|
258
|
|
259 static long STDCALL QueryPinInfo (
|
|
260 IPin * This,
|
|
261 /* [out] */ PIN_INFO *pInfo);
|
|
262 };
|
|
263
|
|
264
|
|
265 #endif
|