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
67a6af77
Commit
67a6af77
authored
Dec 10, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase/transform: Use base sink connection methods.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d14d1966
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
35 deletions
+21
-35
transform.c
dlls/strmbase/transform.c
+21
-35
No files found.
dlls/strmbase/transform.c
View file @
67a6af77
...
...
@@ -212,12 +212,31 @@ static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void
return
S_OK
;
}
static
HRESULT
sink_connect
(
struct
strmbase_sink
*
iface
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
)
{
TransformFilter
*
filter
=
impl_from_sink_IPin
(
&
iface
->
pin
.
IPin_iface
);
if
(
filter
->
pFuncsTable
->
transform_connect_sink
)
return
filter
->
pFuncsTable
->
transform_connect_sink
(
filter
,
mt
);
return
S_OK
;
}
static
void
sink_disconnect
(
struct
strmbase_sink
*
iface
)
{
TransformFilter
*
filter
=
impl_from_sink_IPin
(
&
iface
->
pin
.
IPin_iface
);
if
(
filter
->
pFuncsTable
->
pfnBreakConnect
)
filter
->
pFuncsTable
->
pfnBreakConnect
(
filter
,
PINDIR_INPUT
);
}
static
const
struct
strmbase_sink_ops
sink_ops
=
{
.
base
.
pin_query_accept
=
sink_query_accept
,
.
base
.
pin_get_media_type
=
strmbase_pin_get_media_type
,
.
base
.
pin_query_interface
=
sink_query_interface
,
.
pfnReceive
=
TransformFilter_Input_Receive
,
.
sink_connect
=
sink_connect
,
.
sink_disconnect
=
sink_disconnect
,
};
static
HRESULT
source_query_interface
(
struct
strmbase_pin
*
iface
,
REFIID
iid
,
void
**
out
)
...
...
@@ -397,39 +416,6 @@ static HRESULT WINAPI TransformFilter_InputPin_EndOfStream(IPin * iface)
return
VFW_E_NOT_CONNECTED
;
}
static
HRESULT
WINAPI
TransformFilter_InputPin_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
iface
);
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(%p, %p)
\n
"
,
iface
,
pReceivePin
,
pmt
);
strmbase_dump_media_type
(
pmt
);
if
(
pTransform
->
pFuncsTable
->
transform_connect_sink
)
hr
=
pTransform
->
pFuncsTable
->
transform_connect_sink
(
pTransform
,
pmt
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
BaseInputPinImpl_ReceiveConnection
(
iface
,
pReceivePin
,
pmt
);
if
(
FAILED
(
hr
)
&&
pTransform
->
pFuncsTable
->
pfnBreakConnect
)
pTransform
->
pFuncsTable
->
pfnBreakConnect
(
pTransform
,
PINDIR_INPUT
);
}
return
hr
;
}
static
HRESULT
WINAPI
TransformFilter_InputPin_Disconnect
(
IPin
*
iface
)
{
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
iface
);
TRACE
(
"(%p)->()
\n
"
,
iface
);
if
(
pTransform
->
pFuncsTable
->
pfnBreakConnect
)
pTransform
->
pFuncsTable
->
pfnBreakConnect
(
pTransform
,
PINDIR_INPUT
);
return
BaseInputPinImpl_Disconnect
(
iface
);
}
static
HRESULT
WINAPI
TransformFilter_InputPin_BeginFlush
(
IPin
*
iface
)
{
TransformFilter
*
pTransform
=
impl_from_sink_IPin
(
iface
);
...
...
@@ -483,8 +469,8 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl =
BasePinImpl_AddRef
,
BasePinImpl_Release
,
BaseInputPinImpl_Connect
,
TransformFilter_InputPin
_ReceiveConnection
,
TransformFilter_InputPin
_Disconnect
,
BaseInputPinImpl
_ReceiveConnection
,
BaseInputPinImpl
_Disconnect
,
BasePinImpl_ConnectedTo
,
BasePinImpl_ConnectionMediaType
,
BasePinImpl_QueryPinInfo
,
...
...
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