| | |
| | | import cn.com.basic.face.util.RtspFaceNative; |
| | | |
| | | import cn.com.basic.face.service.SurveillanceMng; |
| | | import cn.com.basic.face.util.SurveillancePhotoEmulateThread; |
| | | import cn.com.basic.face.widget.surveilance.SurveillanceBottomAttendanceListView; |
| | | import cn.com.basic.face.widget.surveilance.SurveillanceBottomVisitorListView; |
| | | |
| | |
| | | } |
| | | fragment_supervisory_enter_camera.getHolder().addCallback(new SurfaceHolder.Callback() { |
| | | public void surfaceCreated(SurfaceHolder holder) { |
| | | // if (useNative) { |
| | | // RtspFaceNative.setSurface(Integer.parseInt(CommonVariables.Camera.IN), fragment_supervisory_enter_camera.getHolder().getSurface()); |
| | | // RtspFaceNative.createPlayer(Integer.parseInt(CommonVariables.Camera.IN), DeviceMng.getInstance().getCamera1Address()); |
| | | // RtspFaceNative.setFaceCallback(Integer.parseInt(CommonVariables.Camera.IN), "cn/com/basic/face/util/RtspFaceNative", "faceCallBack"); |
| | | // } |
| | | new SurveillancePhotoEmulateThread().start(); |
| | | if (useNative) { |
| | | RtspFaceNative.setSurface(Integer.parseInt(CommonVariables.Camera.IN), fragment_supervisory_enter_camera.getHolder().getSurface()); |
| | | RtspFaceNative.createPlayer(Integer.parseInt(CommonVariables.Camera.IN), DeviceMng.getInstance().getCamera1Address()); |
| | | RtspFaceNative.setFaceCallback(Integer.parseInt(CommonVariables.Camera.IN), "cn/com/basic/face/util/RtspFaceNative", "faceCallBack"); |
| | | } |
| | | } |
| | | |
| | | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {} |
| | |
| | | }); |
| | | fragment_supervisory_exit_camera.getHolder().addCallback(new SurfaceHolder.Callback() { |
| | | public void surfaceCreated(SurfaceHolder holder) { |
| | | // if (useNative) { |
| | | // RtspFaceNative.setSurface(Integer.parseInt(CommonVariables.Camera.OUT), fragment_supervisory_exit_camera.getHolder().getSurface()); |
| | | // RtspFaceNative.createPlayer(Integer.parseInt(CommonVariables.Camera.OUT), DeviceMng.getInstance().getCamera2Address()); |
| | | // RtspFaceNative.setFaceCallback(Integer.parseInt(CommonVariables.Camera.OUT), "cn/com/basic/face/util/RtspFaceNative", "faceCallBack"); |
| | | // } |
| | | if (useNative) { |
| | | RtspFaceNative.setSurface(Integer.parseInt(CommonVariables.Camera.OUT), fragment_supervisory_exit_camera.getHolder().getSurface()); |
| | | RtspFaceNative.createPlayer(Integer.parseInt(CommonVariables.Camera.OUT), DeviceMng.getInstance().getCamera2Address()); |
| | | RtspFaceNative.setFaceCallback(Integer.parseInt(CommonVariables.Camera.OUT), "cn/com/basic/face/util/RtspFaceNative", "faceCallBack"); |
| | | } |
| | | } |
| | | |
| | | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { |
| | | System.out.print("width="+width+",height="+height); |
| | | if (useNative) { |
| | | RtspFaceNative.setSurface(Integer.parseInt(CommonVariables.Camera.IN), fragment_supervisory_enter_camera.getHolder().getSurface()); |
| | | RtspFaceNative.createPlayer(Integer.parseInt(CommonVariables.Camera.IN), DeviceMng.getInstance().getCamera1Address()); |
| | | RtspFaceNative.setFaceCallback(Integer.parseInt(CommonVariables.Camera.IN), "cn/com/basic/face/util/RtspFaceNative", "faceCallBack"); |
| | | } |
| | | // if (useNative) { |
| | | // RtspFaceNative.setSurface(Integer.parseInt(CommonVariables.Camera.IN), fragment_supervisory_enter_camera.getHolder().getSurface()); |
| | | // RtspFaceNative.createPlayer(Integer.parseInt(CommonVariables.Camera.IN), DeviceMng.getInstance().getCamera1Address()); |
| | | // RtspFaceNative.setFaceCallback(Integer.parseInt(CommonVariables.Camera.IN), "cn/com/basic/face/util/RtspFaceNative", "faceCallBack"); |
| | | // } |
| | | } |
| | | public void surfaceDestroyed(SurfaceHolder holder) { |
| | | System.out.println("surfaceDestroyed"); |