mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 10:43:37 +00:00
mfplay: Forward GetNativeVideoSize() to the session.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7ce6ff3cb4
commit
fd0d79c624
|
@ -1,6 +1,6 @@
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue