amstream: Add stream to the media stream filter in IAMMultiMediaStreamImpl_AddMediaStream.

This commit is contained in:
Christian Costa 2012-03-27 23:46:03 +02:00 committed by Alexandre Julliard
parent 76d69cdb91
commit 1349cf6902
2 changed files with 11 additions and 5 deletions

View File

@ -333,7 +333,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
IMediaStream* pStream;
IMediaStream** pNewStreams;
FIXME("(%p/%p)->(%p,%s,%x,%p) partial stub!\n", This, iface, pStreamObject, debugstr_guid(PurposeId), dwFlags, ppNewStream);
TRACE("(%p/%p)->(%p,%s,%x,%p)\n", This, iface, pStreamObject, debugstr_guid(PurposeId), dwFlags, ppNewStream);
if (!IsEqualGUID(PurposeId, &MSPID_PrimaryVideo) && !IsEqualGUID(PurposeId, &MSPID_PrimaryAudio))
return MS_E_PURPOSEID;
@ -379,6 +379,12 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
*ppNewStream = pStream;
}
if (SUCCEEDED(hr))
{
/* Add stream to the media stream filter */
IMediaStreamFilter_AddMediaStream((IMediaStreamFilter*)This->media_stream_filter, (IAMMediaStream*)pStream);
}
return hr;
}

View File

@ -215,8 +215,8 @@ static void test_media_streams(void)
if (media_stream_filter)
{
hr = IMediaStreamFilter_GetMediaStream(media_stream_filter, &MSPID_PrimaryVideo, &dummy_stream);
todo_wine ok(hr == S_OK, "IMediaStreamFilter_GetMediaStream returned: %x\n", hr);
todo_wine ok(dummy_stream == video_stream, "Got wrong returned pointer %p, expected %p\n", dummy_stream, video_stream);
ok(hr == S_OK, "IMediaStreamFilter_GetMediaStream returned: %x\n", hr);
ok(dummy_stream == video_stream, "Got wrong returned pointer %p, expected %p\n", dummy_stream, video_stream);
if (SUCCEEDED(hr))
IMediaStream_Release(dummy_stream);
}
@ -241,8 +241,8 @@ static void test_media_streams(void)
if (media_stream_filter)
{
hr = IMediaStreamFilter_GetMediaStream(media_stream_filter, &MSPID_PrimaryAudio, &dummy_stream);
todo_wine ok(hr == S_OK, "IAMMultiMediaStream_GetMediaStream returned: %x\n", hr);
todo_wine ok(dummy_stream == audio_stream, "Got wrong returned pointer %p, expected %p\n", dummy_stream, audio_stream);
ok(hr == S_OK, "IAMMultiMediaStream_GetMediaStream returned: %x\n", hr);
ok(dummy_stream == audio_stream, "Got wrong returned pointer %p, expected %p\n", dummy_stream, audio_stream);
if (SUCCEEDED(hr))
IMediaStream_Release(dummy_stream);
}