From 3884e9a56aeab7ac2ad7c9483059adc0df6683d9 Mon Sep 17 00:00:00 2001 From: jiang <893224616@qq.com> Date: 星期三, 07 九月 2022 15:56:48 +0800 Subject: [PATCH] 1.根据redis消息更新推流列表时同时更新在线状态 2.推流列表的模板增加在线状态 --- src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java index 8f5d5af..ec09ce5 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java @@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.gb28181.session.SsrcConfig; import com.genersoft.iot.vmp.media.zlm.ZLMServerConfig; import io.swagger.v3.oas.annotations.media.Schema; +import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; import java.util.HashMap; @@ -106,9 +107,9 @@ public MediaServerItem(ZLMServerConfig zlmServerConfig, String sipIp) { id = zlmServerConfig.getGeneralMediaServerId(); ip = zlmServerConfig.getIp(); - hookIp = StringUtils.isEmpty(zlmServerConfig.getHookIp())? sipIp: zlmServerConfig.getHookIp(); - sdpIp = StringUtils.isEmpty(zlmServerConfig.getSdpIp())? zlmServerConfig.getIp(): zlmServerConfig.getSdpIp(); - streamIp = StringUtils.isEmpty(zlmServerConfig.getStreamIp())? zlmServerConfig.getIp(): zlmServerConfig.getStreamIp(); + hookIp = ObjectUtils.isEmpty(zlmServerConfig.getHookIp())? sipIp: zlmServerConfig.getHookIp(); + sdpIp = ObjectUtils.isEmpty(zlmServerConfig.getSdpIp())? zlmServerConfig.getIp(): zlmServerConfig.getSdpIp(); + streamIp = ObjectUtils.isEmpty(zlmServerConfig.getStreamIp())? zlmServerConfig.getIp(): zlmServerConfig.getStreamIp(); httpPort = zlmServerConfig.getHttpPort(); httpSSlPort = zlmServerConfig.getHttpSSLport(); rtmpPort = zlmServerConfig.getRtmpPort(); -- Gitblit v1.8.0