Commit 44c0e691 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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

parent 4d580796
...@@ -2130,14 +2130,14 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap ...@@ -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 ...@@ -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 ...@@ -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_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); struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
IVMRImagePresenter9_StartPresenting(filter->presenter, filter->cookie);
if (filter->window.hwnd && filter->window.AutoShow) if (filter->window.hwnd && filter->window.AutoShow)
ShowWindow(filter->window.hwnd, SW_SHOW); 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); SetEvent(filter->run_event);
} }
...@@ -659,6 +665,7 @@ static const struct strmbase_renderer_ops renderer_ops = ...@@ -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,
......
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