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
f25a867c
Commit
f25a867c
authored
Dec 08, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Use an iface instead of a vtbl pointer in IEnumPinsImpl.
parent
bf247fad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
enumpins.c
dlls/strmbase/enumpins.c
+14
-9
No files found.
dlls/strmbase/enumpins.c
View file @
f25a867c
...
...
@@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
typedef
struct
IEnumPinsImpl
{
const
IEnumPinsVtbl
*
lpVtbl
;
IEnumPins
IEnumPins_iface
;
LONG
refCount
;
ULONG
uIndex
;
BaseFilter
*
base
;
...
...
@@ -39,6 +39,11 @@ typedef struct IEnumPinsImpl
DWORD
Version
;
}
IEnumPinsImpl
;
static
inline
IEnumPinsImpl
*
impl_from_IEnumPins
(
IEnumPins
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IEnumPinsImpl
,
IEnumPins_iface
);
}
static
const
struct
IEnumPinsVtbl
IEnumPinsImpl_Vtbl
;
HRESULT
WINAPI
EnumPins_Construct
(
BaseFilter
*
base
,
BaseFilter_GetPin
receive_pin
,
BaseFilter_GetPinCount
receive_pincount
,
BaseFilter_GetPinVersion
receive_version
,
IEnumPins
**
ppEnum
)
...
...
@@ -54,7 +59,7 @@ HRESULT WINAPI EnumPins_Construct(BaseFilter *base, BaseFilter_GetPin receive_p
*
ppEnum
=
NULL
;
return
E_OUTOFMEMORY
;
}
pEnumPins
->
lpVtbl
=
&
IEnumPinsImpl_Vtbl
;
pEnumPins
->
IEnumPins_iface
.
lpVtbl
=
&
IEnumPinsImpl_Vtbl
;
pEnumPins
->
refCount
=
1
;
pEnumPins
->
uIndex
=
0
;
pEnumPins
->
receive_pin
=
receive_pin
;
...
...
@@ -62,7 +67,7 @@ HRESULT WINAPI EnumPins_Construct(BaseFilter *base, BaseFilter_GetPin receive_p
pEnumPins
->
receive_version
=
receive_version
;
pEnumPins
->
base
=
base
;
IBaseFilter_AddRef
((
IBaseFilter
*
)
base
);
*
ppEnum
=
(
IEnumPins
*
)(
&
pEnumPins
->
lpVtbl
)
;
*
ppEnum
=
&
pEnumPins
->
IEnumPins_iface
;
pEnumPins
->
Version
=
receive_version
(
base
);
TRACE
(
"Created new enumerator (%p)
\n
"
,
*
ppEnum
);
...
...
@@ -93,7 +98,7 @@ static HRESULT WINAPI IEnumPinsImpl_QueryInterface(IEnumPins * iface, REFIID rii
static
ULONG
WINAPI
IEnumPinsImpl_AddRef
(
IEnumPins
*
iface
)
{
IEnumPinsImpl
*
This
=
(
IEnumPinsImpl
*
)
iface
;
IEnumPinsImpl
*
This
=
impl_from_IEnumPins
(
iface
)
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->() AddRef from %d
\n
"
,
This
,
refCount
-
1
);
...
...
@@ -103,7 +108,7 @@ static ULONG WINAPI IEnumPinsImpl_AddRef(IEnumPins * iface)
static
ULONG
WINAPI
IEnumPinsImpl_Release
(
IEnumPins
*
iface
)
{
IEnumPinsImpl
*
This
=
(
IEnumPinsImpl
*
)
iface
;
IEnumPinsImpl
*
This
=
impl_from_IEnumPins
(
iface
)
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->() Release from %d
\n
"
,
This
,
refCount
+
1
);
...
...
@@ -120,7 +125,7 @@ static ULONG WINAPI IEnumPinsImpl_Release(IEnumPins * iface)
static
HRESULT
WINAPI
IEnumPinsImpl_Next
(
IEnumPins
*
iface
,
ULONG
cPins
,
IPin
**
ppPins
,
ULONG
*
pcFetched
)
{
IEnumPinsImpl
*
This
=
(
IEnumPinsImpl
*
)
iface
;
IEnumPinsImpl
*
This
=
impl_from_IEnumPins
(
iface
)
;
HRESULT
hr
=
S_OK
;
ULONG
i
=
0
;
...
...
@@ -161,7 +166,7 @@ static HRESULT WINAPI IEnumPinsImpl_Next(IEnumPins * iface, ULONG cPins, IPin **
static
HRESULT
WINAPI
IEnumPinsImpl_Skip
(
IEnumPins
*
iface
,
ULONG
cPins
)
{
IEnumPinsImpl
*
This
=
(
IEnumPinsImpl
*
)
iface
;
IEnumPinsImpl
*
This
=
impl_from_IEnumPins
(
iface
)
;
TRACE
(
"(%u)
\n
"
,
cPins
);
...
...
@@ -177,7 +182,7 @@ static HRESULT WINAPI IEnumPinsImpl_Skip(IEnumPins * iface, ULONG cPins)
static
HRESULT
WINAPI
IEnumPinsImpl_Reset
(
IEnumPins
*
iface
)
{
IEnumPinsImpl
*
This
=
(
IEnumPinsImpl
*
)
iface
;
IEnumPinsImpl
*
This
=
impl_from_IEnumPins
(
iface
)
;
TRACE
(
"IEnumPinsImpl::Reset()
\n
"
);
This
->
Version
=
This
->
receive_version
(
This
->
base
);
...
...
@@ -189,7 +194,7 @@ static HRESULT WINAPI IEnumPinsImpl_Reset(IEnumPins * iface)
static
HRESULT
WINAPI
IEnumPinsImpl_Clone
(
IEnumPins
*
iface
,
IEnumPins
**
ppEnum
)
{
HRESULT
hr
;
IEnumPinsImpl
*
This
=
(
IEnumPinsImpl
*
)
iface
;
IEnumPinsImpl
*
This
=
impl_from_IEnumPins
(
iface
)
;
TRACE
(
"(%p)
\n
"
,
ppEnum
);
...
...
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