00001 00029 #ifndef __VETLIB_VETDOCTOR_H__ 00030 #define __VETLIB_VETDOCTOR_H__ 00031 00032 #include "../vetDefs.h" 00033 #include "../vetOutput.h" 00034 00035 #include "../vetFrameYUV420.h" 00036 #include "../vetFrameRGB24.h" 00037 #include "../vetFrameT.h" 00038 00039 #include <time.h> // clock() 00040 00041 00042 class vetDoctor : public vetOutput 00043 { 00044 00045 protected: 00046 00051 int runmode; 00052 00058 long v_sleeptime; 00059 00064 long frameCount; 00065 00071 clock_t lastFrameTime; 00072 00077 float lastFps; 00078 00083 float mediumFps; 00084 00089 long lastExTime; 00090 00095 long mediumExTime; 00096 00100 void updateFps(); 00101 00105 void updateExtime(); 00106 00107 public: 00108 00112 enum RUNMODE { FPS_STAT, IMG_STAT }; 00113 00119 vetDoctor(RUNMODE mode = vetDoctor::FPS_STAT); 00120 00121 00126 VETRESULT run() { return VETRET_NOT_IMPLEMENTED; }; 00127 00133 VETRESULT setHeight(unsigned int value) { return VETRET_NOT_IMPLEMENTED; }; 00134 00140 VETRESULT setWidth(unsigned int value) { return VETRET_NOT_IMPLEMENTED; }; 00141 00142 00143 00152 VETRESULT reset(bool startTimers = false); 00153 00162 VETRESULT setInputFrameRate(float fps = 0); 00163 00170 long getInputFrameRateDelay() { return v_sleeptime; }; 00171 00178 float getInputFrameRateCurrent() const { return lastFps; }; 00179 00186 float getInputFrameRateAverage() const { return mediumFps; }; 00187 00196 long getExecutionTimeCurrent() const { return lastExTime; }; 00197 00206 long getExecutionTimeAverage() const { return mediumExTime; }; 00207 00208 00209 00210 long getElapsedTime() const; 00211 00212 00224 VETRESULT importFrom(vetFrameYUV420& img); 00225 00237 VETRESULT importFrom(vetFrameRGB24& img); 00238 00250 VETRESULT importFrom(vetFrameT<unsigned char>& img); 00251 00252 00262 void operator << (vetFrameYUV420& img); 00272 void operator << (vetFrameRGB24& img); 00273 00274 00284 void operator << (vetFrameT<unsigned char>& img); 00285 00286 00287 00288 00289 }; 00290 00291 #endif //__VETLIB_VETCODER_BMP_H__
1.4.4