Commit 9b1bd731 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

evr/presenter: Return default flags for GetRenderingPrefs().

parent f79ca651
......@@ -61,6 +61,7 @@ struct video_presenter
HWND video_window;
MFVideoNormalizedRect src_rect;
RECT dst_rect;
DWORD rendering_prefs;
unsigned int state;
CRITICAL_SECTION cs;
};
......@@ -658,9 +659,18 @@ static HRESULT WINAPI video_presenter_control_SetRenderingPrefs(IMFVideoDisplayC
static HRESULT WINAPI video_presenter_control_GetRenderingPrefs(IMFVideoDisplayControl *iface, DWORD *flags)
{
FIXME("%p, %p.\n", iface, flags);
struct video_presenter *presenter = impl_from_IMFVideoDisplayControl(iface);
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, flags);
if (!flags)
return E_POINTER;
EnterCriticalSection(&presenter->cs);
*flags = presenter->rendering_prefs;
LeaveCriticalSection(&presenter->cs);
return S_OK;
}
static HRESULT WINAPI video_presenter_control_SetFullscreen(IMFVideoDisplayControl *iface, BOOL fullscreen)
......
......@@ -979,6 +979,7 @@ static void test_default_presenter(void)
HWND hwnd, hwnd2;
HANDLE handle;
IUnknown *unk;
DWORD flags;
float rate;
HRESULT hr;
GUID iid;
......@@ -1016,6 +1017,15 @@ static void test_default_presenter(void)
hr = IMFGetService_GetService(gs, &MR_VIDEO_RENDER_SERVICE, &IID_IMFVideoDisplayControl, (void **)&display_control);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, NULL);
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
flags = 123;
hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, &flags);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(!flags, "Unexpected rendering flags %#x.\n", flags);
IMFVideoDisplayControl_Release(display_control);
hr = IMFGetService_GetService(gs, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IDirect3DDeviceManager9, (void **)&dm);
......
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