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
4a3b8d2e
Commit
4a3b8d2e
authored
Nov 26, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap: Add helper to initalize test_filter structure.
parent
be369546
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
qcap.c
dlls/qcap/tests/qcap.c
+21
-8
No files found.
dlls/qcap/tests/qcap.c
View file @
4a3b8d2e
...
...
@@ -984,17 +984,29 @@ static const IEnumMediaTypesVtbl EnumMediaTypesVtbl = {
EnumMediaTypes_Clone
};
static
void
init_test_filter
(
test_filter
*
This
,
PIN_DIRECTION
dir
,
filter_type
type
)
{
memset
(
This
,
0
,
sizeof
(
*
This
));
This
->
IBaseFilter_iface
.
lpVtbl
=
&
BaseFilterVtbl
;
This
->
IEnumPins_iface
.
lpVtbl
=
&
EnumPinsVtbl
;
This
->
IPin_iface
.
lpVtbl
=
&
PinVtbl
;
This
->
IKsPropertySet_iface
.
lpVtbl
=
&
KsPropertySetVtbl
;
This
->
IEnumMediaTypes_iface
.
lpVtbl
=
&
EnumMediaTypesVtbl
;
This
->
dir
=
dir
;
This
->
filter_type
=
type
;
}
static
void
test_CaptureGraphBuilder_RenderStream
(
void
)
{
test_filter
source_filter
=
{{
&
BaseFilterVtbl
},
{
&
EnumPinsVtbl
},
{
&
PinVtbl
},
{
&
KsPropertySetVtbl
},
{
&
EnumMediaTypesVtbl
},
PINDIR_OUTPUT
,
SOURCE_FILTER
};
test_filter
sink_filter
=
{{
&
BaseFilterVtbl
},
{
&
EnumPinsVtbl
},
{
&
PinVtbl
},
{
&
KsPropertySetVtbl
},
{
&
EnumMediaTypesVtbl
},
PINDIR_INPUT
,
SINK_FILTER
};
test_filter
intermediate_filter
=
{{
&
BaseFilterVtbl
},
{
&
EnumPinsVtbl
},
{
&
PinVtbl
},
{
&
KsPropertySetVtbl
},
{
&
EnumMediaTypesVtbl
},
PINDIR_OUTPUT
,
INTERMEDIATE_FILTER
};
test_filter
source_filter
,
sink_filter
,
intermediate_filter
;
ICaptureGraphBuilder2
*
cgb
;
HRESULT
hr
;
init_test_filter
(
&
source_filter
,
PINDIR_OUTPUT
,
SOURCE_FILTER
);
init_test_filter
(
&
sink_filter
,
PINDIR_INPUT
,
SINK_FILTER
);
init_test_filter
(
&
intermediate_filter
,
PINDIR_OUTPUT
,
INTERMEDIATE_FILTER
);
hr
=
CoCreateInstance
(
&
CLSID_CaptureGraphBuilder2
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ICaptureGraphBuilder2
,
(
void
**
)
&
cgb
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
...
...
@@ -1070,8 +1082,7 @@ static void test_AviMux_QueryInterface(void)
static
void
test_AviMux
(
void
)
{
test_filter
source_filter
=
{{
&
BaseFilterVtbl
},
{
&
EnumPinsVtbl
},
{
&
PinVtbl
},
{
&
KsPropertySetVtbl
},
{
&
EnumMediaTypesVtbl
},
PINDIR_OUTPUT
,
SOURCE_FILTER
};
test_filter
source_filter
;
VIDEOINFOHEADER
videoinfoheader
;
IPin
*
avimux_in
,
*
avimux_out
,
*
pin
;
AM_MEDIA_TYPE
source_media_type
;
...
...
@@ -1082,6 +1093,8 @@ static void test_AviMux(void)
IEnumMediaTypes
*
emt
;
HRESULT
hr
;
init_test_filter
(
&
source_filter
,
PINDIR_OUTPUT
,
SOURCE_FILTER
);
hr
=
CoCreateInstance
(
&
CLSID_AviDest
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
void
**
)
&
avimux
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"couldn't create AVI Mux filter, hr = %08x
\n
"
,
hr
);
...
...
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