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
a638c327
Commit
a638c327
authored
Sep 20, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/filtergraph: Try filters in the graph first in FilterGraph2_Connect().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6eb05abf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
13 deletions
+33
-13
filtergraph.c
dlls/quartz/filtergraph.c
+32
-3
filtergraph.c
dlls/quartz/tests/filtergraph.c
+1
-10
No files found.
dlls/quartz/filtergraph.c
View file @
a638c327
...
...
@@ -1089,7 +1089,9 @@ static HRESULT connect_output_pin(IFilterGraphImpl *graph, IBaseFilter *filter,
static
HRESULT
WINAPI
FilterGraph2_Connect
(
IFilterGraph2
*
iface
,
IPin
*
ppinOut
,
IPin
*
ppinIn
)
{
IFilterGraphImpl
*
This
=
impl_from_IFilterGraph2
(
iface
);
struct
filter
*
filter
;
HRESULT
hr
;
IPin
*
pin
;
AM_MEDIA_TYPE
*
mt
=
NULL
;
IEnumMediaTypes
*
penummt
=
NULL
;
ULONG
nbmt
;
...
...
@@ -1097,7 +1099,6 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
IEnumMoniker
*
pEnumMoniker
;
GUID
tab
[
2
];
IMoniker
*
pMoniker
;
ULONG
pin
;
PIN_INFO
PinInfo
;
CLSID
FilterCLSID
;
PIN_DIRECTION
dir
;
...
...
@@ -1160,6 +1161,34 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
TRACE
(
"Direct connection failed, trying to render using extra filters
\n
"
);
LIST_FOR_EACH_ENTRY
(
filter
,
&
This
->
filters
,
struct
filter
,
entry
)
{
hr
=
IBaseFilter_EnumPins
(
filter
->
filter
,
&
penumpins
);
if
(
FAILED
(
hr
))
goto
out
;
while
(
IEnumPins_Next
(
penumpins
,
1
,
&
pin
,
NULL
)
==
S_OK
)
{
IPin_QueryDirection
(
pin
,
&
dir
);
if
(
dir
==
PINDIR_INPUT
&&
SUCCEEDED
(
IFilterGraph2_ConnectDirect
(
iface
,
ppinOut
,
pin
,
NULL
)))
{
if
(
SUCCEEDED
(
hr
=
connect_output_pin
(
This
,
filter
->
filter
,
ppinIn
)))
{
IPin_Release
(
pin
);
IEnumPins_Release
(
penumpins
);
goto
out
;
}
IFilterGraph2_Disconnect
(
iface
,
pin
);
IFilterGraph2_Disconnect
(
iface
,
ppinOut
);
}
IPin_Release
(
pin
);
}
IEnumPins_Release
(
penumpins
);
}
hr
=
IPin_QueryPinInfo
(
ppinIn
,
&
PinInfo
);
if
(
FAILED
(
hr
))
goto
out
;
...
...
@@ -1290,14 +1319,14 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
goto
error
;
}
hr
=
IEnumPins_Next
(
penumpins
,
1
,
&
ppinfilter
,
&
pin
);
hr
=
IEnumPins_Next
(
penumpins
,
1
,
&
ppinfilter
,
NULL
);
IEnumPins_Release
(
penumpins
);
if
(
FAILED
(
hr
))
{
WARN
(
"Obtaining next pin: (%x)
\n
"
,
hr
);
goto
error
;
}
if
(
pin
==
0
)
{
if
(
hr
==
S_FALSE
)
{
WARN
(
"Cannot use this filter: no pins
\n
"
);
goto
error
;
}
...
...
dlls/quartz/tests/filtergraph.c
View file @
a638c327
...
...
@@ -1701,11 +1701,9 @@ todo_wine
sink_pin
.
accept_mt
=
&
sink_type
;
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
todo_wine
{
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
);
}
IFilterGraph2_Disconnect
(
graph
,
source_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
IFilterGraph2_Disconnect
(
graph
,
sink_pin
.
peer
);
...
...
@@ -1715,11 +1713,9 @@ todo_wine {
IFilterGraph2_AddFilter
(
graph
,
&
parser1
.
IBaseFilter_iface
,
NULL
);
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser1_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser1_pins
[
1
].
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
);
...
...
@@ -1729,12 +1725,10 @@ todo_wine {
IFilterGraph2_AddFilter
(
graph
,
&
parser3
.
IBaseFilter_iface
,
NULL
);
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser3_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
parser3_pins
[
1
].
peer
==
&
parser1_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
parser3_pins
[
1
].
peer
);
ok
(
sink_pin
.
peer
==
&
parser1_pins
[
1
].
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
,
parser3_pins
[
0
].
peer
);
...
...
@@ -1753,11 +1747,10 @@ todo_wine {
IFilterGraph2_AddFilter
(
graph
,
&
sink2
.
IBaseFilter_iface
,
NULL
);
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
todo_wine
{
todo_wine
ok
(
hr
==
VFW_S_PARTIAL_RENDER
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser1_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser1_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
}
ok
(
!
parser1_pins
[
2
].
peer
,
"Got peer %p.
\n
"
,
parser1_pins
[
2
].
peer
);
IFilterGraph2_Disconnect
(
graph
,
source_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
...
...
@@ -1769,11 +1762,9 @@ todo_wine {
parser1_pins
[
1
].
QueryInternalConnections_hr
=
S_OK
;
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser1_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser1_pins
[
1
].
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
);
...
...
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