Commit 1f768377 authored by Aidan Thornton's avatar Aidan Thornton Committed by Alexandre Julliard

quartz: Implement IFilterGraph2::AddSourceFilterForMoniker.

parent e6a558ad
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment