From 575a339f5fcf46106ae43042a422c2c5327ed270 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期一, 17 四月 2017 16:11:50 +0800
Subject: [PATCH] bugfix localip
---
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java | 43 ++++++++++++++++++++-----------------------
1 files changed, 20 insertions(+), 23 deletions(-)
diff --git a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java
index 814feb2..8a4bf03 100644
--- a/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java
+++ b/VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/SurveillanceFragment.java
@@ -1,6 +1,8 @@
package cn.com.basic.face.fragment;
import android.os.Bundle;
+import android.view.Surface;
+import android.view.SurfaceView;
import android.view.View;
import android.widget.RadioButton;
import android.widget.RadioGroup;
@@ -10,17 +12,12 @@
import cn.com.basic.face.base.BaseFragment;
-import com.bsk.zhangbo.demoforbsk.util.RtspFaceNative;
+import cn.com.basic.face.util.RtspFaceNative;
-import cn.com.basic.face.service.SurvalanceMng;
-import cn.com.basic.face.widget.surveilance.SupervisoryBottomListView;
+import cn.com.basic.face.service.SurveillanceMng;
+import cn.com.basic.face.widget.surveilance.SurveillanceBottomListView;
import com.lidroid.xutils.view.annotation.ViewInject;
-
-
-/**
- * Created by zhangbo on 2017/2/15.
- */
public class SurveillanceFragment extends BaseFragment {
@@ -33,18 +30,23 @@
@ViewInject(R.id.fragment_supervisory_bottom_attendance_background)
private View fragment_supervisory_bottom_attendance_background;
@ViewInject(R.id.fragment_supervisory_bottom_visit_list_view)
- private SupervisoryBottomListView fragment_supervisory_bottom_visit_list_view;
+ private SurveillanceBottomListView fragment_supervisory_bottom_visit_list_view;
@ViewInject(R.id.fragment_supervisory_bottom_attendance_list_view)
- private SupervisoryBottomListView fragment_supervisory_bottom_attendance_list_view;
+ private SurveillanceBottomListView fragment_supervisory_bottom_attendance_list_view;
@ViewInject(R.id.fragment_supervisory_enter_camera)
- VideoView fragment_supervisory_enter_camera;
+ SurfaceView fragment_supervisory_enter_camera;
@ViewInject(R.id.fragment_supervisory_exit_camera)
- VideoView fragment_supervisory_exit_camera;
+ SurfaceView fragment_supervisory_exit_camera;
static boolean useNative = false;
static {
if (useNative) {
+ System.loadLibrary("cvface_api");
+ System.loadLibrary("opencv_java3");
+ System.loadLibrary("protobuf-lite");
+ System.loadLibrary("protobuf");
+ System.loadLibrary("protoc");
System.loadLibrary("rtspface");
RtspFaceNative.init();
}
@@ -56,11 +58,11 @@
return instance;
}
- public SupervisoryBottomListView get_fragment_supervisory_bottom_visit_list_view() {
+ public SurveillanceBottomListView get_fragment_supervisory_bottom_visit_list_view() {
return fragment_supervisory_bottom_visit_list_view;
}
- public SupervisoryBottomListView get_fragment_supervisory_bottom_attendance_list_view() {
+ public SurveillanceBottomListView get_fragment_supervisory_bottom_attendance_list_view() {
return fragment_supervisory_bottom_visit_list_view;
}
@@ -78,16 +80,11 @@
Thread.sleep(2000);
if (useNative) {
RtspFaceNative.setSurface(1, fragment_supervisory_enter_camera.getHolder().getSurface());
- RtspFaceNative.setSurface(2, fragment_supervisory_exit_camera.getHolder().getSurface());
+ //RtspFaceNative.setSurface(2, fragment_supervisory_exit_camera.getHolder().getSurface());
RtspFaceNative.createPlayer(1, "rtsp://admin:admin12345@192.168.1.70:554/h264/ch1/sub/av_stream");
- RtspFaceNative.createPlayer(2, "rtsp://admin:admin12345@192.168.1.70:554/h264/ch1/sub/av_stream");
+ //RtspFaceNative.createPlayer(2, "rtsp://admin:admin12345@192.168.1.70:554/h264/ch1/sub/av_stream");
+ RtspFaceNative.setFaceCallback(1, "cn/com/basic/face/util/RtspFaceNative", "faceCallBack");
} else {
-// fragment_supervisory_enter_camera.setVideoURI(Uri.parse("rtsp://admin:admin12345@192.168.1.70:554/h264/ch1/sub/av_stream"));
-// fragment_supervisory_enter_camera.requestFocus();
-// fragment_supervisory_enter_camera.start();
-// fragment_supervisory_exit_camera.setVideoURI(Uri.parse("rtsp://admin:admin12345@192.168.1.70:554/h264/ch1/main/av_stream"));
-// fragment_supervisory_exit_camera.requestFocus();
-// fragment_supervisory_exit_camera.start();
}
} catch (Exception e) {
e.printStackTrace();
@@ -120,7 +117,7 @@
}
private void reloadBottomList() {
- SurvalanceMng.getInstance().findSupervisoryBottomList(fragment_supervisory_bottom_visitor_radio_button.isChecked());
+ SurveillanceMng.getInstance().findSurveillanceBottomList(fragment_supervisory_bottom_visitor_radio_button.isChecked());
}
}
--
Gitblit v1.8.0