Zebediah Figura : quartz/videorenderer: Set the destination rect to the whole client area when connecting.
Alexandre Julliard
julliard at winehq.org
Fri Jun 26 17:00:53 CDT 2020
Module: wine
Branch: master
Commit: 8725564f68332c9129ca701de9b85799a00ddebf
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8725564f68332c9129ca701de9b85799a00ddebf
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Thu Jun 25 17:57:38 2020 -0500
quartz/videorenderer: Set the destination rect to the whole client area when connecting.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/tests/videorenderer.c | 18 ++++++++++++++++++
dlls/quartz/videorenderer.c | 3 ++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c
index ab2b4f9e0d..b157700a92 100644
--- a/dlls/quartz/tests/videorenderer.c
+++ b/dlls/quartz/tests/videorenderer.c
@@ -2606,6 +2606,7 @@ static void test_basic_video(void)
UINT count;
ULONG ref;
IPin *pin;
+ RECT rect;
IBaseFilter_QueryInterface(filter, &IID_IBasicVideo, (void **)&video);
IBaseFilter_FindPin(filter, L"In", &pin);
@@ -2722,6 +2723,23 @@ static void test_basic_video(void)
test_basic_video_source(video);
test_basic_video_destination(video);
+ hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ hr = IFilterGraph2_Disconnect(graph, pin);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ vih.bmiHeader.biWidth = 16;
+ vih.bmiHeader.biHeight = 16;
+ hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+ check_source_position(video, 0, 0, 16, 16);
+
+ SetRect(&rect, 0, 0, 0, 0);
+ AdjustWindowRectEx(&rect, WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW, FALSE, 0);
+ check_destination_position(video, 0, 0, max(16, GetSystemMetrics(SM_CXMIN) - (rect.right - rect.left)),
+ max(16, GetSystemMetrics(SM_CYMIN) - (rect.bottom - rect.top)));
+
ref = IFilterGraph2_Release(graph);
ok(!ref, "Got outstanding refcount %d.\n", ref);
IBasicVideo_Release(video);
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index e004d0fc21..f6eebc9ef9 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -225,12 +225,13 @@ static HRESULT video_renderer_connect(struct strmbase_renderer *iface, const AM_
filter->VideoWidth = bitmap_header->biWidth;
filter->VideoHeight = abs(bitmap_header->biHeight);
SetRect(&rect, 0, 0, filter->VideoWidth, filter->VideoHeight);
- filter->window.src = filter->window.dst = rect;
+ filter->window.src = rect;
AdjustWindowRectEx(&rect, GetWindowLongW(window, GWL_STYLE), FALSE,
GetWindowLongW(window, GWL_EXSTYLE));
SetWindowPos(window, NULL, 0, 0, rect.right - rect.left, rect.bottom - rect.top,
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
+ GetClientRect(window, &filter->window.dst);
return S_OK;
}
More information about the wine-cvs
mailing list