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.
SimpleSkyCam/videodev-vfw.h

46 lines
1.1 KiB

#ifndef _H_VIDEODEV_VFW_H_
#define _H_VIDEODEV_VFW_H_
#include "videodev.h"
class VideoDev_VFW: public VideoDev {
private:
unsigned char *inframe;
int inframe_size;
int inframe_w, inframe_h;
int inframe_pixfmt;
int vfw_size;
ConvertData cdata;
int camid;
HWND cap, hwnd;
WNDCLASSEX * hclass;
HINSTANCE hinst;
int Grab(VideoFrameRaw *vf);
int Open();
int Close();
int CaptureStart();
int CaptureStop();
int SetDevCtrl(unsigned int id, int value);
int GetDevCtrl(unsigned int id, int *value);
int CreateClass();
int DestroyClass();
void HandleMessages();
void GetCapabilities();
void print_error(int err);
public:
VideoDev_VFW();
~VideoDev_VFW();
int GetDeviceList(std::list<std::string> *list);
int GetDeviceFormats(string device, std::list<string> *formats);
int GetDeviceResolutions(string device, std::list<string> *formats) { return VDEV_STATUS_OK; };
unsigned char * GetFrameBuffer(void) { return inframe; };
void SetFrameBufferSize(int s) { vfw_size = s; };
int GetFrameBufferSize(void) { return vfw_size; };
};
#endif