| | |
| | | import android.view.SurfaceHolder; |
| | | import android.view.SurfaceView; |
| | | import android.view.View; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.ProgressBar; |
| | | import android.widget.RadioButton; |
| | | import android.widget.RadioGroup; |
| | |
| | | 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; |
| | | |
| | |
| | | private RelativeLayout fragment_supervisory_exit_camera_relative_layout; |
| | | @ViewInject(R.id.fragment_supervisory_enter_camera_relative_layout) |
| | | private RelativeLayout fragment_supervisory_enter_camera_relative_layout; |
| | | @ViewInject(R.id.fragment_surveillance_bottom_linear_layout) |
| | | private LinearLayout fragment_surveillance_bottom_linear_layout; |
| | | |
| | | |
| | | static boolean useNative = false; |
| | | |
| | |
| | | useNative = false; |
| | | } |
| | | //useNative = false; |
| | | if (CommonVariables.EMULATOR) { |
| | | useNative = false; |
| | | } |
| | | if (useNative) { |
| | | System.loadLibrary("cvface_api"); |
| | | System.loadLibrary("opencv_java3"); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | // outputStream.writeBytes("busybox ifconfig wlan0 hw ether 00:e0:2c:31:1a:ba\n"); |
| | | /* |
| | | sysctl kernel.sched_is_big_little=1 |
| | | sysctl net.core.rmem_max=40000000 |
| | | */ |
| | | RtspFaceNative.setLocalIP(ipAddress); |
| | | System.out.println("ipaddr="+ipAddress); |
| | | } |
| | | } |
| | | |
| | |
| | | if (CommonVariables.FACE_SERVER) { |
| | | fragment_supervisory_enter_camera_relative_layout.addView(MainActivity.getInstance().mPreview); |
| | | fragment_supervisory_enter_camera_relative_layout.addView(MainActivity.getInstance().mDraw); |
| | | |
| | | //fragment_supervisory_exit_camera_relative_layout.setVisibility(View.GONE); |
| | | //fragment_surveillance_bottom_linear_layout.setVisibility(View.GONE); |
| | | } |
| | | fragment_supervisory_enter_camera.getHolder().addCallback(new SurfaceHolder.Callback() { |
| | | public void surfaceCreated(SurfaceHolder holder) { |
| | | 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()); |
| | |
| | | } |
| | | } |
| | | |
| | | public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {} |
| | | 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"); |
| | | // } |
| | | } |
| | | public void surfaceDestroyed(SurfaceHolder holder) { |
| | | System.out.println("surfaceDestroyed"); |
| | | } |