Zebediah Figura : quartz/vmr9: Auto-show the window when pausing, not when running.

Alexandre Julliard julliard at winehq.org
Tue Jul 14 16:23:37 CDT 2020


Module: wine
Branch: master
Commit: 44c0e691379afeba50e39c81624702af89a10e00
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=44c0e691379afeba50e39c81624702af89a10e00

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Jul 13 17:37:18 2020 -0500

quartz/vmr9: Auto-show the window when pausing, not when running.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/quartz/tests/vmr7.c |  4 ++--
 dlls/quartz/tests/vmr9.c |  4 ++--
 dlls/quartz/vmr9.c       | 11 +++++++++--
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c
index adf677535b..cf4675ce06 100644
--- a/dlls/quartz/tests/vmr7.c
+++ b/dlls/quartz/tests/vmr7.c
@@ -2130,14 +2130,14 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap
 
     hr = IVideoWindow_get_Visible(window, &l);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
-    todo_wine ok(l == OATRUE, "Got %d.\n", l);
+    ok(l == OATRUE, "Got %d.\n", l);
 
     hr = IMediaControl_Stop(control);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
     hr = IVideoWindow_get_Visible(window, &l);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
-    todo_wine ok(l == OATRUE, "Got %d.\n", l);
+    ok(l == OATRUE, "Got %d.\n", l);
 
     hr = IVideoWindow_put_AutoShow(window, OAFALSE);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c
index 005b10974f..e953c05dd1 100644
--- a/dlls/quartz/tests/vmr9.c
+++ b/dlls/quartz/tests/vmr9.c
@@ -2376,14 +2376,14 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap
 
     hr = IVideoWindow_get_Visible(window, &l);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
-    todo_wine ok(l == OATRUE, "Got %d.\n", l);
+    ok(l == OATRUE, "Got %d.\n", l);
 
     hr = IMediaControl_Stop(control);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
     hr = IVideoWindow_get_Visible(window, &l);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
-    todo_wine ok(l == OATRUE, "Got %d.\n", l);
+    ok(l == OATRUE, "Got %d.\n", l);
 
     hr = IVideoWindow_put_AutoShow(window, OAFALSE);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index a540feb237..aeaefd52c6 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -477,13 +477,19 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
     return VFW_E_TYPE_NOT_ACCEPTED;
 }
 
-static void vmr_start_stream(struct strmbase_renderer *iface)
+static void vmr_init_stream(struct strmbase_renderer *iface)
 {
     struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
 
-    IVMRImagePresenter9_StartPresenting(filter->presenter, filter->cookie);
     if (filter->window.hwnd && filter->window.AutoShow)
         ShowWindow(filter->window.hwnd, SW_SHOW);
+}
+
+static void vmr_start_stream(struct strmbase_renderer *iface)
+{
+    struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
+
+    IVMRImagePresenter9_StartPresenting(filter->presenter, filter->cookie);
     SetEvent(filter->run_event);
 }
 
@@ -659,6 +665,7 @@ static const struct strmbase_renderer_ops renderer_ops =
 {
     .pfnCheckMediaType = VMR9_CheckMediaType,
     .pfnDoRenderSample = VMR9_DoRenderSample,
+    .renderer_init_stream = vmr_init_stream,
     .renderer_start_stream = vmr_start_stream,
     .renderer_stop_stream = vmr_stop_stream,
     .pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow,




More information about the wine-cvs mailing list