diff --git a/detect.cc b/detect.cc index 7396cc5..5fd2a86 100644 --- a/detect.cc +++ b/detect.cc @@ -1,5 +1,6 @@ +#include #include #include #include diff --git a/videodev-dummy.cc b/videodev-dummy.cc index de38f38..1251ef2 100644 --- a/videodev-dummy.cc +++ b/videodev-dummy.cc @@ -1,13 +1,13 @@ #include "convert.h" -#include "videodev-svbcam.h" +#include "videodev-dummy.h" -VideoDev_SVBCam::VideoDev_SVBCam() { +VideoDev_Dummy::VideoDev_Dummy() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); }; -VideoDev_SVBCam::~VideoDev_SVBCam() { +VideoDev_Dummy::~VideoDev_Dummy() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); if (running > 0) CaptureStop(); } @@ -18,7 +18,7 @@ VideoDev_SVBCam::~VideoDev_SVBCam() { * 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_SVBCam::GetDeviceList(std::list *list) { +int VideoDev_Dummy::GetDeviceList(std::list *list) { std::string device; int devnum; @@ -35,7 +35,7 @@ int VideoDev_SVBCam::GetDeviceList(std::list *list) { * Open Device * prepare the buffer, InitMMAP and read all controls */ -int VideoDev_SVBCam::Open() { +int VideoDev_Dummy::Open() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); return VDEV_STATUS_OK; }; @@ -45,7 +45,7 @@ int VideoDev_SVBCam::Open() { * Close Device * Free videobuffer */ -int VideoDev_SVBCam::Close() { +int VideoDev_Dummy::Close() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); return VDEV_STATUS_OK; }; @@ -60,13 +60,13 @@ int VideoDev_SVBCam::Close() { /* * send the start capture signal to the cam */ -int VideoDev_SVBCam::CaptureStart() { +int VideoDev_Dummy::CaptureStart() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); return VDEV_STATUS_OK; }; -int VideoDev_SVBCam::CaptureStop() { +int VideoDev_Dummy::CaptureStop() { printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); return VDEV_STATUS_OK; }; @@ -77,7 +77,7 @@ int VideoDev_SVBCam::CaptureStop() { * 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_SVBCam::Grab(VideoFrame *vf) { +int VideoDev_Dummy::Grab(VideoFrame *vf) { return VDEV_STATUS_OK; } @@ -92,7 +92,7 @@ int VideoDev_SVBCam::Grab(VideoFrame *vf) { /* * set video control identified by id */ -int VideoDev_SVBCam::SetDevCtrl(unsigned int id, int value) { +int VideoDev_Dummy::SetDevCtrl(unsigned int id, int value) { return VDEV_STATUS_OK; }; @@ -100,7 +100,7 @@ int VideoDev_SVBCam::SetDevCtrl(unsigned int id, int value) { /* * get video control identified by id */ -int VideoDev_SVBCam::GetDevCtrl(unsigned int id, int *value) { +int VideoDev_Dummy::GetDevCtrl(unsigned int id, int *value) { return VDEV_STATUS_OK; }; diff --git a/videodev-dummy.h b/videodev-dummy.h index 4b68a59..3181b66 100644 --- a/videodev-dummy.h +++ b/videodev-dummy.h @@ -34,7 +34,7 @@ enum { -class VideoDev_SVBCam: public VideoDev { +class VideoDev_Dummy: public VideoDev { private: ConvertData cdata; @@ -46,8 +46,8 @@ private: int SetDevCtrl(unsigned int id, int value); int GetDevCtrl(unsigned int id, int *value); public: - VideoDev_SVBCam(); - ~VideoDev_SVBCam(); + VideoDev_Dummy(); + ~VideoDev_Dummy(); int GetDeviceList(std::list *list); }; diff --git a/videodev-svbcam.cc b/videodev-svbcam.cc index ac41e5b..00206ae 100644 --- a/videodev-svbcam.cc +++ b/videodev-svbcam.cc @@ -4,6 +4,9 @@ * SUBSYSTEMS=="usb", ATTRS{idVendor}=="f266", ATTRS{idProduct}=="9a0a", GROUP="plugdev", MODE="0660" */ +#ifdef USE_SVBONY + +#include #include #include "convert.h" #include "videodev-svbcam.h" @@ -304,3 +307,4 @@ int VideoDev_SVBCam::GetDevCtrl(unsigned int id, int *value) { }; +#endif