From eb69d9c33b307bfc2d6c7f46a210f98c5fa306c5 Mon Sep 17 00:00:00 2001 From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674> Date: 星期五, 11 八月 2017 14:31:01 +0800 Subject: [PATCH] bug fix for client --- VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp index 14c401b..8d0cd6d 100644 --- a/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp +++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/RemoteFuncClient.cpp @@ -7,16 +7,28 @@ #include "RtspNativeCodecJNIClient.h" RemoteServer<RtspFaceDetectImpl> remoteServer("127.0.0.1", 8111); +static RtspFaceViewClient* rtspFaceViewClient = nullptr; void startRemoteServer() { remoteServer.start(); } -RtspFaceViewClient rtspFaceViewClient; - -RtspFaceViewClient &RtspFaceViewClient() +RtspFaceViewClient* getRtspFaceViewClient() { + if (rtspFaceViewClient != nullptr) + { + try + { + rtspFaceViewClient = new RtspFaceViewClient; + } + catch(...) + { + delete rtspFaceViewClient; + rtspFaceViewClient = nullptr; + LOG_ERROR << "aaaaaaaa"<<LOG_ENDL;//#todo + } + } return rtspFaceViewClient; } -- Gitblit v1.8.0