| | |
| | | p_this->m_image.copyTo(copyMat); |
| | | p_this->m_pManager->SaveImageToRedis(p_this->m_chanPubID, imageName, copyMat); |
| | | } |
| | | /*********/ |
| | | |
| | | p_this->submit(); |
| | | } |
| | |
| | | //关闭ffmpeg解码模块 |
| | | p_this->m_fFmpegDecoderJPG.stopThd(); |
| | | //启动ffmpeg解码模块 |
| | | DBG("m_chanPubID:"<<p_this->m_chanPubID << " m_fps:" << p_this->m_fps); |
| | | p_this->m_fFmpegDecoderJPG.startThd(p_this->m_chanPubID, p_this->m_fps, p_this->m_gpuIdx); |
| | | continue; |
| | | } |
| | |
| | | } |
| | | |
| | | void BASICGB28181::VideoCaptureElementWithRtp::threadFunc() { |
| | | // { |
| | | // if (m_publishVideoRet) { |
| | | // if (videoPublishElement == nullptr) { |
| | | // string path = appConfig.getStringProperty("srsAddr") + "cam" + m_chanPubID + ".flv"; |
| | | // cv::Size size_(appConfig.getIntProperty("pulish.width"), appConfig.getIntProperty("pulish.height")); |
| | | // int gupIdx = appPref.getIntData("gpu.index"); |
| | | // DBG("videoPublishpath:" << path << " h:" << size_.height << " w:" << size_.width); |
| | | // videoPublishElement = new ffmpeg::VideoPublishElement(path, size_, "flv", 25, gupIdx); |
| | | // videoPublishElement->start(); |
| | | // } else { |
| | | // if (!m_image.empty()) { |
| | | // videoPublishElement->setImage(m_image); |
| | | // } else { |
| | | // ERR("m_image.empty()"); |
| | | // } |
| | | // } |
| | | // } else { |
| | | // if (videoPublishElement != nullptr) { |
| | | // DBG("videoPublishElement->stop()"); |
| | | // videoPublishElement->stop(); |
| | | // videoPublishElement->wait(); |
| | | // delete videoPublishElement; |
| | | // videoPublishElement = nullptr; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | fireConnectors(); |
| | | } |