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

Modified Files:
      Tag: b_thjc_dynamic_arrays
        sphere_mixed.cc .cvsignore 
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/sphere/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -C2 -d -r1.1 -r1.1.6.1
*** .cvsignore  4 Oct 2005 17:53:51 -0000       1.1
--- .cvsignore  10 Oct 2007 09:26:10 -0000      1.1.6.1
***************
*** 1,2 ****
--- 1,4 ----
  Makefile
  Makefile.in
+ .deps
+ *.la

Index: sphere_mixed.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/camera/sphere/sphere_mixed.cc,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C2 -d -r1.11 -r1.11.2.1
*** sphere_mixed.cc     23 Aug 2007 19:58:43 -0000      1.11
--- sphere_mixed.cc     10 Oct 2007 09:26:10 -0000      1.11.2.1
***************
*** 443,448 ****
        PLAYER_MSGTYPE_RESP_ACK,
        PLAYER_PTZ_REQ_STATUS,
!       (void*)&status, sizeof(status), NULL
!       );
      return(0);
    }
--- 443,448 ----
        PLAYER_MSGTYPE_RESP_ACK,
        PLAYER_PTZ_REQ_STATUS,
!       (void*)&status
!     );
      return(0);
    }
***************
*** 492,502 ****
    mCameraData.compression = PLAYER_CAMERA_COMPRESS_RAW;
    mCameraData.image_count = image_size;
  
-   assert(image_size <= sizeof(mCameraData.image));
  
    // Copy the image pixels
    if (0 == strcasecmp(mPalette, "GREY"))
    {
-     assert(image_size <= (size_t) mFrame->size);
      memcpy(mCameraData.image, mFrame->data, image_size);
    }
--- 492,501 ----
    mCameraData.compression = PLAYER_CAMERA_COMPRESS_RAW;
    mCameraData.image_count = image_size;
+   mCameraData.image = new unsigned char [image_size];
  
  
    // Copy the image pixels
    if (0 == strcasecmp(mPalette, "GREY"))
    {
      memcpy(mCameraData.image, mFrame->data, image_size);
    }
***************
*** 516,529 ****
    }
  
-   // Copy data to server
-   size = sizeof(mCameraData) - sizeof(mCameraData.image) + image_size;
- 
    Publish(mCameraAddr, 
            PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE,
!           reinterpret_cast<void*>(&mCameraData), size, NULL);
  
    Publish(mPtzAddr, 
            PLAYER_MSGTYPE_DATA, PLAYER_PTZ_DATA_STATE,
!           reinterpret_cast<void*>(&mPtzData), sizeof(mPtzData), NULL);
  
    // Save frames
--- 515,525 ----
    }
  
    Publish(mCameraAddr, 
            PLAYER_MSGTYPE_DATA, PLAYER_CAMERA_DATA_STATE,
!           reinterpret_cast<void*>(&mCameraData));
  
    Publish(mPtzAddr, 
            PLAYER_MSGTYPE_DATA, PLAYER_PTZ_DATA_STATE,
!           reinterpret_cast<void*>(&mPtzData));
  
    // Save frames
***************
*** 534,537 ****
--- 530,534 ----
      frame_save(mFrame, filename);
    }
+   delete [] mCameraData.image;
  
  }


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