From 57f4beda05af74121089de4d94a6c169e4a0ad77 Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期四, 20 四月 2017 10:28:08 +0800
Subject: [PATCH]
---
VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
index d5ba2a2..0d9f851 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/CameraWrapper.h
@@ -1,11 +1,15 @@
#ifndef __CameraWrapper_H__
#define __CameraWrapper_H__
+#define MAX_FACE 5
+#define MAX_FACE_WIDTH 240
+#define MAX_FACE_HEIGHT 320
#include "FaceCache.h"
#include <PipeLine.h>
#include <PL_RTSPClient.h>
#include <PL_AndroidMediaCodecDecoder.h>
+#include <PL_AndroidSurfaceViewRender.h>
#include <PL_SensetimeFaceTrack.h>
//#include "looper.h"
@@ -13,11 +17,7 @@
#include <media/NdkMediaCodec.h>
#include <pthread.h>
-
-#define MAX_FACE 5
-#define MAX_FACE_WIDTH 240
-#define MAX_FACE_HEIGHT 320
-#define USE_ST_SDK
+#include <jni.h>
class CameraWrapper
{
@@ -25,11 +25,15 @@
PipeLine* pipeLine;
PL_RTSPClient_Config rtspConfig;
- PL_AndroidMediaCodecDecoder_Config amcdConfig;
- SensetimeFaceTrackConfig sftConfig;
-
+ PL_AndroidMediaCodecDecoder_Config amcdConfig;
+ PL_AndroidSurfaceViewRender_Config asvrConfig;
+ SensetimeFaceTrackConfig sftConfig;
+
int cameraIdx;
- jmethodID faceCallback;
+ JavaVM* javaVM;
+ JNIEnv* javaEnv;
+ jclass faceCallbackClazz;
+ jmethodID faceCallbackFunc;
ANativeWindow* window;
pthread_t live_daemon_thid;
@@ -39,8 +43,8 @@
FaceCache faceCache;
CameraWrapper() :
- pipeLine(nullptr), rtspConfig(), amcdConfig(), sftConfig(),
- cameraIdx(0), faceCallback(0), window(nullptr),
+ pipeLine(nullptr), rtspConfig(), amcdConfig(), sftConfig(), asvrConfig(),
+ cameraIdx(0), javaVM(nullptr), javaEnv(nullptr), faceCallbackClazz(0), faceCallbackFunc(0), window(nullptr),
live_daemon_thid(0), running(false),
faceCacheLocked(false), faceCache()
{
--
Gitblit v1.8.0