quartz/tests: Test that MPEG-1 Stream Splitter implements IAMStreamSelect
Anton Baskanov
baskanov at gmail.com
Wed Oct 28 12:02:54 CDT 2015
Signed-off-by: Anton Baskanov <baskanov at gmail.com>
---
dlls/quartz/tests/Makefile.in | 1 +
dlls/quartz/tests/mpegsplitter.c | 58 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)
create mode 100644 dlls/quartz/tests/mpegsplitter.c
diff --git a/dlls/quartz/tests/Makefile.in b/dlls/quartz/tests/Makefile.in
index 05bfda9..451b711 100644
--- a/dlls/quartz/tests/Makefile.in
+++ b/dlls/quartz/tests/Makefile.in
@@ -8,6 +8,7 @@ C_SRCS = \
filtermapper.c \
memallocator.c \
misc.c \
+ mpegsplitter.c \
referenceclock.c \
videorenderer.c
diff --git a/dlls/quartz/tests/mpegsplitter.c b/dlls/quartz/tests/mpegsplitter.c
new file mode 100644
index 0000000..622a70c
--- /dev/null
+++ b/dlls/quartz/tests/mpegsplitter.c
@@ -0,0 +1,58 @@
+/*
+ * Unit tests for the MPEG-1 stream splitter functions
+ *
+ * Copyright 2015 Anton Baskanov
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define COBJMACROS
+
+#include "wine/test.h"
+#include "dshow.h"
+
+static IUnknown *create_mpeg_splitter(void)
+{
+ IUnknown *mpeg_splitter = NULL;
+ HRESULT result = CoCreateInstance(&CLSID_MPEG1Splitter, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IUnknown, (void **)&mpeg_splitter);
+ ok(S_OK == result, "got 0x%08x\n", result);
+ return mpeg_splitter;
+}
+
+static void test_query_interface(void)
+{
+ IUnknown *mpeg_splitter = create_mpeg_splitter();
+
+ IAMStreamSelect *stream_select = NULL;
+ HRESULT result = IUnknown_QueryInterface(
+ mpeg_splitter, &IID_IAMStreamSelect, (void **)&stream_select);
+ ok(S_OK == result, "got 0x%08x\n", result);
+ if (S_OK == result)
+ {
+ IAMStreamSelect_Release(stream_select);
+ }
+
+ IUnknown_Release(mpeg_splitter);
+}
+
+START_TEST(mpegsplitter)
+{
+ CoInitialize(NULL);
+
+ test_query_interface();
+
+ CoUninitialize();
+}
--
2.1.0
More information about the wine-patches
mailing list