| | |
| | | } |
| | | |
| | | |
| | | |
| | | static std::string rtspAddrBuild(std::string ip, const int port, std::string username, |
| | | std::string passwd, std::string brand) { |
| | | std::string rtsp_url; |
| | |
| | | INFO("StartCamNO: "<<startCamNO<<" CamStep: "<<CamCount); |
| | | auto itor = lst.begin(); |
| | | |
| | | if(startCamNO >= lst.size()) |
| | | { |
| | | if (startCamNO >= lst.size()) { |
| | | ERR("startCamNO > lst.size()"); |
| | | return; |
| | | } |
| | |
| | | } |
| | | |
| | | for (int i = 0; i < CamCount; i++) { |
| | | if (itor == lst.end()) |
| | | { |
| | | if (itor == lst.end()) { |
| | | ERR("itor == lst.end()"); |
| | | return; |
| | | } |
| | |
| | | |
| | | |
| | | //录取视频的RPC的接口函数 |
| | | ::std::string RtspAnalysManager::recordVideo(const ::std::string& name, const ::Ice::Current&) |
| | | { |
| | | ::std::string RtspAnalysManager::recordVideo(const ::std::string &name, const ::Ice::Current &) { |
| | | INFO("Record Video For: "<<name); |
| | | ImageName_s_t nameSt=ImageName_s_t::fromString(name); |
| | | if(nameSt.Valid()) |
| | | { |
| | | if (nameSt.Valid()) { |
| | | auto pCaptureElem = m_controllers.find(nameSt.m_camId); |
| | | if(pCaptureElem!= m_controllers.end()) |
| | | { |
| | | if (pCaptureElem != m_controllers.end()) { |
| | | pCaptureElem->second->SaveVideo(name); |
| | | } else{ |
| | | ERR("Can not Find CamId "<<nameSt.m_camId); |
| | | } |
| | | } |
| | | else{ |
| | | } else { |
| | | ERR("Record Video Failed:Name Not Valid Name: "<<name); |
| | | } |
| | | return name; |
| | | } |
| | | |
| | | //保存视频到RtspImageRedis的队列,由RtspCaptureElement调用 |
| | | bool RtspAnalysManager::SaveImageToRedis(const std::string& camId,const std::string& imageName,const cv::Mat& img) |
| | | { |
| | | bool RtspAnalysManager::SaveImageToRedis(const std::string &camId, const std::string &imageName, const cv::Mat &img) { |
| | | INFO("MYH DEBUG HERE"); |
| | | auto item = m_imgRedisControllers.find(camId); |
| | | if(item!=m_imgRedisControllers.end()) |
| | | { |
| | | if (item != m_imgRedisControllers.end()) { |
| | | INFO("Save Succeed Cam: "<<camId<<" ImageKey: "<<imageName); |
| | | item->second->SaveImage(imageName,img); |
| | | } else { |