miyanhui
2019-02-19 87baff1f74bc17dc7a664b3176288a235bd024f6
录像失败不直接返回
4个文件已修改
27 ■■■■■ 已修改文件
QiaoJiaSystem/StructureApp/FaceExtractElement.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/PerimeterElement.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/VideoToImageMulth/RtspCaptureElement.h 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
QiaoJiaSystem/StructureApp/FaceExtractElement.cpp
@@ -227,7 +227,7 @@
                    if (!server)
                    {
                        ERR("server is null");
                        return;
                        //return;
                    }
                    INFO("Record Video "<<strImageKey);
                    server->recordVideo(strImageKey);
@@ -235,7 +235,7 @@
                catch (std::exception &e)
                {
                    ERR("Record Video Err: "<<strImageKey <<"   Message: "<<e.what());
                    return;
                    //return;
                }
                auto faceSearchServer = faceSearchRpcClient.getServer();
                if (!faceSearchServer) {
QiaoJiaSystem/StructureApp/JudgmentRetrogradeTool.cpp
@@ -312,7 +312,7 @@
        if (!server)
        {
            ERR("server is null");
            return false;
            //return false;
        }
        INFO("Record Video "<<imgKey);
        server->recordVideo(imgKey);
@@ -320,7 +320,7 @@
    catch (std::exception &e)
    {
        ERR("Record Video Err: "<<imgKey <<"   Message: "<<e.what());
        return false;
        //return false;
    }
    bool retface = false;
QiaoJiaSystem/StructureApp/PerimeterElement.cpp
@@ -388,7 +388,7 @@
        if (!server)
        {
            ERR("server is null");
            return false;
            //return false;
        }
        INFO("Record Video "<<imgKey);
        server->recordVideo(imgKey);
@@ -396,7 +396,7 @@
    catch (std::exception &e)
    {
        ERR("Record Video Err: "<<imgKey <<"   Message: "<<e.what());
        return false;
        //return false;
    }
    INFO("SaveImgKeyToES: "<<imgKey);
    bool retface = false;
QiaoJiaSystem/VideoToImageMulth/RtspCaptureElement.h
@@ -12,19 +12,27 @@
     * 使用ffmpeg封装的视频采集流水元素
     * 输入,rtsp地址或文件(mp4或avi)路径,输出opencv中的cv::Mat
     * 支持GPU硬解码
     * 主要完成视频帧的获取以及向CvCapture_FFMPEG传送数据
     */
    class RtspCaptureElement: public TimerElement {
    public:
        RtspCaptureElement(const std::string& path,const std::string& camId, int fps = 30, int reOpenTime = -1, int gpuIndex = -1,RtspAnalysManager* manager= nullptr);
        //保存视频接口,从RtspAnalysManager发起调用
        void SaveVideo(const std::string& strImageName);
        //设置保存视频的最小和最大长度,单位是秒,实际的运行情况有一些差距,需要完善
        void SetVideoMinMaxSeconds(const int minSeconds,const int maxSeconds);
    private:
        //线程执行函数
        virtual void timerFunc() override;
        //线程的一些变量初始化,线程启动的时候调用
        virtual void threadInitial() override;
        //线程结束函数的时候调用,完成一些资源的释放
        virtual void threadClosing() override;
        //打开视频
        void openVideo();
        //
        //根据timeStamp创建路径
        std::string MakeDir(const std::string& timeStamp);
    private:
        //用来抓取视频的Ffmpeg的封装类
@@ -49,11 +57,8 @@
        //用来保存录像视频的路径
        std::string m_cutPath;
        //几张图丢一张,目前是4张丢一张
        //几张图丢一张,目前是8张丢一张
        const int m_nPicsPickOne = 8;
        //每台摄像机保存到Redis的图片数量的最大值
        //const int M_CAM_PIC_MAX_COUNT = 50;
        RtspAnalysManager * m_pManager;
    };