Commit fc7f1b3459d9c65a37cae25bc254a6a3d62cc6db

Authored by xubinbin
1 parent a574ff09

处理上级平台发送的invite请求不携带“y=”sdp信息时,使用默认“y=0000000000”视频无法播放的问题。

src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
@@ -332,14 +332,14 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -332,14 +332,14 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
332 content.append("m=video " + sendRtpItem.getLocalPort() + " RTP/AVP 96\r\n"); 332 content.append("m=video " + sendRtpItem.getLocalPort() + " RTP/AVP 96\r\n");
333 content.append("a=sendonly\r\n"); 333 content.append("a=sendonly\r\n");
334 content.append("a=rtpmap:96 PS/90000\r\n"); 334 content.append("a=rtpmap:96 PS/90000\r\n");
335 - content.append("y=" + ssrc + "\r\n"); 335 + content.append("y=" + sendRtpItem.getSsrc() + "\r\n");
336 content.append("f=\r\n"); 336 content.append("f=\r\n");
337 337
338 try { 338 try {
339 // 超时未收到Ack应该回复bye,当前等待时间为10秒 339 // 超时未收到Ack应该回复bye,当前等待时间为10秒
340 dynamicTask.startDelay(callIdHeader.getCallId(), () -> { 340 dynamicTask.startDelay(callIdHeader.getCallId(), () -> {
341 logger.info("Ack 等待超时"); 341 logger.info("Ack 等待超时");
342 - mediaServerService.releaseSsrc(mediaServerItemInUSe.getId(), ssrc); 342 + mediaServerService.releaseSsrc(mediaServerItemInUSe.getId(), sendRtpItem.getSsrc());
343 // 回复bye 343 // 回复bye
344 cmderFroPlatform.streamByeCmd(platform, callIdHeader.getCallId()); 344 cmderFroPlatform.streamByeCmd(platform, callIdHeader.getCallId());
345 }, 60 * 1000); 345 }, 60 * 1000);
@@ -421,6 +421,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements @@ -421,6 +421,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
421 SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false); 421 SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, null, device.isSsrcCheck(), false);
422 logger.info(JSONObject.toJSONString(ssrcInfo)); 422 logger.info(JSONObject.toJSONString(ssrcInfo));
423 sendRtpItem.setStreamId(ssrcInfo.getStream()); 423 sendRtpItem.setStreamId(ssrcInfo.getStream());
  424 + sendRtpItem.setSsrc(ssrc.equals(ssrcDefault) ? ssrcInfo.getSsrc() : ssrc);
424 425
425 // 写入redis, 超时时回复 426 // 写入redis, 超时时回复
426 redisCatchStorage.updateSendRTPSever(sendRtpItem); 427 redisCatchStorage.updateSendRTPSever(sendRtpItem);