|
@@ -227,6 +227,16 @@ void FuncRegionalPersonCount::task()
|
|
|
}
|
|
|
|
|
|
/************ 挨个房间检测人数 ************/
|
|
|
+ for(const auto& RoomInfo : m_listRoomCamAct)
|
|
|
+ {
|
|
|
+ /* 取出房间内的最大值 */
|
|
|
+ int maxNum = 0;
|
|
|
+ std::string strImagePath;
|
|
|
+ getRoomMaxNum(RoomInfo.RoomID, maxNum, strImagePath);
|
|
|
+
|
|
|
+ m_liveDicNum += maxNum;
|
|
|
+ m_strLiveDicImagePath = strImagePath;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
/************ 检测频率直播间 + 导播间房间的人数 ************/
|
|
@@ -372,4 +382,27 @@ bool FuncRegionalPersonCount::findAlarmEnd(EndAlarmParam& alarmParam)
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+/* 取出一个房间内的最大人数 */
|
|
|
+void FuncRegionalPersonCount::getRoomMaxNum(int roomID, int& maxNum, std::string& strImagePath)
|
|
|
+{
|
|
|
+ strImagePath.clear();
|
|
|
+ for(auto it : m_pListAlarm->listAlarmInfo)
|
|
|
+ {
|
|
|
+ if(it->RoomID == roomID)
|
|
|
+ {
|
|
|
+ /* 取出最大人数 */
|
|
|
+ int num = it->listPersonInfo.size();
|
|
|
+ if(num > maxNum)
|
|
|
+ {
|
|
|
+ maxNum = num;
|
|
|
+ strImagePath = it->ImageInfo;
|
|
|
+ }
|
|
|
+ if(strImagePath.empty())
|
|
|
+ {
|
|
|
+ strImagePath = it->ImageInfo;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|