From 5b3dc4d5957050c2ce3e3c0013337168d8c9f700 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 14 九月 2022 16:11:18 +0800
Subject: [PATCH] 优化点播结束后关闭RTPServer
---
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