quartz/vmr9: Auto-show the window when pausing, not when running.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4d580796bc
commit
44c0e69137
|
@ -2130,14 +2130,14 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap
|
||||||
|
|
||||||
hr = IVideoWindow_get_Visible(window, &l);
|
hr = IVideoWindow_get_Visible(window, &l);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
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);
|
hr = IMediaControl_Stop(control);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
hr = IVideoWindow_get_Visible(window, &l);
|
hr = IVideoWindow_get_Visible(window, &l);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
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);
|
hr = IVideoWindow_put_AutoShow(window, OAFALSE);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
|
|
@ -2376,14 +2376,14 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap
|
||||||
|
|
||||||
hr = IVideoWindow_get_Visible(window, &l);
|
hr = IVideoWindow_get_Visible(window, &l);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
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);
|
hr = IMediaControl_Stop(control);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
|
||||||
hr = IVideoWindow_get_Visible(window, &l);
|
hr = IVideoWindow_get_Visible(window, &l);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
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);
|
hr = IVideoWindow_put_AutoShow(window, OAFALSE);
|
||||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||||
|
|
|
@ -477,13 +477,19 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
|
||||||
return VFW_E_TYPE_NOT_ACCEPTED;
|
return VFW_E_TYPE_NOT_ACCEPTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void vmr_init_stream(struct strmbase_renderer *iface)
|
||||||
|
{
|
||||||
|
struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
|
||||||
|
|
||||||
|
if (filter->window.hwnd && filter->window.AutoShow)
|
||||||
|
ShowWindow(filter->window.hwnd, SW_SHOW);
|
||||||
|
}
|
||||||
|
|
||||||
static void vmr_start_stream(struct strmbase_renderer *iface)
|
static void vmr_start_stream(struct strmbase_renderer *iface)
|
||||||
{
|
{
|
||||||
struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
|
struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
|
||||||
|
|
||||||
IVMRImagePresenter9_StartPresenting(filter->presenter, filter->cookie);
|
IVMRImagePresenter9_StartPresenting(filter->presenter, filter->cookie);
|
||||||
if (filter->window.hwnd && filter->window.AutoShow)
|
|
||||||
ShowWindow(filter->window.hwnd, SW_SHOW);
|
|
||||||
SetEvent(filter->run_event);
|
SetEvent(filter->run_event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,6 +665,7 @@ static const struct strmbase_renderer_ops renderer_ops =
|
||||||
{
|
{
|
||||||
.pfnCheckMediaType = VMR9_CheckMediaType,
|
.pfnCheckMediaType = VMR9_CheckMediaType,
|
||||||
.pfnDoRenderSample = VMR9_DoRenderSample,
|
.pfnDoRenderSample = VMR9_DoRenderSample,
|
||||||
|
.renderer_init_stream = vmr_init_stream,
|
||||||
.renderer_start_stream = vmr_start_stream,
|
.renderer_start_stream = vmr_start_stream,
|
||||||
.renderer_stop_stream = vmr_stop_stream,
|
.renderer_stop_stream = vmr_stop_stream,
|
||||||
.pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow,
|
.pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow,
|
||||||
|
|
Loading…
Reference in New Issue