Commit 4fbc364ab3dc09d8c364d751f97299bdb9510bd5

Authored by 648540858
1 parent 3cada227

合并主线

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