使用zlm原生接口删除录像文件

This commit is contained in:
648540858
2023-11-01 10:45:36 +08:00
parent 4ef1277c16
commit 75fccfaf17
4 changed files with 43 additions and 27 deletions

View File

@@ -268,14 +268,4 @@ public class AssistRESTfulUtils {
return sendGet(mediaServerItem, "api/record/file/download/task/list", param, null);
}
public JSONObject addCollect(MediaServerItem mediaServerItem, JSONObject jsonObject) {
return sendPost(mediaServerItem, "api/record/file/collection/add", jsonObject, null, 30);
}
public JSONObject deleteFiles(MediaServerItem mediaServerItem, List<String> filePathList) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("filePathList", filePathList);
return sendPost(mediaServerItem, "api/record/file/delete", jsonObject, null, 15*60);
}
}

View File

@@ -25,8 +25,6 @@ public class ZLMRESTfulUtils {
private OkHttpClient client;
public interface RequestCallback{
void run(JSONObject response);
}
@@ -398,4 +396,14 @@ public class ZLMRESTfulUtils {
param.put("stream_id", streamId);
return sendPost(mediaServerItem, "updateRtpServerSSRC",param, null);
}
public JSONObject deleteRecordDirectory(MediaServerItem mediaServerItem, String app, String stream, String date, String fileName) {
Map<String, Object> param = new HashMap<>(1);
param.put("vhost", "__defaultVhost__");
param.put("app", app);
param.put("stream", stream);
param.put("period", date);
param.put("name", fileName);
return sendPost(mediaServerItem, "deleteRecordDirectory",param, null);
}
}