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
bf01248c
Commit
bf01248c
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 version fields from IEnumMediaTypesImpl.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b68498c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
21 deletions
+4
-21
mediatype.c
dlls/strmbase/mediatype.c
+2
-13
pin.c
dlls/strmbase/pin.c
+1
-7
strmbase_private.h
dlls/strmbase/strmbase_private.h
+1
-1
No files found.
dlls/strmbase/mediatype.c
View file @
bf01248c
...
...
@@ -83,8 +83,6 @@ typedef struct IEnumMediaTypesImpl
LONG
refCount
;
BasePin
*
basePin
;
BasePin_GetMediaType
enumMediaFunction
;
BasePin_GetMediaTypeVersion
mediaVersionFunction
;
LONG
currentVersion
;
ULONG
count
;
ULONG
uIndex
;
}
IEnumMediaTypesImpl
;
...
...
@@ -96,7 +94,7 @@ static inline IEnumMediaTypesImpl *impl_from_IEnumMediaTypes(IEnumMediaTypes *if
static
const
struct
IEnumMediaTypesVtbl
IEnumMediaTypesImpl_Vtbl
;
HRESULT
WINAPI
EnumMediaTypes_Construct
(
BasePin
*
basePin
,
BasePin_GetMediaType
enumFunc
,
BasePin_GetMediaTypeVersion
versionFunc
,
IEnumMediaTypes
**
ppEnum
)
HRESULT
WINAPI
EnumMediaTypes_Construct
(
BasePin
*
basePin
,
BasePin_GetMediaType
enumFunc
,
IEnumMediaTypes
**
ppEnum
)
{
ULONG
i
;
IEnumMediaTypesImpl
*
pEnumMediaTypes
=
CoTaskMemAlloc
(
sizeof
(
IEnumMediaTypesImpl
));
...
...
@@ -111,7 +109,6 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e
pEnumMediaTypes
->
refCount
=
1
;
pEnumMediaTypes
->
uIndex
=
0
;
pEnumMediaTypes
->
enumMediaFunction
=
enumFunc
;
pEnumMediaTypes
->
mediaVersionFunction
=
versionFunc
;
IPin_AddRef
(
&
basePin
->
IPin_iface
);
pEnumMediaTypes
->
basePin
=
basePin
;
...
...
@@ -124,7 +121,6 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e
pEnumMediaTypes
->
count
=
i
;
*
ppEnum
=
&
pEnumMediaTypes
->
IEnumMediaTypes_iface
;
pEnumMediaTypes
->
currentVersion
=
versionFunc
(
basePin
);
return
S_OK
;
}
...
...
@@ -180,9 +176,6 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Next(IEnumMediaTypes *iface,
TRACE
(
"iface %p, count %u, mts %p, ret_count %p.
\n
"
,
iface
,
count
,
mts
,
ret_count
);
if
(
enummt
->
currentVersion
!=
enummt
->
mediaVersionFunction
(
enummt
->
basePin
))
return
VFW_E_ENUM_OUT_OF_SYNC
;
for
(
i
=
0
;
i
<
count
&&
enummt
->
uIndex
+
i
<
enummt
->
count
;
i
++
)
{
if
(
!
(
mts
[
i
]
=
CoTaskMemAlloc
(
sizeof
(
AM_MEDIA_TYPE
)))
...
...
@@ -209,9 +202,6 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Skip(IEnumMediaTypes *iface, ULONG cou
TRACE
(
"iface %p, count %u.
\n
"
,
iface
,
count
);
if
(
enummt
->
currentVersion
!=
enummt
->
mediaVersionFunction
(
enummt
->
basePin
))
return
VFW_E_ENUM_OUT_OF_SYNC
;
enummt
->
uIndex
+=
count
;
return
enummt
->
uIndex
>
enummt
->
count
?
S_FALSE
:
S_OK
;
...
...
@@ -232,7 +222,6 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Reset(IEnumMediaTypes * iface)
i
++
;
}
This
->
count
=
i
;
This
->
currentVersion
=
This
->
mediaVersionFunction
(
This
->
basePin
);
This
->
uIndex
=
0
;
return
S_OK
;
...
...
@@ -245,7 +234,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Clone(IEnumMediaTypes * iface, IEnumMe
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
ppEnum
);
hr
=
EnumMediaTypes_Construct
(
This
->
basePin
,
This
->
enumMediaFunction
,
This
->
mediaVersionFunction
,
ppEnum
);
hr
=
EnumMediaTypes_Construct
(
This
->
basePin
,
This
->
enumMediaFunction
,
ppEnum
);
if
(
FAILED
(
hr
))
return
hr
;
return
IEnumMediaTypes_Skip
(
*
ppEnum
,
This
->
uIndex
);
...
...
dlls/strmbase/pin.c
View file @
bf01248c
...
...
@@ -160,11 +160,6 @@ HRESULT WINAPI BasePinImpl_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_
return
VFW_S_NO_MORE_ITEMS
;
}
LONG
WINAPI
BasePinImpl_GetMediaTypeVersion
(
BasePin
*
iface
)
{
return
1
;
}
ULONG
WINAPI
BasePinImpl_AddRef
(
IPin
*
iface
)
{
BasePin
*
pin
=
impl_from_IPin
(
iface
);
...
...
@@ -306,8 +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
,
BasePinImpl_GetMediaTypeVersion
,
enum_media_types
);
return
EnumMediaTypes_Construct
(
pin
,
pin
->
pFuncsTable
->
pfnGetMediaType
,
enum_media_types
);
}
HRESULT
WINAPI
BasePinImpl_QueryInternalConnections
(
IPin
*
iface
,
IPin
**
apPin
,
ULONG
*
cPin
)
...
...
dlls/strmbase/strmbase_private.h
View file @
bf01248c
...
...
@@ -64,7 +64,7 @@ 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
,
BasePin_GetMediaTypeVersion
versionFunc
,
IEnumMediaTypes
**
enum_media_types
)
DECLSPEC_HIDDEN
;
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