CBasePin Class Reference

#include <amfilter.h>

Inheritance diagram for CBasePin:

CUnknown CBaseObject CAsyncOutputPin CBaseInputPin CBaseOutputPin CRenderedInputPin CRendererInputPin CTransformInputPin CDynamicOutputPin CSourceStream CTransformOutputPin CTransInPlaceInputPin CTransInPlaceOutputPin

List of all members.

Public Member Functions

 CBasePin (TCHAR *pObjectName, CBaseFilter *pFilter, CCritSec *pLock, HRESULT *phr, LPCWSTR pName, PIN_DIRECTION dir)
virtual ~CBasePin ()
DECLARE_IUNKNOWN STDMETHODIMP NonDelegatingQueryInterface (REFIID riid, void **ppv)
 STDMETHODIMP_ (ULONG) NonDelegatingRelease()
 STDMETHODIMP_ (ULONG) NonDelegatingAddRef()
STDMETHODIMP Connect (IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
STDMETHODIMP ReceiveConnection (IPin *pConnector, const AM_MEDIA_TYPE *pmt)
STDMETHODIMP Disconnect ()
STDMETHODIMP ConnectedTo (IPin **pPin)
STDMETHODIMP ConnectionMediaType (AM_MEDIA_TYPE *pmt)
STDMETHODIMP QueryPinInfo (PIN_INFO *pInfo)
STDMETHODIMP QueryDirection (PIN_DIRECTION *pPinDir)
STDMETHODIMP QueryId (LPWSTR *Id)
STDMETHODIMP QueryAccept (const AM_MEDIA_TYPE *pmt)
STDMETHODIMP EnumMediaTypes (IEnumMediaTypes **ppEnum)
STDMETHODIMP QueryInternalConnections (IPin **apPin, ULONG *nPin)
STDMETHODIMP EndOfStream (void)
STDMETHODIMP NewSegment (REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
STDMETHODIMP Notify (IBaseFilter *pSender, Quality q)
STDMETHODIMP SetSink (IQualityControl *piqc)
BOOL IsConnected (void)
IPin * GetConnected ()
BOOL IsStopped ()
virtual LONG GetMediaTypeVersion ()
void IncrementTypeVersion ()
virtual HRESULT Active (void)
virtual HRESULT Inactive (void)
virtual HRESULT Run (REFERENCE_TIME tStart)
virtual HRESULT CheckMediaType (const CMediaType *) PURE
virtual HRESULT SetMediaType (const CMediaType *)
virtual HRESULT CheckConnect (IPin *)
virtual HRESULT BreakConnect ()
virtual HRESULT CompleteConnect (IPin *pReceivePin)
virtual HRESULT GetMediaType (int iPosition, CMediaType *pMediaType)
REFERENCE_TIME CurrentStopTime ()
REFERENCE_TIME CurrentStartTime ()
double CurrentRate ()
LPWSTR Name ()
void SetReconnectWhenActive (bool bCanReconnect)
bool CanReconnectWhenActive ()

Protected Member Functions

void DisplayPinInfo (IPin *pReceivePin)
void DisplayTypeInfo (IPin *pPin, const CMediaType *pmt)
HRESULT AttemptConnection (IPin *pReceivePin, const CMediaType *pmt)
HRESULT TryMediaTypes (IPin *pReceivePin, const CMediaType *pmt, IEnumMediaTypes *pEnum)
HRESULT AgreeMediaType (IPin *pReceivePin, const CMediaType *pmt)
STDMETHODIMP DisconnectInternal ()

Protected Attributes

WCHARm_pName
IPin * m_Connected
PIN_DIRECTION m_dir
CCritSecm_pLock
bool m_bRunTimeError
bool m_bCanReconnectWhenActive
bool m_bTryMyTypesFirst
CBaseFilterm_pFilter
IQualityControl * m_pQSink
LONG m_TypeVersion
CMediaType m_mt
CRefTime m_tStart
CRefTime m_tStop
double m_dRate


Detailed Description

Definition at line 266 of file amfilter.h.


Constructor & Destructor Documentation

CBasePin::CBasePin ( TCHAR pObjectName,
CBaseFilter pFilter,
CCritSec pLock,
HRESULT *  phr,
LPCWSTR  pName,
PIN_DIRECTION  dir 
)

Definition at line 1036 of file amfilter.cpp.

References ASSERT, lstrlenW, CUnknown::m_cRef, m_pName, and NULL.

CBasePin::~CBasePin (  )  [virtual]

Definition at line 1114 of file amfilter.cpp.

References ASSERT, FALSE, m_Connected, CUnknown::m_cRef, and m_pName.


Member Function Documentation

void CBasePin::DisplayPinInfo ( IPin *  pReceivePin  )  [inline, protected]

Definition at line 298 of file amfilter.h.

Referenced by Connect().

void CBasePin::DisplayTypeInfo ( IPin *  pPin,
const CMediaType pmt 
) [inline, protected]

Definition at line 299 of file amfilter.h.

Referenced by AttemptConnection().

HRESULT CBasePin::AttemptConnection ( IPin *  pReceivePin,
const CMediaType pmt 
) [protected]

HRESULT CBasePin::TryMediaTypes ( IPin *  pReceivePin,
const CMediaType pmt,
IEnumMediaTypes *  pEnum 
) [protected]

Definition at line 1286 of file amfilter.cpp.

References ASSERT, AttemptConnection(), DeleteMediaType(), E_FAIL, E_INVALIDARG, FAILED, hr, HRESULT, NULL, and S_OK.

Referenced by AgreeMediaType().

HRESULT CBasePin::AgreeMediaType ( IPin *  pReceivePin,
const CMediaType pmt 
) [protected]

STDMETHODIMP CBasePin::NonDelegatingQueryInterface ( REFIID  riid,
void **  ppv 
)

CBasePin::STDMETHODIMP_ ( ULONG   ) 

Reimplemented from CUnknown.

CBasePin::STDMETHODIMP_ ( ULONG   ) 

Reimplemented from CUnknown.

STDMETHODIMP CBasePin::Connect ( IPin *  pReceivePin,
const AM_MEDIA_TYPE *  pmt 
)

STDMETHODIMP CBasePin::ReceiveConnection ( IPin *  pConnector,
const AM_MEDIA_TYPE *  pmt 
)

STDMETHODIMP CBasePin::Disconnect ( void   ) 

Reimplemented in CDynamicOutputPin.

Definition at line 1509 of file amfilter.cpp.

References DisconnectInternal(), IsStopped(), and m_pLock.

STDMETHODIMP CBasePin::ConnectedTo ( IPin **  pPin  ) 

Definition at line 1547 of file amfilter.cpp.

References ASSERT, CheckPointer, m_Connected, NULL, S_OK, and ValidateReadWritePtr.

Referenced by CBaseInputPin::ReceiveCanBlock().

STDMETHODIMP CBasePin::ConnectionMediaType ( AM_MEDIA_TYPE *  pmt  ) 

STDMETHODIMP CBasePin::QueryPinInfo ( PIN_INFO *  pInfo  ) 

Definition at line 1589 of file amfilter.cpp.

References CheckPointer, lstrcpynW, m_dir, m_pFilter, m_pName, and ValidateReadWritePtr.

STDMETHODIMP CBasePin::QueryDirection ( PIN_DIRECTION *  pPinDir  ) 

Definition at line 1613 of file amfilter.cpp.

References CheckPointer, m_dir, and ValidateReadWritePtr.

Referenced by CBaseInputPin::ReceiveCanBlock().

STDMETHODIMP CBasePin::QueryId ( LPWSTR Id  ) 

Reimplemented in CRendererInputPin, CSourceStream, CTransformInputPin, and CTransformOutputPin.

Definition at line 1625 of file amfilter.cpp.

References AMGetWideString(), and Name().

STDMETHODIMP CBasePin::QueryAccept ( const AM_MEDIA_TYPE *  pmt  ) 

Definition at line 1636 of file amfilter.cpp.

References CheckMediaType(), CheckPointer, FAILED, hr, HRESULT, S_FALSE, and ValidateReadPtr.

STDMETHODIMP CBasePin::EnumMediaTypes ( IEnumMediaTypes **  ppEnum  ) 

Reimplemented in CTransInPlaceInputPin, and CTransInPlaceOutputPin.

Definition at line 1654 of file amfilter.cpp.

References CheckPointer, E_OUTOFMEMORY, NULL, and ValidateReadWritePtr.

Referenced by AgreeMediaType().

STDMETHODIMP CBasePin::QueryInternalConnections ( IPin **  apPin,
ULONG nPin 
) [inline]

Definition at line 404 of file amfilter.h.

STDMETHODIMP CBasePin::EndOfStream ( void   ) 

Reimplemented in CRenderedInputPin, CBaseOutputPin, CRendererInputPin, and CTransformInputPin.

Definition at line 1711 of file amfilter.cpp.

References S_OK.

Referenced by CRendererInputPin::EndOfStream(), and CBaseInputPin::Receive().

STDMETHODIMP CBasePin::NewSegment ( REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop,
double  dRate 
)

Reimplemented in CTransformInputPin.

Definition at line 1735 of file amfilter.cpp.

References m_dRate, m_tStart, m_tStop, and S_OK.

Referenced by CTransformInputPin::NewSegment().

STDMETHODIMP CBasePin::Notify ( IBaseFilter *  pSender,
Quality  q 
)

Reimplemented in CBaseInputPin, and CTransformOutputPin.

Definition at line 1726 of file amfilter.cpp.

References DbgBreak.

STDMETHODIMP CBasePin::SetSink ( IQualityControl *  piqc  ) 

Definition at line 1717 of file amfilter.cpp.

References m_pLock, m_pQSink, and ValidateReadPtr.

BOOL CBasePin::IsConnected ( void   )  [inline]

IPin* CBasePin::GetConnected (  )  [inline]

BOOL CBasePin::IsStopped (  )  [inline]

LONG CBasePin::GetMediaTypeVersion (  )  [virtual]

void CBasePin::IncrementTypeVersion (  ) 

Definition at line 1685 of file amfilter.cpp.

References m_TypeVersion.

HRESULT CBasePin::Active ( void   )  [virtual]

HRESULT CBasePin::Inactive ( void   )  [virtual]

Reimplemented in CBaseOutputPin, CBaseInputPin, CDynamicOutputPin, CRendererInputPin, and CSourceStream.

Definition at line 1704 of file amfilter.cpp.

References FALSE, and m_bRunTimeError.

Referenced by CBaseFilter::Stop().

HRESULT CBasePin::Run ( REFERENCE_TIME  tStart  )  [virtual]

Reimplemented in CRenderedInputPin.

Definition at line 1697 of file amfilter.cpp.

Referenced by CBaseFilter::Run().

virtual HRESULT CBasePin::CheckMediaType ( const CMediaType  )  [virtual]

HRESULT CBasePin::SetMediaType ( const CMediaType pmt  )  [virtual]

HRESULT CBasePin::CheckConnect ( IPin *  pPin  )  [virtual]

HRESULT CBasePin::BreakConnect (  )  [virtual]

HRESULT CBasePin::CompleteConnect ( IPin *  pReceivePin  )  [virtual]

HRESULT CBasePin::GetMediaType ( int  iPosition,
CMediaType pMediaType 
) [virtual]

Reimplemented in CAsyncOutputPin, CSourceStream, and CTransformOutputPin.

Definition at line 1673 of file amfilter.cpp.

Referenced by CEnumMediaTypes::Next(), and CEnumMediaTypes::Skip().

REFERENCE_TIME CBasePin::CurrentStopTime (  )  [inline]

Definition at line 476 of file amfilter.h.

REFERENCE_TIME CBasePin::CurrentStartTime (  )  [inline]

Definition at line 479 of file amfilter.h.

double CBasePin::CurrentRate (  )  [inline]

Definition at line 482 of file amfilter.h.

LPWSTR CBasePin::Name (  )  [inline]

Definition at line 487 of file amfilter.h.

Referenced by CBaseFilter::FindPin(), and QueryId().

void CBasePin::SetReconnectWhenActive ( bool  bCanReconnect  )  [inline]

Definition at line 490 of file amfilter.h.

Referenced by CDynamicOutputPin::Initialize().

bool CBasePin::CanReconnectWhenActive (  )  [inline]

Definition at line 495 of file amfilter.h.

Referenced by CBaseRenderer::BreakConnect().

STDMETHODIMP CBasePin::DisconnectInternal (  )  [protected]


Member Data Documentation

WCHAR* CBasePin::m_pName [protected]

Definition at line 271 of file amfilter.h.

Referenced by CBasePin(), QueryPinInfo(), and ~CBasePin().

IPin* CBasePin::m_Connected [protected]

PIN_DIRECTION CBasePin::m_dir [protected]

Definition at line 273 of file amfilter.h.

Referenced by CheckConnect(), QueryDirection(), and QueryPinInfo().

Definition at line 276 of file amfilter.h.

Referenced by Connect(), and ReceiveConnection().

Definition at line 277 of file amfilter.h.

Referenced by AgreeMediaType().

IQualityControl* CBasePin::m_pQSink [protected]

Definition at line 280 of file amfilter.h.

Referenced by CBaseInputPin::PassNotify(), and SetSink().

Definition at line 281 of file amfilter.h.

Referenced by GetMediaTypeVersion(), and IncrementTypeVersion().

Definition at line 284 of file amfilter.h.

Referenced by NewSegment().

Definition at line 285 of file amfilter.h.

Referenced by NewSegment().

double CBasePin::m_dRate [protected]

Definition at line 286 of file amfilter.h.

Referenced by NewSegment().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:20:36 2008 by  doxygen 1.5.6