quartz: Add additional notifications to transform filter.

This commit is contained in:
Maarten Lankhorst 2010-05-12 17:10:04 +02:00 committed by Alexandre Julliard
parent b6c523252d
commit 781cb48653
2 changed files with 61 additions and 3 deletions

View File

@ -515,6 +515,60 @@ static HRESULT WINAPI TransformFilter_InputPin_Disconnect(IPin * iface)
return IPinImpl_Disconnect(iface);
}
static HRESULT WINAPI TransformFilter_InputPin_BeginFlush(IPin * iface)
{
InputPin* This = (InputPin*) iface;
TransformFilterImpl* pTransform;
HRESULT hr = S_OK;
TRACE("(%p)->()\n", iface);
pTransform = (TransformFilterImpl*)This->pin.pinInfo.pFilter;
EnterCriticalSection(&pTransform->csFilter);
if (pTransform->pFuncsTable->pfnBeginFlush)
hr = pTransform->pFuncsTable->pfnBeginFlush(This);
if (SUCCEEDED(hr))
hr = InputPin_BeginFlush(iface);
LeaveCriticalSection(&pTransform->csFilter);
return hr;
}
static HRESULT WINAPI TransformFilter_InputPin_EndFlush(IPin * iface)
{
InputPin* This = (InputPin*) iface;
TransformFilterImpl* pTransform;
HRESULT hr = S_OK;
TRACE("(%p)->()\n", iface);
pTransform = (TransformFilterImpl*)This->pin.pinInfo.pFilter;
EnterCriticalSection(&pTransform->csFilter);
if (pTransform->pFuncsTable->pfnEndFlush)
hr = pTransform->pFuncsTable->pfnEndFlush(This);
if (SUCCEEDED(hr))
hr = InputPin_EndFlush(iface);
LeaveCriticalSection(&pTransform->csFilter);
return hr;
}
static HRESULT WINAPI TransformFilter_InputPin_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
{
InputPin* This = (InputPin*) iface;
TransformFilterImpl* pTransform;
HRESULT hr = S_OK;
TRACE("(%p)->()\n", iface);
pTransform = (TransformFilterImpl*)This->pin.pinInfo.pFilter;
EnterCriticalSection(&pTransform->csFilter);
if (pTransform->pFuncsTable->pfnNewSegment)
hr = pTransform->pFuncsTable->pfnNewSegment(This, tStart, tStop, dRate);
if (SUCCEEDED(hr))
hr = InputPin_NewSegment(iface, tStart, tStop, dRate);
LeaveCriticalSection(&pTransform->csFilter);
return hr;
}
static const IPinVtbl TransformFilter_InputPin_Vtbl =
{
InputPin_QueryInterface,
@ -532,9 +586,9 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl =
IPinImpl_EnumMediaTypes,
IPinImpl_QueryInternalConnections,
TransformFilter_InputPin_EndOfStream,
InputPin_BeginFlush,
InputPin_EndFlush,
InputPin_NewSegment
TransformFilter_InputPin_BeginFlush,
TransformFilter_InputPin_EndFlush,
TransformFilter_InputPin_NewSegment
};
static HRESULT WINAPI TransformFilter_Output_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum)

View File

@ -29,6 +29,10 @@ typedef struct TransformFuncsTable {
HRESULT (*pfnQueryConnect) (TransformFilterImpl *This, const AM_MEDIA_TYPE * pmt);
HRESULT (*pfnConnectInput) (InputPin *pin, const AM_MEDIA_TYPE * pmt);
HRESULT (*pfnCleanup) (InputPin *pin);
HRESULT (*pfnEndOfStream) (InputPin *pin);
HRESULT (*pfnBeginFlush) (InputPin *pin);
HRESULT (*pfnEndFlush) (InputPin *pin);
HRESULT (*pfnNewSegment) (InputPin *pin, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
} TransformFuncsTable;
struct TransformFilterImpl