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
dae86f1e
Commit
dae86f1e
authored
Jun 17, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/vfwcapture: Share pin and filter reference counts.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6f7d1065
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
vfwcapture.c
dlls/qcap/vfwcapture.c
+15
-18
No files found.
dlls/qcap/vfwcapture.c
View file @
dae86f1e
...
...
@@ -97,6 +97,11 @@ typedef struct VfwPinImpl
VfwCapture
*
parent
;
}
VfwPinImpl
;
static
inline
VfwPinImpl
*
impl_from_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
VfwPinImpl
,
pin
.
pin
.
IPin_iface
);
}
static
IPin
*
vfw_capture_get_pin
(
BaseFilter
*
iface
,
unsigned
int
index
)
{
VfwCapture
*
This
=
impl_from_BaseFilter
(
iface
);
...
...
@@ -125,7 +130,7 @@ static void vfw_capture_destroy(BaseFilter *iface)
IPin_Disconnect
(
filter
->
pOutputPin
);
IPin_Release
(
peer
);
}
IPin_Release
(
filter
->
pOutputP
in
);
BaseOutputPin_Destroy
(
&
impl_from_IPin
(
filter
->
pOutputPin
)
->
p
in
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
CoTaskMemFree
(
filter
);
ObjectRefCount
(
FALSE
);
...
...
@@ -648,11 +653,6 @@ VfwPin_Construct( IBaseFilter * pBaseFilter, LPCRITICAL_SECTION pCritSec,
return
hr
;
}
static
inline
VfwPinImpl
*
impl_from_IPin
(
IPin
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
VfwPinImpl
,
pin
.
pin
.
IPin_iface
);
}
static
HRESULT
WINAPI
VfwPin_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
VfwPinImpl
*
This
=
impl_from_IPin
(
iface
);
...
...
@@ -677,20 +677,17 @@ static HRESULT WINAPI VfwPin_QueryInterface(IPin * iface, REFIID riid, LPVOID *
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
VfwPin_AddRef
(
IPin
*
iface
)
{
VfwPinImpl
*
pin
=
impl_from_IPin
(
iface
);
return
IBaseFilter_AddRef
(
pin
->
pin
.
pin
.
pinInfo
.
pFilter
);
}
static
ULONG
WINAPI
VfwPin_Release
(
IPin
*
iface
)
{
VfwPinImpl
*
This
=
impl_from_IPin
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
pin
.
pin
.
refCount
);
TRACE
(
"() -> new refcount: %u
\n
"
,
refCount
);
if
(
!
refCount
)
{
BaseOutputPin_Destroy
(
&
This
->
pin
);
ObjectRefCount
(
FALSE
);
}
return
refCount
;
VfwPinImpl
*
pin
=
impl_from_IPin
(
iface
);
return
IBaseFilter_Release
(
pin
->
pin
.
pin
.
pinInfo
.
pFilter
);
}
static
HRESULT
WINAPI
...
...
@@ -719,7 +716,7 @@ VfwPin_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin)
static
const
IPinVtbl
VfwPin_Vtbl
=
{
VfwPin_QueryInterface
,
BasePinImpl
_AddRef
,
VfwPin
_AddRef
,
VfwPin_Release
,
BaseOutputPinImpl_Connect
,
BaseOutputPinImpl_ReceiveConnection
,
...
...
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