派生自 development/c++

pansen
2018-12-17 7d797b1a5786a8d4ca3aafe2484c75ad15ba9d8f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef NEWRECORDVIDEOELEMENT_H
#define NEWRECORDVIDEOELEMENT_H
 
#include <basic/pipe_element/ffmpeg/FfmpegElement.h>
struct ImgInfo
{
    std::string time;
    cv::Mat img;
};
class NewRecordVideoElement {
 
public:
 
    NewRecordVideoElement(){}
    NewRecordVideoElement(std::string camid);
 
    ~NewRecordVideoElement();
 
    std::string startRecord();
 
    void doRecord();
 
    void endRecord();
 
    void pushImgBuf(const std::string& time,cv::Mat img);
 
    void getImg(ImgInfo& info);
 
private:
    std::string getFileName(std::string timeStamp);
    std::string makeDir();
    ffmpeg::VideoEncodeElement videoEncoderElement;
    std::string camID;
    std::string m_cutPath;
    std::list<ImgInfo> m_imgBufQue;
};
 
#endif // RECORDVIDEOELEMENT_H