mf/evr: Forward mixer service requests to the mixer.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-07-08 18:10:37 +03:00 committed by Alexandre Julliard
parent 52f8191b93
commit 58f7c7823b
2 changed files with 27 additions and 2 deletions

View File

@ -468,9 +468,28 @@ static ULONG WINAPI video_renderer_get_service_Release(IMFGetService *iface)
static HRESULT WINAPI video_renderer_get_service_GetService(IMFGetService *iface, REFGUID service, REFIID riid, void **obj)
{
FIXME("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj);
struct video_renderer *renderer = impl_from_IMFGetService(iface);
HRESULT hr = E_NOINTERFACE;
IMFGetService *gs = NULL;
return E_NOTIMPL;
TRACE("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj);
if (IsEqualGUID(service, &MR_VIDEO_MIXER_SERVICE))
{
hr = IMFTransform_QueryInterface(renderer->mixer, &IID_IMFGetService, (void **)&gs);
}
else
{
FIXME("Unsupported service %s.\n", debugstr_guid(service));
}
if (gs)
{
hr = IMFGetService_GetService(gs, service, riid, obj);
IMFGetService_Release(gs);
}
return hr;
}
static const IMFGetServiceVtbl video_renderer_get_service_vtbl =

View File

@ -3235,6 +3235,7 @@ static void test_evr(void)
IMFActivate *activate;
DWORD flags, count;
IMFGetService *gs;
IUnknown *unk;
UINT64 value;
HRESULT hr;
@ -3280,6 +3281,11 @@ static void test_evr(void)
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFGetService, (void **)&gs);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoMixerControl, (void **)&unk);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IUnknown_Release(unk);
IMFGetService_Release(gs);
hr = IMFActivate_ShutdownObject(activate);