1 | /* $Id: ifgraph.c,v 1.3 2001-09-05 13:36:35 bird Exp $ */
|
---|
2 | /*
|
---|
3 | * Implementation of IFilterGraph.
|
---|
4 | *
|
---|
5 | * FIXME - stub.
|
---|
6 | * FIXME - implement IGraphBuilder / IFilterGraph2.
|
---|
7 | *
|
---|
8 | * hidenori@a2.ctktv.ne.jp
|
---|
9 | */
|
---|
10 |
|
---|
11 | #include "config.h"
|
---|
12 |
|
---|
13 | #include "windef.h"
|
---|
14 | #include "winbase.h"
|
---|
15 | #include "wingdi.h"
|
---|
16 | #include "winerror.h"
|
---|
17 | #include "wine/obj_base.h"
|
---|
18 | #include "wine/obj_oleaut.h"
|
---|
19 | #include "strmif.h"
|
---|
20 | #include "control.h"
|
---|
21 | #include "uuids.h"
|
---|
22 |
|
---|
23 | #include "debugtools.h"
|
---|
24 | DEFAULT_DEBUG_CHANNEL(quartz);
|
---|
25 |
|
---|
26 | #include "quartz_private.h"
|
---|
27 | #include "fgraph.h"
|
---|
28 |
|
---|
29 | static HRESULT WINAPI
|
---|
30 | IFilterGraph2_fnQueryInterface(IFilterGraph2* iface,REFIID riid,void** ppobj)
|
---|
31 | {
|
---|
32 | CFilterGraph_THIS(iface,fgraph);
|
---|
33 |
|
---|
34 | TRACE("(%p)->()\n",This);
|
---|
35 |
|
---|
36 | return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
|
---|
37 | }
|
---|
38 |
|
---|
39 | static ULONG WINAPI
|
---|
40 | IFilterGraph2_fnAddRef(IFilterGraph2* iface)
|
---|
41 | {
|
---|
42 | CFilterGraph_THIS(iface,fgraph);
|
---|
43 |
|
---|
44 | TRACE("(%p)->()\n",This);
|
---|
45 |
|
---|
46 | return IUnknown_AddRef(This->unk.punkControl);
|
---|
47 | }
|
---|
48 |
|
---|
49 | static ULONG WINAPI
|
---|
50 | IFilterGraph2_fnRelease(IFilterGraph2* iface)
|
---|
51 | {
|
---|
52 | CFilterGraph_THIS(iface,fgraph);
|
---|
53 |
|
---|
54 | TRACE("(%p)->()\n",This);
|
---|
55 |
|
---|
56 | return IUnknown_Release(This->unk.punkControl);
|
---|
57 | }
|
---|
58 |
|
---|
59 | static HRESULT WINAPI
|
---|
60 | IFilterGraph2_fnAddFilter(IFilterGraph2* iface,IBaseFilter* pFilter, LPCWSTR pName)
|
---|
61 | {
|
---|
62 | CFilterGraph_THIS(iface,fgraph);
|
---|
63 |
|
---|
64 | FIXME( "(%p)->() stub!\n", This );
|
---|
65 | return E_NOTIMPL;
|
---|
66 | }
|
---|
67 |
|
---|
68 | static HRESULT WINAPI
|
---|
69 | IFilterGraph2_fnRemoveFilter(IFilterGraph2* iface,IBaseFilter* pFilter)
|
---|
70 | {
|
---|
71 | CFilterGraph_THIS(iface,fgraph);
|
---|
72 |
|
---|
73 | FIXME( "(%p)->() stub!\n", This );
|
---|
74 | return E_NOTIMPL;
|
---|
75 | }
|
---|
76 |
|
---|
77 | static HRESULT WINAPI
|
---|
78 | IFilterGraph2_fnEnumFilters(IFilterGraph2* iface,IEnumFilters** ppEnum)
|
---|
79 | {
|
---|
80 | CFilterGraph_THIS(iface,fgraph);
|
---|
81 |
|
---|
82 | FIXME( "(%p)->() stub!\n", This );
|
---|
83 | return E_NOTIMPL;
|
---|
84 | }
|
---|
85 |
|
---|
86 | static HRESULT WINAPI
|
---|
87 | IFilterGraph2_fnFindFilterByName(IFilterGraph2* iface,LPCWSTR pName,IBaseFilter** ppFilter)
|
---|
88 | {
|
---|
89 | CFilterGraph_THIS(iface,fgraph);
|
---|
90 |
|
---|
91 | FIXME( "(%p)->() stub!\n", This );
|
---|
92 | return E_NOTIMPL;
|
---|
93 | }
|
---|
94 |
|
---|
95 | static HRESULT WINAPI
|
---|
96 | IFilterGraph2_fnConnectDirect(IFilterGraph2* iface,IPin* pOut,IPin* pIn,const AM_MEDIA_TYPE* pmt)
|
---|
97 | {
|
---|
98 | CFilterGraph_THIS(iface,fgraph);
|
---|
99 |
|
---|
100 | FIXME( "(%p)->() stub!\n", This );
|
---|
101 | return E_NOTIMPL;
|
---|
102 | }
|
---|
103 |
|
---|
104 | static HRESULT WINAPI
|
---|
105 | IFilterGraph2_fnReconnect(IFilterGraph2* iface,IPin* pPin)
|
---|
106 | {
|
---|
107 | CFilterGraph_THIS(iface,fgraph);
|
---|
108 |
|
---|
109 | FIXME( "(%p)->() stub!\n", This );
|
---|
110 | return E_NOTIMPL;
|
---|
111 | }
|
---|
112 |
|
---|
113 | static HRESULT WINAPI
|
---|
114 | IFilterGraph2_fnDisconnect(IFilterGraph2* iface,IPin* pPin)
|
---|
115 | {
|
---|
116 | CFilterGraph_THIS(iface,fgraph);
|
---|
117 |
|
---|
118 | FIXME( "(%p)->() stub!\n", This );
|
---|
119 | return E_NOTIMPL;
|
---|
120 | }
|
---|
121 |
|
---|
122 | static HRESULT WINAPI
|
---|
123 | IFilterGraph2_fnSetDefaultSyncSource(IFilterGraph2* iface)
|
---|
124 | {
|
---|
125 | CFilterGraph_THIS(iface,fgraph);
|
---|
126 |
|
---|
127 | FIXME( "(%p)->() stub!\n", This );
|
---|
128 | return E_NOTIMPL;
|
---|
129 | }
|
---|
130 |
|
---|
131 | static HRESULT WINAPI
|
---|
132 | IFilterGraph2_fnConnect(IFilterGraph2* iface,IPin* pOut,IPin* pIn)
|
---|
133 | {
|
---|
134 | CFilterGraph_THIS(iface,fgraph);
|
---|
135 |
|
---|
136 | FIXME( "(%p)->() stub!\n", This );
|
---|
137 | return E_NOTIMPL;
|
---|
138 | }
|
---|
139 |
|
---|
140 | static HRESULT WINAPI
|
---|
141 | IFilterGraph2_fnRender(IFilterGraph2* iface,IPin* pOut)
|
---|
142 | {
|
---|
143 | CFilterGraph_THIS(iface,fgraph);
|
---|
144 |
|
---|
145 | FIXME( "(%p)->() stub!\n", This );
|
---|
146 | return E_NOTIMPL;
|
---|
147 | }
|
---|
148 |
|
---|
149 | static HRESULT WINAPI
|
---|
150 | IFilterGraph2_fnRenderFile(IFilterGraph2* iface,LPCWSTR lpFileName,LPCWSTR lpPlayList)
|
---|
151 | {
|
---|
152 | CFilterGraph_THIS(iface,fgraph);
|
---|
153 |
|
---|
154 | FIXME( "(%p)->() stub!\n", This );
|
---|
155 | return E_NOTIMPL;
|
---|
156 | }
|
---|
157 |
|
---|
158 | static HRESULT WINAPI
|
---|
159 | IFilterGraph2_fnAddSourceFilter(IFilterGraph2* iface,LPCWSTR lpFileName,LPCWSTR lpFilterName,IBaseFilter** ppBaseFilter)
|
---|
160 | {
|
---|
161 | CFilterGraph_THIS(iface,fgraph);
|
---|
162 |
|
---|
163 | FIXME( "(%p)->() stub!\n", This );
|
---|
164 | return E_NOTIMPL;
|
---|
165 | }
|
---|
166 |
|
---|
167 | static HRESULT WINAPI
|
---|
168 | IFilterGraph2_fnSetLogFile(IFilterGraph2* iface,DWORD_PTR hFile)
|
---|
169 | {
|
---|
170 | CFilterGraph_THIS(iface,fgraph);
|
---|
171 |
|
---|
172 | FIXME( "(%p)->() stub!\n", This );
|
---|
173 | return E_NOTIMPL;
|
---|
174 | }
|
---|
175 |
|
---|
176 | static HRESULT WINAPI
|
---|
177 | IFilterGraph2_fnAbort(IFilterGraph2* iface)
|
---|
178 | {
|
---|
179 | CFilterGraph_THIS(iface,fgraph);
|
---|
180 |
|
---|
181 | /* undoc. */
|
---|
182 |
|
---|
183 | FIXME( "(%p)->() stub!\n", This );
|
---|
184 | return E_NOTIMPL;
|
---|
185 | }
|
---|
186 |
|
---|
187 | static HRESULT WINAPI
|
---|
188 | IFilterGraph2_fnShouldOperationContinue(IFilterGraph2* iface)
|
---|
189 | {
|
---|
190 | CFilterGraph_THIS(iface,fgraph);
|
---|
191 |
|
---|
192 | /* undoc. */
|
---|
193 |
|
---|
194 | FIXME( "(%p)->() stub!\n", This );
|
---|
195 | return E_NOTIMPL;
|
---|
196 | }
|
---|
197 |
|
---|
198 | static HRESULT WINAPI
|
---|
199 | IFilterGraph2_fnAddSourceFilterForMoniker(IFilterGraph2* iface,IMoniker* pMon,IBindCtx* pCtx,LPCWSTR pFilterName,IBaseFilter** ppFilter)
|
---|
200 | {
|
---|
201 | CFilterGraph_THIS(iface,fgraph);
|
---|
202 |
|
---|
203 | FIXME( "(%p)->() stub!\n", This );
|
---|
204 | return E_NOTIMPL;
|
---|
205 | }
|
---|
206 |
|
---|
207 | static HRESULT WINAPI
|
---|
208 | IFilterGraph2_fnReconnectEx(IFilterGraph2* iface,IPin* pPin,const AM_MEDIA_TYPE* pmt)
|
---|
209 | {
|
---|
210 | CFilterGraph_THIS(iface,fgraph);
|
---|
211 |
|
---|
212 | FIXME( "(%p)->() stub!\n", This );
|
---|
213 | return E_NOTIMPL;
|
---|
214 | }
|
---|
215 |
|
---|
216 | static HRESULT WINAPI
|
---|
217 | IFilterGraph2_fnRenderEx(IFilterGraph2* iface,IPin* pPin,DWORD dwParam1,DWORD* pdwParam2)
|
---|
218 | {
|
---|
219 | CFilterGraph_THIS(iface,fgraph);
|
---|
220 |
|
---|
221 | /* undoc. */
|
---|
222 | FIXME( "(%p)->() stub!\n", This );
|
---|
223 | return E_NOTIMPL;
|
---|
224 | }
|
---|
225 |
|
---|
226 |
|
---|
227 |
|
---|
228 |
|
---|
229 | static ICOM_VTABLE(IFilterGraph2) ifgraph =
|
---|
230 | {
|
---|
231 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
232 | /* IUnknown fields */
|
---|
233 | IFilterGraph2_fnQueryInterface,
|
---|
234 | IFilterGraph2_fnAddRef,
|
---|
235 | IFilterGraph2_fnRelease,
|
---|
236 | /* IFilterGraph fields */
|
---|
237 | IFilterGraph2_fnAddFilter,
|
---|
238 | IFilterGraph2_fnRemoveFilter,
|
---|
239 | IFilterGraph2_fnEnumFilters,
|
---|
240 | IFilterGraph2_fnFindFilterByName,
|
---|
241 | IFilterGraph2_fnConnectDirect,
|
---|
242 | IFilterGraph2_fnReconnect,
|
---|
243 | IFilterGraph2_fnDisconnect,
|
---|
244 | IFilterGraph2_fnSetDefaultSyncSource,
|
---|
245 | /* IGraphBuilder fields */
|
---|
246 | IFilterGraph2_fnConnect,
|
---|
247 | IFilterGraph2_fnRender,
|
---|
248 | IFilterGraph2_fnRenderFile,
|
---|
249 | IFilterGraph2_fnAddSourceFilter,
|
---|
250 | IFilterGraph2_fnSetLogFile,
|
---|
251 | IFilterGraph2_fnAbort,
|
---|
252 | IFilterGraph2_fnShouldOperationContinue,
|
---|
253 | /* IFilterGraph2 fields */
|
---|
254 | IFilterGraph2_fnAddSourceFilterForMoniker,
|
---|
255 | IFilterGraph2_fnReconnectEx,
|
---|
256 | IFilterGraph2_fnRenderEx,
|
---|
257 | };
|
---|
258 |
|
---|
259 | void CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg )
|
---|
260 | {
|
---|
261 | TRACE("(%p)\n",pfg);
|
---|
262 | ICOM_VTBL(&pfg->fgraph) = &ifgraph;
|
---|
263 | }
|
---|