648540858
2022-08-15 cb16cabb64e99d7f505822a49665725ff5b61ff6
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -98,9 +98,7 @@
   @PostMapping(value = "/on_server_keepalive", produces = "application/json;charset=UTF-8")
   public ResponseEntity<String> onServerKeepalive(@RequestBody JSONObject json){
      if (logger.isDebugEnabled()) {
         logger.debug("[ ZLM HOOK ] on_server_keepalive API调用,参数:" + json.toString());
      }
      logger.info("[ ZLM HOOK ] on_server_keepalive API调用,参数:" + json.toString());
      String mediaServerId = json.getString("mediaServerId");
      List<ZLMHttpHookSubscribe.Event> subscribes = this.subscribe.getSubscribes(HookType.on_server_keepalive);
      if (subscribes != null  && subscribes.size() > 0) {
@@ -238,7 +236,7 @@
         // 鉴权通过
         redisCatchStorage.updateStreamAuthorityInfo(param.getApp(), param.getStream(), streamAuthorityInfo);
         // 通知assist新的callId
         if (mediaInfo != null) {
         if (mediaInfo != null && mediaInfo.getRecordAssistPort() > 0) {
            assistRESTfulUtils.addStreamCallInfo(mediaInfo, param.getApp(), param.getStream(), callId, null);
         }
      }else {
@@ -445,12 +443,15 @@
            if (streamInfo!=null){
               redisCatchStorage.stopPlay(streamInfo);
               storager.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
               // 如果正在给上级推送,则发送bye
            }else{
               streamInfo = redisCatchStorage.queryPlayback(null, null, stream, null);
               if (streamInfo != null) {
                  redisCatchStorage.stopPlayback(streamInfo.getDeviceID(), streamInfo.getChannelId(),
                        streamInfo.getStream(), null);
               }
               // 如果正在给上级推送,则发送bye
            }
         }else {
            if (!"rtp".equals(app)){