Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/mediatype.c | 15 ++------------- dlls/strmbase/pin.c | 8 +------- dlls/strmbase/strmbase_private.h | 2 +- 3 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/dlls/strmbase/mediatype.c b/dlls/strmbase/mediatype.c index 393264c094c..bb59a815847 100644 --- a/dlls/strmbase/mediatype.c +++ b/dlls/strmbase/mediatype.c @@ -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); diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 2fb9cf012f2..7991fdc5477 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -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) diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index 4b94735eb66..b5e6d4bd188 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -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);