From dcfeed0622eedf60800e9b150ca79dcb4cb9e7b0 Mon Sep 17 00:00:00 2001 From: fiss <2657262686@qq.com> Date: Tue, 15 Aug 2023 19:31:02 +0800 Subject: [PATCH] 代码恢复 --- src/ai_platform/MultiSourceProcess.cpp | 22 ++++++++++------------ src/reprocessing_module/save_snapshot_reprocessing.cpp | 2 +- src/tsl_aiplatform_jni/AiEngineNativeInterface.cpp | 2 +- src/util/JpegUtil.cpp | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/ai_platform/MultiSourceProcess.cpp b/src/ai_platform/MultiSourceProcess.cpp index a8c93de..959703f 100755 --- a/src/ai_platform/MultiSourceProcess.cpp +++ b/src/ai_platform/MultiSourceProcess.cpp @@ -365,16 +365,14 @@ bool CMultiSourceProcess::AddTask(task_param _cur_task_param){ dec->setSnapTimeInterval(frame_stride * 1000); } } - } - - // 测试代码 - // auto task_other_params = m_task_param_manager->get_task_other_params(); - - // const algor_basic_config_param_t *cur_param = - // ((algor_init_config_param_t *)(task_other_params[task_id][algorithm_type_t::FACE_SNAPSHOT]))->basic_param; - - // LOG_INFO("face_snapshot, result_folder: {} result_folder_little: {}", cur_param->result_folder, cur_param->result_folder_little); + // 测试代码 + // auto algor_face = algor_map->find(algorithm_type_t::FACE_SNAPSHOT); + // if(algor_face != algor_map->end()){ + // const algor_basic_config_param_t *cur_param = ((algor_init_config_param_t *)(algor_face->second))->basic_param; + // LOG_INFO("face_snapshot, result_folder: {} result_folder_little: {}", cur_param->result_folder, cur_param->result_folder_little); + // } + } LOG_INFO("started task {} successed!", config.name); @@ -492,11 +490,9 @@ int CMultiSourceProcess::snapshot_task(std::string& uri_or_name, const std::stri delete devMem; devMem = nullptr; - LOG_INFO("snap successed!"); return SUCCESS; } - LOG_ERROR("failed! \n"); return FAILED; } @@ -531,6 +527,8 @@ int CMultiSourceProcess::SnapShot(task_param _cur_task_param) { mq_manager_->publish(mq_type_t::SCREENSHORT_TASK_MQ, json_str.c_str(), true); #endif LOG_INFO("SnapShot task: {} success", task_id); + } else { + LOG_ERROR("SnapShot task: {} failed !", task_id); } return bSnapShot; @@ -1543,7 +1541,7 @@ void CMultiSourceProcess::face_locus_finished(const OBJ_KEY obj_key) { std::to_string(obj_key.obj_id) + "_" + cur_time2 + ".jpg"; #ifdef POST_USE_RABBITMQ - json_str = helpers::gen_json::gen_face_detection_json( obj_key.video_id, obj_key.obj_id, fpath_src, fpath_snapShotLittle, + json_str = helpers::gen_json::gen_face_detection_json( obj_key.video_id, obj_key.obj_id, fpath_snapShotLittle, fpath_src, obj_value.position, obj_value.confidence, obj_value.landmark_point, 25); #endif diff --git a/src/reprocessing_module/save_snapshot_reprocessing.cpp b/src/reprocessing_module/save_snapshot_reprocessing.cpp index e4b69e3..8320145 100755 --- a/src/reprocessing_module/save_snapshot_reprocessing.cpp +++ b/src/reprocessing_module/save_snapshot_reprocessing.cpp @@ -103,7 +103,7 @@ void save_snapshot_reprocessing::save_img_process() { if (callback_ != nullptr && cur_image.json_str.length() > 0) { // LOG_INFO("mq publish process begin"); callback_(cur_image.json_str.c_str()); - // LOG_INFO("mq publish process end: {} ", cur_image.json_str); + LOG_INFO("mq publish process end: {} ", cur_image.json_str); } #endif diff --git a/src/tsl_aiplatform_jni/AiEngineNativeInterface.cpp b/src/tsl_aiplatform_jni/AiEngineNativeInterface.cpp index 473a8e9..3ac5323 100755 --- a/src/tsl_aiplatform_jni/AiEngineNativeInterface.cpp +++ b/src/tsl_aiplatform_jni/AiEngineNativeInterface.cpp @@ -353,7 +353,7 @@ JNIEXPORT jint JNICALL Java_com_objecteye_nativeinterface_TSLAiEngineNativeInter switch (static_cast(algorConfigParam_algorType)) { case algorithm_type_t::FACE_SNAPSHOT: - printf("FACE_SNAPSHOT result_folder: %s result_folder_little: %s \n", algor_basic_param->result_folder, algor_basic_param->result_folder_little); + // printf("FACE_SNAPSHOT result_folder: %s result_folder_little: %s \n", algor_basic_param->result_folder, algor_basic_param->result_folder_little); case algorithm_type_t::HUMAN_SNAPSHOT: case algorithm_type_t::VEHICLE_SNAPSHOT: case algorithm_type_t::NONMOTOR_VEHICLE_SNAPSHOT: { diff --git a/src/util/JpegUtil.cpp b/src/util/JpegUtil.cpp index 0c26d43..b47fbc5 100755 --- a/src/util/JpegUtil.cpp +++ b/src/util/JpegUtil.cpp @@ -64,7 +64,7 @@ int32_t JpegUtil::jpege_save(char* pcData , uint32_t dataLen, string out_file_na FILE* fd = nullptr; fd = fopen(out_file_name.c_str(), "wb"); if (fd == nullptr) { - LOG_ERROR("open output file err\n"); + LOG_ERROR("open output file err"); return 1; } -- libgit2 0.21.4