From: Amine Khaldi Date: Tue, 24 Nov 2015 12:34:05 +0000 (+0000) Subject: [QUARTZ_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 X-Git-Tag: ReactOS-0.4.0~60^2~14 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=34dd2f4dab82e4c474e262a9c1addf0062d04c56 [QUARTZ_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536 svn path=/trunk/; revision=70093 --- diff --git a/rostests/winetests/quartz/CMakeLists.txt b/rostests/winetests/quartz/CMakeLists.txt index 8fdc75a593a..9442fd63f75 100644 --- a/rostests/winetests/quartz/CMakeLists.txt +++ b/rostests/winetests/quartz/CMakeLists.txt @@ -8,6 +8,7 @@ list(APPEND SOURCE filtermapper.c memallocator.c misc.c + mpegsplit.c referenceclock.c videorenderer.c testlist.c) diff --git a/rostests/winetests/quartz/fil_data.idl b/rostests/winetests/quartz/fil_data.idl index 93cdf1e43dd..ab93499a8bc 100644 --- a/rostests/winetests/quartz/fil_data.idl +++ b/rostests/winetests/quartz/fil_data.idl @@ -16,6 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#pragma makedep header + import "objidl.idl"; import "strmif.idl"; import "unknwn.idl"; diff --git a/rostests/winetests/quartz/filtergraph.c b/rostests/winetests/quartz/filtergraph.c index 2f561519881..b42aea8d35d 100644 --- a/rostests/winetests/quartz/filtergraph.c +++ b/rostests/winetests/quartz/filtergraph.c @@ -180,6 +180,9 @@ static void test_graph_builder(void) ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); ok(pF != NULL, "pF is NULL\n"); + hr = IGraphBuilder_AddFilter(pgraph, NULL, testFilterW); + ok(hr == E_POINTER, "IGraphBuilder_AddFilter returned %x\n", hr); + /* add the two filters to the graph */ hr = IGraphBuilder_AddFilter(pgraph, pF, testFilterW); ok(hr == S_OK, "failed to add pF to the graph: %x\n", hr); @@ -204,6 +207,15 @@ static void test_graph_builder(void) hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW, NULL); ok(hr == E_POINTER, "IGraphBuilder_FindFilterByName returned %x\n", hr); + hr = IGraphBuilder_Connect(pgraph, NULL, pIn); + ok(hr == E_POINTER, "IGraphBuilder_Connect returned %x\n", hr); + + hr = IGraphBuilder_Connect(pgraph, pIn, NULL); + ok(hr == E_POINTER, "IGraphBuilder_Connect returned %x\n", hr); + + hr = IGraphBuilder_Connect(pgraph, pIn, pIn); + ok(hr == VFW_E_CANNOT_CONNECT, "IGraphBuilder_Connect returned %x\n", hr); + if (pIn) IPin_Release(pIn); if (pEnum) IEnumPins_Release(pEnum); if (pF) IBaseFilter_Release(pF); diff --git a/rostests/winetests/quartz/filtermapper.c b/rostests/winetests/quartz/filtermapper.c index abe946ff2a9..52298fb3623 100644 --- a/rostests/winetests/quartz/filtermapper.c +++ b/rostests/winetests/quartz/filtermapper.c @@ -509,7 +509,7 @@ static void test_parse_filter_data(void) saBound.lLbound = 0; saBound.cElements = sizeof(data_block); psa = SafeArrayCreate(VT_UI1, 1, &saBound); - ok(psa != NULL, "Unable to crate safe array\n"); + ok(psa != NULL, "Unable to create safe array\n"); if (!psa) goto out; hr = SafeArrayAccessData(psa, (LPVOID *)&pbSAData); ok(hr == S_OK, "Unable to access array data\n"); diff --git a/rostests/winetests/quartz/mpegsplit.c b/rostests/winetests/quartz/mpegsplit.c new file mode 100644 index 00000000000..591e527e30e --- /dev/null +++ b/rostests/winetests/quartz/mpegsplit.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(mpegsplit) +{ + CoInitialize(NULL); + + test_query_interface(); + + CoUninitialize(); +} diff --git a/rostests/winetests/quartz/testlist.c b/rostests/winetests/quartz/testlist.c index a41126c9f16..db1b7263ed7 100644 --- a/rostests/winetests/quartz/testlist.c +++ b/rostests/winetests/quartz/testlist.c @@ -1,4 +1,4 @@ -/* Automatically generated file; DO NOT EDIT!! */ +/* Automatically generated by make depend; DO NOT EDIT!! */ #define STANDALONE #include @@ -9,6 +9,7 @@ extern void func_filtergraph(void); extern void func_filtermapper(void); extern void func_memallocator(void); extern void func_misc(void); +extern void func_mpegsplit(void); extern void func_referenceclock(void); extern void func_videorenderer(void); @@ -20,7 +21,8 @@ const struct test winetest_testlist[] = { "filtermapper", func_filtermapper }, { "memallocator", func_memallocator }, { "misc", func_misc }, - { "videorenderer", func_videorenderer }, + { "mpegsplit", func_mpegsplit }, { "referenceclock", func_referenceclock }, + { "videorenderer", func_videorenderer }, { 0, 0 } };