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