From fef1d403c5dc18722883361e95f7b0f3a5e68b58 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 4 Nov 2019 16:04:33 +0300 Subject: [PATCH] mf: Add MFCreateVideoRendererActivate(). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/mf/main.c | 24 ++++++++++++++++++++++++ dlls/mf/mf.spec | 2 +- dlls/mf/tests/mf.c | 12 ++++++++++++ include/mfidl.idl | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/dlls/mf/main.c b/dlls/mf/main.c index 2e6dc78290d..251d59e1c06 100644 --- a/dlls/mf/main.c +++ b/dlls/mf/main.c @@ -1144,3 +1144,27 @@ HRESULT WINAPI MFEnumDeviceSources(IMFAttributes *attributes, IMFActivate ***sou return S_OK; } + +static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context, IUnknown **obj) +{ + FIXME("%p, %p, %p.\n", attributes, user_context, obj); + + return E_NOTIMPL; +} + +static void evr_free_private(void *user_context) +{ +} + +static const struct activate_funcs evr_activate_funcs = +{ + evr_create_object, + evr_free_private, +}; + +HRESULT WINAPI MFCreateVideoRendererActivate(HWND hwnd, IMFActivate **activate) +{ + TRACE("%p, %p.\n", hwnd, activate); + + return create_activation_object(hwnd, &evr_activate_funcs, activate); +} diff --git a/dlls/mf/mf.spec b/dlls/mf/mf.spec index f13a2451fb6..a8dd314aa3b 100644 --- a/dlls/mf/mf.spec +++ b/dlls/mf/mf.spec @@ -67,7 +67,7 @@ @ stub MFCreateTranscodeTopology @ stub MFCreateUrlmonSchemePlugin @ stub MFCreateVideoRenderer -@ stub MFCreateVideoRendererActivate +@ stdcall MFCreateVideoRendererActivate(long ptr) @ stub MFCreateWMAEncoderActivate @ stub MFCreateWMVEncoderActivate @ stdcall MFEnumDeviceSources(ptr ptr ptr) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 0428c22ed3a..b353df780b6 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -2584,6 +2584,17 @@ if (SUCCEEDED(hr)) CoUninitialize(); } +static void test_evr(void) +{ + IMFActivate *activate; + HRESULT hr; + + hr = MFCreateVideoRendererActivate(NULL, &activate); + ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr); + + IMFActivate_Release(activate); +} + START_TEST(mf) { test_topology(); @@ -2597,4 +2608,5 @@ START_TEST(mf) test_video_processor(); test_quality_manager(); test_sar(); + test_evr(); } diff --git a/include/mfidl.idl b/include/mfidl.idl index 9c14c5604bf..da433998288 100644 --- a/include/mfidl.idl +++ b/include/mfidl.idl @@ -586,6 +586,7 @@ cpp_quote("HRESULT WINAPI MFCreateSystemTimeSource(IMFPresentationTimeSource **t cpp_quote("HRESULT WINAPI MFCreateTopology(IMFTopology **topology);") cpp_quote("HRESULT WINAPI MFCreateTopologyNode(MF_TOPOLOGY_TYPE node_type, IMFTopologyNode **node);") cpp_quote("HRESULT WINAPI MFCreateTopoLoader(IMFTopoLoader **loader);") +cpp_quote("HRESULT WINAPI MFCreateVideoRendererActivate(HWND hwnd, IMFActivate **activate);") cpp_quote("HRESULT WINAPI MFEnumDeviceSources(IMFAttributes *attributes, IMFActivate ***sources, UINT32 *count);") cpp_quote("HRESULT WINAPI MFGetSupportedMimeTypes(PROPVARIANT *array);") cpp_quote("HRESULT WINAPI MFGetService(IUnknown *object, REFGUID service, REFIID iid, void **obj);")