|
|
@@ -557,7 +557,6 @@ public class PlayServiceImpl implements IPlayService {
|
|
|
channel.getStreamIdentification());
|
|
|
snapOnPlay(hookData.getMediaServer(), device.getDeviceId(), channel.getChannelId(), ssrcInfo.getStream());
|
|
|
}, (eventResult) -> {
|
|
|
- logger.info("xjw 9 {}", JSONUtil.toJsonStr(eventResult));
|
|
|
// 处理收到200ok后的TCP主动连接以及SSRC不一致的问题
|
|
|
InviteOKHandler(eventResult, ssrcInfo, mediaServerItem, device, channel.getChannelId(),
|
|
|
timeOutTaskKey, callback, inviteInfo, InviteSessionType.PLAY);
|
|
|
@@ -597,7 +596,6 @@ public class PlayServiceImpl implements IPlayService {
|
|
|
|
|
|
inviteStreamService.removeInviteInfoByDeviceAndChannel(InviteSessionType.PLAY, device.getDeviceId(), channel.getChannelId());
|
|
|
}
|
|
|
- logger.info("xjw 2");
|
|
|
}
|
|
|
|
|
|
private void tcpActiveHandler(Device device, String channelId, String contentString,
|
|
|
@@ -865,19 +863,15 @@ public class PlayServiceImpl implements IPlayService {
|
|
|
InviteInfo inviteInfo, InviteSessionType inviteSessionType){
|
|
|
inviteInfo.setStatus(InviteSessionStatus.ok);
|
|
|
ResponseEvent responseEvent = (ResponseEvent) eventResult.event;
|
|
|
- logger.info("xjw 11 {}",JSONUtil.toJsonStr(responseEvent));
|
|
|
String contentString = new String(responseEvent.getResponse().getRawContent());
|
|
|
String ssrcInResponse = SipUtils.getSsrcFromSdp(contentString);
|
|
|
- logger.info("xjw 12 {}",ssrcInResponse);
|
|
|
// 兼容回复的消息中缺少ssrc(y字段)的情况
|
|
|
if (ssrcInResponse == null) {
|
|
|
ssrcInResponse = ssrcInfo.getSsrc();
|
|
|
}
|
|
|
if (ssrcInfo.getSsrc().equals(ssrcInResponse)) {
|
|
|
- logger.info("xjw 13 {}",JSONUtil.toJsonStr(mediaServerItem));
|
|
|
// ssrc 一致
|
|
|
if (mediaServerItem.isRtpEnable()) {
|
|
|
- logger.info("xjw 14 {}",JSONUtil.toJsonStr(device));
|
|
|
// 多端口
|
|
|
if (device.getStreamMode().equalsIgnoreCase("TCP-ACTIVE")) {
|
|
|
tcpActiveHandler(device, channelId, contentString, mediaServerItem, timeOutTaskKey, ssrcInfo, callback);
|