新增startRecordTask接口,支持录制事件视频

用户可以录制当前时间前后一定时间内的视频,配置文件gop_cache设置较大时历史视频才能录全
This commit is contained in:
xia-chu
2025-08-02 20:47:49 +08:00
parent b1e1a0f174
commit c9a0025620
4 changed files with 176 additions and 2 deletions

View File

@@ -122,6 +122,15 @@ public:
*/
bool setupRecord(MediaSource &sender, Recorder::type type, bool start, const std::string &custom_path, size_t max_second) override;
/**
* 开始录制mp4
* @param file_path mp4相对路径
* @param back_time_ms 回溯录制时长
* @param forward_time_ms 后续录制时长
* @return 录制文件绝对路径
*/
std::string startRecord(const std::string &file_path, uint32_t back_time_ms, uint32_t forward_time_ms);
/**
* 获取录制状态
* @param type 录制类型