The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MPFaceDetectorFilter.h

Go to the documentation of this file.
00001 #ifndef __MPFACEDETECTORFILTER_H__
00002 #define __MPFACEDETECTORFILTER_H__
00003 
00004 #include "FilterInterface.h"
00005 
00006 class MPFaceDetectorFilter
00007 : public CTransformFilter
00008 , public CPersistStream
00009 {
00010 public:
00011 
00012         DECLARE_IUNKNOWN;
00013         static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);
00014 
00015         // Reveals IEZMPFaceDetectorFilter and ISpecifyPropertyPages
00016         STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
00017 
00018         // CPersistStream stuff
00019         HRESULT ScribbleToStream(IStream *pStream);
00020         HRESULT ReadFromStream(IStream *pStream);
00021 
00022         // Overrriden from CTransformFilter base class
00023 
00024         HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut);
00025         HRESULT CheckInputType(const CMediaType *mtIn);
00026         HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut);
00027         HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pProperties);
00028         HRESULT GetMediaType(int iPosition, CMediaType *pMediaType);
00029 
00030         virtual HRESULT StartStreaming(); // frame dependent initialization
00031         virtual HRESULT StopStreaming();
00032 
00033         // CPersistStream override
00034         STDMETHODIMP GetClassID(CLSID *pClsid);
00035 
00036 private:
00037 
00038         MPFaceDetectorFilter(TCHAR *tszName, LPUNKNOWN punk, HRESULT *phr);    // Constructor
00039         ~MPFaceDetectorFilter();        // Destructor
00040 
00041         // Look after doing the special effect
00042         BOOL CanPerformMPFaceDetectorFilter(const CMediaType *pMediaType) const;
00043         HRESULT Copy(IMediaSample *pSource, IMediaSample *pDest);
00044         HRESULT Transform(IMediaSample *pMediaSample);
00045 
00046         CCritSec        m_MPFaceDetectorFilterLock;          // Private play critical section
00047         int m_effect;               // Which effect are we processing
00048         const long m_lBufferRequest;    // The number of buffers to use
00049         int m_imgWidth;
00050         int m_imgHeight;
00051 
00052         CRefTime    m_currentTime;      // time of currently executing filter.
00053         CRefTime    m_lastValidTime;    // last time something valid was tracked
00054         CRefTime    m_resetInterval;    // when this much time passes since last valid
00055 
00056         FilterInterface m_interface;
00057 
00058 }; // EZMPFaceDetectorFilter
00059 
00060 #endif __MPFACEDETECTORFILTER_H__

Generated on Mon Nov 8 17:07:43 2004 for MPT by  doxygen 1.3.9.1