Преглед на файлове

Z991239-6004 #comment 脸部跟踪实体日志优化

80274480 преди 10 месеца
родител
ревизия
24cff3037e
променени са 2 файла, в които са добавени 15 реда и са изтрити 16 реда
  1. 9 10
      Other/win/libfacecapture/libfacecapture.cpp
  2. 6 6
      Other/win/libvideoframework/videortp.c

+ 9 - 10
Other/win/libfacecapture/libfacecapture.cpp

@@ -1912,7 +1912,6 @@ private:
 		//select camera
 		if (m_pOperatorVideoQueue != NULL)
 		{
-			m_pHostApi->Debug(FACECAP_DEBUG, "m_pOperatorVideoQueue != NULL.");
 			m_eCamera = (CameraEnum)m_stFaceConfig.nPrimCamera;
 		}
 		else
@@ -1952,7 +1951,7 @@ private:
 				//if no people,start motion tracker
 				if(NoBody == m_eMonitorState)
 				{
-					m_pHostApi->Debug(FACECAP_INFO, "NoBody");
+					m_pHostApi->Debug(FACECAP_DEBUG, "NoBody");
 					////if no people,start motion tracker
 					//bRst =  MotionTrack(m_eCamera,m_stFaceConfig.nThresholdNum);	
 					//if (!bRst)
@@ -2037,7 +2036,7 @@ private:
 				}
 				else if (SomebodyFar == m_eMonitorState) //if somebody space 2.5m
 				{
-					m_pHostApi->Debug(FACECAP_INFO, "SomebodyFar");
+					m_pHostApi->Debug(FACECAP_DEBUG, "SomebodyFar");
 					//RecordError("Enter far distance search Face ");
 					bRst = GetImage(m_eCamera);
 					if (bRst)
@@ -2069,7 +2068,7 @@ private:
 				}
 				else if (SomebodyClose == m_eMonitorState) //close distance,1.5m
 				{
-					m_pHostApi->Debug(FACECAP_INFO, "SomebodyClose");
+					m_pHostApi->Debug(FACECAP_DEBUG, "SomebodyClose");
 					//RecordError("close distance,search Face by operatorCamera");
 					bRst = FaceDetect(m_eCamera);
 					if(!bRst)
@@ -2090,7 +2089,7 @@ private:
 									SetUpperbodyToCenter();								
 									m_eMonitorState = NoBody;
 									m_pHostEvent->GenerateLeaveEvent();
-									m_pHostApi->Debug(FACECAP_INFO, "客户离开!");
+									m_pHostApi->Debug(FACECAP_DEBUG, "客户离开!");
 									nSearchFailNum = 0;
 									FSleep(m_stFaceConfig.nSleepLong);
 								}
@@ -2118,7 +2117,7 @@ private:
 								SetUpperbodyToCenter();
 								m_eMonitorState = NoBody;
 								m_pHostEvent->GenerateLeaveEvent();
-								m_pHostApi->Debug(FACECAP_INFO, "客户离开!");
+								m_pHostApi->Debug(FACECAP_DEBUG, "客户离开!");
 								nSearchFailNum = 0;
 								FSleep(m_stFaceConfig.nSleepLong);
 							}
@@ -2165,7 +2164,7 @@ private:
 				}
 				else if (SomebodyOperate == m_eMonitorState)	//当有人进入操作距离时
 				{
-					m_pHostApi->Debug(FACECAP_INFO, "SomebodyOperate");
+					m_pHostApi->Debug(FACECAP_DEBUG, "SomebodyOperate");
 					//如果是双相机模式
 					if (m_pOperatorVideoQueue != NULL)
 					{
@@ -2291,7 +2290,7 @@ private:
 									m_eMonitorState = SomebodyClose;
 									m_stAllFaceInfo.astFaceInfo[0].eScene = UnLockScene;
 									m_pHostEvent->GenerateLoseFaceEvent();  //发送失去人脸事件
-									m_pHostApi->Debug(FACECAP_INFO, "人脸失去锁定!");
+									m_pHostApi->Debug(FACECAP_DEBUG, "人脸失去锁定!");
 									nDetectFailNum = 0;
 								}
 								FSleep(m_stFaceConfig.nSleepShort);
@@ -2306,7 +2305,7 @@ private:
 								m_eMonitorState = SomebodyClose;
 								m_stAllFaceInfo.astFaceInfo[0].eScene = UnLockScene;
 								m_pHostEvent->GenerateLoseFaceEvent();  //发送失去人脸事件
-								m_pHostApi->Debug(FACECAP_INFO, "人脸失去锁定!");
+								m_pHostApi->Debug(FACECAP_DEBUG, "人脸失去锁定!");
 								nDetectFailNum = 0;
 							}
 							FSleep(m_stFaceConfig.nSleepShort);
@@ -2334,7 +2333,7 @@ private:
 				   m_pHostApi->Debug(FACECAP_INFO, "opencv library breakdown!");
 				}
 				Sleep(3*m_stFaceConfig.nSleepShort);
-				m_pHostApi->Debug(FACECAP_DEBUG, "****** stop Video Monitor ********");
+				m_pHostApi->Debug(FACECAP_DEBUG, "stop Video Monitor");
 			}
 		} 
 		return 0;

+ 6 - 6
Other/win/libvideoframework/videortp.c

@@ -2258,7 +2258,7 @@ void videortp_stop(videortp_t* vrtp)
 				vrtp->recv_threadid = 0;
 			}
 			else {
-				rtpDbg(vrtp, "%s:%d vrtp receive thread thread join failed for %s.", __FUNCTION__, __LINE__, strerror(errno));
+				rtpDbg(vrtp, "vrtp receive thread thread join failed for %s.", strerror(errno));
 			}
 		}
 		sem_destroy(&vrtp->sem_evt);
@@ -2277,7 +2277,7 @@ int videortp_send_frame(videortp_t *vrtp, const video_frame *frame)
 		int64_t now;
 
 		if(DEBUG_TX){
-			rtpDbg(vrtp,"%s:%d: videortp_send_frame width: %d height: %d format: %d.", __FILE__, __LINE__, frame->width, frame->height, frame->format);
+			rtpDbg(vrtp,"videortp_send_frame width: %d height: %d format: %d.", frame->width, frame->height, frame->format);
 		}
 		
 		if (VIDEO_FORMAT_RGB24 != frame->format)
@@ -2295,7 +2295,7 @@ int videortp_send_frame(videortp_t *vrtp, const video_frame *frame)
 			vrtp->force_key_frames = 0;
 
 			if(DEBUG_TX){
-				rtpDbg(vrtp,"%s:%d: videortp_send_frame force_key_frames.", __FILE__, __LINE__);
+				rtpDbg(vrtp,"videortp_send_frame force_key_frames.");
 			}
 		}
 		//在编码器中固定i帧间隔为2s,不再需要自己主动设置了
@@ -2308,7 +2308,7 @@ int videortp_send_frame(videortp_t *vrtp, const video_frame *frame)
 				if (vrtp->framenum % start_key_interval == 0) {
 					video_encoder_api_send_key_frame(vrtp->encoder);
 					if(DEBUG_TX){
-						rtpDbg(vrtp,"%s:%d: videortp_send_frame framenum: %d force_key_frames.", __FILE__, __LINE__, vrtp->framenum);
+						rtpDbg(vrtp,"videortp_send_frame framenum: %d force_key_frames.", vrtp->framenum);
 					}
 				}
 			}
@@ -2398,7 +2398,7 @@ int videortp_send_yuvframe(videortp_t *vrtp, const video_frame *vframe)
 	}
 
 	if(DEBUG_TX){
-		rtpDbg(vrtp,"%s:%d: videortp_send_yuvframe width: %d height: %d format: %d.", __FILE__, __LINE__, vframe->width, vframe->height, vframe->format);
+		rtpDbg(vrtp,"videortp_send_yuvframe width: %d height: %d format: %d.", vframe->width, vframe->height, vframe->format);
 	}
 	
 	memset(&xpic, 0, sizeof(xpic));
@@ -2447,7 +2447,7 @@ int videortp_send_yuvframe(videortp_t *vrtp, const video_frame *vframe)
 	if (0 == icount++%IDR_INTERVAL){
 		xpic.i_type = X264_TYPE_IDR;
 		if(DEBUG_TX){
-			rtpDbg(vrtp,"%s:%d: videortp_send_yuvframe icount: %d force_key_frames.", __FILE__, __LINE__, icount);
+			rtpDbg(vrtp,"videortp_send_yuvframe icount: %d force_key_frames.", icount);
 		}
 	}
 	else{