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
570e0a0d
Commit
570e0a0d
authored
Feb 03, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/filtergraph: Implement IFilterGraph2::ReconnectEx().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7a0b6a95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
30 deletions
+49
-30
filtergraph.c
dlls/quartz/filtergraph.c
+24
-30
filtergraph.c
dlls/quartz/tests/filtergraph.c
+25
-0
No files found.
dlls/quartz/filtergraph.c
View file @
570e0a0d
...
...
@@ -872,33 +872,13 @@ static HRESULT WINAPI FilterGraph2_ConnectDirect(IFilterGraph2 *iface, IPin *ppi
return
hr
;
}
static
HRESULT
WINAPI
FilterGraph2_Reconnect
(
IFilterGraph2
*
iface
,
IPin
*
p
p
in
)
static
HRESULT
WINAPI
FilterGraph2_Reconnect
(
IFilterGraph2
*
iface
,
IPin
*
pin
)
{
IFilterGraphImpl
*
This
=
impl_from_IFilterGraph2
(
iface
);
IPin
*
pConnectedTo
=
NULL
;
HRESULT
hr
;
PIN_DIRECTION
pindir
;
IPin_QueryDirection
(
ppin
,
&
pindir
);
hr
=
IPin_ConnectedTo
(
ppin
,
&
pConnectedTo
);
IFilterGraphImpl
*
graph
=
impl_from_IFilterGraph2
(
iface
);
TRACE
(
"
(%p/%p)->(%p) -- %p
\n
"
,
This
,
iface
,
ppin
,
pConnectedTo
);
TRACE
(
"
graph %p, pin %p.
\n
"
,
graph
,
pin
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Querying connected to failed: %x
\n
"
,
hr
);
return
hr
;
}
IPin_Disconnect
(
ppin
);
IPin_Disconnect
(
pConnectedTo
);
if
(
pindir
==
PINDIR_INPUT
)
hr
=
IPin_Connect
(
pConnectedTo
,
ppin
,
NULL
);
else
hr
=
IPin_Connect
(
ppin
,
pConnectedTo
,
NULL
);
IPin_Release
(
pConnectedTo
);
if
(
FAILED
(
hr
))
WARN
(
"Reconnecting pins failed, pins are not connected now..
\n
"
);
TRACE
(
"-> %08x
\n
"
,
hr
);
return
hr
;
return
IFilterGraph2_ReconnectEx
(
iface
,
pin
,
NULL
);
}
static
HRESULT
WINAPI
FilterGraph2_Disconnect
(
IFilterGraph2
*
iface
,
IPin
*
ppin
)
...
...
@@ -1830,15 +1810,29 @@ static HRESULT WINAPI FilterGraph2_AddSourceFilterForMoniker(IFilterGraph2 *ifac
return
S_OK
;
}
static
HRESULT
WINAPI
FilterGraph2_ReconnectEx
(
IFilterGraph2
*
iface
,
IPin
*
ppin
,
const
AM_MEDIA_TYPE
*
pmt
)
static
HRESULT
WINAPI
FilterGraph2_ReconnectEx
(
IFilterGraph2
*
iface
,
IPin
*
pin
,
const
AM_MEDIA_TYPE
*
mt
)
{
IFilterGraphImpl
*
This
=
impl_from_IFilterGraph2
(
iface
);
IFilterGraphImpl
*
graph
=
impl_from_IFilterGraph2
(
iface
);
PIN_DIRECTION
dir
;
HRESULT
hr
;
IPin
*
peer
;
TRACE
(
"(%p/%p)->(%p %p): stub !!!
\n
"
,
This
,
iface
,
ppin
,
pmt
);
strmbase_dump_media_type
(
pmt
);
TRACE
(
"graph %p, pin %p, mt %p.
\n
"
,
graph
,
pin
,
mt
);
return
S_OK
;
if
(
FAILED
(
hr
=
IPin_ConnectedTo
(
pin
,
&
peer
)))
return
hr
;
IPin_QueryDirection
(
pin
,
&
dir
);
IFilterGraph2_Disconnect
(
iface
,
peer
);
IFilterGraph2_Disconnect
(
iface
,
pin
);
if
(
dir
==
PINDIR_INPUT
)
hr
=
IFilterGraph2_ConnectDirect
(
iface
,
peer
,
pin
,
mt
);
else
hr
=
IFilterGraph2_ConnectDirect
(
iface
,
pin
,
peer
,
mt
);
IPin_Release
(
peer
);
return
hr
;
}
static
HRESULT
WINAPI
FilterGraph2_RenderEx
(
IFilterGraph2
*
iface
,
IPin
*
pPinOut
,
DWORD
dwFlags
,
...
...
dlls/quartz/tests/filtergraph.c
View file @
570e0a0d
...
...
@@ -2910,6 +2910,31 @@ todo_wine
hr
=
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ReconnectEx
(
graph
,
&
source_pin
.
IPin_iface
,
NULL
);
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ReconnectEx
(
graph
,
&
sink_pin
.
IPin_iface
,
NULL
);
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ReconnectEx
(
graph
,
&
source_pin
.
IPin_iface
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
sink_pin
.
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
!
source_pin
.
mt
,
"Got mt %p.
\n
"
,
source_pin
.
mt
);
ok
(
!
sink_pin
.
peer
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
hr
=
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ReconnectEx
(
graph
,
&
source_pin
.
IPin_iface
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
sink_pin
.
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
source_pin
.
mt
==
&
mt
,
"Got mt %p.
\n
"
,
source_pin
.
mt
);
ok
(
!
sink_pin
.
peer
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
hr
=
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
/* Both pins are disconnected when a filter is removed. */
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\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