quartz/vmr9: 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-04 10:02:49 -05:00 committed by Alexandre Julliard
parent af162fad4f
commit c6f818e9a6
3 changed files with 58 additions and 2 deletions

View File

@ -1097,6 +1097,31 @@ static void test_connect_pin(void)
ok(!ref, "Got outstanding refcount %d.\n", ref);
}
static void test_overlay(void)
{
IBaseFilter *filter = create_vmr7(0);
IOverlay *overlay;
HRESULT hr;
ULONG ref;
IPin *pin;
HWND hwnd;
IBaseFilter_FindPin(filter, L"VMR Input0", &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);
todo_wine 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(vmr7)
{
CoInitialize(NULL);
@ -1111,6 +1136,7 @@ START_TEST(vmr7)
test_enum_media_types();
test_unconnected_filter_state();
test_connect_pin();
test_overlay();
CoUninitialize();
}

View File

@ -1096,6 +1096,31 @@ static void test_connect_pin(void)
ok(!ref, "Got outstanding refcount %d.\n", ref);
}
static void test_overlay(void)
{
IBaseFilter *filter = create_vmr9(0);
IOverlay *overlay;
HRESULT hr;
ULONG ref;
IPin *pin;
HWND hwnd;
IBaseFilter_FindPin(filter, L"VMR Input0", &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);
todo_wine 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(vmr9)
{
IBaseFilter *filter;
@ -1121,6 +1146,7 @@ START_TEST(vmr9)
test_enum_media_types();
test_unconnected_filter_state();
test_connect_pin();
test_overlay();
CoUninitialize();
}

View File

@ -2183,8 +2183,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;
struct quartz_vmr *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)