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
29d3c754
Commit
29d3c754
authored
Mar 24, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: COM cleanup for BaseFilter.
parent
7fe02c47
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
24 deletions
+27
-24
vfwcapture.c
dlls/qcap/vfwcapture.c
+1
-1
filesource.c
dlls/quartz/filesource.c
+5
-5
nullrenderer.c
dlls/quartz/nullrenderer.c
+0
-1
videorenderer.c
dlls/quartz/videorenderer.c
+0
-1
enumpins.c
dlls/strmbase/enumpins.c
+2
-2
filter.c
dlls/strmbase/filter.c
+17
-12
transform.c
dlls/strmbase/transform.c
+1
-1
strmbase.h
include/wine/strmbase.h
+1
-1
No files found.
dlls/qcap/vfwcapture.c
View file @
29d3c754
...
...
@@ -139,7 +139,7 @@ IUnknown * WINAPI QCAP_createVFWCaptureFilter(IUnknown *pUnkOuter, HRESULT *phr)
pVfwCapture
->
IPersistPropertyBag_iface
.
lpVtbl
=
&
IPersistPropertyBag_VTable
;
pVfwCapture
->
init
=
FALSE
;
hr
=
VfwPin_Construct
(
(
IBaseFilter
*
)
&
pVfwCapture
->
filter
.
lpVtbl
,
hr
=
VfwPin_Construct
(
&
pVfwCapture
->
filter
.
IBaseFilter_iface
,
&
pVfwCapture
->
filter
.
csFilter
,
&
pVfwCapture
->
pOutputPin
);
if
(
FAILED
(
hr
))
{
...
...
dlls/quartz/filesource.c
View file @
29d3c754
...
...
@@ -529,21 +529,21 @@ static HRESULT WINAPI FileSource_QueryInterface(IFileSourceFilter * iface, REFII
{
AsyncReader
*
This
=
impl_from_IFileSourceFilter
(
iface
);
return
IBaseFilter_QueryInterface
(
(
IFileSourceFilter
*
)
&
This
->
filter
.
lpVtbl
,
riid
,
ppv
);
return
IBaseFilter_QueryInterface
(
&
This
->
filter
.
IBaseFilter_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
FileSource_AddRef
(
IFileSourceFilter
*
iface
)
{
AsyncReader
*
This
=
impl_from_IFileSourceFilter
(
iface
);
return
IBaseFilter_AddRef
(
(
IFileSourceFilter
*
)
&
This
->
filter
.
lpVtbl
);
return
IBaseFilter_AddRef
(
&
This
->
filter
.
IBaseFilter_iface
);
}
static
ULONG
WINAPI
FileSource_Release
(
IFileSourceFilter
*
iface
)
{
AsyncReader
*
This
=
impl_from_IFileSourceFilter
(
iface
);
return
IBaseFilter_Release
(
(
IFileSourceFilter
*
)
&
This
->
filter
.
lpVtbl
);
return
IBaseFilter_Release
(
&
This
->
filter
.
IBaseFilter_iface
);
}
static
HRESULT
WINAPI
FileSource_Load
(
IFileSourceFilter
*
iface
,
LPCOLESTR
pszFileName
,
const
AM_MEDIA_TYPE
*
pmt
)
...
...
@@ -565,8 +565,8 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
}
/* create pin */
hr
=
FileAsyncReader_Construct
(
hFile
,
(
IBaseFilter
*
)
&
This
->
filter
.
lpVtbl
,
&
This
->
filter
.
csFilter
,
&
This
->
pOutputPin
);
BaseFilterImpl_IncrementPinVersion
(
(
BaseFilter
*
)
&
This
->
filter
.
lpVtbl
);
hr
=
FileAsyncReader_Construct
(
hFile
,
&
This
->
filter
.
IBaseFilter_iface
,
&
This
->
filter
.
csFilter
,
&
This
->
pOutputPin
);
BaseFilterImpl_IncrementPinVersion
(
&
This
->
filter
);
if
(
SUCCEEDED
(
hr
))
hr
=
IPin_QueryInterface
(
This
->
pOutputPin
,
&
IID_IAsyncReader
,
(
LPVOID
*
)
&
pReader
);
...
...
dlls/quartz/nullrenderer.c
View file @
29d3c754
...
...
@@ -227,7 +227,6 @@ static ULONG WINAPI NullRendererInner_Release(IUnknown * iface)
IPin_Disconnect
((
IPin
*
)
This
->
pInputPin
);
IPin_Release
((
IPin
*
)
This
->
pInputPin
);
This
->
filter
.
lpVtbl
=
NULL
;
if
(
This
->
seekthru_unk
)
IUnknown_Release
(
This
->
seekthru_unk
);
...
...
dlls/quartz/videorenderer.c
View file @
29d3c754
...
...
@@ -694,7 +694,6 @@ static ULONG WINAPI VideoRendererInner_Release(IUnknown * iface)
IPin_Release
((
IPin
*
)
This
->
pInputPin
);
This
->
filter
.
lpVtbl
=
NULL
;
IUnknown_Release
(
This
->
seekthru_unk
);
This
->
filter
.
csFilter
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
filter
.
csFilter
);
...
...
dlls/strmbase/enumpins.c
View file @
29d3c754
...
...
@@ -66,7 +66,7 @@ HRESULT WINAPI EnumPins_Construct(BaseFilter *base, BaseFilter_GetPin receive_p
pEnumPins
->
receive_pincount
=
receive_pincount
;
pEnumPins
->
receive_version
=
receive_version
;
pEnumPins
->
base
=
base
;
IBaseFilter_AddRef
(
(
IBaseFilter
*
)
bas
e
);
IBaseFilter_AddRef
(
&
base
->
IBaseFilter_ifac
e
);
*
ppEnum
=
&
pEnumPins
->
IEnumPins_iface
;
pEnumPins
->
Version
=
receive_version
(
base
);
...
...
@@ -115,7 +115,7 @@ static ULONG WINAPI IEnumPinsImpl_Release(IEnumPins * iface)
if
(
!
refCount
)
{
IBaseFilter_Release
(
(
IBaseFilter
*
)
This
->
bas
e
);
IBaseFilter_Release
(
&
This
->
base
->
IBaseFilter_ifac
e
);
CoTaskMemFree
(
This
);
return
0
;
}
...
...
dlls/strmbase/filter.c
View file @
29d3c754
...
...
@@ -29,9 +29,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
strmbase
);
static
inline
BaseFilter
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
BaseFilter
,
IBaseFilter_iface
);
}
HRESULT
WINAPI
BaseFilterImpl_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
...
...
@@ -56,7 +61,7 @@ HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, L
ULONG
WINAPI
BaseFilterImpl_AddRef
(
IBaseFilter
*
iface
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->() AddRef from %d
\n
"
,
This
,
refCount
-
1
);
...
...
@@ -66,7 +71,7 @@ ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter * iface)
ULONG
WINAPI
BaseFilterImpl_Release
(
IBaseFilter
*
iface
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->() Release from %d
\n
"
,
This
,
refCount
+
1
);
...
...
@@ -76,7 +81,7 @@ ULONG WINAPI BaseFilterImpl_Release(IBaseFilter * iface)
if
(
This
->
pClock
)
IReferenceClock_Release
(
This
->
pClock
);
This
->
lpVtbl
=
NULL
;
This
->
IBaseFilter_iface
.
lpVtbl
=
NULL
;
This
->
csFilter
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
csFilter
);
}
...
...
@@ -86,7 +91,7 @@ ULONG WINAPI BaseFilterImpl_Release(IBaseFilter * iface)
HRESULT
WINAPI
BaseFilterImpl_GetClassID
(
IBaseFilter
*
iface
,
CLSID
*
pClsid
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pClsid
);
*
pClsid
=
This
->
clsid
;
...
...
@@ -96,7 +101,7 @@ HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid)
HRESULT
WINAPI
BaseFilterImpl_GetState
(
IBaseFilter
*
iface
,
DWORD
dwMilliSecsTimeout
,
FILTER_STATE
*
pState
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
TRACE
(
"(%p)->(%d, %p)
\n
"
,
This
,
dwMilliSecsTimeout
,
pState
);
EnterCriticalSection
(
&
This
->
csFilter
);
...
...
@@ -110,7 +115,7 @@ HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTim
HRESULT
WINAPI
BaseFilterImpl_SetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
*
pClock
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pClock
);
EnterCriticalSection
(
&
This
->
csFilter
);
...
...
@@ -128,7 +133,7 @@ HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock
HRESULT
WINAPI
BaseFilterImpl_GetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
**
ppClock
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppClock
);
EnterCriticalSection
(
&
This
->
csFilter
);
...
...
@@ -144,7 +149,7 @@ HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock
HRESULT
WINAPI
BaseFilterImpl_EnumPins
(
IBaseFilter
*
iface
,
IEnumPins
**
ppEnum
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
ppEnum
);
...
...
@@ -154,7 +159,7 @@ HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum)
HRESULT
WINAPI
BaseFilterImpl_QueryFilterInfo
(
IBaseFilter
*
iface
,
FILTER_INFO
*
pInfo
)
{
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pInfo
);
strcpyW
(
pInfo
->
achName
,
This
->
filterInfo
.
achName
);
...
...
@@ -169,7 +174,7 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *
HRESULT
WINAPI
BaseFilterImpl_JoinFilterGraph
(
IBaseFilter
*
iface
,
IFilterGraph
*
pGraph
,
LPCWSTR
pName
)
{
HRESULT
hr
=
S_OK
;
BaseFilter
*
This
=
(
BaseFilter
*
)
iface
;
BaseFilter
*
This
=
impl_from_IBaseFilter
(
iface
)
;
TRACE
(
"(%p)->(%p, %s)
\n
"
,
This
,
pGraph
,
debugstr_w
(
pName
));
...
...
@@ -206,7 +211,7 @@ VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter * This)
HRESULT
WINAPI
BaseFilter_Init
(
BaseFilter
*
This
,
const
IBaseFilterVtbl
*
Vtbl
,
const
CLSID
*
pClsid
,
DWORD_PTR
DebugInfo
,
const
BaseFilterFuncTable
*
pBaseFuncsTable
)
{
This
->
lpVtbl
=
Vtbl
;
This
->
IBaseFilter_iface
.
lpVtbl
=
Vtbl
;
This
->
refCount
=
1
;
InitializeCriticalSection
(
&
This
->
csFilter
);
This
->
state
=
State_Stopped
;
...
...
dlls/strmbase/transform.c
View file @
29d3c754
...
...
@@ -233,7 +233,7 @@ HRESULT TransformFilter_Construct(const IBaseFilterVtbl *pVtbl, LONG filter_size
if
(
SUCCEEDED
(
TransformFilter_Init
(
pVtbl
,
pClsid
,
pFuncsTable
,
pTf
)))
{
*
ppTransformFilter
=
(
IBaseFilter
*
)(
&
pTf
->
filter
.
lpVtbl
)
;
*
ppTransformFilter
=
&
pTf
->
filter
.
IBaseFilter_iface
;
return
S_OK
;
}
...
...
include/wine/strmbase.h
View file @
29d3c754
...
...
@@ -148,7 +148,7 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * p
typedef
struct
BaseFilter
{
const
struct
IBaseFilterVtbl
*
lpVtbl
;
IBaseFilter
IBaseFilter_iface
;
LONG
refCount
;
CRITICAL_SECTION
csFilter
;
...
...
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