12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
- #include <memory>
- #include <string>
- #include <vector>
- #include <map>
- #include <list>
- // #include "cnstream_core.hpp"
- #include "cnstream_frame.hpp"
- #include "cnstream_module.hpp"
- #include "easyinfer/model_loader.h"
- #include "easytrack/easy_track.h"
- #include "video.hpp"
- namespace cnstream{
- // Pointer for frame info
- using CNFrameInfoPtr = std::shared_ptr<CNFrameInfo>;
- /// Pointer for infer object
- using CNInferObjectPtr = std::shared_ptr<CNInferObject>;
- class Recorder : public cnstream::Module, public cnstream::ModuleCreator<Recorder>
- {
- using super = cnstream::Module;
- private:
- Recorder(const Recorder &) = delete;
- Recorder &operator=(Recorder const &) = delete;
- std::shared_ptr<video> m_Video;
- int m_dst_width;
- int m_dst_height;
- int m_frame_rate;
- // 视频的最长时间
- int m_videoMaxTime;
- // 视频头尾缓存时间
- int m_cacheTime;
-
- string m_enc_type;
- string m_outputDir;
- public:
- explicit Recorder(const std::string &name);
- bool Open(cnstream::ModuleParamSet paramSet) override;
- void Close() override;
- int Process(std::shared_ptr<cnstream::CNFrameInfo> data) override;
- };
- }
|