648540858
2023-10-13 7aa8444e676775a4541498a3c13ccc25546d2344
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)) {