Update of /cvsroot/playerstage/code/player/server/drivers/camera/compress
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25787/server/drivers/camera/compress

Modified Files:
      Tag: b_thjc_dynamic_arrays
        .cvsignore cameracompress.cc camerauncompress.cc 
Log Message:
Merged some changes from head a while back

Work on updating drivers, A-J done,  laser is next

Index: .cvsignore
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/compress/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.1.14.1
diff -C2 -d -r1.1 -r1.1.14.1
*** .cvsignore  17 Sep 2004 07:20:36 -0000      1.1
--- .cvsignore  10 Oct 2007 09:26:06 -0000      1.1.14.1
***************
*** 1,2 ****
--- 1,7 ----
  Makefile
  Makefile.in
+ .deps
+ *.la
+ .libs
+ *.lo
+ *.a

Index: cameracompress.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/compress/cameracompress.cc,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -C2 -d -r1.16 -r1.16.2.1
*** cameracompress.cc   23 Aug 2007 19:58:43 -0000      1.16
--- cameracompress.cc   10 Oct 2007 09:26:06 -0000      1.16.2.1
***************
*** 275,278 ****
--- 275,279 ----
      return;
    }
+   this->data.image = new unsigned char [rawdata.width*rawdata.width*3];
    this->data.image_count = jpeg_compress( (char*)this->data.image, 
                                            ptr,
***************
*** 290,295 ****
    }
  
-   size = sizeof(this->data) - sizeof(this->data.image) + 
this->data.image_count;
- 
    this->data.width = (rawdata.width);
    this->data.height = (rawdata.height);
--- 291,294 ----
***************
*** 297,303 ****
    this->data.format = PLAYER_CAMERA_FORMAT_RGB888;
    this->data.compression = PLAYER_CAMERA_COMPRESS_JPEG;
!   this->data.image_count = (this->data.image_count);
    
!   Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE, (void*) 
&this->data, size, &this->camera_time);
  
  }
--- 296,303 ----
    this->data.format = PLAYER_CAMERA_FORMAT_RGB888;
    this->data.compression = PLAYER_CAMERA_COMPRESS_JPEG;
!   delete [] this->data.image;
!   this->data.image = NULL;
    
!   Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE, (void*) 
&this->data, &this->camera_time);
  
  }

Index: camerauncompress.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/compress/camerauncompress.cc,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** camerauncompress.cc 27 Aug 2007 03:53:00 -0000      1.4
--- camerauncompress.cc 10 Oct 2007 09:26:06 -0000      1.4.2.1
***************
*** 239,250 ****
  void CameraUncompress::ProcessImage(player_camera_data_t & compdata)
  {
-   size_t size;
    char filename[256];
- 
-   jpeg_decompress( (unsigned char*)this->data.image, 
-                     PLAYER_CAMERA_IMAGE_SIZE,
-                     compdata.image,
-                     compdata.image_count);
- 
    this->data.width = (compdata.width);
    this->data.height = (compdata.height);
--- 239,243 ----
***************
*** 253,256 ****
--- 246,256 ----
    this->data.format = PLAYER_CAMERA_FORMAT_RGB888;
    this->data.compression = PLAYER_CAMERA_COMPRESS_RAW;
+   this->data.image = new unsigned char [this->data.image_count];
+ 
+   jpeg_decompress( (unsigned char*)this->data.image, 
+                     PLAYER_CAMERA_IMAGE_SIZE,
+                     compdata.image,
+                     compdata.image_count);
+ 
  
    if (this->save)
***************
*** 262,266 ****
    }
  
!   Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE, (void*) 
&this->data, sizeof(this->data), &this->camera_time);
! 
  }
--- 262,267 ----
    }
  
!   Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE, (void*) 
&this->data, &this->camera_time);
!   delete [] this->data.image;
!   this->data.image = NULL;
  }


-------------------------------------------------------------------------
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

Reply via email to