From abb547f43629bf3dc535f96bb6743403d45daad5 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sun, 27 Oct 2019 18:28:05 -0500 Subject: [PATCH] qcap/audiorecord: Use strmbase state change methods. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- 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 5d636937f81..6446ee6b4ef 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 11ef690b99d..dc74c3cfc15 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);