prepare dummy videodev file. And fixed some warnings.

test16bit
Steffen Pohle 4 years ago
parent 0737f228fe
commit 27d0d9bbe7

@ -1,5 +1,6 @@
#include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <mmintrin.h> #include <mmintrin.h>
#include <unistd.h> #include <unistd.h>

@ -1,13 +1,13 @@
#include "convert.h" #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__); printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
}; };
VideoDev_SVBCam::~VideoDev_SVBCam() { VideoDev_Dummy::~VideoDev_Dummy() {
printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
if (running > 0) CaptureStop(); 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 * 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]" * output will be a lit of: "V4L2 /dev/videoX [Name]"
*/ */
int VideoDev_SVBCam::GetDeviceList(std::list<std::string> *list) { int VideoDev_Dummy::GetDeviceList(std::list<std::string> *list) {
std::string device; std::string device;
int devnum; int devnum;
@ -35,7 +35,7 @@ int VideoDev_SVBCam::GetDeviceList(std::list<std::string> *list) {
* Open Device * Open Device
* prepare the buffer, InitMMAP and read all controls * prepare the buffer, InitMMAP and read all controls
*/ */
int VideoDev_SVBCam::Open() { int VideoDev_Dummy::Open() {
printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
return VDEV_STATUS_OK; return VDEV_STATUS_OK;
}; };
@ -45,7 +45,7 @@ int VideoDev_SVBCam::Open() {
* Close Device * Close Device
* Free videobuffer * Free videobuffer
*/ */
int VideoDev_SVBCam::Close() { int VideoDev_Dummy::Close() {
printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
return VDEV_STATUS_OK; return VDEV_STATUS_OK;
}; };
@ -60,13 +60,13 @@ int VideoDev_SVBCam::Close() {
/* /*
* send the start capture signal to the cam * send the start capture signal to the cam
*/ */
int VideoDev_SVBCam::CaptureStart() { int VideoDev_Dummy::CaptureStart() {
printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
return VDEV_STATUS_OK; return VDEV_STATUS_OK;
}; };
int VideoDev_SVBCam::CaptureStop() { int VideoDev_Dummy::CaptureStop() {
printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__); printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
return VDEV_STATUS_OK; return VDEV_STATUS_OK;
}; };
@ -77,7 +77,7 @@ int VideoDev_SVBCam::CaptureStop() {
* If something goes wrong return an error code. * 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. * 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; return VDEV_STATUS_OK;
} }
@ -92,7 +92,7 @@ int VideoDev_SVBCam::Grab(VideoFrame *vf) {
/* /*
* set video control identified by id * 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; return VDEV_STATUS_OK;
}; };
@ -100,7 +100,7 @@ int VideoDev_SVBCam::SetDevCtrl(unsigned int id, int value) {
/* /*
* get video control identified by id * 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; return VDEV_STATUS_OK;
}; };

@ -34,7 +34,7 @@ enum {
class VideoDev_SVBCam: public VideoDev { class VideoDev_Dummy: public VideoDev {
private: private:
ConvertData cdata; ConvertData cdata;
@ -46,8 +46,8 @@ private:
int SetDevCtrl(unsigned int id, int value); int SetDevCtrl(unsigned int id, int value);
int GetDevCtrl(unsigned int id, int *value); int GetDevCtrl(unsigned int id, int *value);
public: public:
VideoDev_SVBCam(); VideoDev_Dummy();
~VideoDev_SVBCam(); ~VideoDev_Dummy();
int GetDeviceList(std::list<std::string> *list); int GetDeviceList(std::list<std::string> *list);
}; };

@ -4,6 +4,9 @@
* SUBSYSTEMS=="usb", ATTRS{idVendor}=="f266", ATTRS{idProduct}=="9a0a", GROUP="plugdev", MODE="0660" * SUBSYSTEMS=="usb", ATTRS{idVendor}=="f266", ATTRS{idProduct}=="9a0a", GROUP="plugdev", MODE="0660"
*/ */
#ifdef USE_SVBONY
#include <stdlib.h>
#include <SVBCameraSDK.h> #include <SVBCameraSDK.h>
#include "convert.h" #include "convert.h"
#include "videodev-svbcam.h" #include "videodev-svbcam.h"
@ -304,3 +307,4 @@ int VideoDev_SVBCam::GetDevCtrl(unsigned int id, int *value) {
}; };
#endif

Loading…
Cancel
Save