派生自 development/c++

miyanhui
2019-02-12 c089626f2d9ee90364abd24ecba7ffe567cb1163
修复合并代码的图片宽高不对问题
1个文件已修改
13 ■■■■■ 已修改文件
QiaoJiaSystem/StructureApp/AppPipeController.cpp 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/AppPipeController.cpp
@@ -31,7 +31,8 @@
    triggerElement(25, 10),
    recordVideoElement(-1, ""),
    bRecordVideoEnable(false),
    rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp")
    rpcClient("RtspAnalysServer", "127.0.0.1",10009,"tcp"),
    m_bSetWH(false)
{
    init();
@@ -203,23 +204,25 @@
    //  int max=appPref.getIntData("n_cut_max_duration");
    // recordInit(40,100);
    videoCaptureElement.registerConnector([&] {
        cv::Mat imageTemp;
        std::string imgKey;
        m_hiredisTool.listRpop(m_camId,imgKey);
        if(imgKey.empty())
        {
            //DBG("imgKey.empty()");
            ERR("imgKey.empty()  "<<imgKey);
            return;
        }
        cv::Mat imageTemp;
        m_hiredisTool.getKeyImage(imgKey,imageTemp);
        if(!m_bSetWH)
        {
            INFO("SetWidth:"<<imageTemp.cols<<"  Height:"<<imageTemp.rows);
            appPref.setIntData(m_camId+"width",imageTemp.cols);
            appPref.setIntData(m_camId+"height",imageTemp.rows);
            m_bSetWH=true;
        }
        m_hiredisTool.getKeyImage(imgKey,imageTemp);
        m_hiredisTool.delKey(imgKey);
        if(imageTemp.empty())
        {