From ce557d19624f488faff6c4677e61236910818b5b Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 25 Feb 2019 11:33:51 +0300 Subject: [PATCH] mf/tests: Add a basic test creating media session. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/mf/tests/mf.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 21d8be80c8e..150314933d3 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -448,9 +448,31 @@ static void test_MFCreateSequencerSource(void) 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) { test_topology(); test_MFGetService(); test_MFCreateSequencerSource(); + test_media_session(); }