#ifndef _VIDEOFRAME_H_ #define _VIDEOFRAME_H_ #include "gui.h" #include "config.h" class VideoFrameRaw { private: public: unsigned char *data; int size; int w; int h; uint32_t pixfmt; VideoFrameRaw(); ~VideoFrameRaw(); int ReAlloc(int newsize); int CopyFrom(int spixfmt, int sw, int sh, int ssize, unsigned char *sdata); }; 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: public: int w; int h; uint32_t size; unsigned char *data; VideoFrame(); ~VideoFrame(); VideoFrame operator=(VideoFrame rightside); void SetSize(int nw, int nh); void SetW(int nw) { SetSize(nw, h); }; void SetH(int nh) { SetSize(w, nh); }; void CopyFrom(VideoFrame *source); void CopyFrom(FloatImage *source); void CopyTo(FloatImage *dest); void ToPixbuf(GdkPixbuf* dest); }; #endif