From 4b914a5d7e3d7971cb3e3ed49047fa331bd74da3 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 13 六月 2017 17:19:34 +0800
Subject: [PATCH] milestone 1

---
 VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h |   38 ++++++++++++++++++++++++++------------
 1 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
index 9e41b51..1ea6201 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
@@ -9,38 +9,52 @@
 #include <PipeLine.h>
 #include <PL_RTSPClient.h>
 #include <PL_AndroidMediaCodecDecoder.h>
+#include <PL_AndroidSurfaceViewRender.h>
 #include <PL_SensetimeFaceTrack.h>
+#include <PL_Paint.h>
 
 //#include "looper.h"
 #include <android/native_window_jni.h>
 #include <media/NdkMediaCodec.h>
 
 #include <pthread.h>
+#include <jni.h>
 
 class CameraWrapper
 {
 public:
-	PipeLine* pipeLine;
-	
+	PipeLine* pipeLineDecoderDetector;
+	PipeLine* pipeLineAnalyzer;
+	PipeLine* pipeLineRender;
+
 	PL_RTSPClient_Config rtspConfig;
-	PL_AndroidMediaCodecDecoder_Config amcdConfig;
-	SensetimeFaceTrackConfig sftConfig;
-	
+    PL_AndroidMediaCodecDecoder_Config amcdConfig;
+    PL_AndroidSurfaceViewRender_Config asvrConfig;
+    SensetimeFaceTrackConfig sftConfig;
+
 	int cameraIdx;
-	jmethodID faceCallback;
-	ANativeWindow* window;
-	
+    JavaVM* javaVM;
+    JNIEnv* javaEnv;
+	jclass faceCallbackClazz;
+	jmethodID faceCallbackFunc;
+	void* windowRender;
+	void* windowDecode;
+
 	pthread_t live_daemon_thid;
 	bool running;
 	
 	bool faceCacheLocked;
-	FaceCache faceCache;
+    //FaceCache faceCache;
+    FaceCacheForPLBG faceCache;
+
+	PLPLContext plplContext;
 
 	CameraWrapper() : 
-		pipeLine(nullptr), rtspConfig(), amcdConfig(), sftConfig(), 
-		cameraIdx(0), faceCallback(0), window(nullptr), 
+		pipeLineDecoderDetector(nullptr), pipeLineAnalyzer(nullptr), pipeLineRender(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()
+		faceCacheLocked(false), faceCache(),
+		plplContext()
 	{
 	}
 	

--
Gitblit v1.8.0