[PATCH] mf: Add MFCreateVideoRendererActivate().
Nikolay Sivov
nsivov at codeweavers.com
Mon Nov 4 07:04:33 CST 2019
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
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 2e6dc78290..251d59e1c0 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 f13a2451fb..a8dd314aa3 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 0428c22ed3..b353df780b 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 9c14c5604b..da43399828 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);")
--
2.24.0.rc1
More information about the wine-devel
mailing list