avi_PushSource.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // File: PushSource.H
00003 //------------------------------------------------------------------------------
00004 // UNITS = 10 ^ 7  
00005 // UNITS / 30 = 30 fps;
00006 // UNITS / 20 = 20 fps, etc
00007 
00008 const REFERENCE_TIME FPS_30 = UNITS / 30;
00009 const REFERENCE_TIME FPS_20 = UNITS / 20;
00010 const REFERENCE_TIME FPS_25 = UNITS / 25;
00011 const REFERENCE_TIME FPS_10 = UNITS / 10;
00012 const REFERENCE_TIME FPS_5  = UNITS / 5;
00013 const REFERENCE_TIME FPS_4  = UNITS / 4;
00014 const REFERENCE_TIME FPS_3  = UNITS / 3;
00015 const REFERENCE_TIME FPS_2  = UNITS / 2;
00016 const REFERENCE_TIME FPS_1  = UNITS / 1;
00017 
00023 class CPushPinBitmapSet : public CSourceStream
00024 {
00025 protected:
00026     BOOL m_bZeroMemory;                 // Do we need to clear the buffer?
00027     CRefTime m_rtSampleTime;            // The time stamp for each sample
00028 
00029     BITMAPINFO *m_pBmi;                 // Pointer to the bitmap headers
00030     DWORD m_cbBitmapInfo;               // Size of the bitmap headers
00031         
00032     BYTE * m_pFile;                     // Points to beginning of bitmap
00033         BYTE * m_pImage;                    // Points to pixel bits                                      
00034     BOOL m_bFilesLoaded;
00035 
00036     int m_iFrameNumber;                 // How many frames have been displayed
00037     int m_FirstF,m_LastF;               // how many frames to write
00038     const REFERENCE_TIME m_rtFrameLength;   // Duration of one frame
00039 
00040     CCritSec m_cSharedState;            // Protects our internal state
00041     CImageDisplay m_Display;            // Figures out our media type for us
00042 public:
00043 
00044     CPushPinBitmapSet(int Nframes, HRESULT *phr, CSource *pFilter);
00045     ~CPushPinBitmapSet();
00046 
00047     void LoadNextBitmap(void);
00048 
00049     // Override the version that offers exactly one media type
00050     HRESULT GetMediaType(CMediaType *pMediaType);
00051     HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pRequest);
00052     HRESULT FillBuffer(IMediaSample *pSample);
00053     
00054     // Quality control
00055         // Not implemented because we aren't going in real time.
00056         // If the file-writing filter slows the graph down, we just do nothing, which means
00057         // wait until we're unblocked. No frames are ever dropped.
00058     STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q)
00059     {
00060         return E_FAIL;
00061     }
00062 
00063 };
00064 
00070 class CPushSourceBitmapSet : public CSource
00071 {
00072 public:
00073     CPushSourceBitmapSet(int Nframes, IUnknown *pUnk, HRESULT *phr);
00074     ~CPushSourceBitmapSet();
00075 
00076 private:
00077     CPushPinBitmapSet *m_pPin;
00078 
00079 public:
00080 //    static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);  
00081 
00082 };

Generated on Sun Apr 27 14:20:13 2014 for OpenFX by  doxygen 1.5.6