1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

mf: Implement MFCreateVideoRenderer().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-10-05 15:26:41 +03:00 committed by Alexandre Julliard
parent 93de829b13
commit 6019f3c179
4 changed files with 34 additions and 1 deletions

View File

@ -1388,3 +1388,31 @@ HRESULT WINAPI MFCreateVideoRendererActivate(HWND hwnd, IMFActivate **activate)
return hr;
}
/***********************************************************************
* MFCreateVideoRenderer (mf.@)
*/
HRESULT WINAPI MFCreateVideoRenderer(REFIID riid, void **renderer)
{
IMFAttributes *attributes;
IUnknown *obj;
HRESULT hr;
TRACE("%s, %p.\n", debugstr_guid(riid), renderer);
*renderer = NULL;
if (FAILED(hr = MFCreateAttributes(&attributes, 0)))
return hr;
hr = evr_create_object(attributes, NULL, &obj);
IMFAttributes_Release(attributes);
if (SUCCEEDED(hr))
{
hr = IUnknown_QueryInterface(obj, riid, renderer);
IUnknown_Release(obj);
}
return hr;
}

View File

@ -66,7 +66,7 @@
@ stub MFCreateTranscodeSinkActivate
@ stub MFCreateTranscodeTopology
@ stub MFCreateUrlmonSchemePlugin
@ stub MFCreateVideoRenderer
@ stdcall MFCreateVideoRenderer(ptr ptr)
@ stdcall MFCreateVideoRendererActivate(long ptr)
@ stub MFCreateWMAEncoderActivate
@ stub MFCreateWMVEncoderActivate

View File

@ -3253,6 +3253,10 @@ static void test_evr(void)
hr = CoInitialize(NULL);
ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr);
hr = MFCreateVideoRenderer(&IID_IUnknown, (void **)&unk);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IUnknown_Release(unk);
hr = MFCreateVideoRendererActivate(NULL, NULL);
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);

View File

@ -313,5 +313,6 @@ cpp_quote("HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device
cpp_quote("HRESULT WINAPI MFCreateVideoMixerAndPresenter(IUnknown *mixer_outer, IUnknown *presenter_outer, ")
cpp_quote(" REFIID riid_mixer, void **mixer, REFIID riid_presenter, void **presenter);")
cpp_quote("HRESULT WINAPI MFCreateVideoPresenter(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj);")
cpp_quote("HRESULT WINAPI MFCreateVideoRenderer(REFIID riid, void **renderer);")
cpp_quote("HRESULT WINAPI MFCreateVideoSampleAllocator(REFIID riid, void **allocator);")
cpp_quote("HRESULT WINAPI MFCreateVideoSampleFromSurface(IUnknown *surface, IMFSample **sample);")