Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/renderer.c | 181 +++++++++++++++------------------------ 1 file changed, 69 insertions(+), 112 deletions(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index c75452aea6..1d37531bf2 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -205,11 +205,76 @@ static HRESULT renderer_query_interface(struct strmbase_filter *iface, REFIID ii return E_NOINTERFACE; }
+static HRESULT renderer_init_stream(struct strmbase_filter *iface) +{ + struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); + + if (filter->sink.pin.peer) + ResetEvent(filter->state_event); + filter->sink.end_of_stream = FALSE; + BaseRendererImpl_ClearPendingSample(filter); + ResetEvent(filter->flush_event); + if (filter->pFuncsTable->renderer_init_stream) + filter->pFuncsTable->renderer_init_stream(filter); + + return S_OK; +} + +static HRESULT renderer_start_stream(struct strmbase_filter *iface, REFERENCE_TIME start) +{ + struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); + + filter->stream_start = start; + SetEvent(filter->state_event); + if (filter->sink.pin.peer) + filter->sink.end_of_stream = FALSE; + QualityControlRender_Start(filter->qcimpl, filter->stream_start); + if (filter->sink.pin.peer && filter->pFuncsTable->renderer_start_stream) + filter->pFuncsTable->renderer_start_stream(filter); + + return S_OK; +} + +static HRESULT renderer_stop_stream(struct strmbase_filter *iface) +{ + struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); + + if (filter->sink.pin.peer && filter->pFuncsTable->renderer_stop_stream) + filter->pFuncsTable->renderer_stop_stream(filter); + + return S_OK; +} + +static HRESULT renderer_cleanup_stream(struct strmbase_filter *iface) +{ + struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); + + RendererPosPassThru_ResetMediaTime(filter->pPosition); + SetEvent(filter->state_event); + SetEvent(filter->flush_event); + + return S_OK; +} + +static HRESULT renderer_wait_state(struct strmbase_filter *iface, DWORD timeout) +{ + struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); + + if (WaitForSingleObject(filter->state_event, timeout) == WAIT_TIMEOUT) + return VFW_S_STATE_INTERMEDIATE; + return S_OK; +} + static const struct strmbase_filter_ops filter_ops = { .filter_get_pin = renderer_get_pin, .filter_destroy = renderer_destroy, .filter_query_interface = renderer_query_interface, + .filter_init_stream = renderer_init_stream, + .filter_start_stream = renderer_start_stream, + .filter_stop_stream = renderer_stop_stream, + .filter_cleanup_stream = renderer_cleanup_stream, + .filter_wait_state = renderer_wait_state, };
static HRESULT sink_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt) @@ -371,96 +436,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa return hr; }
-static HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter *iface) -{ - struct strmbase_renderer *This = impl_from_IBaseFilter(iface); - - TRACE("(%p)->()\n", This); - - EnterCriticalSection(&This->csRenderLock); - { - RendererPosPassThru_ResetMediaTime(This->pPosition); - if (This->sink.pin.peer && This->pFuncsTable->renderer_stop_stream) - This->pFuncsTable->renderer_stop_stream(This); - This->filter.state = State_Stopped; - SetEvent(This->state_event); - SetEvent(This->flush_event); - } - LeaveCriticalSection(&This->csRenderLock); - - return S_OK; -} - -static HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter *iface, REFERENCE_TIME tStart) -{ - struct strmbase_renderer *This = impl_from_IBaseFilter(iface); - - TRACE("iface %p, start %s.\n", iface, debugstr_time(tStart)); - - EnterCriticalSection(&This->csRenderLock); - This->stream_start = tStart; - if (This->filter.state == State_Running) - goto out; - - if (This->filter.state == State_Stopped && This->pFuncsTable->renderer_init_stream) - This->pFuncsTable->renderer_init_stream(This); - - SetEvent(This->state_event); - - if (This->sink.pin.peer) - { - This->sink.end_of_stream = FALSE; - } - - QualityControlRender_Start(This->qcimpl, This->stream_start); - if (This->sink.pin.peer && This->pFuncsTable->renderer_start_stream) - This->pFuncsTable->renderer_start_stream(This); - if (This->filter.state == State_Stopped) - BaseRendererImpl_ClearPendingSample(This); - This->filter.state = State_Running; - -out: - LeaveCriticalSection(&This->csRenderLock); - - return S_OK; -} - -static HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter *iface) -{ - struct strmbase_renderer *This = impl_from_IBaseFilter(iface); - HRESULT hr = S_OK; - - TRACE("(%p)->()\n", This); - - EnterCriticalSection(&This->csRenderLock); - { - if (This->filter.state != State_Paused) - { - if (This->filter.state == State_Stopped) - { - if (This->sink.pin.peer) - { - ResetEvent(This->state_event); - hr = S_FALSE; - } - This->sink.end_of_stream = FALSE; - if (This->pFuncsTable->renderer_init_stream) - This->pFuncsTable->renderer_init_stream(This); - } - else if (This->sink.pin.peer && This->pFuncsTable->renderer_stop_stream) - This->pFuncsTable->renderer_stop_stream(This); - - if (This->filter.state == State_Stopped) - BaseRendererImpl_ClearPendingSample(This); - ResetEvent(This->flush_event); - This->filter.state = State_Paused; - } - } - LeaveCriticalSection(&This->csRenderLock); - - return hr; -} - static HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock) { struct strmbase_renderer *This = impl_from_IBaseFilter(iface); @@ -473,34 +448,16 @@ static HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IRefere return hr; }
- -static HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState) -{ - HRESULT hr; - struct strmbase_renderer *This = impl_from_IBaseFilter(iface); - - TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState); - - if (WaitForSingleObject(This->state_event, dwMilliSecsTimeout) == WAIT_TIMEOUT) - hr = VFW_S_STATE_INTERMEDIATE; - else - hr = S_OK; - - BaseFilterImpl_GetState(iface, dwMilliSecsTimeout, pState); - - return hr; -} - static const IBaseFilterVtbl strmbase_renderer_vtbl = { BaseFilterImpl_QueryInterface, BaseFilterImpl_AddRef, BaseFilterImpl_Release, BaseFilterImpl_GetClassID, - BaseRendererImpl_Stop, - BaseRendererImpl_Pause, - BaseRendererImpl_Run, - BaseRendererImpl_GetState, + BaseFilterImpl_Stop, + BaseFilterImpl_Pause, + BaseFilterImpl_Run, + BaseFilterImpl_GetState, BaseRendererImpl_SetSyncSource, BaseFilterImpl_GetSyncSource, BaseFilterImpl_EnumPins,
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/strmbase/qualitycontrol.c | 37 ++++++++++++++------------------ dlls/strmbase/renderer.c | 2 +- dlls/strmbase/strmbase_private.h | 5 ++--- dlls/strmbase/transform.c | 5 ++--- 4 files changed, 21 insertions(+), 28 deletions(-)
diff --git a/dlls/strmbase/qualitycontrol.c b/dlls/strmbase/qualitycontrol.c index b3e93b7baa..59d198bd28 100644 --- a/dlls/strmbase/qualitycontrol.c +++ b/dlls/strmbase/qualitycontrol.c @@ -27,16 +27,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(strmbase_qc);
-HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControlImpl **ppv) +HRESULT QualityControlImpl_Create(struct strmbase_pin *pin, QualityControlImpl **ppv) { QualityControlImpl *This; - TRACE("%p, %p, %p\n", input, self, ppv); *ppv = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(QualityControlImpl)); if (!*ppv) return E_OUTOFMEMORY; This = *ppv; - This->input = input; - This->self = self; + This->pin = pin; This->tonotify = NULL; This->clock = NULL; This->current_rstart = This->current_rstop = -1; @@ -57,19 +55,19 @@ static inline QualityControlImpl *impl_from_IQualityControl(IQualityControl *ifa HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv) { QualityControlImpl *This = impl_from_IQualityControl(iface); - return IBaseFilter_QueryInterface(This->self, riid, ppv); + return IBaseFilter_QueryInterface(&This->pin->filter->IBaseFilter_iface, riid, ppv); }
ULONG WINAPI QualityControlImpl_AddRef(IQualityControl *iface) { QualityControlImpl *This = impl_from_IQualityControl(iface); - return IBaseFilter_AddRef(This->self); + return IBaseFilter_AddRef(&This->pin->filter->IBaseFilter_iface); }
ULONG WINAPI QualityControlImpl_Release(IQualityControl *iface) { QualityControlImpl *This = impl_from_IQualityControl(iface); - return IBaseFilter_Release(This->self); + return IBaseFilter_Release(&This->pin->filter->IBaseFilter_iface); }
HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm) @@ -81,19 +79,16 @@ HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *se iface, sender, qm.Type, qm.Proportion, debugstr_time(qm.Late), debugstr_time(qm.TimeStamp));
if (This->tonotify) - return IQualityControl_Notify(This->tonotify, This->self, qm); - - if (This->input) { - IPin *to = NULL; - IPin_ConnectedTo(This->input, &to); - if (to) { - IQualityControl *qc = NULL; - IPin_QueryInterface(to, &IID_IQualityControl, (void**)&qc); - if (qc) { - hr = IQualityControl_Notify(qc, This->self, qm); - IQualityControl_Release(qc); - } - IPin_Release(to); + return IQualityControl_Notify(This->tonotify, &This->pin->filter->IBaseFilter_iface, qm); + + if (This->pin->peer) + { + IQualityControl *qc = NULL; + IPin_QueryInterface(This->pin->peer, &IID_IQualityControl, (void **)&qc); + if (qc) + { + hr = IQualityControl_Notify(qc, &This->pin->filter->IBaseFilter_iface, qm); + IQualityControl_Release(qc); } }
@@ -270,7 +265,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv) q.Late = priv->current_jitter; q.TimeStamp = priv->current_rstart; TRACE("Late: %s from %s, rate: %g\n", debugstr_time(q.Late), debugstr_time(q.TimeStamp), 1./priv->avg_rate); - hr = IQualityControl_Notify(&priv->IQualityControl_iface, priv->self, q); + hr = IQualityControl_Notify(&priv->IQualityControl_iface, &priv->pin->filter->IBaseFilter_iface, q); priv->qos_handled = hr == S_OK; }
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 1d37531bf2..748a53f2ff 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -545,7 +545,7 @@ HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown filter->advise_event = CreateEventW(NULL, FALSE, FALSE, NULL); filter->flush_event = CreateEventW(NULL, TRUE, TRUE, NULL);
- QualityControlImpl_Create(&filter->sink.pin.IPin_iface, &filter->filter.IBaseFilter_iface, &filter->qcimpl); + QualityControlImpl_Create(&filter->sink.pin, &filter->qcimpl); filter->qcimpl->IQualityControl_iface.lpVtbl = &Renderer_QualityControl_Vtbl;
return S_OK; diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index d0f5029765..6031e0e485 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -53,8 +53,7 @@ static inline const char *debugstr_time(REFERENCE_TIME time) /* Quality Control */ typedef struct QualityControlImpl { IQualityControl IQualityControl_iface; - IPin *input; - IBaseFilter *self; + struct strmbase_pin *pin; IQualityControl *tonotify;
/* Render stuff */ @@ -66,7 +65,7 @@ typedef struct QualityControlImpl { BOOL qos_handled, is_dropped; } QualityControlImpl;
-HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControlImpl **ppv); +HRESULT QualityControlImpl_Create(struct strmbase_pin *pin, QualityControlImpl **out); void QualityControlImpl_Destroy(QualityControlImpl *This); HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv); ULONG WINAPI QualityControlImpl_AddRef(IQualityControl *iface); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index d0484a2543..266232f57a 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -286,8 +286,7 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid, strmbase_source_init(&filter->source, &TransformFilter_OutputPin_Vtbl, &filter->filter, wcsOutputPinName, &source_ops);
- QualityControlImpl_Create(&filter->sink.pin.IPin_iface, - &filter->filter.IBaseFilter_iface, &filter->qcimpl); + QualityControlImpl_Create(&filter->sink.pin, &filter->qcimpl); filter->qcimpl->IQualityControl_iface.lpVtbl = &TransformFilter_QualityControl_Vtbl;
filter->seekthru_unk = NULL; @@ -483,7 +482,7 @@ static const IPinVtbl TransformFilter_OutputPin_Vtbl =
static HRESULT WINAPI TransformFilter_QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm) { QualityControlImpl *qc = (QualityControlImpl*)iface; - TransformFilter *This = impl_from_IBaseFilter(qc->self); + TransformFilter *This = impl_from_source_IPin(&qc->pin->IPin_iface);
if (This->pFuncsTable->pfnNotify) return This->pFuncsTable->pfnNotify(This, sender, qm);
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);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/audiorecord.c | 33 +++------------------------------ dlls/qcap/tests/audiorecord.c | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 40 deletions(-)
diff --git a/dlls/qcap/audiorecord.c b/dlls/qcap/audiorecord.c index 5d636937f8..6446ee6b4e 100644 --- a/dlls/qcap/audiorecord.c +++ b/dlls/qcap/audiorecord.c @@ -44,46 +44,19 @@ static inline AudioRecord *impl_from_strmbase_filter(struct strmbase_filter *fil return CONTAINING_RECORD(filter, AudioRecord, filter); }
-static inline AudioRecord *impl_from_IBaseFilter(IBaseFilter *iface) -{ - struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface); - return impl_from_strmbase_filter(filter); -} - static inline AudioRecord *impl_from_IPersistPropertyBag(IPersistPropertyBag *iface) { return CONTAINING_RECORD(iface, AudioRecord, IPersistPropertyBag_iface); }
-static HRESULT WINAPI AudioRecord_Stop(IBaseFilter *iface) -{ - AudioRecord *This = impl_from_IBaseFilter(iface); - FIXME("(%p): stub\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI AudioRecord_Pause(IBaseFilter *iface) -{ - AudioRecord *This = impl_from_IBaseFilter(iface); - FIXME("(%p): stub\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI AudioRecord_Run(IBaseFilter *iface, REFERENCE_TIME tStart) -{ - AudioRecord *This = impl_from_IBaseFilter(iface); - FIXME("(%p, %s): stub\n", This, wine_dbgstr_longlong(tStart)); - return E_NOTIMPL; -} - static const IBaseFilterVtbl AudioRecordVtbl = { BaseFilterImpl_QueryInterface, BaseFilterImpl_AddRef, BaseFilterImpl_Release, BaseFilterImpl_GetClassID, - AudioRecord_Stop, - AudioRecord_Pause, - AudioRecord_Run, + BaseFilterImpl_Stop, + BaseFilterImpl_Pause, + BaseFilterImpl_Run, BaseFilterImpl_GetState, BaseFilterImpl_SetSyncSource, BaseFilterImpl_GetSyncSource, diff --git a/dlls/qcap/tests/audiorecord.c b/dlls/qcap/tests/audiorecord.c index 11ef690b99..dc74c3cfc1 100644 --- a/dlls/qcap/tests/audiorecord.c +++ b/dlls/qcap/tests/audiorecord.c @@ -255,42 +255,42 @@ static void test_unconnected_filter_state(IBaseFilter *filter) ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); todo_wine ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); - todo_wine ok(state == State_Paused, "Got state %u.\n", state); + ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == State_Running, "Got state %u.\n", state); + ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); todo_wine ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); - todo_wine ok(state == State_Paused, "Got state %u.\n", state); + ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(state == State_Running, "Got state %u.\n", state); + ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); ok(hr == S_OK, "Got hr %#x.\n", hr);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=58508
Your paranoid android.
=== w7u (task log) ===
Task errors: An error occurred while retrieving exe32.report: unable to open 'exe32.report' for reading: No such file or directory BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) Giving up after 3 run(s)
On Mon, 28 Oct 2019, Marvin wrote: [...]
=== w7u (task log) ===
Task errors: An error occurred while retrieving exe32.report: unable to open 'exe32.report' for reading: No such file or directory BotError: The test VM has crashed, rebooted or lost connectivity (or the TestAgent server died) Giving up after 3 run(s)
So this error is caused by the patch that captures the cmd.exe stdout and stderr.
https://source.winehq.org/git/tools.git/commit/6be509ccd0a8a723591a9bded6d0c...
It's less compatible than I thought with the old versions of TestAgentd. The telltale error here is the 'unable to open 'exe32.report' for reading' part. I sent a patch to fix this and I have taken w7u out of the base VMs to not pollute the TestBot results too much in the meantime.
Now that cmd capture patch is causing problems with the kernel32:console tests so there may be further changes.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qedit/samplegrabber.c | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-)
diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index a275d56738..9a67b31fb4 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -371,36 +371,6 @@ static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample) } }
-/* IMediaFilter */ -static HRESULT WINAPI -SampleGrabber_IBaseFilter_Stop(IBaseFilter *iface) -{ - SG_Impl *This = impl_from_IBaseFilter(iface); - TRACE("(%p)\n", This); - This->filter.state = State_Stopped; - return S_OK; -} - -/* IMediaFilter */ -static HRESULT WINAPI -SampleGrabber_IBaseFilter_Pause(IBaseFilter *iface) -{ - SG_Impl *This = impl_from_IBaseFilter(iface); - TRACE("(%p)\n", This); - This->filter.state = State_Paused; - return S_OK; -} - -/* IMediaFilter */ -static HRESULT WINAPI -SampleGrabber_IBaseFilter_Run(IBaseFilter *iface, REFERENCE_TIME tStart) -{ - SG_Impl *This = impl_from_IBaseFilter(iface); - TRACE("(%p)\n", This); - This->filter.state = State_Running; - return S_OK; -} - /* IBaseFilter */ static HRESULT WINAPI SampleGrabber_IBaseFilter_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *graph, LPCWSTR name) @@ -1033,9 +1003,9 @@ static const IBaseFilterVtbl IBaseFilter_VTable = BaseFilterImpl_AddRef, BaseFilterImpl_Release, BaseFilterImpl_GetClassID, - SampleGrabber_IBaseFilter_Stop, - SampleGrabber_IBaseFilter_Pause, - SampleGrabber_IBaseFilter_Run, + BaseFilterImpl_Stop, + BaseFilterImpl_Pause, + BaseFilterImpl_Run, BaseFilterImpl_GetState, BaseFilterImpl_SetSyncSource, BaseFilterImpl_GetSyncSource,