#include "convert.h" #include "videodev-dummy.h" VideoDev_Dummy::VideoDev_Dummy() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); }; VideoDev_Dummy::~VideoDev_Dummy() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); if (running > 0) CaptureStop(); } /* * return a list of /dev/video* devices found on the system, and read out its human friendly name * output will be a lit of: "V4L2 /dev/videoX [Name]" */ int VideoDev_Dummy::GetDeviceList(std::list *list) { std::string device; int devnum; printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); if (list == NULL) return 0; return 1; } /* * Open Device * prepare the buffer, InitMMAP and read all controls */ int VideoDev_Dummy::Open() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); return VDEV_STATUS_OK; }; /* * Close Device * Free videobuffer */ int VideoDev_Dummy::Close() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); return VDEV_STATUS_OK; }; /***************************************************************************************************** * VideoGrabbing */ /* * send the start capture signal to the cam */ int VideoDev_Dummy::CaptureStart() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); return VDEV_STATUS_OK; }; int VideoDev_Dummy::CaptureStop() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); return VDEV_STATUS_OK; }; /* * try to grab one frame and convert it into RGB32. * If something goes wrong return an error code. * Return code VDEV_STATUS_AGAIN is not an error. There was no video image ready to read. */ int VideoDev_Dummy::Grab(VideoFrame *vf) { return VDEV_STATUS_OK; } /***************************************************************************************************** * Controls */ /* * set video control identified by id */ int VideoDev_Dummy::SetDevCtrl(unsigned int id, int value) { return VDEV_STATUS_OK; }; /* * get video control identified by id */ int VideoDev_Dummy::GetDevCtrl(unsigned int id, int *value) { return VDEV_STATUS_OK; };