Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetOuputVoid.cpp

Go to the documentation of this file.
00001 
00018 #include "vetOuputVoid.h"
00019 #include "../vetUtility.h"
00020 
00021 
00022 
00028 vetOutputVoid::vetOutputVoid(bool deleteFrames) : vetOutput()
00029  {
00030         DEBUGMSG("vetOutputVoid::vetOutputVoid(bool deleteFrames) : vetOutput() [CONTRUCTOR]", deleteFrames)
00031 
00032         clearMemory = deleteFrames;
00033         v_sleeptime = 0;
00034  }
00035 
00036 
00045 VETRESULT vetOutputVoid::setInputFrameRate(float fps)
00046  {
00047         if (fps < 0.)
00048                 return VETRET_PARAM_ERR;
00049 
00050         if ( fps == 0 )
00051                 v_sleeptime = 0;
00052         else
00053                 v_sleeptime = (long)( (float)1000 / fps ); // milliseconds
00054 
00055         return VETRET_OK;
00056  }
00057 
00058 
00059 
00070 VETRESULT vetOutputVoid::importFrom(vetFrameYUV420& img)
00071  {
00072         DEBUGMSG("int vetOutputVoid::importFrom(vetFrameYUV420& img) [reading data]", clearMemory)
00073 
00074         if (clearMemory)
00075                 delete &img;
00076 
00077         if ( v_sleeptime )
00078                 vetUtility::vetSleep( v_sleeptime );    // milliseconds
00079 
00080         return VETRET_OK;
00081  }
00082 
00093 VETRESULT vetOutputVoid::importFrom(vetFrameRGB24& img)
00094  {
00095         DEBUGMSG("int vetOutputVoid::importFrom(vetFrameRGB24& img) [reading data]", clearMemory)
00096 
00097         if (clearMemory)
00098                 delete &img;
00099 //BUG autofreedata !
00100         if ( v_sleeptime )
00101                 vetUtility::vetSleep( v_sleeptime );    // milliseconds
00102 
00103         return VETRET_OK;
00104  }
00105 
00117 VETRESULT vetOutputVoid::importFrom(vetFrameT<unsigned char>& img)
00118  {
00119         DEBUGMSG("int vetOutputVoid::importFrom(vetFrameT& img) [reading data]", clearMemory)
00120 
00121         if (clearMemory)
00122                 delete &img;
00123 
00124         if ( v_sleeptime )
00125                 vetUtility::vetSleep( v_sleeptime );    // milliseconds
00126 
00127         return VETRET_OK;
00128  }
00129 
00130 
00131 

Generated on Tue Jan 24 11:59:05 2006 for VETLib by  doxygen 1.4.4