Merge branch 'wvp-28181-2.0' into database-structure-optimization
commit
288b4d4a41
|
@ -153,7 +153,7 @@ user-settings:
|
|||
# 国标是否录制
|
||||
record-sip: true
|
||||
# 是否将日志存储进数据库
|
||||
logInDatebase: true
|
||||
logInDatabase: true
|
||||
# 第三方匹配,用于从stream钟获取有效信息
|
||||
thirdPartyGBIdReg: [\s\S]*
|
||||
```
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ApiAccessFilter extends OncePerRequestFilter {
|
|||
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
|
||||
if (uriName != null && userSetting != null && userSetting.getLogInDatebase() != null && userSetting.getLogInDatebase()) {
|
||||
if (uriName != null && userSetting != null && userSetting.getLogInDatabase() != null && userSetting.getLogInDatabase()) {
|
||||
|
||||
LogDto logDto = new LogDto();
|
||||
logDto.setName(uriName);
|
||||
|
|
|
@ -31,7 +31,7 @@ public class UserSetting {
|
|||
|
||||
private Boolean recordSip = Boolean.TRUE;
|
||||
|
||||
private Boolean logInDatebase = Boolean.TRUE;
|
||||
private Boolean logInDatabase = Boolean.TRUE;
|
||||
|
||||
private Boolean usePushingAsStatus = Boolean.TRUE;
|
||||
|
||||
|
@ -132,12 +132,12 @@ public class UserSetting {
|
|||
this.interfaceAuthenticationExcludes = interfaceAuthenticationExcludes;
|
||||
}
|
||||
|
||||
public Boolean getLogInDatebase() {
|
||||
return logInDatebase;
|
||||
public Boolean getLogInDatabase() {
|
||||
return logInDatabase;
|
||||
}
|
||||
|
||||
public void setLogInDatebase(Boolean logInDatebase) {
|
||||
this.logInDatebase = logInDatebase;
|
||||
public void setLogInDatabase(Boolean logInDatabase) {
|
||||
this.logInDatabase = logInDatabase;
|
||||
}
|
||||
|
||||
public String getServerId() {
|
||||
|
|
|
@ -18,10 +18,7 @@ import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
|
|||
import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.*;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
|
||||
import com.genersoft.iot.vmp.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.service.IPlayService;
|
||||
import com.genersoft.iot.vmp.service.IStreamProxyService;
|
||||
import com.genersoft.iot.vmp.service.IStreamPushService;
|
||||
import com.genersoft.iot.vmp.service.*;
|
||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
||||
import com.genersoft.iot.vmp.service.bean.MessageForPushChannel;
|
||||
|
@ -79,6 +76,9 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||
@Autowired
|
||||
private IRedisCatchStorage redisCatchStorage;
|
||||
|
||||
@Autowired
|
||||
private IInviteStreamService inviteStreamService;
|
||||
|
||||
@Autowired
|
||||
private SSRCFactory ssrcFactory;
|
||||
|
||||
|
@ -479,13 +479,13 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||
errorEvent.run(code, msg, data);
|
||||
}
|
||||
});
|
||||
}else if ("Download".equalsIgnoreCase(sessionName)) {
|
||||
} else if ("Download".equalsIgnoreCase(sessionName)) {
|
||||
// 获取指定的下载速度
|
||||
Vector sdpMediaDescriptions = sdp.getMediaDescriptions(true);
|
||||
MediaDescription mediaDescription = null;
|
||||
String downloadSpeed = "1";
|
||||
if (sdpMediaDescriptions.size() > 0) {
|
||||
mediaDescription = (MediaDescription)sdpMediaDescriptions.get(0);
|
||||
mediaDescription = (MediaDescription) sdpMediaDescriptions.get(0);
|
||||
}
|
||||
if (mediaDescription != null) {
|
||||
downloadSpeed = mediaDescription.getAttribute("downloadspeed");
|
||||
|
@ -499,26 +499,26 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
|
|||
playService.download(mediaServerItem, ssrcInfo, device.getDeviceId(), channelId, DateUtil.formatter.format(start),
|
||||
DateUtil.formatter.format(end), Integer.parseInt(downloadSpeed),
|
||||
(code, msg, data) -> {
|
||||
if (code == InviteErrorCode.SUCCESS.getCode()){
|
||||
if (code == InviteErrorCode.SUCCESS.getCode()) {
|
||||
hookEvent.run(code, msg, data);
|
||||
}else if (code == InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getCode() || code == InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getCode()){
|
||||
} else if (code == InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getCode() || code == InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getCode()) {
|
||||
logger.info("[录像下载]超时, 用户:{}, 通道:{}", username, channelId);
|
||||
redisCatchStorage.deleteSendRTPServer(platform.getServerGBId(), channelId, callIdHeader.getCallId(), null);
|
||||
errorEvent.run(code, msg, data);
|
||||
}else {
|
||||
} else {
|
||||
errorEvent.run(code, msg, data);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
} else {
|
||||
|
||||
SSRCInfo ssrcInfo = playService.play(mediaServerItem, device.getDeviceId(), channelId, ssrc, ((code, msg, data) -> {
|
||||
if (code == InviteErrorCode.SUCCESS.getCode()){
|
||||
if (code == InviteErrorCode.SUCCESS.getCode()) {
|
||||
hookEvent.run(code, msg, data);
|
||||
}else if (code == InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getCode() || code == InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getCode()){
|
||||
} else if (code == InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getCode() || code == InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getCode()) {
|
||||
logger.info("[上级点播]超时, 用户:{}, 通道:{}", username, channelId);
|
||||
redisCatchStorage.deleteSendRTPServer(platform.getServerGBId(), channelId, callIdHeader.getCallId(), null);
|
||||
errorEvent.run(code, msg, data);
|
||||
}else {
|
||||
} else {
|
||||
errorEvent.run(code, msg, data);
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -61,7 +61,7 @@ public class LogController {
|
|||
query = null;
|
||||
}
|
||||
|
||||
if (!userSetting.getLogInDatebase()) {
|
||||
if (!userSetting.getLogInDatabase()) {
|
||||
logger.warn("自动记录日志功能已关闭,查询结果可能不完整。");
|
||||
}
|
||||
|
||||
|
|
|
@ -223,8 +223,6 @@ public class PsController {
|
|||
String is_Udp = isUdp ? "1" : "0";
|
||||
param.put("is_udp", is_Udp);
|
||||
param.put("src_port", sendInfo.getSendLocalPort());
|
||||
param.put("use_ps", "0");
|
||||
param.put("only_audio", "1");
|
||||
|
||||
|
||||
Boolean streamReady = zlmServerFactory.isStreamReady(mediaServerItem, app, stream);
|
||||
|
|
|
@ -247,7 +247,6 @@ public class RtpController {
|
|||
String is_Udp = isUdp ? "1" : "0";
|
||||
paramForAudio.put("is_udp", is_Udp);
|
||||
paramForAudio.put("src_port", sendInfo.getSendLocalPortForAudio());
|
||||
paramForAudio.put("use_ps", "0");
|
||||
paramForAudio.put("only_audio", "1");
|
||||
if (ptForAudio != null) {
|
||||
paramForAudio.put("pt", ptForAudio);
|
||||
|
@ -268,7 +267,6 @@ public class RtpController {
|
|||
String is_Udp = isUdp ? "1" : "0";
|
||||
paramForVideo.put("is_udp", is_Udp);
|
||||
paramForVideo.put("src_port", sendInfo.getSendLocalPortForVideo());
|
||||
paramForVideo.put("use_ps", "0");
|
||||
paramForVideo.put("only_audio", "0");
|
||||
if (ptForVideo != null) {
|
||||
paramForVideo.put("pt", ptForVideo);
|
||||
|
|
|
@ -178,7 +178,7 @@ user-settings:
|
|||
# 国标是否录制
|
||||
record-sip: true
|
||||
# 是否将日志存储进数据库
|
||||
logInDatebase: true
|
||||
logInDatabase: true
|
||||
# 使用推流状态作为推流通道状态
|
||||
use-pushing-as-status: true
|
||||
# 使用来源请求ip作为streamIp,当且仅当你只有zlm节点它与wvp在一起的情况下开启
|
||||
|
|
Loading…
Reference in New Issue