Browse Source

修复重启zlm导致的点播失败

pull/31/head
panlinlin 4 years ago
parent
commit
05960d3573
  1. 5
      src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java

5
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java

@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -68,6 +69,9 @@ public class ZLMHttpHookListener {
@Value("${media.ip}")
private String mediaIp;
@Value("${media.wanIp}")
private String mediaWanIp;
@Value("${media.port}")
private int mediaPort;
@ -358,6 +362,7 @@ public class ZLMHttpHookListener {
// List<MediaServerConfig> mediaServerConfigs = JSON.parseArray(JSON.toJSONString(json), MediaServerConfig.class);
// MediaServerConfig mediaServerConfig = mediaServerConfigs.get(0);
MediaServerConfig mediaServerConfig = JSON.toJavaObject(json, MediaServerConfig.class);
mediaServerConfig.setWanIp(StringUtils.isEmpty(mediaWanIp)? mediaIp: mediaWanIp);
mediaServerConfig.setLocalIP(mediaIp);
redisCatchStorage.updateMediaInfo(mediaServerConfig);
// TODO Auto-generated method stub

Loading…
Cancel
Save