Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mf/main.c | 10 ++++++++++ dlls/mf/mf.spec | 2 +- dlls/mf/tests/mf.c | 23 +++++++++++++++++++++++ include/mfidl.idl | 1 + 4 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/dlls/mf/main.c b/dlls/mf/main.c index 6b1d9293c8a..55e071d23f4 100644 --- a/dlls/mf/main.c +++ b/dlls/mf/main.c @@ -1419,3 +1419,13 @@ HRESULT WINAPI MFRequireProtectedEnvironment(IMFPresentationDescriptor *pd)
return protected ? S_OK : S_FALSE; } + +/*********************************************************************** + * MFCreateNetSchemePlugin (mf.@) + */ +HRESULT WINAPI MFCreateNetSchemePlugin(REFIID riid, void **out) +{ + TRACE("%s, %p.\n", debugstr_guid(riid), out); + + return CoCreateInstance(&CLSID_NetSchemePlugin, NULL, CLSCTX_INPROC_SERVER, riid, (void **)out); +} diff --git a/dlls/mf/mf.spec b/dlls/mf/mf.spec index 8f340243fc2..162feac4b34 100644 --- a/dlls/mf/mf.spec +++ b/dlls/mf/mf.spec @@ -41,7 +41,7 @@ @ stub MFCreateMediaProcessor @ stdcall MFCreateMediaSession(ptr ptr) @ stub MFCreateNSCByteStreamPlugin -@ stub MFCreateNetSchemePlugin +@ stdcall MFCreateNetSchemePlugin(ptr ptr) @ stub MFCreatePMPHost @ stub MFCreatePMPMediaSession @ stub MFCreatePMPServer diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 31a84e47bc1..4015ca79910 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -6971,6 +6971,28 @@ failed: CoUninitialize(); }
+static void test_MFCreateNetSchemePlugin(void) +{ + IMFSchemeHandler *handler; + HRESULT hr; + + hr = MFCreateNetSchemePlugin(&IID_IMFSchemeHandler, (void **)&handler); + todo_wine + ok(hr == CO_E_NOTINITIALIZED, "Unexpected hr %#lx.\n", hr); + + hr = CoInitialize(NULL); + ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr); + + hr = MFCreateNetSchemePlugin(&IID_IMFSchemeHandler, (void **)&handler); + todo_wine + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + + if (SUCCEEDED(hr)) + IMFSchemeHandler_Release(handler); + + CoUninitialize(); +} + START_TEST(mf) { init_functions(); @@ -7004,6 +7026,7 @@ START_TEST(mf) test_sample_copier_output_processing(); test_MFGetTopoNodeCurrentType(); test_MFRequireProtectedEnvironment(); + test_MFCreateNetSchemePlugin(); test_wma_encoder(); test_wma_decoder(); test_h264_decoder(); diff --git a/include/mfidl.idl b/include/mfidl.idl index 7034378f585..68057de54c8 100644 --- a/include/mfidl.idl +++ b/include/mfidl.idl @@ -673,6 +673,7 @@ cpp_quote("HRESULT WINAPI MFCreateAudioRendererActivate(IMFActivate **activate); cpp_quote("HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);") cpp_quote("HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **bytestream);" ) cpp_quote("HRESULT WINAPI MFCreateMFByteStreamOnStreamEx(IUnknown *stream, IMFByteStream **bytestream);") +cpp_quote("HRESULT WINAPI MFCreateNetSchemePlugin(REFIID riid, void **obj);") cpp_quote("HRESULT WINAPI MFCreatePresentationClock(IMFPresentationClock **clock);") cpp_quote("HRESULT WINAPI MFCreatePresentationDescriptor(DWORD count, IMFStreamDescriptor **descriptors,") cpp_quote(" IMFPresentationDescriptor **presentation_desc);")
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112316
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
mf: mf.c:6981: Test failed: Unexpected hr 0.
=== w7u_adm (32 bit report) ===
mf: mf.c:6981: Test failed: Unexpected hr 0.
=== w7u_el (32 bit report) ===
mf: mf.c:6981: Test failed: Unexpected hr 0.
=== w10pro64_ar (64 bit report) ===
mf: mf.c:6981: Test failed: Unexpected hr 0.