[QUARTZ] Add tests for filtergraph

Christian Costa titan.costa at wanadoo.fr
Sat Aug 14 03:54:10 CDT 2004


Hi,

Changelog:
Added tests for filtergraph.

Christian Costa   titan.costa at wanadoo.fr

-------------- next part --------------
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.296
diff -u -r1.296 configure.ac
--- configure.ac	12 Aug 2004 03:27:50 -0000	1.296
+++ configure.ac	14 Aug 2004 07:47:30 -0000
@@ -1620,6 +1620,7 @@
 dlls/psapi/tests/Makefile
 dlls/qcap/Makefile
 dlls/quartz/Makefile
+dlls/quartz/tests/Makefile
 dlls/rasapi32/Makefile
 dlls/richedit/Makefile
 dlls/rpcrt4/Makefile
Index: dlls/quartz/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/quartz/Makefile.in,v
retrieving revision 1.37
diff -u -r1.37 Makefile.in
--- dlls/quartz/Makefile.in	5 May 2004 23:51:59 -0000	1.37
+++ dlls/quartz/Makefile.in	14 Aug 2004 07:47:31 -0000
@@ -25,6 +25,8 @@
 
 RC_SRCS = version.rc
 
+SUBDIRS = tests
+
 @MAKE_DLL_RULES@
 
 ### Dependencies:
--- /dev/null	1970-01-01 01:00:00.000000000 +0100
+++ dlls/quartz/tests/Makefile.in	2004-08-14 08:59:56.000000000 +0100
@@ -0,0 +1,14 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+TESTDLL   = quartz.dll
+IMPORTS   = user32 gdi32 kernel32 ole32
+EXTRALIBS = -luuid
+
+CTESTS = \
+	filtergraph.c
+
+ at MAKE_TEST_RULES@
+
+### Dependencies:
--- /dev/null	1970-01-01 01:00:00.000000000 +0100
+++ dlls/quartz/tests/filtergraph.c	2004-08-14 09:45:48.000000000 +0100
@@ -0,0 +1,79 @@
+/*
+ * Unit tests for Direct Show functions
+ *
+ * Copyright (C) 2004 Christian Costa
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <assert.h>
+#include "wine/test.h"
+#include "uuids.h"
+#include "dshow.h"
+#include "control.h"
+
+IGraphBuilder* pgraph;
+
+static void createfiltergraph()
+{
+    HRESULT hr;
+
+    hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&pgraph);
+    ok(hr==S_OK, "Creating filtergraph returned: %lx\n", hr);
+}
+
+#if 0
+static void renderfile()
+{
+    WCHAR file[] = {'t','e','s','t','.','a','v','i',0};
+    HRESULT hr;
+
+    hr = IGraphBuilder_RenderFile(pgraph, file, NULL);
+    ok(hr==S_OK, "RenderFile returned: %lx\n", hr);
+}
+
+static void rungraph()
+{
+    HRESULT hr;
+    IMediaControl* pmc;
+
+    hr = IGraphBuilder_QueryInterface(pgraph, &IID_IMediaControl, (LPVOID*)&pmc);
+    ok(hr==S_OK, "Cannot get IMediaControl interface returned: %lx\n", hr);
+
+    hr = IMediaControl_Run(pmc);
+    ok(hr==S_OK, "Cannot run the graph returned: %lx\n", hr);
+
+    Sleep(20000); 
+}
+#endif
+
+static void releasefiltergraph()
+{
+    HRESULT hr;
+
+    hr = IGraphBuilder_Release(pgraph);
+    ok(hr==S_OK, "Releasing filtergraph returned: %lx\n", hr);
+}
+
+START_TEST(filtergraph)
+{
+    createfiltergraph();
+#if 0
+    renderfile();
+    rungraph();
+#endif
+    releasefiltergraph();
+}
+


More information about the wine-patches mailing list