From 1eb1ffa329352dbbd4c5d6cf3e1ef08272e31957 Mon Sep 17 00:00:00 2001 From: chenke <chenke@454eff88-639b-444f-9e54-f578c98de674> Date: 星期四, 20 七月 2017 13:40:59 +0800 Subject: [PATCH] 缩放和中文字体稳定版,NV12转RGB565功能正常 --- VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h index 1ea6201..bb8ad6b 100644 --- a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h +++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h @@ -12,6 +12,8 @@ #include <PL_AndroidSurfaceViewRender.h> #include <PL_SensetimeFaceTrack.h> #include <PL_Paint.h> +#include <PL_Scale.h> +#include <PL_Queue.h> //#include "looper.h" #include <android/native_window_jni.h> @@ -27,10 +29,13 @@ PipeLine* pipeLineAnalyzer; PipeLine* pipeLineRender; - PL_RTSPClient_Config rtspConfig; + PL_Queue* queueFrame; + + PL_RTSPClient_Config rtspConfig; PL_AndroidMediaCodecDecoder_Config amcdConfig; PL_AndroidSurfaceViewRender_Config asvrConfig; SensetimeFaceTrackConfig sftConfig; + PL_Scale_Config plScaleCfg; int cameraIdx; JavaVM* javaVM; @@ -40,7 +45,8 @@ void* windowRender; void* windowDecode; - pthread_t live_daemon_thid; + pthread_t decoder_thid; + pthread_t analyzer_thid; bool running; bool faceCacheLocked; @@ -49,12 +55,14 @@ PLPLContext plplContext; + std::map<int, std::wstring> faceLabels; + CameraWrapper() : - pipeLineDecoderDetector(nullptr), pipeLineAnalyzer(nullptr), pipeLineRender(nullptr), rtspConfig(), amcdConfig(), asvrConfig(), sftConfig(), + pipeLineDecoderDetector(nullptr), pipeLineAnalyzer(nullptr), pipeLineRender(nullptr), queueFrame(nullptr), rtspConfig(), amcdConfig(), asvrConfig(), sftConfig(), cameraIdx(0), javaVM(nullptr), javaEnv(nullptr), faceCallbackClazz(0), faceCallbackFunc(0), windowRender(nullptr), windowDecode(nullptr), - live_daemon_thid(0), running(false), + decoder_thid(0), analyzer_thid(0), running(false), faceCacheLocked(false), faceCache(), - plplContext() + plplContext(), faceLabels() { } @@ -67,8 +75,11 @@ void lockFace(); void releaseFace(); + void setFaceLabel(int st_track_id, const std::wstring& label); + private: - static void* live_daemon_thd(void* arg); + static void* decoder_thd(void *arg); + static void* analyzer_thd(void *arg); }; #endif -- Gitblit v1.8.0