mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
hls/mp4录制不再能随时开启或关闭
This commit is contained in:
@@ -737,43 +737,6 @@ void installWebApi() {
|
||||
});
|
||||
#endif//ENABLE_RTPPROXY
|
||||
|
||||
// 开始录制hls或MP4
|
||||
api_regist1("/index/api/startRecord",[](API_ARGS1){
|
||||
CHECK_SECRET();
|
||||
CHECK_ARGS("type","vhost","app","stream","wait_for_record","continue_record");
|
||||
|
||||
int result = Recorder::startRecord((Recorder::type)allArgs["type"].as<int>(),
|
||||
allArgs["vhost"],
|
||||
allArgs["app"],
|
||||
allArgs["stream"],
|
||||
allArgs["customized_path"],
|
||||
allArgs["wait_for_record"],
|
||||
allArgs["continue_record"]);
|
||||
val["result"] = result;
|
||||
});
|
||||
|
||||
// 停止录制hls或MP4
|
||||
api_regist1("/index/api/stopRecord",[](API_ARGS1){
|
||||
CHECK_SECRET();
|
||||
CHECK_ARGS("type","vhost","app","stream");
|
||||
int result = Recorder::stopRecord((Recorder::type)allArgs["type"].as<int>(),
|
||||
allArgs["vhost"],
|
||||
allArgs["app"],
|
||||
allArgs["stream"]);
|
||||
val["result"] = result;
|
||||
});
|
||||
|
||||
// 获取hls或MP4录制状态
|
||||
api_regist1("/index/api/getRecordStatus",[](API_ARGS1){
|
||||
CHECK_SECRET();
|
||||
CHECK_ARGS("type","vhost","app","stream");
|
||||
auto status = Recorder::getRecordStatus((Recorder::type)allArgs["type"].as<int>(),
|
||||
allArgs["vhost"],
|
||||
allArgs["app"],
|
||||
allArgs["stream"]);
|
||||
val["status"] = (int)status;
|
||||
});
|
||||
|
||||
//获取录像文件夹列表或mp4文件列表
|
||||
//http://127.0.0.1/index/api/getMp4RecordFile?vhost=__defaultVhost__&app=live&stream=ss&period=2020-01
|
||||
api_regist1("/index/api/getMp4RecordFile", [](API_ARGS1){
|
||||
|
||||
Reference in New Issue
Block a user