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:
parent
ac10f3de1f
commit
659b93c7da
|
@ -727,7 +727,7 @@ static HRESULT WINAPI DSoundRender_Pause(IBaseFilter * iface)
|
|||
if (This->renderer.filter.state == State_Stopped)
|
||||
{
|
||||
if (This->renderer.sink.pin.pConnectedTo)
|
||||
ResetEvent(This->renderer.evComplete);
|
||||
ResetEvent(This->renderer.state_event);
|
||||
This->renderer.sink.end_of_stream = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ typedef struct VideoRendererImpl
|
|||
|
||||
DWORD ThreadID;
|
||||
HANDLE hEvent;
|
||||
/* hEvent == evComplete? */
|
||||
BOOL ThreadResult;
|
||||
RECT SourceRect;
|
||||
RECT DestRect;
|
||||
|
|
|
@ -266,7 +266,7 @@ HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, const IBaseFilterVtb
|
|||
|
||||
InitializeCriticalSection(&filter->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->pMediaSample = NULL;
|
||||
|
||||
|
@ -290,7 +290,7 @@ void strmbase_renderer_cleanup(BaseRenderer *filter)
|
|||
DeleteCriticalSection(&filter->csRenderLock);
|
||||
|
||||
BaseRendererImpl_ClearPendingSample(filter);
|
||||
CloseHandle(filter->evComplete);
|
||||
CloseHandle(filter->state_event);
|
||||
CloseHandle(filter->RenderEvent);
|
||||
QualityControlImpl_Destroy(filter->qcimpl);
|
||||
strmbase_filter_cleanup(&filter->filter);
|
||||
|
@ -341,7 +341,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
|
|||
if (This->pFuncsTable->pfnOnReceiveFirstSample)
|
||||
This->pFuncsTable->pfnOnReceiveFirstSample(This, pSample);
|
||||
|
||||
SetEvent(This->evComplete);
|
||||
SetEvent(This->state_event);
|
||||
}
|
||||
|
||||
/* Wait for render Time */
|
||||
|
@ -401,7 +401,7 @@ HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface)
|
|||
if (This->pFuncsTable->pfnOnStopStreaming)
|
||||
This->pFuncsTable->pfnOnStopStreaming(This);
|
||||
This->filter.state = State_Stopped;
|
||||
SetEvent(This->evComplete);
|
||||
SetEvent(This->state_event);
|
||||
SetEvent(This->RenderEvent);
|
||||
}
|
||||
LeaveCriticalSection(&This->csRenderLock);
|
||||
|
@ -420,7 +420,7 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
|
|||
if (This->filter.state == State_Running)
|
||||
goto out;
|
||||
|
||||
SetEvent(This->evComplete);
|
||||
SetEvent(This->state_event);
|
||||
|
||||
if (This->sink.pin.pConnectedTo)
|
||||
{
|
||||
|
@ -466,7 +466,7 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
|
|||
if (This->filter.state == State_Stopped)
|
||||
{
|
||||
if (This->sink.pin.pConnectedTo)
|
||||
ResetEvent(This->evComplete);
|
||||
ResetEvent(This->state_event);
|
||||
This->sink.end_of_stream = FALSE;
|
||||
}
|
||||
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);
|
||||
|
||||
if (WaitForSingleObject(This->evComplete, dwMilliSecsTimeout) == WAIT_TIMEOUT)
|
||||
if (WaitForSingleObject(This->state_event, dwMilliSecsTimeout) == WAIT_TIMEOUT)
|
||||
hr = VFW_S_STATE_INTERMEDIATE;
|
||||
else
|
||||
hr = S_OK;
|
||||
|
@ -531,7 +531,7 @@ HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface)
|
|||
}
|
||||
}
|
||||
RendererPosPassThru_EOS(iface->pPosition);
|
||||
SetEvent(iface->evComplete);
|
||||
SetEvent(iface->state_event);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -540,7 +540,9 @@ typedef struct BaseRendererTag
|
|||
BaseInputPin sink;
|
||||
IUnknown *pPosition;
|
||||
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;
|
||||
IMediaSample *pMediaSample;
|
||||
|
||||
|
|
Loading…
Reference in New Issue