Compare commits

..

No commits in common. '5c05d1b7f99f2a30d7de13753e4ae08f23492a7a' and 'd7786fa8b15d9ce883ae620212209a40a0c895f6' have entirely different histories.

@ -60,7 +60,7 @@ void axis_history_add(int axis, double diff, double out) {
}
#define CALIB_MAXSPEED 1.0
#define CALIB_DURATION_DELTA 5.0
#define CALIB_DURATION_DELTA 10.0
#define CALIB_DURATION_AXIS (CALIB_DURATION_DELTA / CALIB_MAXSPEED)
void posctl_gui_update();

@ -121,7 +121,7 @@ int VideoDev_Dumpfile::Open() {
}
filesize = s.st_size;
if ((fd = open(fname.c_str(), O_RDONLY | O_BINARY)) == -1) {
if ((fd = open(fname.c_str(), O_RDONLY)) == -1) {
printf ("%s:%d could not open file '%s' error:%s\n", __FILE__, __LINE__, fname.c_str(), strerror(errno));
return VDEV_STATUS_ERROR;
}
@ -267,8 +267,9 @@ int VideoDev_Dumpfile::ReadFrame() {
//
// read frame
if (read (fd, inbuf, 4*2) != 4*2) {
printf ("%s:%d could not read frame header: %s\n", __FILE__, __LINE__, strerror(errno));
printf ("%s:%d could not read frame header\n", __FILE__, __LINE__);
Close();
}
filepos += (4*2);
inframe_size = ntohl(inbuf[0]);
@ -290,9 +291,10 @@ int VideoDev_Dumpfile::ReadFrame() {
printf ("%s:%d cloud not allocate enought memory\n", __FILE__, __LINE__);
return VDEV_CBSTATUS_ERROR;
}
if (read (fd, inframe, inframe_size) != inframe_size) {
printf ("%s:%d could not read frame: %s\n", __FILE__, __LINE__, strerror(errno));
Close();
printf ("%s:%d could not read frame\n", __FILE__, __LINE__);
Close();
}
filepos += inframe_size;

@ -226,8 +226,8 @@ int VideoDev_VFW::Open() {
capSetUserData(cap, this);
// set video source, capture format and size
//capDlgVideoSource(cap);
//capDlgVideoFormat(cap);
capDlgVideoSource(cap);
capDlgVideoFormat(cap);
CAPTUREPARMS cp;
if(!capCaptureGetSetup(cap, &cp, sizeof(cp))) {
@ -426,9 +426,7 @@ void VideoDev_VFW::HandleMessages() {
*/
int VideoDev_VFW::Grab(VideoFrameRaw *vf) {
// Do not know exactly why, but needed to translate/dispatch window message
HandleMessages();
if (inframe == NULL) return VDEV_STATUS_ERROR;
if (GetFrameBufferSize() > 0) {

Loading…
Cancel
Save