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
00051
00053
00054
00056
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,
00075 VETFRAME_MONO,
00076
00077
00078 VETFRAME_RGB24,
00079 VETFRAME_BGR24,
00080 VETFRAME_RGB32,
00081 VETFRAME_BGR32,
00082 VETFRAME_RGB96,
00083 VETFRAME_BGR96,
00084
00085 VETFRAME_RGB565,
00086 VETFRAME_BGR565,
00087 VETFRAME_RGB555,
00088 VETFRAME_BGR555,
00089
00090 VETFRAME_ARGB32,
00091 VETFRAME_ABGR32,
00092 VETFRAME_RGBA32,
00093 VETFRAME_BGRA32,
00094
00095
00096 VETFRAME_I420,
00097 VETFRAME_YV12,
00098 VETFRAME_YUY2,
00099 VETFRAME_UYVY,
00100 VETFRAME_YVYU,
00101
00102
00103 VETFRAME_AYUV,
00104
00105 VETFRAME_HSV,
00106
00107 VETFRAME_CUSTOM
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