Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cdab25b0
Commit
cdab25b0
authored
Jun 15, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Try to connect all source pins when autoplugging from the registry.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3e0e12d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
36 deletions
+27
-36
filtergraph.c
dlls/quartz/filtergraph.c
+16
-25
filtergraph.c
dlls/quartz/tests/filtergraph.c
+11
-11
No files found.
dlls/quartz/filtergraph.c
View file @
cdab25b0
...
...
@@ -1327,7 +1327,6 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
while
(
IEnumMoniker_Next
(
pEnumMoniker
,
1
,
&
pMoniker
,
NULL
)
==
S_OK
)
{
VARIANT
var
;
IPin
*
ppinfilter
=
NULL
;
IBaseFilter
*
pfilter
=
NULL
;
IAMGraphBuilderCallback
*
callback
=
NULL
;
...
...
@@ -1390,35 +1389,27 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
goto
error
;
}
hr
=
IEnumPins_Next
(
penumpins
,
1
,
&
ppinfilter
,
NULL
);
IEnumPins_Release
(
penumpins
);
if
(
FAILED
(
hr
))
{
WARN
(
"Obtaining next pin: (%x)
\n
"
,
hr
);
goto
error
;
}
if
(
hr
==
S_FALSE
)
{
WARN
(
"Cannot use this filter: no pins
\n
"
);
goto
error
;
}
hr
=
IFilterGraph2_ConnectDirect
(
iface
,
ppinOut
,
ppinfilter
,
NULL
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot connect to filter (%x), trying next one
\n
"
,
hr
);
goto
error
;
}
TRACE
(
"Successfully connected to filter, follow chain...
\n
"
);
if
(
SUCCEEDED
(
hr
=
connect_output_pin
(
This
,
pfilter
,
ppinIn
)))
while
(
IEnumPins_Next
(
penumpins
,
1
,
&
pin
,
NULL
)
==
S_OK
)
{
IPin_Release
(
ppinfilter
);
IBaseFilter_Release
(
pfilter
);
break
;
if
(
SUCCEEDED
(
IFilterGraph2_ConnectDirect
(
iface
,
ppinOut
,
pin
,
NULL
)))
{
if
(
SUCCEEDED
(
hr
=
connect_output_pin
(
This
,
pfilter
,
ppinIn
)))
{
IPin_Release
(
pin
);
IEnumPins_Release
(
penumpins
);
IBaseFilter_Release
(
pfilter
);
IEnumMoniker_Release
(
pEnumMoniker
);
goto
out
;
}
IFilterGraph2_Disconnect
(
iface
,
pin
);
IFilterGraph2_Disconnect
(
iface
,
ppinOut
);
}
IPin_Release
(
pin
);
}
IEnumPins_Release
(
penumpins
);
error:
VariantClear
(
&
var
);
if
(
ppinfilter
)
IPin_Release
(
ppinfilter
);
if
(
pfilter
)
{
IFilterGraph2_RemoveFilter
(
iface
,
pfilter
);
IBaseFilter_Release
(
pfilter
);
...
...
dlls/quartz/tests/filtergraph.c
View file @
cdab25b0
...
...
@@ -2136,9 +2136,9 @@ static void test_graph_builder_connect(void)
testfilter_init
(
&
parser1
,
parser1_pins
,
3
);
parser1
.
pin_count
=
2
;
tests
ink_init
(
&
parser2_pins
[
0
]
);
tests
ource_init
(
&
parser2_pins
[
1
],
&
sink_type
,
1
);
parser2_pins
[
1
].
request_mt
=
&
sink_type
;
tests
ource_init
(
&
parser2_pins
[
0
],
&
sink_type
,
1
);
tests
ink_init
(
&
parser2_pins
[
1
]
);
parser2_pins
[
0
].
request_mt
=
&
sink_type
;
testfilter_init
(
&
parser2
,
parser2_pins
,
2
);
testsink_init
(
&
parser3_pins
[
0
]);
...
...
@@ -2215,8 +2215,8 @@ static void test_graph_builder_connect(void)
sink_pin
.
accept_mt
=
&
sink_type
;
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser2_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser2_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
ok
(
source_pin
.
peer
==
&
parser2_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser2_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
source_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
IFilterGraph2_Disconnect
(
graph
,
sink_pin
.
peer
);
...
...
@@ -2227,8 +2227,8 @@ static void test_graph_builder_connect(void)
{
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
ok
(
hr
==
S_OK
,
"Got hr %#x for Connect() hr %#x.
\n
"
,
hr
,
source_pin
.
Connect_hr
);
ok
(
source_pin
.
peer
==
&
parser2_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser2_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
ok
(
source_pin
.
peer
==
&
parser2_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser2_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
source_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
IFilterGraph2_Disconnect
(
graph
,
sink_pin
.
peer
);
...
...
@@ -2379,9 +2379,9 @@ todo_wine
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser1_pins
[
0
].
IPin_iface
||
source_pin
.
peer
==
&
parser2_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
||
source_pin
.
peer
==
&
parser2_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser1_pins
[
1
].
IPin_iface
||
sink_pin
.
peer
==
&
parser2_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
||
sink_pin
.
peer
==
&
parser2_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
@@ -2417,8 +2417,8 @@ todo_wine
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser2_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser2_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
ok
(
source_pin
.
peer
==
&
parser2_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser2_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
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