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
d14d1966
Commit
d14d1966
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: Add callbacks for sink (dis)connection.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f595d9bd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
37 deletions
+44
-37
avico.c
dlls/qcap/avico.c
+2
-2
avimux.c
dlls/qcap/avimux.c
+2
-2
smartteefilter.c
dlls/qcap/smartteefilter.c
+1
-1
samplegrabber.c
dlls/qedit/samplegrabber.c
+1
-1
pin.c
dlls/strmbase/pin.c
+31
-25
renderer.c
dlls/strmbase/renderer.c
+1
-1
transform.c
dlls/strmbase/transform.c
+1
-1
strmbase.h
include/wine/strmbase.h
+5
-4
No files found.
dlls/qcap/avico.c
View file @
d14d1966
...
...
@@ -291,7 +291,7 @@ static HRESULT WINAPI AVICompressorIn_ReceiveConnection(IPin *iface,
hres
=
fill_format_info
(
This
,
(
VIDEOINFOHEADER
*
)
pmt
->
pbFormat
);
if
(
FAILED
(
hres
))
BasePinImpl_Disconnect
(
iface
);
Base
Input
PinImpl_Disconnect
(
iface
);
return
hres
;
}
...
...
@@ -302,7 +302,7 @@ static HRESULT WINAPI AVICompressorIn_Disconnect(IPin *iface)
TRACE
(
"(%p)
\n
"
,
This
);
hres
=
BasePinImpl_Disconnect
(
iface
);
hres
=
Base
Input
PinImpl_Disconnect
(
iface
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/qcap/avimux.c
View file @
d14d1966
...
...
@@ -1469,7 +1469,7 @@ static HRESULT WINAPI AviMuxIn_ReceiveConnection(IPin *iface,
if
(
SUCCEEDED
(
hr
))
hr
=
IMemAllocator_Commit
(
avimuxin
->
samples_allocator
);
if
(
FAILED
(
hr
))
{
BasePinImpl_Disconnect
(
iface
);
Base
Input
PinImpl_Disconnect
(
iface
);
return
hr
;
}
...
...
@@ -1497,7 +1497,7 @@ static HRESULT WINAPI AviMuxIn_Disconnect(IPin *iface)
TRACE
(
"pin %p.
\n
"
,
avimuxin
);
hr
=
BasePinImpl_Disconnect
(
iface
);
hr
=
Base
Input
PinImpl_Disconnect
(
iface
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
dlls/qcap/smartteefilter.c
View file @
d14d1966
...
...
@@ -87,7 +87,7 @@ static const IPinVtbl SmartTeeFilterInputVtbl = {
BasePinImpl_Release
,
BaseInputPinImpl_Connect
,
BaseInputPinImpl_ReceiveConnection
,
BasePinImpl_Disconnect
,
Base
Input
PinImpl_Disconnect
,
BasePinImpl_ConnectedTo
,
BasePinImpl_ConnectionMediaType
,
BasePinImpl_QueryPinInfo
,
...
...
dlls/qedit/samplegrabber.c
View file @
d14d1966
...
...
@@ -523,7 +523,7 @@ static const IPinVtbl sink_vtbl =
BasePinImpl_Release
,
BaseInputPinImpl_Connect
,
SampleGrabber_In_IPin_ReceiveConnection
,
BasePinImpl_Disconnect
,
Base
Input
PinImpl_Disconnect
,
BasePinImpl_ConnectedTo
,
BasePinImpl_ConnectionMediaType
,
BasePinImpl_QueryPinInfo
,
...
...
dlls/strmbase/pin.c
View file @
d14d1966
...
...
@@ -119,31 +119,6 @@ ULONG WINAPI BasePinImpl_Release(IPin *iface)
return
IBaseFilter_Release
(
&
pin
->
filter
->
IBaseFilter_iface
);
}
HRESULT
WINAPI
BasePinImpl_Disconnect
(
IPin
*
iface
)
{
struct
strmbase_pin
*
This
=
impl_from_IPin
(
iface
);
HRESULT
hr
;
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
&
This
->
filter
->
csFilter
);
{
if
(
This
->
peer
)
{
IPin_Release
(
This
->
peer
);
This
->
peer
=
NULL
;
FreeMediaType
(
&
This
->
mt
);
ZeroMemory
(
&
This
->
mt
,
sizeof
(
This
->
mt
));
hr
=
S_OK
;
}
else
hr
=
S_FALSE
;
}
LeaveCriticalSection
(
&
This
->
filter
->
csFilter
);
return
hr
;
}
HRESULT
WINAPI
BasePinImpl_ConnectedTo
(
IPin
*
iface
,
IPin
**
ppPin
)
{
struct
strmbase_pin
*
This
=
impl_from_IPin
(
iface
);
...
...
@@ -685,6 +660,9 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
}
}
if
(
SUCCEEDED
(
hr
)
&&
This
->
pFuncsTable
->
sink_connect
)
hr
=
This
->
pFuncsTable
->
sink_connect
(
This
,
pReceivePin
,
pmt
);
if
(
SUCCEEDED
(
hr
))
{
CopyMediaType
(
&
This
->
pin
.
mt
,
pmt
);
...
...
@@ -697,6 +675,34 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
return
hr
;
}
HRESULT
WINAPI
BaseInputPinImpl_Disconnect
(
IPin
*
iface
)
{
struct
strmbase_sink
*
pin
=
impl_sink_from_IPin
(
iface
);
HRESULT
hr
;
TRACE
(
"pin %p.
\n
"
,
pin
);
EnterCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
if
(
pin
->
pin
.
peer
)
{
if
(
pin
->
pFuncsTable
->
sink_disconnect
)
pin
->
pFuncsTable
->
sink_disconnect
(
pin
);
IPin_Release
(
pin
->
pin
.
peer
);
pin
->
pin
.
peer
=
NULL
;
FreeMediaType
(
&
pin
->
pin
.
mt
);
memset
(
&
pin
->
pin
.
mt
,
0
,
sizeof
(
AM_MEDIA_TYPE
));
hr
=
S_OK
;
}
else
hr
=
S_FALSE
;
LeaveCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
return
hr
;
}
static
HRESULT
deliver_endofstream
(
IPin
*
pin
,
LPVOID
unused
)
{
return
IPin_EndOfStream
(
pin
);
...
...
dlls/strmbase/renderer.c
View file @
d14d1966
...
...
@@ -68,7 +68,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
TRACE
(
"iface %p.
\n
"
,
iface
);
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
hr
=
BasePinImpl_Disconnect
(
iface
);
hr
=
Base
Input
PinImpl_Disconnect
(
iface
);
if
(
SUCCEEDED
(
hr
))
{
if
(
filter
->
pFuncsTable
->
pfnBreakConnect
)
...
...
dlls/strmbase/transform.c
View file @
d14d1966
...
...
@@ -427,7 +427,7 @@ static HRESULT WINAPI TransformFilter_InputPin_Disconnect(IPin * iface)
if
(
pTransform
->
pFuncsTable
->
pfnBreakConnect
)
pTransform
->
pFuncsTable
->
pfnBreakConnect
(
pTransform
,
PINDIR_INPUT
);
return
BasePinImpl_Disconnect
(
iface
);
return
Base
Input
PinImpl_Disconnect
(
iface
);
}
static
HRESULT
WINAPI
TransformFilter_InputPin_BeginFlush
(
IPin
*
iface
)
...
...
include/wine/strmbase.h
View file @
d14d1966
...
...
@@ -91,9 +91,10 @@ typedef HRESULT (WINAPI *BaseInputPin_Receive)(struct strmbase_sink *This, IMedi
struct
strmbase_sink_ops
{
BasePinFuncTable
base
;
/* Optional */
BaseInputPin_Receive
pfnReceive
;
BasePinFuncTable
base
;
BaseInputPin_Receive
pfnReceive
;
HRESULT
(
*
sink_connect
)(
struct
strmbase_sink
*
pin
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
);
void
(
*
sink_disconnect
)(
struct
strmbase_sink
*
pin
);
};
/* Base Pin */
...
...
@@ -102,7 +103,7 @@ LONG WINAPI BasePinImpl_GetMediaTypeVersion(struct strmbase_pin *pin);
HRESULT
WINAPI
BasePinImpl_QueryInterface
(
IPin
*
iface
,
REFIID
iid
,
void
**
out
);
ULONG
WINAPI
BasePinImpl_AddRef
(
IPin
*
iface
);
ULONG
WINAPI
BasePinImpl_Release
(
IPin
*
iface
);
HRESULT
WINAPI
BasePinImpl_Disconnect
(
IPin
*
iface
);
HRESULT
WINAPI
Base
Input
PinImpl_Disconnect
(
IPin
*
iface
);
HRESULT
WINAPI
BasePinImpl_ConnectedTo
(
IPin
*
iface
,
IPin
**
ppPin
);
HRESULT
WINAPI
BasePinImpl_ConnectionMediaType
(
IPin
*
iface
,
AM_MEDIA_TYPE
*
pmt
);
HRESULT
WINAPI
BasePinImpl_QueryPinInfo
(
IPin
*
iface
,
PIN_INFO
*
pInfo
);
...
...
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