Commit 782e8b98004945c49a37421cf9ea3da11d683c37
1 parent
ebc65b40
修复sendRtpItem写入不及时导致的发流失败
Showing
1 changed file
with
4 additions
and
4 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
| @@ -512,7 +512,10 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | @@ -512,7 +512,10 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | ||
| 512 | } | 512 | } |
| 513 | }); | 513 | }); |
| 514 | } else { | 514 | } else { |
| 515 | - | 515 | + sendRtpItem.setPlayType(InviteStreamType.PLAY); |
| 516 | + String streamId = String.format("%s_%s", device.getDeviceId(), channelId); | ||
| 517 | + sendRtpItem.setStreamId(streamId); | ||
| 518 | + redisCatchStorage.updateSendRTPSever(sendRtpItem); | ||
| 516 | SSRCInfo ssrcInfo = playService.play(mediaServerItem, device.getDeviceId(), channelId, ssrc, ((code, msg, data) -> { | 519 | SSRCInfo ssrcInfo = playService.play(mediaServerItem, device.getDeviceId(), channelId, ssrc, ((code, msg, data) -> { |
| 517 | if (code == InviteErrorCode.SUCCESS.getCode()) { | 520 | if (code == InviteErrorCode.SUCCESS.getCode()) { |
| 518 | hookEvent.run(code, msg, data); | 521 | hookEvent.run(code, msg, data); |
| @@ -524,9 +527,6 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | @@ -524,9 +527,6 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements | ||
| 524 | errorEvent.run(code, msg, data); | 527 | errorEvent.run(code, msg, data); |
| 525 | } | 528 | } |
| 526 | })); | 529 | })); |
| 527 | - sendRtpItem.setPlayType(InviteStreamType.PLAY); | ||
| 528 | - String streamId = String.format("%s_%s", device.getDeviceId(), channelId); | ||
| 529 | - sendRtpItem.setStreamId(streamId); | ||
| 530 | sendRtpItem.setSsrc(ssrcInfo.getSsrc()); | 530 | sendRtpItem.setSsrc(ssrcInfo.getSsrc()); |
| 531 | redisCatchStorage.updateSendRTPSever(sendRtpItem); | 531 | redisCatchStorage.updateSendRTPSever(sendRtpItem); |
| 532 | 532 |