Commit 8be62e8e authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Check whether the pin is connected in IVideoWindow::put_Visible().

Ferro CCTV calls this.
parent e4ec04bf
......@@ -2402,6 +2402,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Visible(window, OATRUE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source);
IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
IFilterGraph2_AddFilter(graph, filter, NULL);
......
......@@ -2401,6 +2401,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Visible(window, OATRUE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source);
IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
IFilterGraph2_AddFilter(graph, filter, NULL);
......
......@@ -2627,6 +2627,9 @@ static void test_video_window(void)
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Visible(window, OATRUE);
ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source);
IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL);
IFilterGraph2_AddFilter(graph, filter, NULL);
......
......@@ -350,6 +350,9 @@ HRESULT WINAPI BaseControlWindowImpl_put_Visible(IVideoWindow *iface, LONG visib
TRACE("window %p, visible %ld.\n", window, visible);
if (!window->pPin->peer)
return VFW_E_NOT_CONNECTED;
ShowWindow(window->hwnd, visible ? SW_SHOW : SW_HIDE);
return S_OK;
}
......
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