strmbase: Use BOOL type where appropriate.

This commit is contained in:
Frédéric Delanoy 2013-11-25 22:27:35 +01:00 committed by Alexandre Julliard
parent 6a847bd9cd
commit 50d45a8abc
5 changed files with 15 additions and 14 deletions

View File

@ -981,7 +981,7 @@ HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface)
if (This->flushing) if (This->flushing)
hr = S_FALSE; hr = S_FALSE;
else else
This->end_of_stream = 1; This->end_of_stream = TRUE;
LeaveCriticalSection(This->pin.pCritSec); LeaveCriticalSection(This->pin.pCritSec);
if (hr == S_OK) if (hr == S_OK)
@ -1001,7 +1001,7 @@ HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface)
TRACE("() semi-stub\n"); TRACE("() semi-stub\n");
EnterCriticalSection(This->pin.pCritSec); EnterCriticalSection(This->pin.pCritSec);
This->flushing = 1; This->flushing = TRUE;
hr = SendFurther( iface, deliver_beginflush, NULL, NULL ); hr = SendFurther( iface, deliver_beginflush, NULL, NULL );
LeaveCriticalSection(This->pin.pCritSec); LeaveCriticalSection(This->pin.pCritSec);
@ -1021,7 +1021,7 @@ HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface)
TRACE("(%p)\n", This); TRACE("(%p)\n", This);
EnterCriticalSection(This->pin.pCritSec); EnterCriticalSection(This->pin.pCritSec);
This->flushing = This->end_of_stream = 0; This->flushing = This->end_of_stream = FALSE;
hr = SendFurther( iface, deliver_endflush, NULL, NULL ); hr = SendFurther( iface, deliver_endflush, NULL, NULL );
LeaveCriticalSection(This->pin.pCritSec); LeaveCriticalSection(This->pin.pCritSec);
@ -1232,7 +1232,7 @@ static HRESULT InputPin_Init(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPi
IMemAllocator_AddRef(pPinImpl->preferred_allocator); IMemAllocator_AddRef(pPinImpl->preferred_allocator);
pPinImpl->pin.IPin_iface.lpVtbl = InputPin_Vtbl; pPinImpl->pin.IPin_iface.lpVtbl = InputPin_Vtbl;
pPinImpl->IMemInputPin_iface.lpVtbl = &MemInputPin_Vtbl; pPinImpl->IMemInputPin_iface.lpVtbl = &MemInputPin_Vtbl;
pPinImpl->flushing = pPinImpl->end_of_stream = 0; pPinImpl->flushing = pPinImpl->end_of_stream = FALSE;
return S_OK; return S_OK;
} }

View File

@ -263,7 +263,7 @@ HRESULT WINAPI PosPassThru_Construct(IUnknown *pUnkOuter, LPVOID *ppPassThru)
fimpl->IMediaPosition_iface.lpVtbl = &IMediaPositionPassThru_Vtbl; fimpl->IMediaPosition_iface.lpVtbl = &IMediaPositionPassThru_Vtbl;
fimpl->ref = 1; fimpl->ref = 1;
fimpl->pin = NULL; fimpl->pin = NULL;
fimpl->timevalid = 0; fimpl->timevalid = FALSE;
InitializeCriticalSection(&fimpl->time_cs); InitializeCriticalSection(&fimpl->time_cs);
fimpl->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PassThruImpl.time_cs"); fimpl->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PassThruImpl.time_cs");
BaseDispatch_Init(&fimpl->baseDispatch, &IID_IMediaPosition); BaseDispatch_Init(&fimpl->baseDispatch, &IID_IMediaPosition);
@ -599,7 +599,7 @@ HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_
PassThruImpl *This = impl_from_IUnknown_inner(iface); PassThruImpl *This = impl_from_IUnknown_inner(iface);
EnterCriticalSection(&This->time_cs); EnterCriticalSection(&This->time_cs);
This->time_earliest = start; This->time_earliest = start;
This->timevalid = 1; This->timevalid = TRUE;
LeaveCriticalSection(&This->time_cs); LeaveCriticalSection(&This->time_cs);
return S_OK; return S_OK;
} }
@ -608,7 +608,7 @@ HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface)
{ {
PassThruImpl *This = impl_from_IUnknown_inner(iface); PassThruImpl *This = impl_from_IUnknown_inner(iface);
EnterCriticalSection(&This->time_cs); EnterCriticalSection(&This->time_cs);
This->timevalid = 0; This->timevalid = FALSE;
LeaveCriticalSection(&This->time_cs); LeaveCriticalSection(&This->time_cs);
return S_OK; return S_OK;
} }
@ -621,10 +621,10 @@ HRESULT WINAPI RendererPosPassThru_EOS(IUnknown *iface)
hr = IMediaSeeking_GetStopPosition(&This->IMediaSeeking_iface, &time); hr = IMediaSeeking_GetStopPosition(&This->IMediaSeeking_iface, &time);
EnterCriticalSection(&This->time_cs); EnterCriticalSection(&This->time_cs);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
This->timevalid = 1; This->timevalid = TRUE;
This->time_earliest = time; This->time_earliest = time;
} else } else
This->timevalid = 0; This->timevalid = FALSE;
LeaveCriticalSection(&This->time_cs); LeaveCriticalSection(&This->time_cs);
return hr; return hr;
} }

View File

@ -112,8 +112,9 @@ void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart)
This->avg_render = This->last_in_time = This->last_left = This->avg_duration = This->avg_pt = -1; This->avg_render = This->last_in_time = This->last_left = This->avg_duration = This->avg_pt = -1;
This->clockstart = tStart; This->clockstart = tStart;
This->avg_rate = -1.0; This->avg_rate = -1.0;
This->rendered = This->dropped = This->is_dropped = 0; This->rendered = This->dropped = 0;
This->qos_handled = 1; /* Lie that will be corrected on first adjustment */ This->is_dropped = FALSE;
This->qos_handled = TRUE; /* Lie that will be corrected on first adjustment */
} }

View File

@ -472,7 +472,7 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
if (This->pInputPin->pin.pConnectedTo) if (This->pInputPin->pin.pConnectedTo)
{ {
This->pInputPin->end_of_stream = 0; This->pInputPin->end_of_stream = FALSE;
} }
else if (This->filter.filterInfo.pGraph) else if (This->filter.filterInfo.pGraph)
{ {
@ -515,7 +515,7 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
{ {
if (This->pInputPin->pin.pConnectedTo) if (This->pInputPin->pin.pConnectedTo)
ResetEvent(This->evComplete); ResetEvent(This->evComplete);
This->pInputPin->end_of_stream = 0; This->pInputPin->end_of_stream = FALSE;
} }
else if (This->pFuncsTable->pfnOnStopStreaming) else if (This->pFuncsTable->pfnOnStopStreaming)
This->pFuncsTable->pfnOnStopStreaming(This); This->pFuncsTable->pfnOnStopStreaming(This);

View File

@ -406,7 +406,7 @@ HRESULT WINAPI TransformFilterImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStar
{ {
if (This->filter.state == State_Stopped) if (This->filter.state == State_Stopped)
{ {
impl_BaseInputPin_from_IPin(This->ppPins[0])->end_of_stream = 0; impl_BaseInputPin_from_IPin(This->ppPins[0])->end_of_stream = FALSE;
if (This->pFuncsTable->pfnStartStreaming) if (This->pFuncsTable->pfnStartStreaming)
hr = This->pFuncsTable->pfnStartStreaming(This); hr = This->pFuncsTable->pfnStartStreaming(This);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))