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
f7718d64
Commit
f7718d64
authored
May 20, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Move the test for filter mapper aggregation to filtergraph.c.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b8abb6e9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
58 deletions
+25
-58
filtergraph.c
dlls/quartz/tests/filtergraph.c
+25
-0
filtermapper.c
dlls/quartz/tests/filtermapper.c
+0
-58
No files found.
dlls/quartz/tests/filtergraph.c
View file @
f7718d64
...
@@ -2496,6 +2496,7 @@ static IUnknown test_outer = {&outer_vtbl};
...
@@ -2496,6 +2496,7 @@ static IUnknown test_outer = {&outer_vtbl};
static
void
test_aggregation
(
void
)
static
void
test_aggregation
(
void
)
{
{
IFilterGraph2
*
graph
,
*
graph2
;
IFilterGraph2
*
graph
,
*
graph2
;
IFilterMapper2
*
mapper
;
IUnknown
*
unk
,
*
unk2
;
IUnknown
*
unk
,
*
unk2
;
HRESULT
hr
;
HRESULT
hr
;
ULONG
ref
;
ULONG
ref
;
...
@@ -2550,6 +2551,30 @@ static void test_aggregation(void)
...
@@ -2550,6 +2551,30 @@ static void test_aggregation(void)
ref
=
IUnknown_Release
(
unk
);
ref
=
IUnknown_Release
(
unk
);
ok
(
!
ref
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
!
ref
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
outer_ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
outer_ref
);
ok
(
outer_ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
outer_ref
);
/* Test the aggregated filter mapper. */
graph
=
create_graph
();
ref
=
get_refcount
(
graph
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
hr
=
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IFilterMapper2
,
(
void
**
)
&
mapper
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
graph
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
mapper
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
hr
=
IFilterMapper2_QueryInterface
(
mapper
,
&
IID_IFilterGraph2
,
(
void
**
)
&
graph2
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
graph2
==
graph
,
"Got unexpected IFilterGraph2 %p.
\n
"
,
graph2
);
IFilterGraph2_Release
(
graph2
);
IFilterMapper2_Release
(
mapper
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got unexpected refcount %d.
\n
"
,
ref
);
}
}
/* Test how methods from "control" interfaces (IBasicAudio, IBasicVideo,
/* Test how methods from "control" interfaces (IBasicAudio, IBasicVideo,
...
...
dlls/quartz/tests/filtermapper.c
View file @
f7718d64
...
@@ -368,63 +368,6 @@ static void test_legacy_filter_registration(void)
...
@@ -368,63 +368,6 @@ static void test_legacy_filter_registration(void)
IFilterMapper2_Release
(
mapper2
);
IFilterMapper2_Release
(
mapper2
);
}
}
static
ULONG
getRefcount
(
IUnknown
*
iface
)
{
IUnknown_AddRef
(
iface
);
return
IUnknown_Release
(
iface
);
}
static
void
test_ifiltermapper_from_filtergraph
(
void
)
{
IFilterGraph2
*
pgraph2
=
NULL
;
IFilterMapper2
*
pMapper2
=
NULL
;
IFilterGraph
*
filtergraph
=
NULL
;
HRESULT
hr
;
ULONG
refcount
;
hr
=
CoCreateInstance
(
&
CLSID_FilterGraph
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFilterGraph2
,
(
LPVOID
*
)
&
pgraph2
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with %08x
\n
"
,
hr
);
if
(
!
pgraph2
)
goto
out
;
hr
=
IFilterGraph2_QueryInterface
(
pgraph2
,
&
IID_IFilterMapper2
,
(
LPVOID
*
)
&
pMapper2
);
ok
(
hr
==
S_OK
,
"IFilterGraph2_QueryInterface failed with %08x
\n
"
,
hr
);
if
(
!
pMapper2
)
goto
out
;
refcount
=
getRefcount
((
IUnknown
*
)
pgraph2
);
ok
(
refcount
==
2
,
"unexpected reference count: %u
\n
"
,
refcount
);
refcount
=
getRefcount
((
IUnknown
*
)
pMapper2
);
ok
(
refcount
==
2
,
"unexpected reference count: %u
\n
"
,
refcount
);
IFilterMapper2_AddRef
(
pMapper2
);
refcount
=
getRefcount
((
IUnknown
*
)
pgraph2
);
ok
(
refcount
==
3
,
"unexpected reference count: %u
\n
"
,
refcount
);
refcount
=
getRefcount
((
IUnknown
*
)
pMapper2
);
ok
(
refcount
==
3
,
"unexpected reference count: %u
\n
"
,
refcount
);
IFilterMapper2_Release
(
pMapper2
);
hr
=
IFilterMapper2_QueryInterface
(
pMapper2
,
&
IID_IFilterGraph
,
(
LPVOID
*
)
&
filtergraph
);
ok
(
hr
==
S_OK
,
"IFilterMapper2_QueryInterface failed with %08x
\n
"
,
hr
);
if
(
!
filtergraph
)
goto
out
;
IFilterMapper2_Release
(
pMapper2
);
pMapper2
=
NULL
;
IFilterGraph_Release
(
filtergraph
);
filtergraph
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_FilterMapper2
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFilterMapper2
,
(
LPVOID
*
)
&
pMapper2
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with %08x
\n
"
,
hr
);
if
(
!
pMapper2
)
goto
out
;
hr
=
IFilterMapper2_QueryInterface
(
pMapper2
,
&
IID_IFilterGraph
,
(
LPVOID
*
)
&
filtergraph
);
ok
(
hr
==
E_NOINTERFACE
,
"IFilterMapper2_QueryInterface unexpected result: %08x
\n
"
,
hr
);
out:
if
(
pMapper2
)
IFilterMapper2_Release
(
pMapper2
);
if
(
filtergraph
)
IFilterGraph_Release
(
filtergraph
);
if
(
pgraph2
)
IFilterGraph2_Release
(
pgraph2
);
}
static
void
test_register_filter_with_null_clsMinorType
(
void
)
static
void
test_register_filter_with_null_clsMinorType
(
void
)
{
{
static
WCHAR
wszPinName
[]
=
L"Pin"
;
static
WCHAR
wszPinName
[]
=
L"Pin"
;
...
@@ -721,7 +664,6 @@ START_TEST(filtermapper)
...
@@ -721,7 +664,6 @@ START_TEST(filtermapper)
test_interfaces
();
test_interfaces
();
test_fm2_enummatchingfilters
();
test_fm2_enummatchingfilters
();
test_legacy_filter_registration
();
test_legacy_filter_registration
();
test_ifiltermapper_from_filtergraph
();
test_register_filter_with_null_clsMinorType
();
test_register_filter_with_null_clsMinorType
();
test_parse_filter_data
();
test_parse_filter_data
();
test_aggregation
();
test_aggregation
();
...
...
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