Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/mixer.c | 14 +++++++++++++- dlls/evr/tests/evr.c | 18 +++++++++++++++++- include/evr.idl | 6 ++++++ 3 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index 7663a28ab10..006427b77af 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -797,7 +797,19 @@ static ULONG WINAPI video_mixer_getservice_Release(IMFGetService *iface)
static HRESULT WINAPI video_mixer_getservice_GetService(IMFGetService *iface, REFGUID service, REFIID riid, void **obj) { - FIXME("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj); + TRACE("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj); + + if (IsEqualGUID(service, &MR_VIDEO_MIXER_SERVICE)) + { + if (IsEqualIID(riid, &IID_IMFVideoMixerBitmap) || + IsEqualIID(riid, &IID_IMFVideoProcessor) || + IsEqualIID(riid, &IID_IMFVideoPositionMapper)) + { + return IMFGetService_QueryInterface(iface, riid, obj); + } + } + + FIXME("Unsupported service %s, riid %s.\n", debugstr_guid(service), debugstr_guid(riid));
return E_NOTIMPL; } diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index 4f954d868a6..5bfa87014d8 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -383,6 +383,7 @@ static void test_default_mixer(void) DWORD input_id, output_id; IMFAttributes *attributes, *attributes2; IMFTransform *transform; + IMFGetService *gs; unsigned int i; DWORD ids[16]; IUnknown *unk; @@ -396,10 +397,25 @@ static void test_default_mixer(void) ok(hr == S_OK, "Unexpected hr %#x.\n", hr); IUnknown_Release(unk);
- hr = IMFTransform_QueryInterface(transform, &IID_IMFGetService, (void **)&unk); + hr = IMFTransform_QueryInterface(transform, &IID_IMFGetService, (void **)&gs); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoMixerBitmap, (void **)&unk); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); IUnknown_Release(unk);
+ hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoProcessor, (void **)&unk); +todo_wine + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + if (SUCCEEDED(hr)) + IUnknown_Release(unk); + + hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoPositionMapper, (void **)&unk); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + IUnknown_Release(unk); + + IMFGetService_Release(gs); + hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoMixerBitmap, (void **)&unk); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); IUnknown_Release(unk); diff --git a/include/evr.idl b/include/evr.idl index 43afca1201a..4599e298790 100644 --- a/include/evr.idl +++ b/include/evr.idl @@ -218,5 +218,11 @@ interface IMFDesiredSample : IUnknown void Clear(); }
+cpp_quote("DEFINE_GUID(MR_VIDEO_RENDER_SERVICE, 0x1092a86c, 0xab1a, 0x459a, 0xa3, 0x36, 0x83, 0x1f, 0xbc, 0x4d, 0x11, 0xff);") +cpp_quote("DEFINE_GUID(MR_VIDEO_MIXER_SERVICE, 0x073cd2fc, 0x6cf4, 0x40b7, 0x88, 0x59, 0xe8, 0x95, 0x52, 0xc8, 0x41, 0xf8);") +cpp_quote("DEFINE_GUID(MR_VIDEO_ACCELERATION_SERVICE, 0xefef5175, 0x5c7d, 0x4ce2, 0xbb, 0xbd, 0x34, 0xff, 0x8b, 0xca, 0x65, 0x54);") +cpp_quote("DEFINE_GUID(MR_BUFFER_SERVICE, 0xa562248c, 0x9ac6, 0x4ffc, 0x9f, 0xba, 0x3a, 0xf8, 0xf8, 0xad, 0x1a, 0x4d);") +cpp_quote("DEFINE_GUID(VIDEO_ZOOM_RECT, 0x7aaa1638, 0x1b7f, 0x4c93, 0xbd, 0x89, 0x5b, 0x9c, 0x9f, 0xb6, 0xfc, 0xf0);") + cpp_quote("HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj);") cpp_quote("HRESULT WINAPI MFCreateVideoSampleFromSurface(IUnknown *surface, IMFSample **sample);")