* @return [void] None.
*/
public void newCameraFrameAvailable(byte[] latestFrame, long timeStamp) {
- //public void newCameraFrameAvailable(CameraSmart _camera) {
BufferedImage img = null;
- //byte[] newImg = _camera.getLatestFrame();
try {
- //InputStream in = new ByteArrayInputStream(_camera.getLatestFrame());
- //InputStream in = new ByteArrayInputStream(newImg);
// Parse the byte array into a Buffered Image
InputStream in = new ByteArrayInputStream(latestFrame);
img = ImageIO.read(in);
// timestamp from camera into timestamp buffer
long dateLong = timeStamp;
- //long dateLong = _camera.getTimestamp();
//System.out.println("DEBUG: New image at time: " + dateLong);
possibleDate = new Date(dateLong);
// Motion was detected so issue callbacks to all objects that registered
// to receive callback from this class.
for (MotionDetectionCallback c : callbackList) {
- //try {
- c.motionDetected(this);
- //} catch (RemoteException re) {
- //}
+ c.motionDetected(this);
}
} else {
}
-
-
// /*******************************************************************************************************************************************
// ** Main Method used for testing
// *******************************************************************************************************************************************/
// try {
// InetAddress addr = InetAddress.getByName("192.168.1.29");
- // cam = new AmcrestCamera(addr, "admin", "55779CatSoundz32");
+ // cam = new AmcrestCamera(addr, "admin", "admin");
// cam.registerCallback(mo);
// cam.start();
- // // cam.streamDisconnect();
// } catch (Exception e) {