#include <amfilter.h>

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 |
Definition at line 1151 of file amfilter.h.
| CBaseAllocator::~CBaseAllocator | ( | ) | [virtual] |
Definition at line 3590 of file amfilter.cpp.
References ASSERT, EXECUTE_ASSERT, m_bCommitted, m_hSem, m_pNotify, and NULL.
| static CMediaSample* & CBaseAllocator::NextSample | ( | CMediaSample * | pSample | ) | [inline, static, private] |
Definition at line 1159 of file amfilter.h.
References CMediaSample::m_pNext.
Referenced by CBaseAllocator::CSampleList::Add(), CBaseAllocator::CSampleList::Next(), CBaseAllocator::CSampleList::Remove(), and CBaseAllocator::CSampleList::RemoveHead().
| virtual void CBaseAllocator::Free | ( | void | ) | [protected, virtual] |
| HRESULT CBaseAllocator::Alloc | ( | void | ) | [protected, virtual] |
Reimplemented in CMemAllocator, and CImageAllocator.
Definition at line 3891 of file amfilter.cpp.
References ASSERT, FALSE, CBaseAllocator::CSampleList::GetCount(), m_bChanged, m_lAlignment, m_lAllocated, m_lCount, m_lFree, m_lSize, and S_FALSE.
Referenced by CImageAllocator::Alloc(), CMemAllocator::Alloc(), and Commit().
| 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 | |||
| ) |
Reimplemented in CMemAllocator, and CImageAllocator.
Definition at line 3620 of file amfilter.cpp.
References ASSERT, CheckPointer, DbgLog, CBaseAllocator::CSampleList::GetCount(), LOG_ERROR, m_bChanged, m_bCommitted, m_lAlignment, m_lAllocated, m_lCount, m_lFree, m_lPrefix, m_lSize, TRUE, and ValidateReadWritePtr.
Referenced by CImageAllocator::SetProperties().
| 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 | ( | ) |
Definition at line 3812 of file amfilter.cpp.
References Alloc(), DbgLog, FAILED, FALSE, HRESULT, LOG_MEMORY, m_bCommitted, m_bDecommitInProgress, m_lCount, m_lSize, and TRUE.
| STDMETHODIMP CBaseAllocator::Decommit | ( | ) |
Definition at line 3850 of file amfilter.cpp.
References BOOL, FALSE, Free(), CBaseAllocator::CSampleList::GetCount(), m_bCommitted, m_bDecommitInProgress, m_lAllocated, m_lFree, NotifySample(), and TRUE.
Referenced by CMemAllocator::~CMemAllocator().
| HRESULT CBaseAllocator::GetBuffer | ( | IMediaSample ** | ppBuffer, | |
| REFERENCE_TIME * | pStartTime, | |||
| REFERENCE_TIME * | pEndTime, | |||
| DWORD | dwFlags | |||
| ) |
Definition at line 3678 of file amfilter.cpp.
References ASSERT, m_bCommitted, CMediaSample::m_cRef, m_hSem, m_lFree, NULL, CBaseAllocator::CSampleList::RemoveHead(), and SetWaiting().
| STDMETHODIMP CBaseAllocator::ReleaseBuffer | ( | IMediaSample * | pBuffer | ) |
Definition at line 3727 of file amfilter.cpp.
References CBaseAllocator::CSampleList::Add(), ASSERT, BOOL, CheckPointer, FALSE, Free(), CBaseAllocator::CSampleList::GetCount(), LONG, m_bDecommitInProgress, m_fEnableReleaseCallback, m_lAllocated, m_lFree, m_lWaiting, m_pNotify, NotifySample(), TRUE, and ValidateReadPtr.
| 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 | ) |
Definition at line 3791 of file amfilter.cpp.
References ASSERT, CBaseAllocator::CSampleList::GetCount(), m_fEnableReleaseCallback, m_lAllocated, m_lCount, and m_lFree.
| 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] |
friend class CSampleList [friend] |
Definition at line 1155 of file amfilter.h.
CSampleList CBaseAllocator::m_lFree [protected] |
Definition at line 1202 of file amfilter.h.
Referenced by CImageAllocator::Alloc(), CMemAllocator::Alloc(), Alloc(), Decommit(), CImageAllocator::Free(), GetBuffer(), GetFreeCount(), CMemAllocator::ReallyFree(), ReleaseBuffer(), CMemAllocator::SetProperties(), and SetProperties().
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] |
long CBaseAllocator::m_lCount [protected] |
Definition at line 1208 of file amfilter.h.
Referenced by CImageAllocator::Alloc(), CMemAllocator::Alloc(), Alloc(), Commit(), GetFreeCount(), GetProperties(), CMemAllocator::SetProperties(), and SetProperties().
long CBaseAllocator::m_lAllocated [protected] |
Definition at line 1209 of file amfilter.h.
Referenced by CImageAllocator::Alloc(), CMemAllocator::Alloc(), Alloc(), Decommit(), CImageAllocator::Free(), GetFreeCount(), CMemAllocator::ReallyFree(), ReleaseBuffer(), CMemAllocator::SetProperties(), and SetProperties().
long CBaseAllocator::m_lSize [protected] |
Definition at line 1210 of file amfilter.h.
Referenced by CImageAllocator::Alloc(), CMemAllocator::Alloc(), Alloc(), Commit(), GetProperties(), CMemAllocator::SetProperties(), and SetProperties().
long CBaseAllocator::m_lAlignment [protected] |
Definition at line 1211 of file amfilter.h.
Referenced by CMemAllocator::Alloc(), Alloc(), GetProperties(), CMemAllocator::SetProperties(), and SetProperties().
long CBaseAllocator::m_lPrefix [protected] |
Definition at line 1212 of file amfilter.h.
Referenced by CMemAllocator::Alloc(), GetProperties(), CMemAllocator::SetProperties(), and SetProperties().
BOOL CBaseAllocator::m_bChanged [protected] |
Definition at line 1213 of file amfilter.h.
Referenced by CMemAllocator::Alloc(), Alloc(), CMemAllocator::SetProperties(), and SetProperties().
BOOL CBaseAllocator::m_bCommitted [protected] |
Definition at line 1216 of file amfilter.h.
Referenced by Commit(), Decommit(), GetBuffer(), CMemAllocator::SetProperties(), SetProperties(), and ~CBaseAllocator().
BOOL CBaseAllocator::m_bDecommitInProgress [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().
BOOL CBaseAllocator::m_fEnableReleaseCallback [protected] |
Definition at line 1224 of file amfilter.h.
Referenced by GetFreeCount(), NonDelegatingQueryInterface(), ReleaseBuffer(), and SetNotify().
1.5.6