Merge branch 'wvp-28181-2.0'

# Conflicts:
#	src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
#	src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
#	src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
This commit is contained in:
648540858
2022-09-26 11:25:53 +08:00
75 changed files with 3141 additions and 3424 deletions

View File

@@ -2,6 +2,9 @@ package com.genersoft.iot.vmp.conf;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.vmanager.gb28181.device.DeviceQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.ObjectUtils;
@@ -15,6 +18,8 @@ import java.util.regex.Pattern;
@Configuration("mediaConfig")
public class MediaConfig{
private final static Logger logger = LoggerFactory.getLogger(MediaConfig.class);
// 修改必须配置,不再支持自动获取
@Value("${media.id}")
private String id;
@@ -174,7 +179,7 @@ public class MediaConfig{
try {
hostAddress = InetAddress.getByName(sdpIp).getHostAddress();
} catch (UnknownHostException e) {
throw new RuntimeException(e);
logger.error("[获取SDP IP]: 域名解析失败");
}
return hostAddress;
}

View File

@@ -1,7 +1,10 @@
package com.genersoft.iot.vmp.conf;
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd.AlarmQueryMessageHandler;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.utils.SystemInfoUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -14,6 +17,8 @@ import java.util.Map;
@Component
public class SystemInfoTimerTask {
private Logger logger = LoggerFactory.getLogger(SystemInfoTimerTask.class);
@Autowired
private IRedisCatchStorage redisCatchStorage;
@@ -27,7 +32,7 @@ public class SystemInfoTimerTask {
Map<String, String> networkInterfaces = SystemInfoUtils.getNetworkInterfaces();
redisCatchStorage.addNetInfo(networkInterfaces);
} catch (InterruptedException e) {
e.printStackTrace();
logger.error("[获取系统信息失败] {}", e.getMessage());
}
}

View File

@@ -2,35 +2,23 @@ package com.genersoft.iot.vmp.conf;
import com.genersoft.iot.vmp.common.VersionPo;
import com.genersoft.iot.vmp.utils.GitUtil;
import com.genersoft.iot.vmp.utils.JarFileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Map;
@Component
public class VersionInfo {
@Autowired
VersionConfig config;
@Autowired
GitUtil gitUtil;
@Autowired
JarFileUtils jarFileUtils;
public VersionPo getVersion() {
VersionPo versionPo = new VersionPo();
Map<String,String> map=jarFileUtils.readJarFile();
versionPo.setGIT_Revision(gitUtil.getGitCommitId());
versionPo.setCreate_By(map.get("Created-By"));
versionPo.setGIT_BRANCH(gitUtil.getBranch());
versionPo.setGIT_URL(gitUtil.getGitUrl());
versionPo.setBUILD_DATE(gitUtil.getBuildDate());
versionPo.setArtifactId(config.getArtifactId());
versionPo.setGIT_Revision_SHORT(gitUtil.getCommitIdShort());
versionPo.setVersion(config.getVersion());
versionPo.setProject(config.getDescription());
versionPo.setBuild_Jdk(map.get("Build-Jdk"));
versionPo.setVersion(gitUtil.getBuildVersion());
return versionPo;
}

View File

@@ -0,0 +1,51 @@
package com.genersoft.iot.vmp.conf.exception;
import com.sun.javafx.binding.StringFormatter;
/**
* @author lin
*/
public class SsrcTransactionNotFoundException extends Exception{
private String deviceId;
private String channelId;
private String callId;
private String stream;
public SsrcTransactionNotFoundException(String deviceId, String channelId, String callId, String stream) {
this.deviceId = deviceId;
this.channelId = channelId;
this.callId = callId;
this.stream = stream;
}
public String getDeviceId() {
return deviceId;
}
public String getChannelId() {
return channelId;
}
public String getCallId() {
return callId;
}
public String getStream() {
return stream;
}
@Override
public String getMessage() {
StringBuffer msg = new StringBuffer();
msg.append(StringFormatter.format("缓存事务信息未找到device%s channel: %s ", deviceId, channelId));
if (callId != null) {
msg.append("callId: " + callId);
}
if (stream != null) {
msg.append("stream: " + stream);
}
return msg.toString();
}
}