录制接口支持指定切片时间大小:#747

This commit is contained in:
xiongziliang
2021-03-07 10:41:57 +08:00
parent daedbed737
commit c0f4899950
13 changed files with 54 additions and 40 deletions

View File

@@ -877,10 +877,11 @@ void installWebApi() {
CHECK_SECRET();
CHECK_ARGS("type","vhost","app","stream");
auto result = Recorder::startRecord((Recorder::type) allArgs["type"].as<int>(),
allArgs["vhost"],
allArgs["app"],
allArgs["stream"],
allArgs["customized_path"]);
allArgs["vhost"],
allArgs["app"],
allArgs["stream"],
allArgs["customized_path"],
allArgs["max_second"].as<size_t>());
val["result"] = result;
val["code"] = result ? API::Success : API::OtherFailed;
val["msg"] = result ? "success" : "start record failed";