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:
parent
493c2c323e
commit
3a433af207
|
@ -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,9 +372,21 @@ 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.@)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue