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.
43 lines
1.1 KiB
43 lines
1.1 KiB
|
|
#ifndef _VIDEODEVICE_DUMP_H_
|
|
#define _VIDEODEVICE_DUMP_H_
|
|
|
|
#include "video.h"
|
|
|
|
int dumpframe_open(uint32_t pixelformat, int srcw, int srch);
|
|
void dumpframe(unsigned char *ptrsrc, int srcsize, uint32_t pixelformat, int srcw, int srch);
|
|
void dumpframe_close();
|
|
|
|
class VideoDevice_Dump : public VideoDevice {
|
|
private:
|
|
int fd;
|
|
uint32_t w;
|
|
uint32_t h;
|
|
uint32_t pixformat;
|
|
off_t filesize;
|
|
off_t filepos;
|
|
struct timeval starttv;
|
|
unsigned char *inframe;
|
|
uint32_t inframe_nexttime;
|
|
int inframe_maxsize;
|
|
int inframe_size;
|
|
int fixedframesize;
|
|
int Open();
|
|
int Close();
|
|
int ReadFrame();
|
|
protected:
|
|
public:
|
|
VideoDevice_Dump();
|
|
~VideoDevice_Dump();
|
|
|
|
int SetDevice(std::string newdevice, int nwidth, int nheight, uint32_t pixfmt) { config.vdev_device = newdevice; return 1; };
|
|
int SetIOMode(int newiomode) { return 1; };
|
|
int Start();
|
|
int Stop();
|
|
int GetFrame (VideoFrame *destframe);
|
|
int SetDevCtrl(unsigned int id, int value);
|
|
int GetDevCtrl(unsigned int id, int *value);
|
|
};
|
|
|
|
#endif
|