|
|
|
@ -107,7 +107,7 @@ int VideoDev_Simulation::CaptureStart() {
|
|
|
|
|
|
|
|
|
|
|
|
if (inframe != NULL) Close();
|
|
|
|
if (inframe != NULL) Close();
|
|
|
|
if (Open() != VDEV_STATUS_OK) return VDEV_STATUS_ERROR;
|
|
|
|
if (Open() != VDEV_STATUS_OK) return VDEV_STATUS_ERROR;
|
|
|
|
ConvertStart(&cdata, V4L2_PIX_FMT_RGB24);
|
|
|
|
pixelformat = V4L2_PIX_FMT_RGB24;
|
|
|
|
get_cycletime(&lastframetv);
|
|
|
|
get_cycletime(&lastframetv);
|
|
|
|
|
|
|
|
|
|
|
|
return VDEV_STATUS_OK;
|
|
|
|
return VDEV_STATUS_OK;
|
|
|
|
@ -118,7 +118,6 @@ int VideoDev_Simulation::CaptureStop() {
|
|
|
|
printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
|
|
|
|
printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
|
|
|
|
|
|
|
|
|
|
|
|
if (inframe != NULL) Close();
|
|
|
|
if (inframe != NULL) Close();
|
|
|
|
ConvertStop(&cdata, V4L2_PIX_FMT_RGB24);
|
|
|
|
|
|
|
|
return VDEV_STATUS_OK;
|
|
|
|
return VDEV_STATUS_OK;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -129,7 +128,7 @@ int VideoDev_Simulation::CaptureStop() {
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#define SIMULATION_SIZE 16
|
|
|
|
#define SIMULATION_SIZE 16
|
|
|
|
int VideoDev_Simulation::Grab(VideoFrame *vf) {
|
|
|
|
int VideoDev_Simulation::Grab(VideoFrameRaw *vf) {
|
|
|
|
int posx, posy, x ,y, r, radius;
|
|
|
|
int posx, posy, x ,y, r, radius;
|
|
|
|
double a, dsec;
|
|
|
|
double a, dsec;
|
|
|
|
|
|
|
|
|
|
|
|
@ -152,8 +151,7 @@ int VideoDev_Simulation::Grab(VideoFrame *vf) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LockMutex();
|
|
|
|
LockMutex();
|
|
|
|
Convert(&cdata, vf, inframe, (conf_width*conf_height*3), V4L2_PIX_FMT_RGB24,
|
|
|
|
vf->CopyFrom(V4L2_PIX_FMT_RGB24, conf_width, conf_height, (conf_width*conf_height*3), inframe);
|
|
|
|
conf_width, conf_height);
|
|
|
|
|
|
|
|
UnLockMutex();
|
|
|
|
UnLockMutex();
|
|
|
|
|
|
|
|
|
|
|
|
return VDEV_STATUS_OK;
|
|
|
|
return VDEV_STATUS_OK;
|
|
|
|
|