From 9e5babf9db52e64bdae60137be7696e56241fca6 Mon Sep 17 00:00:00 2001
From: xingzilong <xingzilong@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期五, 18 八月 2017 18:12:17 +0800
Subject: [PATCH] H264 NALU解析  并在RTSPServer判断

---
 VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp |   34 ++++++++--------------------------
 1 files changed, 8 insertions(+), 26 deletions(-)

diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp
index 623fdc0..ad5210f 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp
@@ -5,37 +5,20 @@
 #include "RemoteFuncClient.h"
 #include "RemoteFunc.h"
 #include "RtspNativeCodecJNIClient.h"
+#include "AppConfig.h"
 
 #include <string>
 #include <iostream>
 using namespace std;
 
-//#todo 淇敼鏈嶅姟绾跨▼鏋勯�犲弬鏁颁紶鍏ユ柟寮�
-RemoteServer<RtspFaceDetectImpl> remoteServer("192.168.1.97", 8111);
+AppConfig config("data/config.cfg");
+RemoteServer<RtspFaceDetectImpl> remoteServer(config.getStringValue("local_ip"), config.getIntValue("local_port"));
+//RemoteServer<RtspFaceDetectImpl> remoteServer("192.168.1.97", 8111);
 static RtspFaceViewClient* rtspFaceViewClient = nullptr;
 
 void startRemoteServer()
 {
-	LOG_ERROR << "pansen : this is clinet" << std::endl;
 	remoteServer.start();
-
-    //#todo 璋冪敤浣嶇疆绉诲姩
-//    try
-//    {
-//        RtspFaceViewClient rtspFaceViewClient = RtspFaceViewClient();
-//        RtspFaceView::Client& rClient = rtspFaceViewClient.getClient();
-//
-//        auto& waitScope = rtspFaceViewClient.getWaitScope();
-//        //auto  request = rClient.abcdef();
-//       // auto sendAct = request.send();
-//       // sendAct.wait(waitScope);
-//    }
-//    catch (const kj::Exception& e)
-//    {
-//        cout << e.getDescription().cStr() << endl;
-//        return;
-//    }
-    //#end
 }
 
 RtspFaceViewClient * getRtspFaceViewClient()
@@ -76,9 +59,8 @@
     if (rpcClient == nullptr) {
         try
         {
-            //#todo ip modify
-            rpcClient = new capnp::EzRpcClient("192.168.1.94", 8112);
-            //rpcClient = new capnp::EzRpcClient("192.168.1.71", 8112);
+            //rpcClient = new capnp::EzRpcClient("192.168.1.116", 8112);
+            rpcClient = new capnp::EzRpcClient(config.getStringValue("server_ip"), config.getIntValue("server_port"));
         }
         catch (const kj::Exception& e)
         {
@@ -93,8 +75,8 @@
 ::kj::Promise<void> RtspFaceDetectImpl::fireFaceCountListener(FireFaceCountListenerContext context)
 {
 	auto results = context.getResults();
-    LOG_ERROR << "!!!!!!!!!!!!!!!!!!!!!WHO  find face!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << LOG_ENDL;
+    LOG_ERROR << "!!!!!!!!!!!!!!!!!!!!!WHO  find face!!!!!!!" << LOG_ENDL;
 	remoteFireFaceCountListener(context.getParams(), results);
-    context.setResults(results);
+    //context.setResults(results);
     return kj::READY_NOW;
 }

--
Gitblit v1.8.0