From 7aa8444e676775a4541498a3c13ccc25546d2344 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 13 十月 2023 18:25:36 +0800 Subject: [PATCH] 临时提交 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java index 3c76883..045bd7e 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java @@ -111,6 +111,9 @@ private IUserService userService; @Autowired + private ICloudRecordService cloudRecordService; + + @Autowired private VideoStreamSessionManager sessionManager; @Autowired @@ -766,6 +769,21 @@ return HookResult.SUCCESS(); } + /** + * 褰曞儚瀹屾垚浜嬩欢 + */ + @ResponseBody + @PostMapping(value = "/on_record_mp4", produces = "application/json;charset=UTF-8") + public HookResult onRecordMp4(HttpServletRequest request, @RequestBody OnRecordMp4HookParam param) { + logger.info("[ZLM HOOK] 褰曞儚瀹屾垚浜嬩欢锛歿}->{}", param.getMediaServerId(), param.getFile_path()); + + taskExecutor.execute(() -> { + cloudRecordService.addRecord(param); + }); + + return HookResult.SUCCESS(); + } + private Map<String, String> urlParamToMap(String params) { HashMap<String, String> map = new HashMap<>(); if (ObjectUtils.isEmpty(params)) { -- Gitblit v1.8.0