| | |
| | | } |
| | | void RtspCaptureElement::SaveVideo(const std::string &strImageName) |
| | | { |
| | | INFO("SaveVideo: "<<strImageName); |
| | | std::string strTimeStamp= AppUtil::getTimeUSecString(); |
| | | std::string strPath=MakeDir(strTimeStamp); |
| | | m_capture->SaveVideoByImageName(strPath,strImageName); |
| | |
| | | if(m_gpuIndex>=0){ |
| | | setenv("CUDA_VISIBLE_DEVICES", std::to_string(m_gpuIndex).c_str(),0); |
| | | } |
| | | INFO("Open Video "<<m_path<<" GPU_Index: "<<m_gpuIndex); |
| | | m_capture->open(m_path.c_str(),m_gpuIndex>=0); |
| | | } |
| | | |
| | | void RtspCaptureElement::threadInitial() |
| | | { |
| | | INFO("MYH DEBUG"); |
| | | openVideo(); |
| | | } |
| | | |
| | | void RtspCaptureElement::threadClosing() |
| | | { |
| | | INFO("MYH DEBUG"); |
| | | m_capture->close(); |
| | | delete m_capture; |
| | | m_capture = nullptr; |