mfplay: Implement source rectangle methods.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-04-21 12:29:46 +03:00 committed by Alexandre Julliard
parent fd0d79c624
commit 6580ce6801
1 changed files with 27 additions and 4 deletions

View File

@ -1270,17 +1270,40 @@ static HRESULT WINAPI media_player_GetIdealVideoSize(IMFPMediaPlayer *iface,
static HRESULT WINAPI media_player_SetVideoSourceRect(IMFPMediaPlayer *iface,
MFVideoNormalizedRect const *rect)
{
FIXME("%p, %p.\n", iface, rect);
struct media_player *player = impl_from_IMFPMediaPlayer(iface);
IMFVideoDisplayControl *display_control;
HRESULT hr;
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, rect);
if (SUCCEEDED(hr = MFGetService((IUnknown *)player->session, &MR_VIDEO_RENDER_SERVICE,
&IID_IMFVideoDisplayControl, (void **)&display_control)))
{
hr = IMFVideoDisplayControl_SetVideoPosition(display_control, rect, NULL);
IMFVideoDisplayControl_Release(display_control);
}
return hr;
}
static HRESULT WINAPI media_player_GetVideoSourceRect(IMFPMediaPlayer *iface,
MFVideoNormalizedRect *rect)
{
FIXME("%p, %p.\n", iface, rect);
struct media_player *player = impl_from_IMFPMediaPlayer(iface);
IMFVideoDisplayControl *display_control;
HRESULT hr;
RECT dest;
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, rect);
if (SUCCEEDED(hr = MFGetService((IUnknown *)player->session, &MR_VIDEO_RENDER_SERVICE,
&IID_IMFVideoDisplayControl, (void **)&display_control)))
{
hr = IMFVideoDisplayControl_GetVideoPosition(display_control, rect, &dest);
IMFVideoDisplayControl_Release(display_control);
}
return hr;
}
static HRESULT WINAPI media_player_SetAspectRatioMode(IMFPMediaPlayer *iface, DWORD mode)