派生自 development/c++

xuxiuxi
2019-03-04 17675f1c6447b6e014b520608ce6d5f1f2e9707a
QiaoJiaSystem/VideoToImageMulth/RtspCaptureElement.cpp
@@ -82,6 +82,7 @@
}
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);
@@ -93,16 +94,19 @@
    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;