Module: wine Branch: master Commit: 243351d223e3171769576980540349daa611a5c6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=243351d223e317176957698054...
Author: Chris Robinson chris.kcat@gmail.com Date: Tue Apr 3 00:06:16 2007 -0700
quartz: Add a QueryConnect method for transform filters.
---
dlls/quartz/acmwrapper.c | 1 + dlls/quartz/avidec.c | 1 + dlls/quartz/transform.c | 8 +++++--- dlls/quartz/transform.h | 1 + 4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 344779c..b5a3f6c 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -240,6 +240,7 @@ static const TransformFuncsTable ACMWrapper_FuncsTable = { NULL, ACMWrapper_ProcessSampleData, NULL, + NULL, ACMWrapper_ConnectInput, ACMWrapper_Cleanup }; diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index a878500..aa80800 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -261,6 +261,7 @@ static const TransformFuncsTable AVIDec_FuncsTable = { AVIDec_ProcessBegin, AVIDec_ProcessSampleData, AVIDec_ProcessEnd, + NULL, AVIDec_ConnectInput, AVIDec_Cleanup }; diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c index 5a1b502..2c2c0bf 100644 --- a/dlls/quartz/transform.c +++ b/dlls/quartz/transform.c @@ -97,12 +97,14 @@ static HRESULT TransformFilter_Sample(LPVOID iface, IMediaSample * pSample)
static HRESULT TransformFilter_Input_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt) { - /* TransformFilterImpl* This = (TransformFilterImpl*)iface; */ + TransformFilterImpl* This = (TransformFilterImpl*)iface; TRACE("%p\n", iface); dump_AM_MEDIA_TYPE(pmt);
- /* FIXME: Add a function to verify media type with the actual filter */ - /* return This->pFuncsTable->pfnConnectInput(This, pmt); */ + if (This->pFuncsTable->pfnQueryConnect) + return This->pFuncsTable->pfnQueryConnect(This, pmt); + /* Assume OK if there's no query method (the connection will fail if + needed) */ return S_OK; }
diff --git a/dlls/quartz/transform.h b/dlls/quartz/transform.h index 65adad0..c967dd4 100644 --- a/dlls/quartz/transform.h +++ b/dlls/quartz/transform.h @@ -24,6 +24,7 @@ typedef struct TransformFuncsTable { HRESULT (*pfnProcessBegin) (TransformFilterImpl* This); HRESULT (*pfnProcessSampleData) (TransformFilterImpl* This, LPBYTE data, DWORD size); HRESULT (*pfnProcessEnd) (TransformFilterImpl* This); + HRESULT (*pfnQueryConnect) (TransformFilterImpl* This, const AM_MEDIA_TYPE * pmt); HRESULT (*pfnConnectInput) (TransformFilterImpl* This, const AM_MEDIA_TYPE * pmt); HRESULT (*pfnCleanup) (TransformFilterImpl* This); } TransformFuncsTable;