Commit b4c5dd49 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat: Implement MFInvokeCallback().

parent 0f0d4b14
......@@ -116,12 +116,12 @@
@ stub MFInitMediaTypeFromWaveFormatEx
@ stub MFInitVideoFormat
@ stub MFInitVideoFormat_RGB
@ stub MFInvokeCallback
@ stdcall MFInvokeCallback(ptr)
@ stub MFJoinIoPort
@ stdcall MFLockPlatform()
@ stdcall MFLockWorkQueue(long)
@ stub MFPutWorkItem
@ stub MFPutWorkItemEx
@ stdcall MFPutWorkItem(long ptr ptr)
@ stdcall MFPutWorkItemEx(long ptr)
@ stub MFRecordError
@ stub MFRemovePeriodicCallback
@ stub MFScheduleWorkItem
......
......@@ -331,3 +331,57 @@ HRESULT WINAPI MFUnlockWorkQueue(DWORD queue)
return unlock_user_queue(queue);
}
/***********************************************************************
* MFPutWorkItem (mfplat.@)
*/
HRESULT WINAPI MFPutWorkItem(DWORD queue, IMFAsyncCallback *callback, IUnknown *state)
{
IMFAsyncResult *result;
HRESULT hr;
TRACE("%#x, %p, %p.\n", queue, callback, state);
if (FAILED(hr = MFCreateAsyncResult(NULL, callback, state, &result)))
return hr;
hr = MFPutWorkItemEx(queue, result);
IMFAsyncResult_Release(result);
return hr;
}
/***********************************************************************
* MFPutWorkItemEx (mfplat.@)
*/
HRESULT WINAPI MFPutWorkItemEx(DWORD queue, IMFAsyncResult *result)
{
FIXME("%#x, %p\n", queue, result);
return E_NOTIMPL;
}
/***********************************************************************
* MFInvokeCallback (mfplat.@)
*/
HRESULT WINAPI MFInvokeCallback(IMFAsyncResult *result)
{
MFASYNCRESULT *result_data = (MFASYNCRESULT *)result;
DWORD queue = MFASYNC_CALLBACK_QUEUE_STANDARD, flags;
HRESULT hr;
TRACE("%p.\n", result);
if (FAILED(IMFAsyncCallback_GetParameters(result_data->pCallback, &flags, &queue)))
queue = MFASYNC_CALLBACK_QUEUE_STANDARD;
if (FAILED(MFLockWorkQueue(queue)))
queue = MFASYNC_CALLBACK_QUEUE_STANDARD;
hr = MFPutWorkItemEx(queue, result);
MFUnlockWorkQueue(queue);
return hr;
}
......@@ -102,6 +102,8 @@ HRESULT WINAPI MFTEnumEx(GUID category, UINT32 flags, const MFT_REGISTER_TYPE_IN
UINT32 *pcount);
HRESULT WINAPI MFInvokeCallback(IMFAsyncResult *result);
HRESULT WINAPI MFLockPlatform(void);
HRESULT WINAPI MFPutWorkItem(DWORD queue, IMFAsyncCallback *callback, IUnknown *state);
HRESULT WINAPI MFPutWorkItemEx(DWORD queue, IMFAsyncResult *result);
HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags, UINT32 cinput,
MFT_REGISTER_TYPE_INFO *input_types, UINT32 coutput,
MFT_REGISTER_TYPE_INFO *output_types, IMFAttributes *attributes);
......
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