www.pudn.com > VOBSUB.rar > MyCustomAllocator.h
#pragma once
class CMyCustomAllocator : public CMemAllocator
{
protected:
CBaseFilter* m_pFilter; // Delegate reference counts to
CMediaType* m_pMediaType; // Pointer to the current format
bool m_fMediaTypeChanged;
public:
CMyCustomAllocator(CBaseFilter* pFilter, HRESULT* phr);
#ifdef DEBUG
~CMyCustomAllocator();
#endif
STDMETHODIMP_(ULONG) NonDelegatingAddRef() {return m_pFilter->AddRef();}
STDMETHODIMP_(ULONG) NonDelegatingRelease() {return m_pFilter->Release();}
void NotifyMediaType(CMediaType* pMediaType);
STDMETHODIMP GetBuffer(IMediaSample** ppBuffer,
REFERENCE_TIME* pStartTime,
REFERENCE_TIME* pEndTime,
DWORD dwFlags);
};