Update of /cvsroot/playerstage/code/player/server/drivers/camera/uvc
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3150/server/drivers/camera/uvc
Modified Files:
cameraUVC.cc cameraUVC.h
Log Message:
minor fixes in a couple of camera drivers relating to data size which is
calculated in the marshalling code
Index: cameraUVC.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/camera/uvc/cameraUVC.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** cameraUVC.cc 23 Aug 2007 19:58:43 -0000 1.5
--- cameraUVC.cc 27 Aug 2007 03:53:00 -0000 1.6
***************
*** 116,119 ****
--- 116,125 ----
}
+ CameraUvc::~CameraUvc()
+ {
+ delete ui;
+ }
+
+
////////////////////////////////////////////////////////////////////////////////
// Set up the device. Return 0 if things go well, and -1 otherwise.
***************
*** 175,185 ****
data.compression=PLAYER_CAMERA_COMPRESS_JPEG;
data.image_count=ui->GetFrameSize();
ui->CopyFrame(data.image);
-
- // Work out the data size; do this BEFORE byteswapping
- size_t size=sizeof(this->data) - sizeof(this->data.image) +
this->data.image_count;
// Write data to the client (through the server)
! Publish
(device_addr,PLAYER_MSGTYPE_DATA,PLAYER_CAMERA_DATA_STATE,&data,size,NULL);
}
}
--- 181,189 ----
data.compression=PLAYER_CAMERA_COMPRESS_JPEG;
data.image_count=ui->GetFrameSize();
+ assert(data.image_count <= PLAYER_CAMERA_IMAGE_SIZE);
ui->CopyFrame(data.image);
// Write data to the client (through the server)
! Publish
(device_addr,PLAYER_MSGTYPE_DATA,PLAYER_CAMERA_DATA_STATE,&data,sizeof(data),NULL);
}
}
Index: cameraUVC.h
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/camera/uvc/cameraUVC.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cameraUVC.h 23 Aug 2007 19:58:43 -0000 1.2
--- cameraUVC.h 27 Aug 2007 03:53:00 -0000 1.3
***************
*** 13,16 ****
--- 13,17 ----
public:
CameraUvc(ConfigFile* cf, int section);
+ ~CameraUvc();
int Setup();
int Shutdown();
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit