From e26a5550539fa0cad91313bf9670df605199a324 Mon Sep 17 00:00:00 2001
From: pans <pans@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 15 八月 2017 13:55:25 +0800
Subject: [PATCH] capnproto fix bug

---
 VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNIServer.cpp |   57 +++++++++++++++++++++++++++++++++------------------------
 1 files changed, 33 insertions(+), 24 deletions(-)

diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNIServer.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNIServer.cpp
index 83738bc..4e272dc 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNIServer.cpp
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNIServer.cpp
@@ -20,6 +20,7 @@
 #include "TeleWrapper.h"
 
 #include "cpu_sched_test.h"
+#include "RemoteFuncServer.h"
 
 //#include <mediastreamer2/include/mediastreamer2/msjava.h>
 
@@ -57,6 +58,7 @@
     memcpy(imgIndexData.begin(), imgIdxes.data(), imgIdxesSize);
     auto imgData = results.initImgData(_faceImagesSize);
     memcpy(imgData.begin(), _faceImages, _faceImagesSize);
+    LOG_ERROR <<"c++ server : remoteGetFaceListImage!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<< LOG_ENDL;
 }
 
 void remoteGetFaceList(const RtspFaceView::GetFaceListParams::Reader& params, RtspFaceView::GetFaceListResults::Builder& results){
@@ -80,9 +82,13 @@
 
 void Java_cn_com_basic_face_util_RtspFaceNative_init(JNIEnv *env, jclass clazz)
 {
-    g_logger.set_level(INFO);
+    g_logger.set_level(VERBOSE);
 
     cpu_sched();
+
+#ifdef USE_ST_SDK
+    PipeLine::register_global_elem_creator("PL_SensetimeFaceTrackMitiTrd", create_PL_SensetimeFaceTrackMultiTrd);
+#endif
 
     for (size_t i = 0; i < CAMERA_COUNT; i++)
     {
@@ -94,6 +100,9 @@
     }
 
     g_TeleWrapper.start();
+
+    startRemoteServer();
+    LOG_ERROR << "@@@ this is test Server end" << LOG_ENDL;
 }
 
 void
@@ -354,8 +363,8 @@
         cameraWrapper.asvrConfig.outputOriginFrame = true;
         cameraWrapper.asvrConfig.outputRenderFrame = true;
         cameraWrapper.asvrConfig.scaleToWidth = 0;
-		cameraWrapper.asvrConfig.scaleToHeight = 0;
-		cameraWrapper.asvrConfig.directlyDisplay = true;
+        cameraWrapper.asvrConfig.scaleToHeight = 0;
+        cameraWrapper.asvrConfig.directlyDisplay = true;
     }
 
     {
@@ -374,9 +383,9 @@
         cameraWrapper.sftConfig.score_min = 0.4f;
     }
 
-	cameraWrapper.fontPath = "/data/msyh.ttc";
+    cameraWrapper.fontPath = "/data/msyh.ttc";
 
-	bool ret = cameraWrapper.initPl();
+    bool ret = cameraWrapper.initPl();
     if (ret)
         return (cameraWrapper.start() ? JNI_TRUE : JNI_FALSE);
     else
@@ -594,34 +603,34 @@
 
 bool Java_cn_com_basic_face_util_RtspFaceNative_teleCall(JNIEnv *env, jclass clazz, jstring phone)
 {
-	std::string _phone;
-	{
-		const char *utfFunc = env->GetStringUTFChars(phone, NULL);
-		_phone = utfFunc;
-		env->ReleaseStringUTFChars(phone, utfFunc);
-	}
+    std::string _phone;
+    {
+        const char *utfFunc = env->GetStringUTFChars(phone, NULL);
+        _phone = utfFunc;
+        env->ReleaseStringUTFChars(phone, utfFunc);
+    }
 
-	const char *phoneNum = _phone.c_str();
-	TeleTask  task;
-	task.command= TeleTask::CALL;
-	task.param = phoneNum;
-	LOG_INFO << "Java_cn_com_basic_face_util_RtspFaceNative_telCall::jni" << LOG_ENDL;
-	//
-	g_TeleWrapper.pushTask(task);
+    const char *phoneNum = _phone.c_str();
+    TeleTask  task;
+    task.command= TeleTask::CALL;
+    task.param = phoneNum;
+    LOG_INFO << "Java_cn_com_basic_face_util_RtspFaceNative_telCall::jni" << LOG_ENDL;
+    //
+    g_TeleWrapper.pushTask(task);
 }
 
 void Java_cn_com_basic_face_util_RtspFaceNative_teleHang(JNIEnv *env, jclass clazz)
 {
-	TeleTask  task;
-	task.command =TeleTask::HANGUP;
-	//
-	g_TeleWrapper.pushTask(task);
+    TeleTask  task;
+    task.command =TeleTask::HANGUP;
+    //
+    g_TeleWrapper.pushTask(task);
 }
 
 void Java_cn_com_basic_face_util_RtspFaceNative_teleShutdown(JNIEnv *env, jclass clazz)
 {
-	LOG_DEBUG << "@@@ Java_cn_com_basic_face_util_RtspFaceNative_telShutdown" << LOG_ENDL;
-	g_TeleWrapper.stop();
+    LOG_DEBUG << "@@@ Java_cn_com_basic_face_util_RtspFaceNative_telShutdown" << LOG_ENDL;
+    g_TeleWrapper.stop();
 }
 
 void Java_cn_com_basic_face_util_RtspFaceNative_setFaceLabel(JNIEnv *env, jclass clazz, jint cameraIdx, jint stTrackId, jstring label)

--
Gitblit v1.8.0