| | |
| | | #include "../buz/recorder.hpp" |
| | | |
| | | struct AVPacket; |
| | | class CPacket; |
| | | |
| | | namespace ffwrapper |
| | | { |
| | |
| | | std::mutex mtx_pkt_; |
| | | |
| | | private: |
| | | // 查找缓存中的录制帧 |
| | | void findRecFramesIndex(const int64_t &fired_id, const int duration, int &start, int &end); |
| | | |
| | | // 录像实例的回调函数,录像完成后设置录像文件路径,id和帧id |
| | | void setRecInfo(std::string &id, int &index, std::string &path); |
| | | // 缓存视频包 |
| | | void cachePacket(std::shared_ptr<ffwrapper::CodedData> data, int64_t &id); |
| | | void cachePacket(const CPacket &pkt); |
| | | // 丢弃缓存 |
| | | int shrinkCache(); |
| | | // 创建录像实例开始录像 |
| | |
| | | void Unload(); |
| | | const bool Loaded() const; |
| | | // 缓存录像的视频包,等待触发录像,或直接放到录像缓存 |
| | | void SetPacket(std::shared_ptr<ffwrapper::CodedData> data, int64_t &id); |
| | | void SetPacket(const CPacket &pkt); |
| | | // 触发录像 |
| | | void FireRecSignal(const char* sid,const int64_t &id); |
| | | // 获取录像文件路径和帧id |