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
750efd19
Commit
750efd19
authored
Sep 23, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Get rid of the "enumMediaFunction" field from IEnumMediaTypesImpl.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bf01248c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
18 deletions
+7
-18
mediatype.c
dlls/strmbase/mediatype.c
+5
-15
pin.c
dlls/strmbase/pin.c
+1
-1
strmbase_private.h
dlls/strmbase/strmbase_private.h
+1
-2
No files found.
dlls/strmbase/mediatype.c
View file @
750efd19
...
...
@@ -82,7 +82,6 @@ typedef struct IEnumMediaTypesImpl
IEnumMediaTypes
IEnumMediaTypes_iface
;
LONG
refCount
;
BasePin
*
basePin
;
BasePin_GetMediaType
enumMediaFunction
;
ULONG
count
;
ULONG
uIndex
;
}
IEnumMediaTypesImpl
;
...
...
@@ -94,11 +93,9 @@ static inline IEnumMediaTypesImpl *impl_from_IEnumMediaTypes(IEnumMediaTypes *if
static
const
struct
IEnumMediaTypesVtbl
IEnumMediaTypesImpl_Vtbl
;
HRESULT
WINAPI
EnumMediaTypes_Construct
(
BasePin
*
basePin
,
BasePin_GetMediaType
enumFunc
,
IEnumMediaTypes
**
ppEnum
)
HRESULT
enum_media_types_create
(
BasePin
*
basePin
,
IEnumMediaTypes
**
ppEnum
)
{
ULONG
i
;
IEnumMediaTypesImpl
*
pEnumMediaTypes
=
CoTaskMemAlloc
(
sizeof
(
IEnumMediaTypesImpl
));
AM_MEDIA_TYPE
amt
;
*
ppEnum
=
NULL
;
...
...
@@ -108,18 +105,11 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e
pEnumMediaTypes
->
IEnumMediaTypes_iface
.
lpVtbl
=
&
IEnumMediaTypesImpl_Vtbl
;
pEnumMediaTypes
->
refCount
=
1
;
pEnumMediaTypes
->
uIndex
=
0
;
pEnumMediaTypes
->
enumMediaFunction
=
enumFunc
;
IPin_AddRef
(
&
basePin
->
IPin_iface
);
pEnumMediaTypes
->
basePin
=
basePin
;
i
=
0
;
while
(
enumFunc
(
basePin
,
i
,
&
amt
)
==
S_OK
)
{
FreeMediaType
(
&
amt
);
i
++
;
}
IEnumMediaTypes_Reset
(
&
pEnumMediaTypes
->
IEnumMediaTypes_iface
);
pEnumMediaTypes
->
count
=
i
;
*
ppEnum
=
&
pEnumMediaTypes
->
IEnumMediaTypes_iface
;
return
S_OK
;
}
...
...
@@ -179,7 +169,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Next(IEnumMediaTypes *iface,
for
(
i
=
0
;
i
<
count
&&
enummt
->
uIndex
+
i
<
enummt
->
count
;
i
++
)
{
if
(
!
(
mts
[
i
]
=
CoTaskMemAlloc
(
sizeof
(
AM_MEDIA_TYPE
)))
||
FAILED
(
enummt
->
enumMediaFunction
(
enummt
->
basePin
,
enummt
->
uIndex
+
i
,
mts
[
i
])))
||
FAILED
(
enummt
->
basePin
->
pFuncsTable
->
pfnGetMediaType
(
enummt
->
basePin
,
enummt
->
uIndex
+
i
,
mts
[
i
])))
{
while
(
i
--
)
DeleteMediaType
(
mts
[
i
]);
...
...
@@ -216,7 +206,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Reset(IEnumMediaTypes * iface)
TRACE
(
"(%p)->()
\n
"
,
iface
);
i
=
0
;
while
(
This
->
enumMediaFunction
(
This
->
basePin
,
i
,
&
amt
)
==
S_OK
)
while
(
This
->
basePin
->
pFuncsTable
->
pfnGetMediaType
(
This
->
basePin
,
i
,
&
amt
)
==
S_OK
)
{
FreeMediaType
(
&
amt
);
i
++
;
...
...
@@ -234,7 +224,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Clone(IEnumMediaTypes * iface, IEnumMe
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
ppEnum
);
hr
=
EnumMediaTypes_Construct
(
This
->
basePin
,
This
->
enumMediaFunctio
n
,
ppEnum
);
hr
=
enum_media_types_create
(
This
->
basePi
n
,
ppEnum
);
if
(
FAILED
(
hr
))
return
hr
;
return
IEnumMediaTypes_Skip
(
*
ppEnum
,
This
->
uIndex
);
...
...
dlls/strmbase/pin.c
View file @
750efd19
...
...
@@ -301,7 +301,7 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_me
TRACE
(
"iface %p, enum_media_types %p.
\n
"
,
iface
,
enum_media_types
);
return
EnumMediaTypes_Construct
(
pin
,
pin
->
pFuncsTable
->
pfnGetMediaType
,
enum_media_types
);
return
enum_media_types_create
(
pin
,
enum_media_types
);
}
HRESULT
WINAPI
BasePinImpl_QueryInternalConnections
(
IPin
*
iface
,
IPin
**
apPin
,
ULONG
*
cPin
)
...
...
dlls/strmbase/strmbase_private.h
View file @
750efd19
...
...
@@ -63,8 +63,7 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s
void
QualityControlRender_EndRender
(
QualityControlImpl
*
This
);
HRESULT
enum_pins_create
(
struct
strmbase_filter
*
filter
,
IEnumPins
**
enum_pins
);
HRESULT
WINAPI
EnumMediaTypes_Construct
(
BasePin
*
pin
,
BasePin_GetMediaType
enumFunc
,
IEnumMediaTypes
**
enum_media_types
)
DECLSPEC_HIDDEN
;
HRESULT
enum_media_types_create
(
BasePin
*
pin
,
IEnumMediaTypes
**
enum_media_types
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
RendererPosPassThru_RegisterMediaTime
(
IUnknown
*
iface
,
REFERENCE_TIME
start
);
HRESULT
WINAPI
RendererPosPassThru_ResetMediaTime
(
IUnknown
*
iface
);
...
...
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