Commit 4fbc364ab3dc09d8c364d751f97299bdb9510bd5
1 parent
3cada227
合并主线
Showing
3 changed files
with
7 additions
and
5 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl; |
| 2 | 2 | |
| 3 | -import com.genersoft.iot.vmp.common.VideoManagerConstants; | |
| 3 | +import com.alibaba.fastjson2.JSON; | |
| 4 | +import com.alibaba.fastjson2.JSONObject; | |
| 4 | 5 | import com.genersoft.iot.vmp.common.StreamInfo; |
| 6 | +import com.genersoft.iot.vmp.common.VideoManagerConstants; | |
| 5 | 7 | import com.genersoft.iot.vmp.conf.DynamicTask; |
| 6 | 8 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 7 | 9 | import com.genersoft.iot.vmp.conf.UserSetting; |
| ... | ... | @@ -428,7 +430,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 428 | 430 | Map<String, Object> param = new HashMap<>(12); |
| 429 | 431 | param.put("vhost","__defaultVhost__"); |
| 430 | 432 | param.put("app",sendRtpItem.getApp()); |
| 431 | - param.put("stream",sendRtpItem.getStreamId()); | |
| 433 | + param.put("stream",sendRtpItem.getStream()); | |
| 432 | 434 | param.put("ssrc", sendRtpItem.getSsrc()); |
| 433 | 435 | if (!sendRtpItem.isTcpActive()) { |
| 434 | 436 | param.put("dst_url",sendRtpItem.getIp()); |
| ... | ... | @@ -444,7 +446,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements |
| 444 | 446 | // 开启rtcp保活 |
| 445 | 447 | param.put("udp_rtcp_timeout", sendRtpItem.isRtcp()? "1":"0"); |
| 446 | 448 | } |
| 447 | - JSONObject startSendRtpStreamResult = zlmServerFactory.startSendRtpStreamForPassive(mediaInfo, param); | |
| 449 | + JSONObject startSendRtpStreamResult = zlmServerFactory.startSendRtpPassive(mediaInfo, param); | |
| 448 | 450 | if (startSendRtpStreamResult != null) { |
| 449 | 451 | startSendRtpStreamHand(evt, sendRtpItem, null, startSendRtpStreamResult, param, callIdHeader); |
| 450 | 452 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
| ... | ... | @@ -720,7 +720,7 @@ public class ZLMHttpHookListener { |
| 720 | 720 | |
| 721 | 721 | if (!exist) { |
| 722 | 722 | SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaInfo, param.getStream(), null, |
| 723 | - device.isSsrcCheck(), true, 0, false, device.getStreamModeForParam()); | |
| 723 | + device.isSsrcCheck(), true, 0, false, false, device.getStreamModeForParam()); | |
| 724 | 724 | playService.playBack(mediaInfo, ssrcInfo, deviceId, channelId, startTime, endTime, (code, message, data) -> { |
| 725 | 725 | msg.setData(new HookResult(code, message)); |
| 726 | 726 | resultHolder.invokeResult(msg); | ... | ... |
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
| ... | ... | @@ -234,7 +234,7 @@ public class PlayServiceImpl implements IPlayService { |
| 234 | 234 | sendRtpItem.setReceiveStream(stream + "_talk"); |
| 235 | 235 | |
| 236 | 236 | String callId = SipUtils.getNewCallId(); |
| 237 | - int port = sendRtpPortManager.getNextPort(mediaServerItem.getId()); | |
| 237 | + int port = sendRtpPortManager.getNextPort(mediaServerItem); | |
| 238 | 238 | //端口获取失败的ssrcInfo 没有必要发送点播指令 |
| 239 | 239 | if (port <= 0) { |
| 240 | 240 | logger.info("[语音对讲] 端口分配异常,deviceId={},channelId={}", device.getDeviceId(), channelId); | ... | ... |