Commit fd0d79c6 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplay: Forward GetNativeVideoSize() to the session.

parent 7ce6ff3c
MODULE = mfplay.dll
IMPORTLIB = mfplay
IMPORTS = mfplat mf ole32 user32 uuid mfuuid
IMPORTS = mfplat mf ole32 user32 uuid mfuuid strmiids
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
......
......@@ -1251,9 +1251,20 @@ static HRESULT WINAPI media_player_GetNativeVideoSize(IMFPMediaPlayer *iface,
static HRESULT WINAPI media_player_GetIdealVideoSize(IMFPMediaPlayer *iface,
SIZE *min_size, SIZE *max_size)
{
FIXME("%p, %p, %p.\n", iface, min_size, max_size);
struct media_player *player = impl_from_IMFPMediaPlayer(iface);
IMFVideoDisplayControl *display_control;
HRESULT hr;
return E_NOTIMPL;
TRACE("%p, %p, %p.\n", iface, min_size, max_size);
if (SUCCEEDED(hr = MFGetService((IUnknown *)player->session, &MR_VIDEO_RENDER_SERVICE,
&IID_IMFVideoDisplayControl, (void **)&display_control)))
{
hr = IMFVideoDisplayControl_GetIdealVideoSize(display_control, min_size, max_size);
IMFVideoDisplayControl_Release(display_control);
}
return hr;
}
static HRESULT WINAPI media_player_SetVideoSourceRect(IMFPMediaPlayer *iface,
......
......@@ -122,6 +122,7 @@ static void test_create_player(void)
static void test_shutdown(void)
{
SIZE min_size, max_size;
IMFPMediaPlayer *player;
float slowest, fastest;
HRESULT hr;
......@@ -156,6 +157,9 @@ static void test_shutdown(void)
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(state == MFP_MEDIAPLAYER_STATE_SHUTDOWN, "Unexpected state %d.\n", state);
hr = IMFPMediaPlayer_GetIdealVideoSize(player, &min_size, &max_size);
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
hr = IMFPMediaPlayer_CreateMediaItemFromURL(player, L"url", TRUE, 0, &item);
ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment