#ifndef __CameraWrapper_H__ #define __CameraWrapper_H__ #define MAX_FACE 5 #define MAX_FACE_WIDTH 240 #define MAX_FACE_HEIGHT 320 #include "FaceCache.h" #include #include #include #include #include //#include "looper.h" #include #include #include #include class CameraWrapper { public: PipeLine* pipeLine; PL_RTSPClient_Config rtspConfig; PL_AndroidMediaCodecDecoder_Config amcdConfig; PL_AndroidSurfaceViewRender_Config asvrConfig; SensetimeFaceTrackConfig sftConfig; int cameraIdx; JavaVM* javaVM; JNIEnv* javaEnv; jclass faceCallbackClazz; jmethodID faceCallbackFunc; void* windowRender; void* windowDecode; pthread_t live_daemon_thid; bool running; bool faceCacheLocked; FaceCache faceCache; CameraWrapper() : pipeLine(nullptr), rtspConfig(), amcdConfig(), sftConfig(), asvrConfig(), cameraIdx(0), javaVM(nullptr), javaEnv(nullptr), faceCallbackClazz(0), faceCallbackFunc(0), windowRender(nullptr), windowDecode(nullptr), live_daemon_thid(0), running(false), faceCacheLocked(false), faceCache() { } ~CameraWrapper(); bool start(); void stop(); bool initPl(); void lockFace(); void releaseFace(); private: static void* live_daemon_thd(void* arg); }; #endif