Update of /cvsroot/playerstage/code/player/server/drivers/camera/imageseq
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4552/server/drivers/camera/imageseq
Modified Files:
Tag: release-2-0-patches
imageseq.cc
Log Message:
backported lots of stuff from HEAD
Index: imageseq.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/camera/imageseq/imageseq.cc,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -C2 -d -r1.3 -r1.3.2.1
*** imageseq.cc 23 Feb 2006 18:54:54 -0000 1.3
--- imageseq.cc 7 Jun 2006 16:12:45 -0000 1.3.2.1
***************
*** 32,38 ****
* @brief Image file sequencer
- @todo This driver is currently disabled because it needs to be updated to
- the Player 2.0 API.
-
The imageseq driver simulates a camera by reading an image sequence
from the filesystem. The filenames for the image sequence must be
--- 32,35 ----
***************
*** 99,111 ****
#include <opencv/highgui.h>
! #include "player.h"
! #include "error.h"
! #include "device.h"
! #include "devicetable.h"
! #include "drivertable.h"
! #include "playertime.h"
!
! #include "playerpacket.h"
!
--- 96,100 ----
#include <opencv/highgui.h>
! #include <libplayercore/playercore.h>
***************
*** 158,162 ****
// Constructor
ImageSeq::ImageSeq(ConfigFile *cf, int section)
! : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN,
PLAYER_CAMERA_CODE, PLAYER_READ_MODE)
{
// Data rate
--- 147,151 ----
// Constructor
ImageSeq::ImageSeq(ConfigFile *cf, int section)
! : Driver(cf, section, true, PLAYER_MSGQUEUE_DEFAULT_MAXLEN,
PLAYER_CAMERA_CODE)
{
// Data rate
***************
*** 246,255 ****
this->data.format = PLAYER_CAMERA_FORMAT_MONO8;
this->data.compression = PLAYER_CAMERA_COMPRESS_RAW;
! this->data.image_size = this->data.width * this->data.height;
// Check image size
! if (this->data.image_size > PLAYER_CAMERA_IMAGE_SIZE)
{
! PLAYER_ERROR1("image size is too large [%d]", this->data.image_size);
return -1;
}
--- 235,244 ----
this->data.format = PLAYER_CAMERA_FORMAT_MONO8;
this->data.compression = PLAYER_CAMERA_COMPRESS_RAW;
! this->data.image_count = this->data.width * this->data.height;
// Check image size
! if (this->data.image_count > PLAYER_CAMERA_IMAGE_SIZE)
{
! PLAYER_ERROR1("image size is too large [%d]", this->data.image_count);
return -1;
}
***************
*** 273,286 ****
size_t size;
! size = sizeof(this->data) - sizeof(this->data.image) +
this->data.image_size;
!
! this->data.width = htons(this->data.width);
! this->data.height = htons(this->data.height);
! this->data.bpp = this->data.bpp;
! this->data.format = this->data.format;
! this->data.compression = this->data.compression;
! this->data.image_size = htonl(this->data.image_size);
!
! PutMsg(device_id, NULL, PLAYER_MSGTYPE_DATA, 0, &this->data, size, NULL);
return;
--- 262,267 ----
size_t size;
! size = sizeof(this->data) - sizeof(this->data.image) +
this->data.image_count;
! Publish(device_addr, NULL, PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE,
&this->data, size, NULL);
return;
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit