#ifndef _VIDEOFRAME_H_ #define _VIDEOFRAME_H_ #include "gui.h" #include "config.h" class FloatImage { public: int w; int h; uint32_t size; float *data; FloatImage(); ~FloatImage(); FloatImage operator=(FloatImage rightside); void SetSize(int nw, int nh); void SetW(int nw) { SetSize(nw, h); }; void SetH(int nh) { SetSize(w, nh); }; void CopyFrom(FloatImage *source); }; class VideoFrame { private: void SetMemorySize (int nw, int nh, int nps); unsigned char *data; public: int w; int h; uint32_t pixelsize; uint32_t size; VideoFrame(); ~VideoFrame(); VideoFrame operator=(VideoFrame rightside); void SetSize(int nw, int nh) { SetMemorySize (nw, nh, pixelsize); }; void* GetData() { return data; }; void SetPixelSize(uint32_t nps) { SetMemorySize (w, h, nps); }; void SetW(int nw) { SetMemorySize(nw, h, pixelsize); }; void SetH(int nh) { SetMemorySize(w, nh, pixelsize); }; void CopyFrom(VideoFrame *source); void CopyFrom(FloatImage *source); void CopyTo(FloatImage *dest); void ToPixbuf(GdkPixbuf* dest); }; #endif