mfplat: Add a helper to create async result objects.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-03-01 11:03:09 +03:00 committed by Alexandre Julliard
parent 493c2c323e
commit 3a433af207
1 changed files with 13 additions and 3 deletions

View File

@ -345,12 +345,10 @@ static const IMFAsyncResultVtbl async_result_vtbl =
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;
TRACE("%p, %p, %p, %p.\n", object, callback, state, out);
if (!out)
return E_INVALIDARG;
@ -374,9 +372,21 @@ HRESULT WINAPI MFCreateAsyncResult(IUnknown *object, IMFAsyncCallback *callback,
*out = &result->result.AsyncResult;
TRACE("Created async result object %p.\n", *out);
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.@)
*/