X-Git-Url: http://plrg.eecs.uci.edu/git/?p=iot2.git;a=blobdiff_plain;f=benchmarks%2FJava%2FSmartLightsController%2FMotionDetection.java;fp=benchmarks%2FJava%2FSmartLightsController%2FMotionDetection.java;h=c3346e713763fa2ea9265b56a17ea57bc20199e1;hp=84913186479c51f531299fd8fb5a297a4791c739;hb=3f7f321df88865c44ce21ba16b344be6718b9472;hpb=c237c320de0460665d2adf13fc24034398a2d9c9 diff --git a/benchmarks/Java/SmartLightsController/MotionDetection.java b/benchmarks/Java/SmartLightsController/MotionDetection.java index 8491318..c3346e7 100644 --- a/benchmarks/Java/SmartLightsController/MotionDetection.java +++ b/benchmarks/Java/SmartLightsController/MotionDetection.java @@ -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) {