| | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.genersoft.iot.vmp.conf.DynamicTask; |
| | | import com.genersoft.iot.vmp.conf.UserSetting; |
| | | import com.genersoft.iot.vmp.media.event.MediaServerChangeEvent; |
| | | import com.genersoft.iot.vmp.media.event.MediaServerDeleteEvent; |
| | | import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerChangeEvent; |
| | | import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerDeleteEvent; |
| | | import com.genersoft.iot.vmp.media.service.IMediaServerService; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.MediaServer; |
| | | import com.genersoft.iot.vmp.media.bean.MediaServer; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.ZLMServerConfig; |
| | | import com.genersoft.iot.vmp.media.zlm.event.HookZlmServerKeepaliveEvent; |
| | | import com.genersoft.iot.vmp.media.zlm.event.HookZlmServerStartEvent; |
| | |
| | | @Value("${server.port}") |
| | | private Integer serverPort; |
| | | |
| | | @Value("${server.servlet.context-path:}") |
| | | private String serverServletContextPath; |
| | | |
| | | @Autowired |
| | | private UserSetting userSetting; |
| | | |
| | |
| | | logger.info("[ZLM-添加待上线节点] ID:" + mediaServerItem.getId()); |
| | | offlineZlmPrimaryMap.put(mediaServerItem.getId(), mediaServerItem); |
| | | offlineZlmTimeMap.put(mediaServerItem.getId(), System.currentTimeMillis()); |
| | | execute(); |
| | | } |
| | | } |
| | | |
| | |
| | | logger.info("[媒体服务节点] 正在设置 :{} -> {}:{}", |
| | | mediaServerItem.getId(), mediaServerItem.getIp(), mediaServerItem.getHttpPort()); |
| | | String protocol = sslEnabled ? "https" : "http"; |
| | | String hookPrefix = String.format("%s://%s:%s/index/hook", protocol, mediaServerItem.getHookIp(), serverPort); |
| | | String hookPrefix = String.format("%s://%s:%s%s/index/hook", protocol, mediaServerItem.getHookIp(), serverPort, (serverServletContextPath == null || "/".equals(serverServletContextPath)) ? "" : serverServletContextPath); |
| | | |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("api.secret",mediaServerItem.getSecret()); // -profile:v Baseline |