Christian Costa : amstream/tests: Verify if the dsound renderer is created when we create an audio stream with the default renderer .

Alexandre Julliard julliard at winehq.org
Wed Mar 28 12:47:07 CDT 2012


Module: wine
Branch: master
Commit: 3aab79792904c791d8a79bccc996d0cfca2ef952
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3aab79792904c791d8a79bccc996d0cfca2ef952

Author: Christian Costa <titan.costa at gmail.com>
Date:   Tue Mar 27 23:46:11 2012 +0200

amstream/tests: Verify if the dsound renderer is created when we create an audio stream with the default renderer.

---

 dlls/amstream/tests/amstream.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c
index dce8c7d..176df7e 100644
--- a/dlls/amstream/tests/amstream.c
+++ b/dlls/amstream/tests/amstream.c
@@ -22,6 +22,7 @@
 
 #include "wine/test.h"
 #include "initguid.h"
+#include "uuids.h"
 #include "amstream.h"
 #include "vfwmsgs.h"
 
@@ -228,6 +229,32 @@ static void test_media_streams(void)
     /* Verify no stream is created when using the default renderer for audio stream */
     hr = IAMMultiMediaStream_AddMediaStream(pams, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, NULL);
     ok((hr == S_OK) || (hr == VFW_E_NO_AUDIO_HARDWARE), "IAMMultiMediaStream_AddMediaStream returned: %x\n", hr);
+    if (hr == S_OK)
+    {
+        IGraphBuilder* filtergraph = NULL;
+        IBaseFilter* filter = NULL;
+        const WCHAR name[] = {'0','0','0','1',0};
+        CLSID clsid;
+
+        hr = IAMMultiMediaStream_GetFilterGraph(pams, &filtergraph);
+        ok(hr == S_OK, "IAMMultiMediaStream_GetFilterGraph returned: %x\n", hr);
+        if (hr == S_OK)
+        {
+            hr = IGraphBuilder_FindFilterByName(filtergraph, name, &filter);
+            ok(hr == S_OK, "IGraphBuilder_FindFilterByName returned: %x\n", hr);
+        }
+        if (hr == S_OK)
+        {
+            hr = IBaseFilter_GetClassID(filter, &clsid);
+            ok(hr == S_OK, "IGraphBuilder_FindFilterByName returned: %x\n", hr);
+        }
+        if (hr == S_OK)
+            ok(IsEqualGUID(&clsid, &CLSID_DSoundRender), "Got wrong CLSID\n");
+        if (filter)
+            IBaseFilter_Release(filter);
+        if (filtergraph)
+            IGraphBuilder_Release(filtergraph);
+    }
     hr = IAMMultiMediaStream_GetMediaStream(pams, &MSPID_PrimaryAudio, &audio_stream);
     ok(hr == MS_E_NOSTREAM, "IAMMultiMediaStream_GetMediaStream returned: %x\n", hr);
 




More information about the wine-cvs mailing list