Nikolay Sivov : mfplay: Implement GetNativeVideoSize().
Module: wine Branch: master Commit: 2d2290843913fa8ed4f15670da5818fc3479bf05 URL: https://source.winehq.org/git/wine.git/?a=commit;h=2d2290843913fa8ed4f15670d... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 21 12:29:49 2021 +0300 mfplay: Implement GetNativeVideoSize(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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,
participants (1)
-
Alexandre Julliard