Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplay/player.c | 18 ++++++++++++++++-- dlls/mfplay/tests/mfplay.c | 3 --- 2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/dlls/mfplay/player.c b/dlls/mfplay/player.c index 7f9188e5619..31c8e094cd2 100644 --- a/dlls/mfplay/player.c +++ b/dlls/mfplay/player.c @@ -1524,9 +1524,23 @@ static HRESULT WINAPI media_player_GetVideoWindow(IMFPMediaPlayer *iface, HWND *
static HRESULT WINAPI media_player_UpdateVideo(IMFPMediaPlayer *iface) { - FIXME("%p.\n", iface); + struct media_player *player = impl_from_IMFPMediaPlayer(iface); + IMFVideoDisplayControl *display_control; + HRESULT hr; + RECT rect;
- return E_NOTIMPL; + TRACE("%p.\n", iface); + + if (SUCCEEDED(hr = media_player_get_display_control(player, &display_control))) + { + if (GetClientRect(player->output_window, &rect)) + hr = IMFVideoDisplayControl_SetVideoPosition(display_control, NULL, &rect); + if (SUCCEEDED(hr)) + hr = IMFVideoDisplayControl_RepaintVideo(display_control); + IMFVideoDisplayControl_Release(display_control); + } + + return hr; }
static HRESULT WINAPI media_player_SetBorderColor(IMFPMediaPlayer *iface, COLORREF color) diff --git a/dlls/mfplay/tests/mfplay.c b/dlls/mfplay/tests/mfplay.c index 3c2782a9412..44526801c22 100644 --- a/dlls/mfplay/tests/mfplay.c +++ b/dlls/mfplay/tests/mfplay.c @@ -203,7 +203,6 @@ static void test_shutdown(void) ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_UpdateVideo(player); - todo_wine ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_CreateMediaItemFromURL(player, L"url", TRUE, 0, &item); @@ -316,7 +315,6 @@ static void test_video_control(void) ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_UpdateVideo(player); - todo_wine ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
IMFPMediaPlayer_Release(player); @@ -356,7 +354,6 @@ static void test_video_control(void) ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaPlayer_UpdateVideo(player); - todo_wine ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
IMFPMediaPlayer_Release(player);