1 | /*
|
---|
2 | * Implementation of IFilterMapper for CLSID_FilterMapper.
|
---|
3 | *
|
---|
4 | * FIXME - stub.
|
---|
5 | *
|
---|
6 | * hidenori@a2.ctktv.ne.jp
|
---|
7 | */
|
---|
8 |
|
---|
9 | #include "config.h"
|
---|
10 |
|
---|
11 | #include "windef.h"
|
---|
12 | #include "winbase.h"
|
---|
13 | #include "wingdi.h"
|
---|
14 | #include "winreg.h"
|
---|
15 | #include "winerror.h"
|
---|
16 | #include "wine/obj_base.h"
|
---|
17 | #include "wine/obj_oleaut.h"
|
---|
18 | #include "strmif.h"
|
---|
19 | #include "control.h"
|
---|
20 | #include "uuids.h"
|
---|
21 |
|
---|
22 | #include "debugtools.h"
|
---|
23 | DEFAULT_DEBUG_CHANNEL(quartz);
|
---|
24 |
|
---|
25 | #include "quartz_private.h"
|
---|
26 | #include "fmap.h"
|
---|
27 | #include "regsvr.h"
|
---|
28 |
|
---|
29 |
|
---|
30 | static HRESULT WINAPI
|
---|
31 | IFilterMapper_fnQueryInterface(IFilterMapper* iface,REFIID riid,void** ppobj)
|
---|
32 | {
|
---|
33 | CFilterMapper_THIS(iface,fmap);
|
---|
34 |
|
---|
35 | TRACE("(%p)->()\n",This);
|
---|
36 |
|
---|
37 | return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
|
---|
38 | }
|
---|
39 |
|
---|
40 | static ULONG WINAPI
|
---|
41 | IFilterMapper_fnAddRef(IFilterMapper* iface)
|
---|
42 | {
|
---|
43 | CFilterMapper_THIS(iface,fmap);
|
---|
44 |
|
---|
45 | TRACE("(%p)->()\n",This);
|
---|
46 |
|
---|
47 | return IUnknown_AddRef(This->unk.punkControl);
|
---|
48 | }
|
---|
49 |
|
---|
50 | static ULONG WINAPI
|
---|
51 | IFilterMapper_fnRelease(IFilterMapper* iface)
|
---|
52 | {
|
---|
53 | CFilterMapper_THIS(iface,fmap);
|
---|
54 |
|
---|
55 | TRACE("(%p)->()\n",This);
|
---|
56 |
|
---|
57 | return IUnknown_Release(This->unk.punkControl);
|
---|
58 | }
|
---|
59 |
|
---|
60 |
|
---|
61 | static HRESULT WINAPI
|
---|
62 | IFilterMapper_fnRegisterFilter(IFilterMapper* iface,CLSID clsid,LPCWSTR lpwszName,DWORD dwMerit)
|
---|
63 | {
|
---|
64 | CFilterMapper_THIS(iface,fmap);
|
---|
65 |
|
---|
66 | FIXME("(%p)->(%s,%s,%08lx)\n",This,
|
---|
67 | debugstr_guid(&clsid),debugstr_w(lpwszName),dwMerit);
|
---|
68 |
|
---|
69 | /* FIXME */
|
---|
70 | /* FIXME - handle dwMerit! */
|
---|
71 | return QUARTZ_RegisterAMovieFilter(
|
---|
72 | &CLSID_LegacyAmFilterCategory,
|
---|
73 | &clsid,
|
---|
74 | NULL, 0,
|
---|
75 | lpwszName, NULL, TRUE );
|
---|
76 | }
|
---|
77 |
|
---|
78 | static HRESULT WINAPI
|
---|
79 | IFilterMapper_fnRegisterFilterInstance(IFilterMapper* iface,CLSID clsid,LPCWSTR lpwszName,CLSID* pclsidMedia)
|
---|
80 | {
|
---|
81 | CFilterMapper_THIS(iface,fmap);
|
---|
82 | HRESULT hr;
|
---|
83 |
|
---|
84 | FIXME("(%p)->()\n",This);
|
---|
85 |
|
---|
86 | if ( pclsidMedia == NULL )
|
---|
87 | return E_POINTER;
|
---|
88 | hr = CoCreateGuid(pclsidMedia);
|
---|
89 | if ( FAILED(hr) )
|
---|
90 | return hr;
|
---|
91 |
|
---|
92 | /* FIXME */
|
---|
93 | /* this doesn't work. */
|
---|
94 | /* return IFilterMapper_RegisterFilter(iface,
|
---|
95 | *pclsidMedia,lpwszName,0x60000000); */
|
---|
96 |
|
---|
97 | return E_NOTIMPL;
|
---|
98 | }
|
---|
99 |
|
---|
100 | static HRESULT WINAPI
|
---|
101 | IFilterMapper_fnRegisterPin(IFilterMapper* iface,CLSID clsidFilter,LPCWSTR lpwszName,BOOL bRendered,BOOL bOutput,BOOL bZero,BOOL bMany,CLSID clsidReserved,LPCWSTR lpwszReserved)
|
---|
102 | {
|
---|
103 | CFilterMapper_THIS(iface,fmap);
|
---|
104 |
|
---|
105 | FIXME("(%p)->() stub!\n",This);
|
---|
106 |
|
---|
107 | return E_NOTIMPL;
|
---|
108 | }
|
---|
109 |
|
---|
110 | static HRESULT WINAPI
|
---|
111 | IFilterMapper_fnRegisterPinType(IFilterMapper* iface,CLSID clsidFilter,LPCWSTR lpwszName,CLSID clsidMajorType,CLSID clsidSubType)
|
---|
112 | {
|
---|
113 | CFilterMapper_THIS(iface,fmap);
|
---|
114 |
|
---|
115 | FIXME("(%p)->() stub!\n",This);
|
---|
116 |
|
---|
117 | return E_NOTIMPL;
|
---|
118 | }
|
---|
119 |
|
---|
120 | static HRESULT WINAPI
|
---|
121 | IFilterMapper_fnUnregisterFilter(IFilterMapper* iface,CLSID clsidFilter)
|
---|
122 | {
|
---|
123 | CFilterMapper_THIS(iface,fmap);
|
---|
124 |
|
---|
125 | FIXME("(%p)->(%s)\n",This,debugstr_guid(&clsidFilter));
|
---|
126 |
|
---|
127 | /* FIXME */
|
---|
128 | return QUARTZ_RegisterAMovieFilter(
|
---|
129 | &CLSID_LegacyAmFilterCategory,
|
---|
130 | &clsidFilter,
|
---|
131 | NULL, 0, NULL, NULL, FALSE );
|
---|
132 | }
|
---|
133 |
|
---|
134 | static HRESULT WINAPI
|
---|
135 | IFilterMapper_fnUnregisterFilterInstance(IFilterMapper* iface,CLSID clsidMedia)
|
---|
136 | {
|
---|
137 | CFilterMapper_THIS(iface,fmap);
|
---|
138 |
|
---|
139 | FIXME("(%p)->(%s)\n",This,debugstr_guid(&clsidMedia));
|
---|
140 |
|
---|
141 | /* FIXME */
|
---|
142 | /* this doesn't work. */
|
---|
143 | /* return IFilterMapper_UnregisterFilter(iface,clsidMedia); */
|
---|
144 |
|
---|
145 | return E_NOTIMPL;
|
---|
146 | }
|
---|
147 |
|
---|
148 | static HRESULT WINAPI
|
---|
149 | IFilterMapper_fnUnregisterPin(IFilterMapper* iface,CLSID clsidPin,LPCWSTR lpwszName)
|
---|
150 | {
|
---|
151 | CFilterMapper_THIS(iface,fmap);
|
---|
152 |
|
---|
153 | FIXME("(%p)->(%s,%s) stub!\n",This,
|
---|
154 | debugstr_guid(&clsidPin),debugstr_w(lpwszName));
|
---|
155 |
|
---|
156 | return E_NOTIMPL;
|
---|
157 | }
|
---|
158 |
|
---|
159 | static HRESULT WINAPI
|
---|
160 | IFilterMapper_fnEnumMatchingFilters(IFilterMapper* iface,IEnumRegFilters** ppobj,DWORD dwMerit,BOOL bInputNeeded,CLSID clsInMajorType,CLSID clsidSubType,BOOL bRender,BOOL bOutputNeeded,CLSID clsOutMajorType,CLSID clsOutSubType)
|
---|
161 | {
|
---|
162 | CFilterMapper_THIS(iface,fmap);
|
---|
163 |
|
---|
164 | FIXME("(%p)->() stub!\n",This);
|
---|
165 |
|
---|
166 | return E_NOTIMPL;
|
---|
167 | }
|
---|
168 |
|
---|
169 |
|
---|
170 |
|
---|
171 | static ICOM_VTABLE(IFilterMapper) ifmap =
|
---|
172 | {
|
---|
173 | ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
|
---|
174 | /* IUnknown fields */
|
---|
175 | IFilterMapper_fnQueryInterface,
|
---|
176 | IFilterMapper_fnAddRef,
|
---|
177 | IFilterMapper_fnRelease,
|
---|
178 | /* IFilterMapper fields */
|
---|
179 | IFilterMapper_fnRegisterFilter,
|
---|
180 | IFilterMapper_fnRegisterFilterInstance,
|
---|
181 | IFilterMapper_fnRegisterPin,
|
---|
182 | IFilterMapper_fnRegisterPinType,
|
---|
183 | IFilterMapper_fnUnregisterFilter,
|
---|
184 | IFilterMapper_fnUnregisterFilterInstance,
|
---|
185 | IFilterMapper_fnUnregisterPin,
|
---|
186 | IFilterMapper_fnEnumMatchingFilters,
|
---|
187 | };
|
---|
188 |
|
---|
189 |
|
---|
190 | HRESULT CFilterMapper_InitIFilterMapper( CFilterMapper* pfm )
|
---|
191 | {
|
---|
192 | TRACE("(%p)\n",pfm);
|
---|
193 | ICOM_VTBL(&pfm->fmap) = &ifmap;
|
---|
194 |
|
---|
195 | return NOERROR;
|
---|
196 | }
|
---|
197 |
|
---|
198 | void CFilterMapper_UninitIFilterMapper( CFilterMapper* pfm )
|
---|
199 | {
|
---|
200 | TRACE("(%p)\n",pfm);
|
---|
201 | }
|
---|