1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #pragma once
- #include <iostream>
- #include <list>
- #include "opencv2/highgui/highgui.hpp"
- #include "opencv2/imgproc/imgproc.hpp"
- #include "opencv2/dnn.hpp"
- #include "opencv2/opencv.hpp"
- #include "opencv2/highgui.hpp"
- #include "opencv2/imgcodecs/imgcodecs.hpp"
- #include "cnstream_frame_va.hpp"
- #include "device/mlu_context.h"
- // #include "cnstream_core.hpp"
- #include "cnstream_frame.hpp"
- #include "cnstream_module.hpp"
- #include "easyinfer/model_loader.h"
- #include "easytrack/easy_track.h"
- #include <time.h>
- #include <cstdlib>
- #include <dirent.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- using namespace std;
- using namespace cv;
- using namespace cnstream;
- class video
- {
- private:
- std::string m_fileName;
- string m_enc_type;
- string m_outputDir;
-
- int m_fps;
- int m_cacheTime;
- list<Mat> m_frameBuffer;
- int m_count;
- int m_videoMaxTime;
- Size m_frameSize;
- std::shared_ptr<cv::VideoWriter> m_videoWriter;
- bool m_videoStart;
- public:
- video(const string &outputDir,const string &enc_type, const int fps, const int videoMaxTime,const int cacheTime,const Size& frameSize);
- ~video();
- void Destroy();
- bool capture(std::shared_ptr<cnstream::CNFrameInfo> &data);
- string getFileName();
- int getVideoFps();
- int getVideoTime();
- };
|