Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/qualitycontrol.c | 19 ++++++------------- dlls/strmbase/renderer.c | 19 +------------------ dlls/strmbase/strmbase_private.h | 2 -- 3 files changed, 7 insertions(+), 33 deletions(-)
diff --git a/dlls/strmbase/qualitycontrol.c b/dlls/strmbase/qualitycontrol.c index 59d198bd28..a7e6e71364 100644 --- a/dlls/strmbase/qualitycontrol.c +++ b/dlls/strmbase/qualitycontrol.c @@ -36,7 +36,6 @@ HRESULT QualityControlImpl_Create(struct strmbase_pin *pin, QualityControlImpl * This = *ppv; This->pin = pin; This->tonotify = NULL; - This->clock = NULL; This->current_rstart = This->current_rstop = -1; TRACE("-> %p\n", This); return S_OK; @@ -125,13 +124,6 @@ void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart) This->qos_handled = TRUE; /* Lie that will be corrected on first adjustment */ }
- -void QualityControlRender_SetClock(QualityControlImpl *This, IReferenceClock *clock) -{ - TRACE("%p %p\n", This, clock); - This->clock = clock; -} - static BOOL QualityControlRender_IsLate(QualityControlImpl *This, REFERENCE_TIME jitter, REFERENCE_TIME start, REFERENCE_TIME stop) { @@ -168,7 +160,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv)
TRACE("%p\n", priv);
- if (!priv->clock || priv->current_rstart < 0) + if (!priv->pin->filter->pClock || priv->current_rstart < 0) return;
start = priv->current_rstart; @@ -284,7 +276,7 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s if (start >= 0) { REFERENCE_TIME now; - IReferenceClock_GetTime(This->clock, &now); + IReferenceClock_GetTime(This->pin->filter->pClock, &now); This->current_jitter = (now - This->clockstart) - start; } else @@ -299,10 +291,10 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s else This->rendered++;
- if (!This->clock) + if (!This->pin->filter->pClock) return;
- IReferenceClock_GetTime(This->clock, &This->start); + IReferenceClock_GetTime(This->pin->filter->pClock, &This->start);
TRACE("Starting at %s.\n", debugstr_time(This->start)); } @@ -313,7 +305,8 @@ void QualityControlRender_EndRender(QualityControlImpl *This)
TRACE("%p\n", This);
- if (!This->clock || This->start < 0 || FAILED(IReferenceClock_GetTime(This->clock, &This->stop))) + if (!This->pin->filter->pClock || This->start < 0 + || FAILED(IReferenceClock_GetTime(This->pin->filter->pClock, &This->stop))) return;
elapsed = This->start - This->stop; diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 748a53f2ff..57f440b9f4 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -22,11 +22,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
-static inline struct strmbase_renderer *impl_from_IBaseFilter(IBaseFilter *iface) -{ - return CONTAINING_RECORD(iface, struct strmbase_renderer, filter.IBaseFilter_iface); -} - static inline struct strmbase_renderer *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, struct strmbase_renderer, filter); @@ -436,18 +431,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa return hr; }
-static HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock) -{ - struct strmbase_renderer *This = impl_from_IBaseFilter(iface); - HRESULT hr; - - EnterCriticalSection(&This->filter.csFilter); - QualityControlRender_SetClock(This->qcimpl, clock); - hr = BaseFilterImpl_SetSyncSource(iface, clock); - LeaveCriticalSection(&This->filter.csFilter); - return hr; -} - static const IBaseFilterVtbl strmbase_renderer_vtbl = { BaseFilterImpl_QueryInterface, @@ -458,7 +441,7 @@ static const IBaseFilterVtbl strmbase_renderer_vtbl = BaseFilterImpl_Pause, BaseFilterImpl_Run, BaseFilterImpl_GetState, - BaseRendererImpl_SetSyncSource, + BaseFilterImpl_SetSyncSource, BaseFilterImpl_GetSyncSource, BaseFilterImpl_EnumPins, BaseFilterImpl_FindPin, diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index 6031e0e485..49e624b41b 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -57,7 +57,6 @@ typedef struct QualityControlImpl { IQualityControl *tonotify;
/* Render stuff */ - IReferenceClock *clock; REFERENCE_TIME last_in_time, last_left, avg_duration, avg_pt, avg_render, start, stop; REFERENCE_TIME current_jitter, current_rstart, current_rstop, clockstart; double avg_rate; @@ -74,7 +73,6 @@ HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *se HRESULT WINAPI QualityControlImpl_SetSink(IQualityControl *iface, IQualityControl *tonotify);
void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart); -void QualityControlRender_SetClock(QualityControlImpl *This, IReferenceClock *clock); void QualityControlRender_DoQOS(QualityControlImpl *priv); void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME start, REFERENCE_TIME stop); void QualityControlRender_EndRender(QualityControlImpl *This);