Commit 782e8b98004945c49a37421cf9ea3da11d683c37

Authored by 648540858
1 parent ebc65b40

修复sendRtpItem写入不及时导致的发流失败

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 512 }
513 513 });
514 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 519 SSRCInfo ssrcInfo = playService.play(mediaServerItem, device.getDeviceId(), channelId, ssrc, ((code, msg, data) -> {
517 520 if (code == InviteErrorCode.SUCCESS.getCode()) {
518 521 hookEvent.run(code, msg, data);
... ... @@ -524,9 +527,6 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
524 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 530 sendRtpItem.setSsrc(ssrcInfo.getSsrc());
531 531 redisCatchStorage.updateSendRTPSever(sendRtpItem);
532 532  
... ...