www.pudn.com > T264-src-0.02.zip > T264Enc.h


#define OUTPIN_BUFFER_SIZE (1024*1024) 
 
#include "..\..\src\t264.h" 
#include "IProp.h" 
 
class CT264Enc: public CTransformFilter, 
                public IProp, 
                public ISpecifyPropertyPages 
{ 
public: 
    static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr); 
 
    // Reveals IContrast & ISpecifyPropertyPages 
    STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv); 
 
    DECLARE_IUNKNOWN; 
 
    HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut); 
    HRESULT CheckInputType(const CMediaType *mtIn); 
    HRESULT CheckTransform(const CMediaType *mtIn,const CMediaType *mtOut); 
    HRESULT GetMediaType(int iPosition, CMediaType *pMediaType); 
    HRESULT DecideBufferSize(IMemAllocator *pAlloc, 
        ALLOCATOR_PROPERTIES *pProperties); 
    HRESULT StartStreaming(); 
    HRESULT StopStreaming(); 
 
    // ISpecifyPropertyPages method 
    STDMETHODIMP GetPages(CAUUID *pPages); 
 
    // IProp 
    HRESULT __stdcall get_Para(INT** pPara); 
    HRESULT __stdcall put_Default(); 
    HRESULT __stdcall put_InfoWnd(INT hWnd); 
 
    CT264Enc(TCHAR *tszName, LPUNKNOWN punk, HRESULT *phr); 
    ~CT264Enc(); 
    HRESULT Transform(IMediaSample *pMediaSample); 
    HRESULT Copy(IMediaSample *pSource, IMediaSample *pDest) const; 
    HRESULT InitOutMediaType(CMediaType* pOut); 
private: 
    T264_t* m_t264; 
    T264_param_t m_param; 
    BYTE* m_pBuffer; 
    LONGLONG m_avgFrameTime; 
    HWND m_hWnd; 
    TCHAR m_szInfo[_MAX_PATH]; 
};