From d83474582773ba7fa0993472329013471eadef22 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期一, 17 四月 2017 17:13:37 +0800
Subject: [PATCH] update librtspface.so
---
VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp | 38 +++++++++++++++++++++++++++++---------
1 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
index 69836e8..272d6f9 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/RtspNativeCodecJNI.cpp
@@ -23,9 +23,6 @@
void Java_cn_com_basic_face_util_RtspFaceNative_init(JNIEnv *env, jclass clazz)
{
g_logger.set_level(VERBOSE);
-
- PipeLine::register_global_elem_creator("PL_RTSPClient", create_PL_RTSPClient);
- PipeLine::register_global_elem_creator("PL_AndroidMediaCodecDecoder", create_PL_AndroidMediaCodecDecoder);
#ifdef USE_ST_SDK
PipeLine::register_global_elem_creator("PL_SensetimeFaceTrack", create_PL_SensetimeFaceTrack);
@@ -38,6 +35,20 @@
g_CameraWrappers[i].pipeLine = new PipeLine;
PipeLine& pipeLine(*(g_CameraWrappers[i].pipeLine));
}
+}
+
+void Java_cn_com_basic_face_util_RtspFaceNative_setLocalIP(JNIEnv *env, jclass clazz, jstring ipaddr)
+{
+ LOG_DEBUG << "@@@ Java_cn_com_basic_face_util_RtspFaceNative_setLocalIP" << LOG_ENDL;
+
+ const char *utf8 = env->GetStringUTFChars(ipaddr, NULL);
+ for (size_t i = 0; i < CAMERA_COUNT; i++)
+ {
+ g_CameraWrappers[i].rtspConfig.receivingInterfaceAddr = utf8;
+ g_CameraWrappers[i].rtspConfig.desiredPortNum = 10056 + i * 3;
+ g_CameraWrappers[i].rtspConfig.requestStreamingOverTcp = true;
+ }
+ env->ReleaseStringUTFChars(ipaddr, utf8);
}
// set the surface
@@ -81,23 +92,32 @@
{
cameraWrapper.amcdConfig.ak_mime = "video/avc";
- cameraWrapper.amcdConfig.ak_width = 1920;
- cameraWrapper.amcdConfig.ak_height = 1080;
- cameraWrapper.amcdConfig.windowSurface = cameraWrapper.window = nullptr;//#todo
+ cameraWrapper.amcdConfig.ak_width = 640;
+ cameraWrapper.amcdConfig.ak_height = 480;
+ cameraWrapper.amcdConfig.windowSurface = nullptr; // cameraWrapper.window
cameraWrapper.amcdConfig.releaseOutputBuffIdx = true;
cameraWrapper.amcdConfig.generateDecodedDataPerFrame = 1;
+ cameraWrapper.amcdConfig.renderFromOutputBuffIdx = false;//true
+ cameraWrapper.amcdConfig.renderFromOutputBuff = false;
#ifndef USE_ST_SDK
cameraWrapper.amcdConfig.releaseOutputBuffIdxInPay = true;
#endif
}
-
- {
+
+ {
+ cameraWrapper.asvrConfig.windowSurface = cameraWrapper.window;
+ cameraWrapper.asvrConfig.outputOriginFrame = true;
+ cameraWrapper.asvrConfig.outputRenderFrame = true;
+ }
+
+ {
cameraWrapper.sftConfig.point_size = 21;
cameraWrapper.sftConfig.detect_face_cnt_limit = MAX_FACE;
cameraWrapper.sftConfig.draw_face_rect = false;
cameraWrapper.sftConfig.draw_face_feature_point = false;
cameraWrapper.sftConfig.generate_face_feature = true;
- }
+ cameraWrapper.sftConfig.doTrackPerFrame = 50;
+ }
bool ret = cameraWrapper.initPl();
if (ret)
--
Gitblit v1.8.0