Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
42263f9a
Commit
42263f9a
authored
Feb 28, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Clean up test_query_interface().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d9456cc9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
23 deletions
+47
-23
mpegsplit.c
dlls/quartz/tests/mpegsplit.c
+47
-23
No files found.
dlls/quartz/tests/mpegsplit.c
View file @
42263f9a
/*
*
Unit tests for the MPEG-1 stream splitter function
s
*
MPEG-1 splitter filter unit test
s
*
* Copyright 2015 Anton Baskanov
*
...
...
@@ -19,40 +19,64 @@
*/
#define COBJMACROS
#include "wine/test.h"
#include "dshow.h"
#include "wine/test.h"
static
I
Unknown
*
create_mpeg_splitter
(
void
)
static
I
BaseFilter
*
create_mpeg_splitter
(
void
)
{
I
Unknown
*
mpeg_split
ter
=
NULL
;
HRESULT
result
=
CoCreateInstance
(
&
CLSID_MPEG1Splitter
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_I
Unknown
,
(
void
**
)
&
mpeg_split
ter
);
ok
(
S_OK
==
result
,
"got 0x%08x
\n
"
,
result
);
return
mpeg_split
ter
;
I
BaseFilter
*
fil
ter
=
NULL
;
HRESULT
hr
=
CoCreateInstance
(
&
CLSID_MPEG1Splitter
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_I
BaseFilter
,
(
void
**
)
&
fil
ter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
return
fil
ter
;
}
static
void
test_query_interface
(
void
)
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
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
);
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#x, expected %#x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
static
void
test_interfaces
(
void
)
{
IBaseFilter
*
filter
=
create_mpeg_splitter
();
check_interface
(
filter
,
&
IID_IAMStreamSelect
,
TRUE
);
check_interface
(
filter
,
&
IID_IBaseFilter
,
TRUE
);
check_interface
(
filter
,
&
IID_IPersist
,
TRUE
);
check_interface
(
filter
,
&
IID_IMediaFilter
,
TRUE
);
check_interface
(
filter
,
&
IID_IUnknown
,
TRUE
);
check_interface
(
filter
,
&
IID_IAMFilterMiscFlags
,
FALSE
);
check_interface
(
filter
,
&
IID_IBasicAudio
,
FALSE
);
check_interface
(
filter
,
&
IID_IBasicVideo
,
FALSE
);
check_interface
(
filter
,
&
IID_IKsPropertySet
,
FALSE
);
check_interface
(
filter
,
&
IID_IMediaPosition
,
FALSE
);
check_interface
(
filter
,
&
IID_IMediaSeeking
,
FALSE
);
check_interface
(
filter
,
&
IID_IPersistPropertyBag
,
FALSE
);
check_interface
(
filter
,
&
IID_IPin
,
FALSE
);
check_interface
(
filter
,
&
IID_IQualityControl
,
FALSE
);
check_interface
(
filter
,
&
IID_IQualProp
,
FALSE
);
check_interface
(
filter
,
&
IID_IReferenceClock
,
FALSE
);
check_interface
(
filter
,
&
IID_IVideoWindow
,
FALSE
);
IBaseFilter_Release
(
filter
);
}
START_TEST
(
mpegsplit
)
{
CoInitialize
(
NULL
);
test_
query_interface
();
test_
interfaces
();
CoUninitialize
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment