1 /*
2 * Unit tests for the MPEG-1 stream splitter functions
3 *
4 * Copyright 2015 Anton Baskanov
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #define COBJMACROS
22
23 #include "wine/test.h"
24 #include "dshow.h"
25
create_mpeg_splitter(void)26 static IUnknown *create_mpeg_splitter(void)
27 {
28 IUnknown *mpeg_splitter = NULL;
29 HRESULT result = CoCreateInstance(&CLSID_MPEG1Splitter, NULL, CLSCTX_INPROC_SERVER,
30 &IID_IUnknown, (void **)&mpeg_splitter);
31 ok(S_OK == result, "got 0x%08x\n", result);
32 return mpeg_splitter;
33 }
34
test_query_interface(void)35 static void test_query_interface(void)
36 {
37 IUnknown *mpeg_splitter = create_mpeg_splitter();
38
39 IAMStreamSelect *stream_select = NULL;
40 HRESULT result = IUnknown_QueryInterface(
41 mpeg_splitter, &IID_IAMStreamSelect, (void **)&stream_select);
42 ok(S_OK == result, "got 0x%08x\n", result);
43 if (S_OK == result)
44 {
45 IAMStreamSelect_Release(stream_select);
46 }
47
48 IUnknown_Release(mpeg_splitter);
49 }
50
START_TEST(mpegsplit)51 START_TEST(mpegsplit)
52 {
53 CoInitialize(NULL);
54
55 test_query_interface();
56
57 CoUninitialize();
58 }
59