CBaseAllocator Class Reference

#include <amfilter.h>

Inheritance diagram for CBaseAllocator:

CUnknown CCritSec CBaseObject CImageAllocator CMemAllocator

List of all members.

Public Member Functions

 CBaseAllocator (TCHAR *, LPUNKNOWN, HRESULT *, BOOL bEvent=TRUE, BOOL fEnableReleaseCallback=FALSE)
virtual ~CBaseAllocator ()
DECLARE_IUNKNOWN STDMETHODIMP NonDelegatingQueryInterface (REFIID riid, void **ppv)
STDMETHODIMP SetProperties (ALLOCATOR_PROPERTIES *pRequest, ALLOCATOR_PROPERTIES *pActual)
STDMETHODIMP GetProperties (ALLOCATOR_PROPERTIES *pProps)
STDMETHODIMP Commit ()
STDMETHODIMP Decommit ()
STDMETHODIMP GetBuffer (IMediaSample **ppBuffer, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime, DWORD dwFlags)
STDMETHODIMP ReleaseBuffer (IMediaSample *pBuffer)
STDMETHODIMP SetNotify (IMemAllocatorNotifyCallbackTemp *pNotify)
STDMETHODIMP GetFreeCount (LONG *plBuffersFree)
void NotifySample ()
void SetWaiting ()

Protected Member Functions

virtual void Free (void) PURE
virtual HRESULT Alloc (void)

Protected Attributes

CSampleList m_lFree
HANDLE m_hSem
long m_lWaiting
long m_lCount
long m_lAllocated
long m_lSize
long m_lAlignment
long m_lPrefix
BOOL m_bChanged
BOOL m_bCommitted
BOOL m_bDecommitInProgress
IMemAllocatorNotifyCallbackTemp * m_pNotify
BOOL m_fEnableReleaseCallback

Static Private Member Functions

static CMediaSample *& NextSample (CMediaSample *pSample)

Friends

class CSampleList

Classes

class  CSampleList


Detailed Description

Definition at line 1151 of file amfilter.h.


Constructor & Destructor Documentation

CBaseAllocator::CBaseAllocator ( TCHAR pName,
LPUNKNOWN  pUnk,
HRESULT *  phr,
BOOL  bEvent = TRUE,
BOOL  fEnableReleaseCallback = FALSE 
)

Definition at line 3529 of file amfilter.cpp.

References E_OUTOFMEMORY, m_hSem, and NULL.

CBaseAllocator::~CBaseAllocator (  )  [virtual]

Definition at line 3590 of file amfilter.cpp.

References ASSERT, EXECUTE_ASSERT, m_bCommitted, m_hSem, m_pNotify, and NULL.


Member Function Documentation

static CMediaSample* & CBaseAllocator::NextSample ( CMediaSample pSample  )  [inline, static, private]

virtual void CBaseAllocator::Free ( void   )  [protected, virtual]

Reimplemented in CMemAllocator, and CImageAllocator.

Referenced by Decommit(), and ReleaseBuffer().

HRESULT CBaseAllocator::Alloc ( void   )  [protected, virtual]

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

Reimplemented from CUnknown.

Definition at line 3607 of file amfilter.cpp.

References GetInterface(), m_fEnableReleaseCallback, and CUnknown::NonDelegatingQueryInterface().

STDMETHODIMP CBaseAllocator::SetProperties ( ALLOCATOR_PROPERTIES *  pRequest,
ALLOCATOR_PROPERTIES *  pActual 
)

STDMETHODIMP CBaseAllocator::GetProperties ( ALLOCATOR_PROPERTIES *  pProps  ) 

Definition at line 3664 of file amfilter.cpp.

References CheckPointer, m_lAlignment, m_lCount, m_lPrefix, m_lSize, and ValidateReadWritePtr.

STDMETHODIMP CBaseAllocator::Commit (  ) 

STDMETHODIMP CBaseAllocator::Decommit (  ) 

HRESULT CBaseAllocator::GetBuffer ( IMediaSample **  ppBuffer,
REFERENCE_TIME *  pStartTime,
REFERENCE_TIME *  pEndTime,
DWORD  dwFlags 
)

STDMETHODIMP CBaseAllocator::ReleaseBuffer ( IMediaSample *  pBuffer  ) 

STDMETHODIMP CBaseAllocator::SetNotify ( IMemAllocatorNotifyCallbackTemp *  pNotify  ) 

Definition at line 3774 of file amfilter.cpp.

References ASSERT, m_fEnableReleaseCallback, m_pNotify, and S_OK.

STDMETHODIMP CBaseAllocator::GetFreeCount ( LONG plBuffersFree  ) 

void CBaseAllocator::NotifySample (  ) 

Definition at line 3802 of file amfilter.cpp.

References ASSERT, m_hSem, m_lWaiting, and NULL.

Referenced by Decommit(), and ReleaseBuffer().

void CBaseAllocator::SetWaiting (  )  [inline]

Definition at line 1292 of file amfilter.h.

Referenced by GetBuffer().


Friends And Related Function Documentation

friend class CSampleList [friend]

Definition at line 1155 of file amfilter.h.


Member Data Documentation

HANDLE CBaseAllocator::m_hSem [protected]

Definition at line 1206 of file amfilter.h.

Referenced by CBaseAllocator(), GetBuffer(), NotifySample(), and ~CBaseAllocator().

long CBaseAllocator::m_lWaiting [protected]

Definition at line 1207 of file amfilter.h.

Referenced by NotifySample(), and ReleaseBuffer().

long CBaseAllocator::m_lCount [protected]

long CBaseAllocator::m_lAllocated [protected]

long CBaseAllocator::m_lSize [protected]

long CBaseAllocator::m_lAlignment [protected]

long CBaseAllocator::m_lPrefix [protected]

BOOL CBaseAllocator::m_bChanged [protected]

BOOL CBaseAllocator::m_bCommitted [protected]

Definition at line 1219 of file amfilter.h.

Referenced by Commit(), Decommit(), and ReleaseBuffer().

IMemAllocatorNotifyCallbackTemp* CBaseAllocator::m_pNotify [protected]

Definition at line 1222 of file amfilter.h.

Referenced by ReleaseBuffer(), SetNotify(), and ~CBaseAllocator().

Definition at line 1224 of file amfilter.h.

Referenced by GetFreeCount(), NonDelegatingQueryInterface(), ReleaseBuffer(), and SetNotify().


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

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