ReactOS 0.4.15-dev-7906-g1b85a5f
mpegsplit.c
Go to the documentation of this file.
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
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
35static 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
51START_TEST(mpegsplit)
52{
54
56
58}
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
const GUID IID_IUnknown
#define NULL
Definition: types.h:112
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
GLuint64EXT * result
Definition: glext.h:11304
#define S_OK
Definition: intsafe.h:52
static IUnknown * create_mpeg_splitter(void)
Definition: mpegsplit.c:26
static void test_query_interface(void)
Definition: mpegsplit.c:35