Commit 3a433af2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat: Add a helper to create async result objects.

parent 493c2c32
...@@ -345,12 +345,10 @@ static const IMFAsyncResultVtbl async_result_vtbl = ...@@ -345,12 +345,10 @@ static const IMFAsyncResultVtbl async_result_vtbl =
async_result_GetStateNoAddRef, async_result_GetStateNoAddRef,
}; };
HRESULT WINAPI MFCreateAsyncResult(IUnknown *object, IMFAsyncCallback *callback, IUnknown *state, IMFAsyncResult **out) static HRESULT create_async_result(IUnknown *object, IMFAsyncCallback *callback, IUnknown *state, IMFAsyncResult **out)
{ {
struct async_result *result; struct async_result *result;
TRACE("%p, %p, %p, %p.\n", object, callback, state, out);
if (!out) if (!out)
return E_INVALIDARG; return E_INVALIDARG;
...@@ -374,10 +372,22 @@ HRESULT WINAPI MFCreateAsyncResult(IUnknown *object, IMFAsyncCallback *callback, ...@@ -374,10 +372,22 @@ HRESULT WINAPI MFCreateAsyncResult(IUnknown *object, IMFAsyncCallback *callback,
*out = &result->result.AsyncResult; *out = &result->result.AsyncResult;
TRACE("Created async result object %p.\n", *out);
return S_OK; return S_OK;
} }
/*********************************************************************** /***********************************************************************
* MFCreateAsyncResult (mfplat.@)
*/
HRESULT WINAPI MFCreateAsyncResult(IUnknown *object, IMFAsyncCallback *callback, IUnknown *state, IMFAsyncResult **out)
{
TRACE("%p, %p, %p, %p.\n", object, callback, state, out);
return create_async_result(object, callback, state, out);
}
/***********************************************************************
* MFAllocateWorkQueue (mfplat.@) * MFAllocateWorkQueue (mfplat.@)
*/ */
HRESULT WINAPI MFAllocateWorkQueue(DWORD *queue) HRESULT WINAPI MFAllocateWorkQueue(DWORD *queue)
......
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