派生自 development/c++

pansen
2019-01-10 ffa3485e9d36911f3b6aeac7ddbcca61c3e3dde6
QiaoJiaSystem/StructureApp/NewRecordVideoElement.h
@@ -2,11 +2,12 @@
#define NEWRECORDVIDEOELEMENT_H
#include <basic/pipe/PipeElement.h>
#include <basic/pipe_element/ffmpeg/FfmpegElement.h>
struct ImgInfo
{
    std::string time;
    cv::Mat img;
};
#include "HiredisTool.h"
//struct ImgInfo
//{
//    std::string time;
//    cv::Mat img;
//};
class NewRecordVideoElement : public basic::PipeElement{
public:
@@ -16,22 +17,16 @@
    ~NewRecordVideoElement();
    std::string startRecord();
    void setSdkTrigger(bool isTrigger);
    void doRecord();
    void endRecord();
    void pushImgBuf(const std::string& time,cv::Mat& img);
    void getImg(ImgInfo& info);
private:
    virtual void threadFunc() override;
    virtual void threadInitial() override;
private:
    void recordInit(int videoMin, int videoMax);
    void Record();
    int fileMin;
    int fileMax;
    bool sdkTrigger;
@@ -44,16 +39,20 @@
    int recordStatus;
    int videoLength;
    int recordDelay;
private:
    std::string getFileName(std::string timeStamp);
    std::string makeDir();
    std::string startRecord();
    void doRecord();
    void endRecord();
    void getImg(ImgInfo& info);
    std::string getFileName(const std::string& timeStamp);
    std::string makeDir(const std::string& timeStamp);
    ffmpeg::VideoEncodeElement videoEncoderElement;
    std::string camID;
    std::string m_cutPath;
    std::queue<ImgInfo> m_imgBufQue;
    HiredisTool m_hiredisTool;
    std::string m_filename;
};
#endif // RECORDVIDEOELEMENT_H