| | |
| | | #include "RtspNativeCodecJNI.h" |
| | | #include "CameraWrapper.h" |
| | | #include "CaptureCamera.h" |
| | | #include <logger.h> |
| | | #include <Logger/src/logger.hpp> |
| | | |
| | |
| | | static std::string g_stface_license_str; |
| | | |
| | | CameraWrapper g_CameraWrappers[CAMERA_COUNT]; |
| | | |
| | | CaptureCamera g_CaptureCamera; |
| | | |
| | | extern "C" |
| | | { |
| | |
| | | } |
| | | else if (cameraWrapper.rtspConfig.rtspURL.find("/h264_2") != std::string::npos) |
| | | { |
| | | w=640;h=480; |
| | | w=800;h=600; |
| | | } |
| | | else if (cameraWrapper.rtspConfig.rtspURL.find("/h264") != std::string::npos) |
| | | { |
| | |
| | | evpHeader->size = sizeof(EVPHeader) + sizeof(FDP_FaceDetectPB) + buffSize; |
| | | buffSize = evpHeader->size; |
| | | |
| | | FDP_FaceDetectPB* fdpFaceDetectPB = new (buffer + sizeof(EVPHeader)) FDP_FaceDetectPB(dbId); |
| | | FDP_FaceDetectPB* fdpFaceDetectPB = new (buffer + sizeof(EVPHeader)) FDP_FaceDetectPB(dbId, cameraIdx + 1); |
| | | |
| | | evpHeader->hton(); |
| | | fdpFaceDetectPB->hton(); |
| | |
| | | //LOG_ERROR << g_stface_license_str << LOG_ERROR; |
| | | } |
| | | |
| | | void Java_cn_com_basic_face_util_RtspFaceNative_setCaptureSurface(JNIEnv *env, jclass clazz, jobject surfaceCapture) |
| | | { |
| | | if (g_CaptureCamera.windowRender != nullptr) |
| | | { |
| | | ANativeWindow_release((ANativeWindow*)(g_CaptureCamera.windowRender)); |
| | | g_CaptureCamera.windowRender = NULL; |
| | | } |
| | | g_CaptureCamera.windowRender = ANativeWindow_fromSurface(env, surfaceCapture); |
| | | } |
| | | |
| | | bool Java_cn_com_basic_face_util_RtspFaceNative_startCapturePlayer(JNIEnv *env, jclass clazz, jstring uri) |
| | | { |
| | | std::string _uri; |
| | | { |
| | | const char *utfFunc = env->GetStringUTFChars(uri, NULL); |
| | | _uri = utfFunc; |
| | | env->ReleaseStringUTFChars(uri, utfFunc); |
| | | } |
| | | |
| | | if (_uri.empty()) |
| | | return false; |
| | | if (g_CaptureCamera.windowRender == nullptr) |
| | | return false; |
| | | |
| | | g_CaptureCamera.cameraUri = _uri; |
| | | return g_CaptureCamera.start(); |
| | | } |
| | | |
| | | void Java_cn_com_basic_face_util_RtspFaceNative_stopCapturePlayer(JNIEnv *env, jclass clazz) |
| | | { |
| | | |
| | | } |
| | | |
| | | jobject Java_cn_com_basic_face_util_RtspFaceNative_getCaptureImages(JNIEnv* env, jclass clazz) |
| | | { |
| | | |
| | | } |
| | | |
| | | } |