From 25a195317c4b503b26db8493234fbd5ca513ce2a Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期一, 17 七月 2017 17:21:33 +0800
Subject: [PATCH]
---
VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h | 34 +++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
index 649caf5..8bb9f05 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
@@ -11,6 +11,8 @@
#include <PL_AndroidMediaCodecDecoder.h>
#include <PL_AndroidSurfaceViewRender.h>
#include <PL_SensetimeFaceTrack.h>
+#include <PL_Paint.h>
+#include <PL_Queue.h>
//#include "looper.h"
#include <android/native_window_jni.h>
@@ -22,9 +24,13 @@
class CameraWrapper
{
public:
- PipeLine* pipeLine;
-
- PL_RTSPClient_Config rtspConfig;
+ PipeLine* pipeLineDecoderDetector;
+ PipeLine* pipeLineAnalyzer;
+ PipeLine* pipeLineRender;
+
+ PL_Queue* queueFrame;
+
+ PL_RTSPClient_Config rtspConfig;
PL_AndroidMediaCodecDecoder_Config amcdConfig;
PL_AndroidSurfaceViewRender_Config asvrConfig;
SensetimeFaceTrackConfig sftConfig;
@@ -37,17 +43,24 @@
void* windowRender;
void* windowDecode;
- pthread_t live_daemon_thid;
+ pthread_t decoder_thid;
+ pthread_t analyzer_thid;
bool running;
bool faceCacheLocked;
- FaceCache faceCache;
+ //FaceCache faceCache;
+ FaceCacheForPLBG faceCache;
+
+ PLPLContext plplContext;
+
+ std::map<int, std::string> faceLabels;
CameraWrapper() :
- pipeLine(nullptr), rtspConfig(), amcdConfig(), sftConfig(), asvrConfig(),
+ 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),
- faceCacheLocked(false), faceCache()
+ decoder_thid(0), analyzer_thid(0), running(false),
+ faceCacheLocked(false), faceCache(),
+ plplContext(), faceLabels()
{
}
@@ -60,8 +73,11 @@
void lockFace();
void releaseFace();
+ void setFaceLabel(int st_track_id, const std::string& 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