Cleaning up benchmarks and drivers code.
[iot2.git] / benchmarks / Java / SmartLightsController / MotionDetection.java
index 84913186479c51f531299fd8fb5a297a4791c739..c3346e713763fa2ea9265b56a17ea57bc20199e1 100644 (file)
@@ -258,13 +258,9 @@ class MotionDetection implements CameraCallback {
         *   @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);
@@ -285,7 +281,6 @@ class MotionDetection implements CameraCallback {
 
                // 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);
 
@@ -424,10 +419,7 @@ class MotionDetection implements CameraCallback {
                                // 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 {
@@ -442,8 +434,6 @@ class MotionDetection implements CameraCallback {
        }
 
 
-
-
        // /*******************************************************************************************************************************************
        // **  Main Method used for testing
        // *******************************************************************************************************************************************/
@@ -454,10 +444,9 @@ class MotionDetection implements CameraCallback {
        //     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) {