2 * Implements IBaseFilter for transform filters. (internal)
4 * Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34 #include "wine/debug.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
37 #include "quartz_private.h"
42 static const WCHAR XFORM_DefInName[] =
43 {'X','F','o','r','m',' ','I','n',0};
44 static const WCHAR XFORM_DefOutName[] =
45 {'X','F','o','r','m',' ','O','u','t',0};
47 /***************************************************************************
49 * CTransformBaseImpl methods
53 static HRESULT CTransformBaseImpl_OnActive( CBaseFilterImpl* pImpl )
55 CTransformBaseImpl_THIS(pImpl,basefilter);
57 TRACE( "(%p)\n", This );
62 static HRESULT CTransformBaseImpl_OnInactive( CBaseFilterImpl* pImpl )
64 CTransformBaseImpl_THIS(pImpl,basefilter);
66 IMemAllocator* pAllocator;
68 TRACE( "(%p)\n", This );
70 if ( This->pInPin->pin.pPinConnectedTo == NULL ||
71 This->pOutPin->pin.pPinConnectedTo == NULL )
74 EnterCriticalSection( &This->basefilter.csFilter );
76 pAllocator = This->m_pOutPinAllocator;
77 if ( pAllocator != NULL &&
78 This->pInPin->meminput.pAllocator != pAllocator )
80 hr = IMemAllocator_Commit( pAllocator );
85 if ( !This->m_bFiltering )
87 hr = This->m_pHandler->pBeginTransform( This, This->pInPin->pin.pmtConn, This->pOutPin->pin.pmtConn, This->m_bReuseSample );
90 This->m_bFiltering = TRUE;
95 LeaveCriticalSection( &This->basefilter.csFilter );
100 static HRESULT CTransformBaseImpl_OnStop( CBaseFilterImpl* pImpl )
102 CTransformBaseImpl_THIS(pImpl,basefilter);
103 IMemAllocator* pAllocator;
105 TRACE( "(%p)\n", This );
107 EnterCriticalSection( &This->basefilter.csFilter );
109 if ( This->m_bFiltering )
111 This->m_pHandler->pEndTransform( This );
112 This->m_bFiltering = FALSE;
114 if ( This->m_pSample != NULL )
116 IMediaSample_Release( This->m_pSample );
117 This->m_pSample = NULL;
120 pAllocator = This->m_pOutPinAllocator;
121 if ( pAllocator != NULL &&
122 This->pInPin->meminput.pAllocator != pAllocator )
124 IMemAllocator_Decommit( pAllocator );
127 LeaveCriticalSection( &This->basefilter.csFilter );
132 static const CBaseFilterHandlers filterhandlers =
134 CTransformBaseImpl_OnActive, /* pOnActive */
135 CTransformBaseImpl_OnInactive, /* pOnInactive */
136 CTransformBaseImpl_OnStop, /* pOnStop */
139 /***************************************************************************
141 * CTransformBaseInPinImpl methods
145 static HRESULT CTransformBaseInPinImpl_OnPostConnect( CPinBaseImpl* pImpl, IPin* pPin )
147 CTransformBaseInPinImpl_THIS(pImpl,pin);
150 TRACE( "(%p,%p)\n", This, pPin );
152 EnterCriticalSection( &This->pFilter->basefilter.csFilter );
153 hr = This->pFilter->m_pHandler->pGetOutputTypes( This->pFilter, This->pFilter->pInPin->pin.pmtConn, &This->pFilter->pOutPin->pin.pmtAcceptTypes, &This->pFilter->pOutPin->pin.cAcceptTypes );
159 LeaveCriticalSection( &This->pFilter->basefilter.csFilter );
164 static HRESULT CTransformBaseInPinImpl_OnDisconnect( CPinBaseImpl* pImpl )
166 CTransformBaseInPinImpl_THIS(pImpl,pin);
168 TRACE( "(%p)\n", This );
170 if ( This->meminput.pAllocator != NULL )
172 IMemAllocator_Decommit(This->meminput.pAllocator);
173 IMemAllocator_Release(This->meminput.pAllocator);
174 This->meminput.pAllocator = NULL;
180 static HRESULT CTransformBaseInPinImpl_CheckMediaType( CPinBaseImpl* pImpl, const AM_MEDIA_TYPE* pmt )
182 CTransformBaseInPinImpl_THIS(pImpl,pin);
185 TRACE( "(%p,%p)\n", This, pmt );
187 EnterCriticalSection( &This->pFilter->basefilter.csFilter );
188 hr = This->pFilter->m_pHandler->pCheckMediaType( This->pFilter, pmt, (This->pFilter->pOutPin->pin.pPinConnectedTo != NULL) ? This->pFilter->pOutPin->pin.pmtConn : NULL );
189 LeaveCriticalSection( &This->pFilter->basefilter.csFilter );
194 static HRESULT CTransformBaseInPinImpl_Receive( CPinBaseImpl* pImpl, IMediaSample* pSample )
196 CTransformBaseInPinImpl_THIS(pImpl,pin);
199 TRACE( "(%p,%p)\n", This, pSample );
201 if ( This->pin.pPinConnectedTo == NULL ||
202 This->pFilter->pOutPin->pin.pPinConnectedTo == NULL )
205 if ( !This->pFilter->m_bFiltering )
208 if ( This->pFilter->m_bInFlush )
211 if ( This->meminput.pAllocator != This->pFilter->m_pOutPinAllocator )
213 if ( This->pFilter->m_pSample == NULL )
215 hr = IMemAllocator_GetBuffer( This->pFilter->m_pOutPinAllocator, &This->pFilter->m_pSample, NULL, NULL, 0 );
219 hr = QUARTZ_IMediaSample_Copy(
220 This->pFilter->m_pSample, pSample, This->pFilter->m_bPreCopy );
225 if ( This->pFilter->m_bPreCopy )
226 hr = This->pFilter->m_pHandler->pTransform( This->pFilter, This->pFilter->m_pSample, NULL );
228 hr = This->pFilter->m_pHandler->pTransform( This->pFilter, pSample, This->pFilter->m_pSample );
235 hr = CPinBaseImpl_SendSample(&This->pFilter->pOutPin->pin,This->pFilter->m_pSample);
242 if ( !This->pFilter->m_bReuseSample )
244 if ( This->pFilter->m_pSample != NULL )
246 IMediaSample_Release( This->pFilter->m_pSample );
247 This->pFilter->m_pSample = NULL;
259 static HRESULT CTransformBaseInPinImpl_ReceiveCanBlock( CPinBaseImpl* pImpl )
261 CTransformBaseInPinImpl_THIS(pImpl,pin);
263 TRACE( "(%p)\n", This );
265 if ( This->pin.pPinConnectedTo == NULL ||
266 This->pFilter->pOutPin->pin.pPinConnectedTo == NULL )
269 return CPinBaseImpl_SendReceiveCanBlock( &This->pFilter->pOutPin->pin );
272 static HRESULT CTransformBaseInPinImpl_EndOfStream( CPinBaseImpl* pImpl )
274 CTransformBaseInPinImpl_THIS(pImpl,pin);
276 TRACE( "(%p)\n", This );
278 if ( This->pin.pPinConnectedTo == NULL ||
279 This->pFilter->pOutPin->pin.pPinConnectedTo == NULL )
282 return CPinBaseImpl_SendEndOfStream( &This->pFilter->pOutPin->pin );
285 static HRESULT CTransformBaseInPinImpl_BeginFlush( CPinBaseImpl* pImpl )
287 CTransformBaseInPinImpl_THIS(pImpl,pin);
289 TRACE( "(%p)\n", This );
291 if ( This->pin.pPinConnectedTo == NULL ||
292 This->pFilter->pOutPin->pin.pPinConnectedTo == NULL )
295 This->pFilter->m_bInFlush = TRUE;
297 return CPinBaseImpl_SendBeginFlush( &This->pFilter->pOutPin->pin );
300 static HRESULT CTransformBaseInPinImpl_EndFlush( CPinBaseImpl* pImpl )
302 CTransformBaseInPinImpl_THIS(pImpl,pin);
304 TRACE( "(%p)\n", This );
306 if ( This->pin.pPinConnectedTo == NULL ||
307 This->pFilter->pOutPin->pin.pPinConnectedTo == NULL )
310 This->pFilter->m_bInFlush = FALSE;
312 return CPinBaseImpl_SendEndFlush( &This->pFilter->pOutPin->pin );
315 static HRESULT CTransformBaseInPinImpl_NewSegment( CPinBaseImpl* pImpl, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, double rate )
317 CTransformBaseInPinImpl_THIS(pImpl,pin);
319 FIXME( "(%p)\n", This );
321 if ( This->pin.pPinConnectedTo == NULL ||
322 This->pFilter->pOutPin->pin.pPinConnectedTo == NULL )
325 return CPinBaseImpl_SendNewSegment( &This->pFilter->pOutPin->pin,
326 rtStart, rtStop, rate );
329 static const CBasePinHandlers inputpinhandlers =
331 NULL, /* pOnPreConnect */
332 CTransformBaseInPinImpl_OnPostConnect, /* pOnPostConnect */
333 CTransformBaseInPinImpl_OnDisconnect, /* pOnDisconnect */
334 CTransformBaseInPinImpl_CheckMediaType, /* pCheckMediaType */
335 NULL, /* pQualityNotify */
336 CTransformBaseInPinImpl_Receive, /* pReceive */
337 CTransformBaseInPinImpl_ReceiveCanBlock, /* pReceiveCanBlock */
338 CTransformBaseInPinImpl_EndOfStream, /* pEndOfStream */
339 CTransformBaseInPinImpl_BeginFlush, /* pBeginFlush */
340 CTransformBaseInPinImpl_EndFlush, /* pEndFlush */
341 CTransformBaseInPinImpl_NewSegment, /* pNewSegment */
344 /***************************************************************************
346 * CTransformBaseOutPinImpl methods
350 static HRESULT CTransformBaseOutPinImpl_OnPostConnect( CPinBaseImpl* pImpl, IPin* pPin )
352 CTransformBaseOutPinImpl_THIS(pImpl,pin);
354 ALLOCATOR_PROPERTIES propReqThis;
355 ALLOCATOR_PROPERTIES propReqPeer;
356 ALLOCATOR_PROPERTIES propActual;
357 BOOL bTransInPlace = FALSE;
358 BOOL bTryToReUseSample = FALSE;
359 BOOL bOutReadonly = FALSE;
360 IMemAllocator* pAllocator;
362 FIXME( "(%p,%p)\n", This, pPin );
364 if ( This->pFilter->pInPin->pin.pPinConnectedTo == NULL )
366 if ( This->pin.pMemInputPinConnectedTo == NULL )
369 ZeroMemory( &propReqThis, sizeof(ALLOCATOR_PROPERTIES) );
370 ZeroMemory( &propReqPeer, sizeof(ALLOCATOR_PROPERTIES) );
371 ZeroMemory( &propActual, sizeof(ALLOCATOR_PROPERTIES) );
373 hr = This->pFilter->m_pHandler->pGetAllocProp( This->pFilter, This->pFilter->pInPin->pin.pmtConn, This->pin.pmtConn, &propReqThis, &bTransInPlace, &bTryToReUseSample );
377 if ( propReqThis.cbAlign == 0 )
378 propReqThis.cbAlign = 1;
382 ZeroMemory( &propReqPeer, sizeof(ALLOCATOR_PROPERTIES) );
383 hr = IMemInputPin_GetAllocatorRequirements(
384 This->pin.pMemInputPinConnectedTo, &propReqPeer );
385 if ( propReqPeer.cbAlign != 0 && propReqPeer.cbAlign != 1 )
386 bTransInPlace = FALSE;
387 if ( propReqPeer.cbPrefix != 0 )
388 bTransInPlace = FALSE;
390 bOutReadonly = FALSE;
391 if ( bTransInPlace && This->pFilter->pInPin->meminput.bReadonly )
394 pAllocator = This->pFilter->pInPin->meminput.pAllocator;
396 hr = IMemInputPin_NotifyAllocator(
397 This->pin.pMemInputPinConnectedTo,
398 pAllocator, bOutReadonly );
401 This->pFilter->m_pOutPinAllocator = pAllocator;
402 IMemAllocator_AddRef(pAllocator);
403 bTryToReUseSample = FALSE;
408 hr = IMemInputPin_GetAllocator(
409 This->pin.pMemInputPinConnectedTo, &pAllocator );
412 hr = IMemAllocator_SetProperties( pAllocator, &propReqThis, &propActual );
415 TRACE("cBuffers = %ld / cbBuffer = %ld\n",propActual.cBuffers,propActual.cbBuffer);
416 hr = IMemInputPin_NotifyAllocator(
417 This->pin.pMemInputPinConnectedTo, pAllocator,
422 IMemAllocator_Release(pAllocator);
425 This->pFilter->m_pOutPinAllocator = pAllocator;
429 This->pFilter->m_bPreCopy = FALSE;
430 This->pFilter->m_bReuseSample = FALSE;
433 This->pFilter->m_bPreCopy = bTransInPlace && (This->pFilter->pInPin->meminput.pAllocator != This->pFilter->m_pOutPinAllocator);
434 This->pFilter->m_bReuseSample = bTryToReUseSample;
440 static HRESULT CTransformBaseOutPinImpl_OnDisconnect( CPinBaseImpl* pImpl )
442 CTransformBaseOutPinImpl_THIS(pImpl,pin);
444 FIXME( "(%p)\n", This );
446 if ( This->pFilter->m_pOutPinAllocator != NULL )
448 IMemAllocator_Decommit(This->pFilter->m_pOutPinAllocator);
449 IMemAllocator_Release(This->pFilter->m_pOutPinAllocator);
450 This->pFilter->m_pOutPinAllocator = NULL;
456 static HRESULT CTransformBaseOutPinImpl_CheckMediaType( CPinBaseImpl* pImpl, const AM_MEDIA_TYPE* pmt )
458 CTransformBaseOutPinImpl_THIS(pImpl,pin);
461 TRACE( "(%p,%p)\n", This, pmt );
463 if ( This->pFilter->pInPin->pin.pPinConnectedTo == NULL )
466 EnterCriticalSection( &This->pFilter->basefilter.csFilter );
467 hr = This->pFilter->m_pHandler->pCheckMediaType( This->pFilter, This->pFilter->pInPin->pin.pmtConn, pmt );
468 LeaveCriticalSection( &This->pFilter->basefilter.csFilter );
473 static const CBasePinHandlers outputpinhandlers =
475 NULL, /* pOnPreConnect */
476 CTransformBaseOutPinImpl_OnPostConnect, /* pOnPostConnect */
477 CTransformBaseOutPinImpl_OnDisconnect, /* pOnDisconnect */
478 CTransformBaseOutPinImpl_CheckMediaType, /* pCheckMediaType */
479 NULL, /* pQualityNotify */
480 OutputPinSync_Receive, /* pReceive */
481 OutputPinSync_ReceiveCanBlock, /* pReceiveCanBlock */
482 OutputPinSync_EndOfStream, /* pEndOfStream */
483 OutputPinSync_BeginFlush, /* pBeginFlush */
484 OutputPinSync_EndFlush, /* pEndFlush */
485 OutputPinSync_NewSegment, /* pNewSegment */
489 /***************************************************************************
491 * new/delete CTransformBaseImpl
495 /* can I use offsetof safely? - FIXME? */
496 static QUARTZ_IFEntry FilterIFEntries[] =
498 { &IID_IPersist, offsetof(CTransformBaseImpl,basefilter)-offsetof(CTransformBaseImpl,unk) },
499 { &IID_IMediaFilter, offsetof(CTransformBaseImpl,basefilter)-offsetof(CTransformBaseImpl,unk) },
500 { &IID_IBaseFilter, offsetof(CTransformBaseImpl,basefilter)-offsetof(CTransformBaseImpl,unk) },
503 static void QUARTZ_DestroyTransformBase(IUnknown* punk)
505 CTransformBaseImpl_THIS(punk,unk);
507 TRACE( "(%p)\n", This );
509 This->m_pHandler->pCleanup(This);
511 if ( This->pInPin != NULL )
513 IUnknown_Release(This->pInPin->unk.punkControl);
516 if ( This->pOutPin != NULL )
518 IUnknown_Release(This->pOutPin->unk.punkControl);
519 This->pOutPin = NULL;
521 if ( This->pSeekPass != NULL )
523 IUnknown_Release((IUnknown*)&This->pSeekPass->unk);
524 This->pSeekPass = NULL;
527 CBaseFilterImpl_UninitIBaseFilter(&This->basefilter);
529 DeleteCriticalSection( &This->csReceive );
532 HRESULT QUARTZ_CreateTransformBase(
533 IUnknown* punkOuter,void** ppobj,
534 const CLSID* pclsidTransformBase,
535 LPCWSTR pwszTransformBaseName,
536 LPCWSTR pwszInPinName,
537 LPCWSTR pwszOutPinName,
538 const TransformBaseHandlers* pHandler )
540 CTransformBaseImpl* This = NULL;
543 TRACE("(%p,%p)\n",punkOuter,ppobj);
545 if ( pwszInPinName == NULL )
546 pwszInPinName = XFORM_DefInName;
547 if ( pwszOutPinName == NULL )
548 pwszOutPinName = XFORM_DefOutName;
550 This = (CTransformBaseImpl*)
551 QUARTZ_AllocObj( sizeof(CTransformBaseImpl) );
553 return E_OUTOFMEMORY;
556 This->pOutPin = NULL;
557 This->pSeekPass = NULL;
558 This->m_pOutPinAllocator = NULL;
559 This->m_bPreCopy = FALSE; /* sample must be copied */
560 This->m_bReuseSample = FALSE; /* sample must be reused */
561 This->m_bInFlush = FALSE;
562 This->m_pSample = NULL;
563 This->m_bFiltering = FALSE;
564 This->m_pHandler = pHandler;
565 This->m_pUserData = NULL;
567 QUARTZ_IUnkInit( &This->unk, punkOuter );
569 hr = CBaseFilterImpl_InitIBaseFilter(
571 This->unk.punkControl,
573 pwszTransformBaseName,
577 /* construct this class. */
578 hr = This->m_pHandler->pInit( This );
581 CBaseFilterImpl_UninitIBaseFilter(&This->basefilter);
587 QUARTZ_FreeObj(This);
591 This->unk.pEntries = FilterIFEntries;
592 This->unk.dwEntries = sizeof(FilterIFEntries)/sizeof(FilterIFEntries[0]);
593 This->unk.pOnFinalRelease = QUARTZ_DestroyTransformBase;
594 InitializeCriticalSection( &This->csReceive );
597 hr = QUARTZ_CreateTransformBaseInPin(
598 This, &This->basefilter.csFilter, &This->csReceive,
599 &This->pInPin, pwszInPinName );
601 hr = QUARTZ_CompList_AddComp(
602 This->basefilter.pInPins,
603 (IUnknown*)&(This->pInPin->pin),
606 hr = QUARTZ_CreateTransformBaseOutPin(
607 This, &This->basefilter.csFilter,
608 &This->pOutPin, pwszOutPinName );
610 hr = QUARTZ_CompList_AddComp(
611 This->basefilter.pOutPins,
612 (IUnknown*)&(This->pOutPin->pin),
617 hr = QUARTZ_CreateSeekingPassThruInternal(
618 (IUnknown*)&(This->pOutPin->unk), &This->pSeekPass,
619 FALSE, (IPin*)&(This->pInPin->pin) );
624 IUnknown_Release( This->unk.punkControl );
628 *ppobj = (void*)&(This->unk);
633 /***************************************************************************
635 * new/delete CTransformBaseInPinImpl
639 /* can I use offsetof safely? - FIXME? */
640 static QUARTZ_IFEntry InPinIFEntries[] =
642 { &IID_IPin, offsetof(CTransformBaseInPinImpl,pin)-offsetof(CTransformBaseInPinImpl,unk) },
643 { &IID_IMemInputPin, offsetof(CTransformBaseInPinImpl,meminput)-offsetof(CTransformBaseInPinImpl,unk) },
646 static void QUARTZ_DestroyTransformBaseInPin(IUnknown* punk)
648 CTransformBaseInPinImpl_THIS(punk,unk);
650 TRACE( "(%p)\n", This );
652 CPinBaseImpl_UninitIPin( &This->pin );
653 CMemInputPinBaseImpl_UninitIMemInputPin( &This->meminput );
656 HRESULT QUARTZ_CreateTransformBaseInPin(
657 CTransformBaseImpl* pFilter,
658 CRITICAL_SECTION* pcsPin,
659 CRITICAL_SECTION* pcsPinReceive,
660 CTransformBaseInPinImpl** ppPin,
661 LPCWSTR pwszPinName )
663 CTransformBaseInPinImpl* This = NULL;
666 TRACE("(%p,%p,%p)\n",pFilter,pcsPin,ppPin);
668 This = (CTransformBaseInPinImpl*)
669 QUARTZ_AllocObj( sizeof(CTransformBaseInPinImpl) );
671 return E_OUTOFMEMORY;
673 QUARTZ_IUnkInit( &This->unk, NULL );
674 This->pFilter = pFilter;
676 hr = CPinBaseImpl_InitIPin(
678 This->unk.punkControl,
679 pcsPin, pcsPinReceive,
680 &pFilter->basefilter,
687 hr = CMemInputPinBaseImpl_InitIMemInputPin(
689 This->unk.punkControl,
693 CPinBaseImpl_UninitIPin( &This->pin );
699 QUARTZ_FreeObj(This);
703 This->unk.pEntries = InPinIFEntries;
704 This->unk.dwEntries = sizeof(InPinIFEntries)/sizeof(InPinIFEntries[0]);
705 This->unk.pOnFinalRelease = QUARTZ_DestroyTransformBaseInPin;
709 TRACE("returned successfully.\n");
715 /***************************************************************************
717 * new/delete CTransformBaseOutPinImpl
721 /* can I use offsetof safely? - FIXME? */
722 static QUARTZ_IFEntry OutPinIFEntries[] =
724 { &IID_IPin, offsetof(CTransformBaseOutPinImpl,pin)-offsetof(CTransformBaseOutPinImpl,unk) },
725 { &IID_IQualityControl, offsetof(CTransformBaseOutPinImpl,qcontrol)-offsetof(CTransformBaseOutPinImpl,unk) },
728 static HRESULT CTransformBaseOutPinImpl_OnQueryInterface(
729 IUnknown* punk, const IID* piid, void** ppobj )
731 CTransformBaseOutPinImpl_THIS(punk,unk);
733 if ( This->pFilter == NULL || This->pFilter->pSeekPass == NULL )
734 return E_NOINTERFACE;
736 if ( IsEqualGUID( &IID_IMediaPosition, piid ) ||
737 IsEqualGUID( &IID_IMediaSeeking, piid ) )
739 TRACE( "IMediaSeeking(or IMediaPosition) is queried\n" );
740 return IUnknown_QueryInterface( (IUnknown*)(&This->pFilter->pSeekPass->unk), piid, ppobj );
743 return E_NOINTERFACE;
746 static void QUARTZ_DestroyTransformBaseOutPin(IUnknown* punk)
748 CTransformBaseOutPinImpl_THIS(punk,unk);
750 TRACE( "(%p)\n", This );
752 CPinBaseImpl_UninitIPin( &This->pin );
753 CQualityControlPassThruImpl_UninitIQualityControl( &This->qcontrol );
756 HRESULT QUARTZ_CreateTransformBaseOutPin(
757 CTransformBaseImpl* pFilter,
758 CRITICAL_SECTION* pcsPin,
759 CTransformBaseOutPinImpl** ppPin,
760 LPCWSTR pwszPinName )
762 CTransformBaseOutPinImpl* This = NULL;
765 TRACE("(%p,%p,%p)\n",pFilter,pcsPin,ppPin);
767 This = (CTransformBaseOutPinImpl*)
768 QUARTZ_AllocObj( sizeof(CTransformBaseOutPinImpl) );
770 return E_OUTOFMEMORY;
772 QUARTZ_IUnkInit( &This->unk, NULL );
773 This->qiext.pNext = NULL;
774 This->qiext.pOnQueryInterface = &CTransformBaseOutPinImpl_OnQueryInterface;
775 QUARTZ_IUnkAddDelegation( &This->unk, &This->qiext );
777 This->pFilter = pFilter;
779 hr = CPinBaseImpl_InitIPin(
781 This->unk.punkControl,
783 &pFilter->basefilter,
786 &outputpinhandlers );
790 hr = CQualityControlPassThruImpl_InitIQualityControl(
792 This->unk.punkControl,
796 CPinBaseImpl_UninitIPin( &This->pin );
802 QUARTZ_FreeObj(This);
806 This->unk.pEntries = OutPinIFEntries;
807 This->unk.dwEntries = sizeof(OutPinIFEntries)/sizeof(OutPinIFEntries[0]);
808 This->unk.pOnFinalRelease = QUARTZ_DestroyTransformBaseOutPin;
812 TRACE("returned successfully.\n");