Aidan Thornton : quartz: Implement IFilterGraph2:: AddSourceFilterForMoniker.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 17 16:32:34 CST 2014
Module: wine
Branch: master
Commit: 1f7683777babab98197c39e5965ba6f70c01c8d0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1f7683777babab98197c39e5965ba6f70c01c8d0
Author: Aidan Thornton <makosoft at gmail.com>
Date: Tue Dec 16 18:49:34 2014 +0000
quartz: Implement IFilterGraph2::AddSourceFilterForMoniker.
---
dlls/quartz/filtergraph.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 3d495db..fcdd05b 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -1737,8 +1737,27 @@ static HRESULT WINAPI FilterGraph2_AddSourceFilterForMoniker(IFilterGraph2 *ifac
IMoniker *pMoniker, IBindCtx *pCtx, LPCWSTR lpcwstrFilterName, IBaseFilter **ppFilter)
{
IFilterGraphImpl *This = impl_from_IFilterGraph2(iface);
+ HRESULT hr;
+ IBaseFilter* pfilter;
+
+ TRACE("(%p/%p)->(%p %p %s %p)\n", This, iface, pMoniker, pCtx, debugstr_w(lpcwstrFilterName), ppFilter);
+
+ hr = IMoniker_BindToObject(pMoniker, pCtx, NULL, &IID_IBaseFilter, (void**)&pfilter);
+ if(FAILED(hr)) {
+ WARN("Unable to bind moniker to filter object (%x)\n", hr);
+ return hr;
+ }
+
+ hr = IFilterGraph2_AddFilter(iface, pfilter, lpcwstrFilterName);
+ if (FAILED(hr)) {
+ WARN("Unable to add filter (%x)\n", hr);
+ IBaseFilter_Release(pfilter);
+ return hr;
+ }
- TRACE("(%p/%p)->(%p %p %s %p): stub !!!\n", This, iface, pMoniker, pCtx, debugstr_w(lpcwstrFilterName), ppFilter);
+ if(ppFilter)
+ *ppFilter = pfilter;
+ else IBaseFilter_Release(pfilter);
return S_OK;
}
More information about the wine-cvs
mailing list