strmbase: Rename "evComplete" to "state_event" for clarity.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-07-01 22:49:45 -05:00 committed by Alexandre Julliard
parent ac10f3de1f
commit 659b93c7da
4 changed files with 12 additions and 11 deletions

View File

@ -727,7 +727,7 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface)
if (This->renderer.filter.state == State_Stopped) if (This->renderer.filter.state == State_Stopped)
{ {
if (This->renderer.sink.pin.pConnectedTo) if (This->renderer.sink.pin.pConnectedTo)
ResetEvent(This->renderer.evComplete); ResetEvent(This->renderer.state_event);
This->renderer.sink.end_of_stream = 0; This->renderer.sink.end_of_stream = 0;
} }

View File

@ -51,7 +51,6 @@ typedef struct VideoRendererImpl
DWORD ThreadID; DWORD ThreadID;
HANDLE hEvent; HANDLE hEvent;
/* hEvent == evComplete? */
BOOL ThreadResult; BOOL ThreadResult;
RECT SourceRect; RECT SourceRect;
RECT DestRect; RECT DestRect;

View File

@ -266,7 +266,7 @@ HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, const IBaseFilterVtb
InitializeCriticalSection(&filter->csRenderLock); InitializeCriticalSection(&filter->csRenderLock);
filter->csRenderLock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": BaseRenderer.csRenderLock"); filter->csRenderLock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": BaseRenderer.csRenderLock");
filter->evComplete = CreateEventW(NULL, TRUE, TRUE, NULL); filter->state_event = CreateEventW(NULL, TRUE, TRUE, NULL);
filter->RenderEvent = CreateEventW(NULL, FALSE, FALSE, NULL); filter->RenderEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
filter->pMediaSample = NULL; filter->pMediaSample = NULL;
@ -290,7 +290,7 @@ void strmbase_renderer_cleanup(BaseRenderer *filter)
DeleteCriticalSection(&filter->csRenderLock); DeleteCriticalSection(&filter->csRenderLock);
BaseRendererImpl_ClearPendingSample(filter); BaseRendererImpl_ClearPendingSample(filter);
CloseHandle(filter->evComplete); CloseHandle(filter->state_event);
CloseHandle(filter->RenderEvent); CloseHandle(filter->RenderEvent);
QualityControlImpl_Destroy(filter->qcimpl); QualityControlImpl_Destroy(filter->qcimpl);
strmbase_filter_cleanup(&filter->filter); strmbase_filter_cleanup(&filter->filter);
@ -341,7 +341,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
if (This->pFuncsTable->pfnOnReceiveFirstSample) if (This->pFuncsTable->pfnOnReceiveFirstSample)
This->pFuncsTable->pfnOnReceiveFirstSample(This, pSample); This->pFuncsTable->pfnOnReceiveFirstSample(This, pSample);
SetEvent(This->evComplete); SetEvent(This->state_event);
} }
/* Wait for render Time */ /* Wait for render Time */
@ -401,7 +401,7 @@ HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface)
if (This->pFuncsTable->pfnOnStopStreaming) if (This->pFuncsTable->pfnOnStopStreaming)
This->pFuncsTable->pfnOnStopStreaming(This); This->pFuncsTable->pfnOnStopStreaming(This);
This->filter.state = State_Stopped; This->filter.state = State_Stopped;
SetEvent(This->evComplete); SetEvent(This->state_event);
SetEvent(This->RenderEvent); SetEvent(This->RenderEvent);
} }
LeaveCriticalSection(&This->csRenderLock); LeaveCriticalSection(&This->csRenderLock);
@ -420,7 +420,7 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
if (This->filter.state == State_Running) if (This->filter.state == State_Running)
goto out; goto out;
SetEvent(This->evComplete); SetEvent(This->state_event);
if (This->sink.pin.pConnectedTo) if (This->sink.pin.pConnectedTo)
{ {
@ -466,7 +466,7 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
if (This->filter.state == State_Stopped) if (This->filter.state == State_Stopped)
{ {
if (This->sink.pin.pConnectedTo) if (This->sink.pin.pConnectedTo)
ResetEvent(This->evComplete); ResetEvent(This->state_event);
This->sink.end_of_stream = FALSE; This->sink.end_of_stream = FALSE;
} }
else if (This->pFuncsTable->pfnOnStopStreaming) else if (This->pFuncsTable->pfnOnStopStreaming)
@ -503,7 +503,7 @@ HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsT
TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState); TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState);
if (WaitForSingleObject(This->evComplete, dwMilliSecsTimeout) == WAIT_TIMEOUT) if (WaitForSingleObject(This->state_event, dwMilliSecsTimeout) == WAIT_TIMEOUT)
hr = VFW_S_STATE_INTERMEDIATE; hr = VFW_S_STATE_INTERMEDIATE;
else else
hr = S_OK; hr = S_OK;
@ -531,7 +531,7 @@ HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface)
} }
} }
RendererPosPassThru_EOS(iface->pPosition); RendererPosPassThru_EOS(iface->pPosition);
SetEvent(iface->evComplete); SetEvent(iface->state_event);
return hr; return hr;
} }

View File

@ -540,7 +540,9 @@ typedef struct BaseRendererTag
BaseInputPin sink; BaseInputPin sink;
IUnknown *pPosition; IUnknown *pPosition;
CRITICAL_SECTION csRenderLock; CRITICAL_SECTION csRenderLock;
HANDLE evComplete; /* Signaled when the filter has completed a state change. The filter waits
* for this event in IBaseFilter::GetState(). */
HANDLE state_event;
HANDLE RenderEvent; HANDLE RenderEvent;
IMediaSample *pMediaSample; IMediaSample *pMediaSample;