From cdfb8eb2a956d25d688033be735f4741b2ab58bd Mon Sep 17 00:00:00 2001 From: xuxiuxi <554325746@qq.com> Date: 星期五, 15 三月 2019 09:48:42 +0800 Subject: [PATCH] Merge branch 'yw.1.2.fixbug' of http://192.168.1.226:10010/r/development/c++ into yw.1.2.fixbug --- QiaoJiaSystem/VideoServer/QiaoJia/DB/DBStruct.h | 142 ++++++++++++++++++++++++++--------------------- 1 files changed, 79 insertions(+), 63 deletions(-) diff --git a/QiaoJiaSystem/VideoServer/QiaoJia/DB/DBStruct.h b/QiaoJiaSystem/VideoServer/QiaoJia/DB/DBStruct.h index 5de036a..44e7822 100644 --- a/QiaoJiaSystem/VideoServer/QiaoJia/DB/DBStruct.h +++ b/QiaoJiaSystem/VideoServer/QiaoJia/DB/DBStruct.h @@ -1,15 +1,15 @@ #ifndef DBCONNECTSTRUCT #define DBCONNECTSTRUCT -//#include <vector> + //#include <QImage> #include <QString> #include <QDateTime> #include <QVector> -struct Record_Storage_Dev -{ - Record_Storage_Dev() - { +#include <map> + +struct Record_Storage_Dev { + Record_Storage_Dev() { n_id = 0; str_storage_dev_id = ""; str_dev_name = ""; @@ -43,13 +43,11 @@ QDateTime tim_start_time;//寮�濮嬩笅杞界殑鏂囦欢鐨勬椂闂� int n_duration;//姣忔涓嬭浇鐨勬椂闂撮暱搴︼紝鍗曚綅锛氬皬鏃� QString str_brand;//鍝佺墝 - QString str_reserved;//棰勭暀 + QString str_reserved;//鎴浘鍦板潃 }; -struct Record_Cam_Dev -{ - Record_Cam_Dev() - { +struct Record_Cam_Dev { + Record_Cam_Dev() { n_id = 0; str_name = ""; str_addr = ""; @@ -62,6 +60,8 @@ str_password = ""; str_brand = ""; str_reserved = ""; + n_type = -1; + type = -1; } int n_id;//鑷id @@ -76,13 +76,13 @@ QString str_password;//鎽勫儚鏈哄瘑鐮� QString str_brand;//鎽勫儚鏈哄搧鐗� QString str_reserved;//棰勭暀 + int n_type;//棰勭暀 + int type;// 0 rtsp, 1 gb28181 }; -struct Record_Cam_Chn -{ +struct Record_Cam_Chn { - Record_Cam_Chn() - { + Record_Cam_Chn() { n_id = 0; str_storage_dev_id = ""; n_chn = 0; @@ -120,8 +120,7 @@ QString str_reserved;//棰勭暀 }; -struct Record_Load_File_info -{ +struct Record_Load_File_info { // Record_Load_File_info() // { @@ -145,8 +144,7 @@ QString str_reserved;//棰勭暀 }; -struct Record_Cut_Video_info -{ +struct Record_Cut_Video_info { // Record_Cut_Video_info() // { @@ -172,8 +170,7 @@ QString str_reserved;//棰勭暀 }; -struct Record_Sdk_Hdl_info -{ +struct Record_Sdk_Hdl_info { // Record_Sdk_Hdl_info() // { @@ -195,11 +192,9 @@ QString str_reserved;//棰勭暀 }; -struct Record_Chn_Sdk -{ +struct Record_Chn_Sdk { - Record_Chn_Sdk() - { + Record_Chn_Sdk() { n_id = 0; str_storage_dev_id = ""; n_chn = 0; @@ -220,11 +215,9 @@ QString str_reserved;//棰勭暀 }; -struct Record_Cam_Sdk -{ +struct Record_Cam_Sdk { - Record_Cam_Sdk() - { + Record_Cam_Sdk() { n_id = 0; str_cam_dev_id = ""; str_sdks = ""; @@ -241,21 +234,20 @@ QString str_reserved;//棰勭暀 }; -struct Record_Config -{ - Record_Config() - { +struct Record_Config { + Record_Config() { str_alarm_ip = ""; n_alarm_port = 0; str_web_pic_ip = ""; n_web_pic_port = 0; str_es_pic_ip = ""; n_es_pic_port = 0; - n_cut_max_duration = 0; + n_cut_max_duration = 20; + n_cut_min_duration = 5; n_dev_type = 0; str_reserved = ""; dev_id = ""; - dev_name= ""; + dev_name = ""; } QString str_alarm_ip;//鎶ヨ鏈嶅姟鍣╥p @@ -265,60 +257,84 @@ QString str_es_pic_ip;//ES绔浘鐗囨湇鍔″櫒ip int n_es_pic_port;//ES绔浘鐗囨湇鍔″櫒绔彛 int n_cut_max_duration;//瑁佸壀瑙嗛鏈�闀� + int n_cut_min_duration;//瑁佸壀瑙嗛鏈�duan int n_dev_type;//0:no dev; 1:storage; 2:camera QString str_reserved;//棰勭暀 QString dev_id; QString dev_name; }; -struct LActRuleWeekRecord -{ - LActRuleWeekRecord() - { - m_nCamId=0; +struct LActRuleWeekRecord { + LActRuleWeekRecord() { + m_strCamId = ""; + m_nSdkType = 0; m_nType = 0; m_strBegin = ""; m_strEnd = ""; } - int m_nCamId; + + QString m_strCamId; + int m_nSdkType; int m_nType; //鍛ㄥ嚑 QString m_strBegin; QString m_strEnd; }; -struct ActRule -{ - ActRule() - { - nCamId = 0; + + +struct SdkRule { + SdkRule() { + nIsRun = 0; + nSdkType = 0; + strCamId = ""; strAreas = ""; strLine = ""; strImageUrl = ""; - nTriggertolerance = 0; - nTriggerDelay=0; - fSensitivity = 0.5; - nAlarmPeopleNum = 0; - strExAreas=""; - strLine=""; + nTriggerTolerance = 0; + nTriggerDelay = 0; + nQuality = 0; + nThreshold = 0; + nAlarmNumUpperLimit = 0; + nAlarmNumLowerLimit = 0; + fSensitivity = 0; + strExAreas = ""; + strLine = ""; + strAddr = ""; } - int nCamId; + + int nSdkType; + QString strCamId; QString strAreas; //鐩戞祴鍖哄煙 QString strExAreas; QString strLine; //鍒嗗壊绾� QString strExLine; QString strImageUrl; //鍒掑尯鍩熺殑鍥剧墖璺緞 - int nTriggertolerance; + QString strBroadcast; + QString strAddr; + int nTriggerTolerance; int nTriggerDelay; //寤惰繜鏃堕棿锛堢锛� - float fSensitivity;//鐏垫晱搴� - int nAlarmPeopleNum; //鎶ヨ浜烘暟锛堜汉鍛樻嫢鎸わ級 -}; -struct RuleCfg -{ + int nQuality; + int nThreshold;//闃堝�� + float fSensitivity; + int nAlarmNumUpperLimit; //鎶ヨ浜烘暟锛堜汉鍛樻嫢鎸わ級 + int nAlarmNumLowerLimit; + int nIsRun; - QVector<LActRuleWeekRecord> weekRuleVec; - ActRule actRule; - std::string strCamId; - std::string strRtsp; - std::string strAdrr; + std::vector<LActRuleWeekRecord> weekRuleVec; +}; + +typedef std::map<int, SdkRule> SdkRuleMap; +enum SdkType { + SdkTypeStart = 0, + FaceSdk, + CarSdk, + YoloSdk, //浜轰綋 + PerimeterSdk, + CrowdSdk, //浜哄憳鎷ユ尋 + KeepRightSdk, + PerHubSdk, //浜哄憳寮傚父7 + PerStaticSdk, //涓綋闈欐8 + SdkTypeEnd }; + #endif // DBCONNECTSTRUCT -- Gitblit v1.8.0