Commit 442ef406 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Implement IVMRSurfaceAllocatorNotify::AdviseSurfaceAllocator().

parent 4c40aeb9
......@@ -1176,8 +1176,39 @@ static ULONG WINAPI surface_allocator_notify_Release(IVMRSurfaceAllocatorNotify
static HRESULT WINAPI surface_allocator_notify_AdviseSurfaceAllocator(
IVMRSurfaceAllocatorNotify *iface, DWORD_PTR cookie, IVMRSurfaceAllocator *allocator)
{
FIXME("iface %p, cookie %#Ix, allocator %p, stub!\n", iface, cookie, allocator);
return E_NOTIMPL;
struct vmr7 *filter = impl_from_IVMRSurfaceAllocatorNotify(iface);
IVMRImagePresenter *presenter;
TRACE("filter %p, cookie %#Ix, allocator %p.\n", filter, cookie, allocator);
EnterCriticalSection(&filter->renderer.filter.filter_cs);
filter->cookie = cookie;
if (filter->renderer.sink.pin.peer)
{
LeaveCriticalSection(&filter->renderer.filter.filter_cs);
WARN("Attempt to set allocator while connected; returning VFW_E_WRONG_STATE.\n");
return VFW_E_WRONG_STATE;
}
if (FAILED(IVMRSurfaceAllocator_QueryInterface(allocator, &IID_IVMRImagePresenter, (void **)&presenter)))
{
LeaveCriticalSection(&filter->renderer.filter.filter_cs);
return E_NOINTERFACE;
}
if (filter->allocator)
{
IVMRImagePresenter_Release(filter->presenter);
IVMRSurfaceAllocator_Release(filter->allocator);
}
filter->allocator = allocator;
filter->presenter = presenter;
IVMRSurfaceAllocator_AddRef(allocator);
LeaveCriticalSection(&filter->renderer.filter.filter_cs);
return S_OK;
}
static HRESULT WINAPI surface_allocator_notify_SetDDrawDevice(
......
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