Commit c6f818e9 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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

parent af162fad
......@@ -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();
}
......@@ -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();
}
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment