amstream/tests: Add tests for GetMultiMediaStream methods.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
355a3248d4
commit
04c3a9bad2
|
@ -253,6 +253,7 @@ static void test_media_streams(void)
|
|||
if (video_stream)
|
||||
{
|
||||
IAMMediaStream* am_media_stream;
|
||||
IMultiMediaStream *multi_media_stream;
|
||||
IAudioMediaStream* audio_media_stream;
|
||||
IDirectDrawMediaStream *ddraw_stream = NULL;
|
||||
IDirectDrawStreamSample *ddraw_sample = NULL;
|
||||
|
@ -260,7 +261,19 @@ static void test_media_streams(void)
|
|||
hr = IMediaStream_QueryInterface(video_stream, &IID_IAMMediaStream, (LPVOID*)&am_media_stream);
|
||||
ok(hr == S_OK, "IMediaStream_QueryInterface returned: %x\n", hr);
|
||||
ok((void*)am_media_stream == (void*)video_stream, "Not same interface, got %p expected %p\n", am_media_stream, video_stream);
|
||||
|
||||
hr = IAMMediaStream_GetMultiMediaStream(am_media_stream, NULL);
|
||||
todo_wine ok(hr == E_POINTER, "Expected E_POINTER, got %x\n", hr);
|
||||
|
||||
multi_media_stream = (void *)0xdeadbeef;
|
||||
hr = IAMMediaStream_GetMultiMediaStream(am_media_stream, &multi_media_stream);
|
||||
todo_wine ok(hr == S_OK, "IAMMediaStream_GetMultiMediaStream returned: %x\n", hr);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
ok((void *)multi_media_stream == (void *)pams, "Expected %p, got %p\n", pams, multi_media_stream);
|
||||
IMultiMediaStream_Release(multi_media_stream);
|
||||
}
|
||||
|
||||
IAMMediaStream_Release(am_media_stream);
|
||||
|
||||
hr = IMediaStream_QueryInterface(video_stream, &IID_IAudioMediaStream, (LPVOID*)&audio_media_stream);
|
||||
|
@ -280,6 +293,18 @@ static void test_media_streams(void)
|
|||
|
||||
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &ddraw_sample);
|
||||
ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr);
|
||||
|
||||
hr = IDirectDrawMediaStream_GetMultiMediaStream(ddraw_stream, NULL);
|
||||
todo_wine ok(hr == E_POINTER, "Expected E_POINTER, got %x\n", hr);
|
||||
|
||||
multi_media_stream = (void *)0xdeadbeef;
|
||||
hr = IDirectDrawMediaStream_GetMultiMediaStream(ddraw_stream, &multi_media_stream);
|
||||
todo_wine ok(hr == S_OK, "IDirectDrawMediaStream_GetMultiMediaStream returned: %x\n", hr);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
ok((void *)multi_media_stream == (void *)pams, "Expected %p, got %p\n", pams, multi_media_stream);
|
||||
IMultiMediaStream_Release(multi_media_stream);
|
||||
}
|
||||
}
|
||||
|
||||
if (ddraw_sample)
|
||||
|
@ -344,6 +369,7 @@ static void test_media_streams(void)
|
|||
if (audio_stream)
|
||||
{
|
||||
IAMMediaStream* am_media_stream;
|
||||
IMultiMediaStream *multi_media_stream;
|
||||
IDirectDrawMediaStream* ddraw_stream = NULL;
|
||||
IAudioMediaStream* audio_media_stream = NULL;
|
||||
IAudioStreamSample *audio_sample = NULL;
|
||||
|
@ -351,7 +377,19 @@ static void test_media_streams(void)
|
|||
hr = IMediaStream_QueryInterface(audio_stream, &IID_IAMMediaStream, (LPVOID*)&am_media_stream);
|
||||
ok(hr == S_OK, "IMediaStream_QueryInterface returned: %x\n", hr);
|
||||
ok((void*)am_media_stream == (void*)audio_stream, "Not same interface, got %p expected %p\n", am_media_stream, audio_stream);
|
||||
|
||||
hr = IAMMediaStream_GetMultiMediaStream(am_media_stream, NULL);
|
||||
todo_wine ok(hr == E_POINTER, "Expected E_POINTER, got %x\n", hr);
|
||||
|
||||
multi_media_stream = (void *)0xdeadbeef;
|
||||
hr = IAMMediaStream_GetMultiMediaStream(am_media_stream, &multi_media_stream);
|
||||
todo_wine ok(hr == S_OK, "IAMMediaStream_GetMultiMediaStream returned: %x\n", hr);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
ok((void *)multi_media_stream == (void *)pams, "Expected %p, got %p\n", pams, multi_media_stream);
|
||||
IMultiMediaStream_Release(multi_media_stream);
|
||||
}
|
||||
|
||||
IAMMediaStream_Release(am_media_stream);
|
||||
|
||||
hr = IMediaStream_QueryInterface(audio_stream, &IID_IDirectDrawMediaStream, (LPVOID*)&ddraw_stream);
|
||||
|
@ -378,6 +416,18 @@ static void test_media_streams(void)
|
|||
hr = IAudioMediaStream_CreateSample(audio_media_stream, audio_data, 0, &audio_sample);
|
||||
ok(hr == S_OK, "IAudioMediaStream_CreateSample returned: %x\n", hr);
|
||||
|
||||
hr = IAudioMediaStream_GetMultiMediaStream(audio_media_stream, NULL);
|
||||
todo_wine ok(hr == E_POINTER, "Expected E_POINTER, got %x\n", hr);
|
||||
|
||||
multi_media_stream = (void *)0xdeadbeef;
|
||||
hr = IAudioMediaStream_GetMultiMediaStream(audio_media_stream, &multi_media_stream);
|
||||
todo_wine ok(hr == S_OK, "IAudioMediaStream_GetMultiMediaStream returned: %x\n", hr);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
ok((void *)multi_media_stream == (void *)pams, "Expected %p, got %p\n", pams, multi_media_stream);
|
||||
IMultiMediaStream_Release(multi_media_stream);
|
||||
}
|
||||
|
||||
if (audio_data)
|
||||
IAudioData_Release(audio_data);
|
||||
if (audio_sample)
|
||||
|
|
Loading…
Reference in New Issue