| | |
| | | |
| | | 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.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 { |
| | | |
| | |
| | | @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; |
| | | @ViewInject(R.id.fragment_supervisory_exit_camera) |
| | |
| | | |
| | | 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(); |
| | | } |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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(); |
| | |
| | | } |
| | | |
| | | private void reloadBottomList() { |
| | | SurvalanceMng.getInstance().findSupervisoryBottomList(fragment_supervisory_bottom_visitor_radio_button.isChecked()); |
| | | SurveillanceMng.getInstance().findSurveillanceBottomList(fragment_supervisory_bottom_visitor_radio_button.isChecked()); |
| | | } |
| | | |
| | | } |