From 221f99c764b51c3cd284c6e5a41492c26c5c7ffc Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期五, 09 九月 2022 17:06:19 +0800 Subject: [PATCH] 优化sip消息 --- src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java b/src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java index f61ae09..b4d254a 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java @@ -14,6 +14,7 @@ import gov.nist.javax.sip.stack.SIPDialog; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; /** @@ -110,16 +111,16 @@ public SsrcTransaction getSsrcTransaction(String deviceId, String channelId, String callId, String stream){ - if (StringUtils.isEmpty(deviceId)) { + if (ObjectUtils.isEmpty(deviceId)) { deviceId ="*"; } - if (StringUtils.isEmpty(channelId)) { + if (ObjectUtils.isEmpty(channelId)) { channelId ="*"; } - if (StringUtils.isEmpty(callId)) { + if (ObjectUtils.isEmpty(callId)) { callId ="*"; } - if (StringUtils.isEmpty(stream)) { + if (ObjectUtils.isEmpty(stream)) { stream ="*"; } String key = VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId() + "_" + deviceId + "_" + channelId + "_" + callId+ "_" + stream; @@ -131,16 +132,16 @@ } public List<SsrcTransaction> getSsrcTransactionForAll(String deviceId, String channelId, String callId, String stream){ - if (StringUtils.isEmpty(deviceId)) { + if (ObjectUtils.isEmpty(deviceId)) { deviceId ="*"; } - if (StringUtils.isEmpty(channelId)) { + if (ObjectUtils.isEmpty(channelId)) { channelId ="*"; } - if (StringUtils.isEmpty(callId)) { + if (ObjectUtils.isEmpty(callId)) { callId ="*"; } - if (StringUtils.isEmpty(stream)) { + if (ObjectUtils.isEmpty(stream)) { stream ="*"; } String key = VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId() + "_" + deviceId + "_" + channelId + "_" + callId+ "_" + stream; -- Gitblit v1.8.0