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

vetFrame.h

00001 
00024 #ifndef __VETLIB_VETFRAME_H__
00025  #define __VETLIB_VETFRAME_H__
00026 
00027  #include "vetDefs.h"
00028 
00029 class vetFrame
00030  {
00031         public:
00032 
00036                 unsigned int     width;
00037 
00041                 unsigned int     height;
00042 
00046                 long timeStamp;
00047 
00048 
00050         //      vetFrame(vetFrame& img)  : width(img.width), height(img.height) { }
00051 
00053         //      vetFrame(unsigned int w, unsigned int h)  : width(w), height(h) { }
00054 
00056         //      vetFrame()  : width(0), height(0) { }
00057 
00058 
00065                 vetFrame()  : width(0), height(0) { }
00066 
00067 
00069                 vetFrame(unsigned int w, unsigned int h)  : width(w), height(h) { }
00070 
00071 
00072 
00073                 enum VETFRAME_PROFILE   {
00074                                                         VETFRAME_NONE,          //empty
00075                                                         VETFRAME_MONO,          //grayscale
00076 
00077                         // RGB formats
00078                                                         VETFRAME_RGB24, //standard
00079                                                         VETFRAME_BGR24, //also standard
00080                                                         VETFRAME_RGB32, //
00081                                                         VETFRAME_BGR32, //
00082                                                         VETFRAME_RGB96, //
00083                                                         VETFRAME_BGR96, //
00084 
00085                                                         VETFRAME_RGB565,        //pixel 16bit!
00086                                                         VETFRAME_BGR565,        //pixel 16bit!
00087                                                         VETFRAME_RGB555,        //pixel 16bit!
00088                                                         VETFRAME_BGR555,        //pixel 16bit!
00089 
00090                                                         VETFRAME_ARGB32,                //alpha + .
00091                                                         VETFRAME_ABGR32,                //alpha + .
00092                                                         VETFRAME_RGBA32,                //. + alpha
00093                                                         VETFRAME_BGRA32,                //. + alpha
00094 
00095                         // YUV formats
00096                                                         VETFRAME_I420,          //4:2:0 planar (=IYUV)
00097                                                         VETFRAME_YV12,          //4:2:0 planar (common in MPEG software: NxM Y + N/2*M/2 V U )
00098                                                         VETFRAME_YUY2,          //4:2:2 packed (common in AVI and hardware devices)
00099                                                         VETFRAME_UYVY,          //4:2:2 packed (radius cinepack, 2nd choice of mpeg codecs)
00100                                                         VETFRAME_YVYU,          //4:2:2 packed
00101 
00102                         //
00103                                                         VETFRAME_AYUV,                  //alpha + 4:4:4 planar
00104 
00105                                                         VETFRAME_HSV,
00106 
00107                                                         VETFRAME_CUSTOM //not listed here..
00108                 };
00109 
00110                 enum VETFRAME_CHANNEL_TYPE      {
00111                                                         VETFRAME_CT_NONE,
00112                                                         VETFRAME_CT_PACKED,
00113                                                         VETFRAME_CT_PLANAR,
00114                                                         VETFRAME_CT_CUSTOM
00115                 };
00116 
00117 
00121                 virtual ~vetFrame() { }
00122 
00123 
00124 
00125                 virtual VETRESULT reAllocCanvas(unsigned int w, unsigned int h) = 0;
00126 
00127 
00128                 virtual VETRESULT extractBrightness(unsigned char* buffer, unsigned int* size = 0 ) = 0;
00129 
00130 
00136                 virtual void* dump_buffer() = 0;
00137 
00143                 virtual unsigned int getBufferSize() = 0;
00144 
00145 
00149                 virtual VETRESULT setBlack() = 0;
00153                 virtual VETRESULT setWhite() = 0;
00154 
00155 
00161                 unsigned int getWidth() const { return width; };
00167                 unsigned int getWidth() { return width; };
00168 
00169 
00175                 unsigned int getHeight() const { return height; };
00181                 unsigned int getHeight() { return height; };
00182 
00183 
00189                 virtual unsigned int getBpp() = 0;
00190 
00196                 virtual VETFRAME_PROFILE getProfile() = 0;
00197 
00203                 virtual VETFRAME_CHANNEL_TYPE getChannelType() = 0;
00204 
00211                 virtual int getFOURCC() = 0;
00212 
00213 
00214 
00221                 enum{ vetClassType = VETCLASS_TYPE_FRAME };
00222 
00223 };
00224 
00225 
00226 #endif //__VETLIB_VETFRAME_H__
00227 

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