quartz/videorenderer: Implement IOverlay::GetWindowHandle().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-10-01 22:43:14 -05:00 committed by Alexandre Julliard
parent c581404d31
commit 7fda84e72b
2 changed files with 32 additions and 2 deletions

View File

@ -1321,6 +1321,31 @@ static void test_unconnected_filter_state(void)
ok(!ref, "Got outstanding refcount %d.\n", ref);
}
static void test_overlay(void)
{
IBaseFilter *filter = create_video_renderer();
IOverlay *overlay;
HRESULT hr;
ULONG ref;
IPin *pin;
HWND hwnd;
IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hwnd = (HWND)0xdeadbeef;
hr = IOverlay_GetWindowHandle(overlay, &hwnd);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(hwnd && hwnd != (HWND)0xdeadbeef, "Got invalid window %p.\n", hwnd);
IOverlay_Release(overlay);
IPin_Release(pin);
ref = IBaseFilter_Release(filter);
ok(!ref, "Got outstanding refcount %d.\n", ref);
}
START_TEST(videorenderer)
{
CoInitialize(NULL);
@ -1334,6 +1359,7 @@ START_TEST(videorenderer)
test_enum_media_types();
test_unconnected_filter_state();
test_connect_pin();
test_overlay();
CoUninitialize();
}

View File

@ -854,8 +854,12 @@ static HRESULT WINAPI overlay_SetColorKey(IOverlay *iface, COLORKEY *key)
static HRESULT WINAPI overlay_GetWindowHandle(IOverlay *iface, HWND *window)
{
FIXME("iface %p, window %p, stub!\n", iface, window);
return E_NOTIMPL;
VideoRendererImpl *filter = impl_from_IOverlay(iface);
TRACE("filter %p, window %p.\n", filter, window);
*window = filter->baseControlWindow.baseWindow.hWnd;
return S_OK;
}
static HRESULT WINAPI overlay_GetClipList(IOverlay *iface, RECT *source, RECT *dest, RGNDATA **region)