From e09e9f8a34cbc99a33dfa9ef1792b0025575c3a8 Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 01 八月 2017 11:41:19 +0800
Subject: [PATCH] 

---
 VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
index b0bb8e1..540437c 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
@@ -15,6 +15,7 @@
 #include <face_daemon_proto.h>
 
 #include <stdlib.h>
+#include <endian.h>
 
 #include "DebugNetwork.h"
 #include "TeleWrapper.h"
@@ -46,7 +47,7 @@
     cpu_sched();
 
 #ifdef USE_ST_SDK
-    PipeLine::register_global_elem_creator("PL_SensetimeFaceTrack", create_PL_SensetimeFaceTrack);
+    PipeLine::register_global_elem_creator("PL_SensetimeFaceTrackMitiTrd", create_PL_SensetimeFaceTrackMultiTrd);
 #endif
 
     for (size_t i = 0; i < CAMERA_COUNT; i++)
@@ -58,6 +59,8 @@
         g_CameraWrappers[i].pipeLineRender = new PipeLine;
         //PipeLine& pipeLine(*(g_CameraWrappers[i].pipeLineDecoderDetector));
     }
+
+    g_TeleWrapper.start();
 }
 
 void
@@ -790,13 +793,16 @@
     assert(cameraIdx > 0 && cameraIdx <= CAMERA_COUNT);
     cameraIdx -= 1;
     CameraWrapper &cameraWrapper(g_CameraWrappers[cameraIdx]);
+    const jchar* jchars = env->GetStringChars(label, nullptr);
+    std::wstring wstr;
+    int lenth = env->GetStringLength(label);
 
-    const char *utfChars = env->GetStringUTFChars(label, NULL);
-    std::string labelstr(utfChars);
-    std::wstring wlabelstr;
-    wlabelstr.assign(labelstr.begin(), labelstr.end());
-    env->ReleaseStringUTFChars(label, utfChars);
-    cameraWrapper.setFaceLabel(stTrackId, wlabelstr);
+    for (int i = 0; i < lenth; ++i) {
+        jchar jc = *(jchars + i);
+        wchar_t wt = (wchar_t)jc;
+        wstr.push_back(wt);
+    }
+    env->ReleaseStringChars(label,jchars);
+    cameraWrapper.setFaceLabel(stTrackId, wstr);
 }
-
 } // extern C

--
Gitblit v1.8.0