panlinlin
2021-02-26 d0f5d684a93db3a0c9a6f2373657b8f596cc47ca
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -86,9 +86,6 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_flow_report API调用,参数:" + json.toString());
      }
      // TODO Auto-generated method stub
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("msg", "success");
@@ -106,8 +103,6 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_http_access API 调用,参数:" + json.toString());
      }
      // TODO Auto-generated method stub
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("err", "");
@@ -127,8 +122,6 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_play API调用,参数:" + json.toString());
      }
      // TODO Auto-generated method stub
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("msg", "success");
@@ -146,15 +139,10 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_publish API调用,参数:" + json.toString());
      }
      String app = json.getString("app");
      String streamId = json.getString("id");
      ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json);
      if (subscribe != null) subscribe.response(json);
      // TODO Auto-generated method stub
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("msg", "success");
@@ -175,8 +163,6 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_record_mp4 API调用,参数:" + json.toString());
      }
      // TODO Auto-generated method stub
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("msg", "success");
@@ -194,8 +180,6 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_rtsp_realm API调用,参数:" + json.toString());
      }
      // TODO Auto-generated method stub
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("realm", "");
@@ -214,8 +198,6 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_rtsp_auth API调用,参数:" + json.toString());
      }
      // TODO Auto-generated method stub
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("encrypted", false);
@@ -234,8 +216,13 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_shell_login API调用,参数:" + json.toString());
      }
      // TODO Auto-generated method stub
      // TODO 如果是带有rtpstream则开启按需拉流
      String app = json.getString("app");
      String stream = json.getString("stream");
      ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_publish, json);
      if (subscribe != null) subscribe.response(json);
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("msg", "success");
@@ -267,8 +254,6 @@
            redisCatchStorage.stopPlayback(streamInfo);
         }
      }
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("msg", "success");
@@ -316,8 +301,6 @@
      if (logger.isDebugEnabled()) {
         logger.debug("ZLM HOOK on_stream_not_found API调用,参数:" + json.toString());
      }
      // TODO Auto-generated method stub
      if (autoApplyPlay) {
         String app = json.getString("app");
         String streamId = json.getString("stream");
@@ -367,8 +350,6 @@
      mediaServerConfig.setWanIp(StringUtils.isEmpty(mediaWanIp)? mediaIp: mediaWanIp);
      mediaServerConfig.setLocalIP(mediaIp);
      redisCatchStorage.updateMediaInfo(mediaServerConfig);
      // TODO Auto-generated method stub
      JSONObject ret = new JSONObject();
      ret.put("code", 0);
      ret.put("msg", "success");