From 2d2290843913fa8ed4f15670da5818fc3479bf05 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 21 Apr 2021 12:29:49 +0300 Subject: [PATCH] mfplay: Implement GetNativeVideoSize(). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/mfplay/player.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/mfplay/player.c b/dlls/mfplay/player.c index aa9392a1e97..540a182a5ba 100644 --- a/dlls/mfplay/player.c +++ b/dlls/mfplay/player.c @@ -1243,9 +1243,20 @@ static HRESULT WINAPI media_player_SetMute(IMFPMediaPlayer *iface, BOOL mute) static HRESULT WINAPI media_player_GetNativeVideoSize(IMFPMediaPlayer *iface, SIZE *video, SIZE *arvideo) { - FIXME("%p, %p, %p.\n", iface, video, arvideo); + struct media_player *player = impl_from_IMFPMediaPlayer(iface); + IMFVideoDisplayControl *display_control; + HRESULT hr; - return E_NOTIMPL; + TRACE("%p, %p, %p.\n", iface, video, arvideo); + + if (SUCCEEDED(hr = MFGetService((IUnknown *)player->session, &MR_VIDEO_RENDER_SERVICE, + &IID_IMFVideoDisplayControl, (void **)&display_control))) + { + hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, video, arvideo); + IMFVideoDisplayControl_Release(display_control); + } + + return hr; } static HRESULT WINAPI media_player_GetIdealVideoSize(IMFPMediaPlayer *iface,