www.pudn.com > DS4050src.zip > divxfilter.h
/************************************************************************** * * * This code has been developed by Andrea Graziani. Those intending to * * use this software module in hardware or software products are advised * * that its use may infringe existing patents or copyrights, and any such * * use would be at such party's own risk. The original developer of this * * software module and his/her company, and subsequent editors and their * * companies (including Project Mayo), will have no liability for use of * * this software or modifications or derivatives thereof. * * * * Project Mayo gives users of the Codec and Filter a license to this * * software module or modifications thereof for use in hardware or * * software products claiming conformance to the MPEG-4 Video Standard * * as described in the Open DivX license. * * * * The complete Open DivX license can be found at * * http://www.projectmayo.com/opendivx/license.php * * * **************************************************************************/ /** * Copyright (C) 2001 - Project Mayo * * Andrea Graziani * * DivX Advanced Research Center* **/ // divxfilter.h // #include "decore.h" #include "divxfilterinterface.h" class DivXFilter : public CVideoTransformFilter, public IDivXFilterInterface, public ISpecifyPropertyPages { public: // // Necessary COM functions... // static CUnknown * WINAPI CreateInstance(LPUNKNOWN lpunk, HRESULT * phr); STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv); DECLARE_IUNKNOWN; // call to declare IUnknown macro // // Output Pin datatype and buffer size functions // HRESULT CheckMediaType(const CMediaType * pmt); HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt); // // IDivXFilterInterface methods // STDMETHODIMP get_PPLevel(int * PPLevel); STDMETHODIMP put_PPLevel(int PPLevel); STDMETHODIMP put_DefaultPPLevel(void); // // Extra Filter Info // DEC_MEM_REQS m_DecMemReqs; DEC_PARAM m_DecParam; int m_Initialized; GUID m_CURRENTSubType; private: // transform override function HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut); HRESULT StartStreaming(); HRESULT StopStreaming(); // input pin overrride functions HRESULT CheckInputType(const CMediaType * pmtIn); HRESULT CheckTransform(const CMediaType * mptIn, const CMediaType * pmtOut); // output pin override functions HRESULT GetMediaType(int iPos, CMediaType * pmt); HRESULT DecideBufferSize(IMemAllocator * pima, ALLOCATOR_PROPERTIES * pProperties); DivXFilter(TCHAR * pName, LPUNKNOWN pUnk, HRESULT *pHr); ~DivXFilter(); // required for ISpecifyPropertyPages STDMETHODIMP GetPages(CAUUID * pPages); STDMETHODIMP FreePages(CAUUID * pPages); // // PostProcessing Settings // const int m_iDefaultPPLevel; int m_iPPLevel; int m_iPrevPPLevel; int m_iInitialized; // locking critical section CCritSec m_DivXLock; }; // DivXFilter