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