| | |
| | | } |
| | | |
| | | static { |
| | | ImageReader imageReader = ImageReader.newInstance(100, 100, ImageFormat.JPEG, 3); |
| | | if (isEmulator()) { |
| | | useNative = false; |
| | | } else { |
| | |
| | | System.loadLibrary("rtspface"); |
| | | RtspFaceNative.init(); |
| | | // RtspFaceNative.setLocalIP("192.168.1.10"); |
| | | // RtspFaceNative.setLocalIP("192.168.1.106");//自己手机ip |
| | | RtspFaceNative.setLocalIP("192.168.1.203"); |
| | | RtspFaceNative.setLocalIP("192.168.1.106");//自己手机ip |
| | | // RtspFaceNative.setLocalIP("192.168.1.203"); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | try { |
| | | final SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss分"); |
| | | while (true) { |
| | | Thread.sleep(1000); |
| | | MainActivity.getInstance().runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | fragment_surveillance_enter_timer.setText(sdf.format(new Date())); |
| | | fragment_surveillance_exit_timer.setText(sdf.format(new Date())); |
| | | } |
| | | }); |
| | | } |
| | | } catch (InterruptedException e) { |
| | | // while (true) { |
| | | // Thread.sleep(1000); |
| | | // MainActivity.getInstance().runOnUiThread(new Runnable() { |
| | | // @Override |
| | | // public void run() { |
| | | // fragment_surveillance_enter_timer.setText(sdf.format(new Date())); |
| | | // fragment_surveillance_exit_timer.setText(sdf.format(new Date())); |
| | | // } |
| | | // }); |
| | | // } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | }).start(); |