evr/presenter: Return default flags for GetRenderingPrefs().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f79ca651ae
commit
9b1bd73188
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue