mf/tests: Add a basic test creating media session.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2019-02-25 11:33:51 +03:00 committed by Alexandre Julliard
parent b474b9138c
commit ce557d1962
1 changed files with 22 additions and 0 deletions

View File

@ -448,9 +448,31 @@ static void test_MFCreateSequencerSource(void)
ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr);
} }
static void test_media_session(void)
{
IMFMediaSession *session;
IUnknown *unk;
HRESULT hr;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL);
ok(hr == S_OK, "Startup failure, hr %#x.\n", hr);
hr = MFCreateMediaSession(NULL, &session);
ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr);
hr = IMFMediaSession_QueryInterface(session, &IID_IMFAttributes, (void **)&unk);
ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr);
IMFMediaSession_Release(session);
hr = MFShutdown();
ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr);
}
START_TEST(mf) START_TEST(mf)
{ {
test_topology(); test_topology();
test_MFGetService(); test_MFGetService();
test_MFCreateSequencerSource(); test_MFCreateSequencerSource();
test_media_session();
} }