| | |
| | | #ifdef TestCode |
| | | DBG("waitSignal(\"DecoderImageOK\") after"); |
| | | #endif |
| | | // 从ffmpeg解码类中获取图片 |
| | | p_this->m_fFmpegDecoderJPG.getImage().copyTo(p_this->m_image); |
| | | |
| | | { |
| | | if (p_this->m_publishVideoRet) { |
| | | if (p_this->videoPublishElement == nullptr) { |
| | |
| | | cv::Size size_(appConfig.getIntProperty("pulish.width"), appConfig.getIntProperty("pulish.height")); |
| | | int gupIdx = appPref.getIntData("gpu.index"); |
| | | DBG("videoPublishpath: " << p_this->m_chanPubID << path << " h:" << size_.height); |
| | | p_this->videoPublishElement = new ffmpeg::VideoPublishElement(path, size_, "flv", 25, gupIdx); |
| | | p_this->videoPublishElement = new ffmpeg::PipeVideoPublishElement(path, size_, "flv", 25, gupIdx); |
| | | p_this->videoPublishElement->start(); |
| | | } else { |
| | | // DBG("videoPublishElement->setImage() : " << p_this->m_chanPubID); |
| | | if (!p_this->m_image.empty()) { |
| | | p_this->videoPublishElement->setImage(p_this->m_image); |
| | | p_this->videoPublishElement->submit(); |
| | | } else { |
| | | ERR("m_image.empty()"); |
| | | } |
| | |
| | | p_this->m_picCount.store(0); |
| | | } |
| | | |
| | | // 从ffmpeg解码类中获取图片 |
| | | p_this->m_fFmpegDecoderJPG.getImage().copyTo(p_this->m_image); |
| | | { |
| | | cv::Mat copyMat; |
| | | std::string imageName = p_this->m_fFmpegDecoderJPG.GetImageName(); |