[PATCH 18/32] quartz: Add additional notifications to transform filter
Maarten Lankhorst
m.b.lankhorst at gmail.com
Wed May 12 10:10:04 CDT 2010
---
dlls/quartz/transform.c | 60 ++++++++++++++++++++++++++++++++++++++++++++--
dlls/quartz/transform.h | 4 +++
2 files changed, 61 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c
index b6ec768..e8056b0 100644
--- a/dlls/quartz/transform.c
+++ b/dlls/quartz/transform.c
@@ -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)
diff --git a/dlls/quartz/transform.h b/dlls/quartz/transform.h
index 8d3a3a0..e2486cd 100644
--- a/dlls/quartz/transform.h
+++ b/dlls/quartz/transform.h
@@ -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
--
1.7.0.4
--------------000903060801030109000104--
More information about the wine-patches
mailing list