You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.4 KiB

#ifndef _VIDEOFRAME_H_
#define _VIDEOFRAME_H_
#include "inmemoryfile.h"
//
// only contain 48bits each color with 16Bit
class VideoFrame {
private:
protected:
void AllocateFrame();
void FreeFrame();
int mem_allocated;
unsigned char *mem;
int height;
int width;
public:
VideoFrame();
~VideoFrame();
int GetHeight() { return height; };
int GetWidth() { return width; };
unsigned char *GetPixBuf() { return mem; };
int SetSize(int w, int h);
int ConvertToJpeg(InMemoryFile *imf, int quality);
int TestScreen(int w, int h);
int CopyTo(VideoFrame *dest, int destw, int desth);
int CopyFrom(int sw, int sh, int ssize, unsigned char *sdata);
};
class VideoFrameFloat {
private:
protected:
void AllocateFrame();
void FreeFrame();
int height;
int width;
int memf_allocated;
float *memf;
public:
VideoFrameFloat();
~VideoFrameFloat();
int SetSize(int w, int h);
int TestScreen(int w, int h);
float *GetPixBuf() { return memf; };
int ConvertToJpeg(InMemoryFile *imf, int quality);
int CopyTo(VideoFrame *dest);
int CopyTo(VideoFrameFloat *dest);
int AddScaledImage(VideoFrameFloat *vf, float f1, float f2);
};
#endif