Commit 6b03568c5dd128a3d71c02fb1a3a76a4344a4920

Authored by 648540858
1 parent ecf84bb0

优化rtcp判断

src/main/java/com/genersoft/iot/vmp/gb28181/bean/SendRtpItem.java
1 1 package com.genersoft.iot.vmp.gb28181.bean;
2 2  
3   -import gov.nist.javax.sip.message.SIPRequest;
4   -
5 3 public class SendRtpItem {
6 4  
7 5 /**
... ... @@ -108,6 +106,11 @@ public class SendRtpItem {
108 106 */
109 107 private boolean onlyAudio = false;
110 108  
  109 + /**
  110 + * 是否开启rtcp保活
  111 + */
  112 + private boolean rtcp = false;
  113 +
111 114  
112 115 /**
113 116 * 播放类型
... ... @@ -281,4 +284,12 @@ public class SendRtpItem {
281 284 public void setToTag(String toTag) {
282 285 this.toTag = toTag;
283 286 }
  287 +
  288 + public boolean isRtcp() {
  289 + return rtcp;
  290 + }
  291 +
  292 + public void setRtcp(boolean rtcp) {
  293 + this.rtcp = rtcp;
  294 + }
284 295 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java
1 1 package com.genersoft.iot.vmp.gb28181.session;
2 2  
3   -import java.util.ArrayList;
4   -import java.util.List;
5   -
  3 +import com.alibaba.fastjson2.JSON;
6 4 import com.genersoft.iot.vmp.common.VideoManagerConstants;
7 5 import com.genersoft.iot.vmp.conf.UserSetting;
8 6 import com.genersoft.iot.vmp.gb28181.bean.SipTransactionInfo;
... ... @@ -13,6 +11,9 @@ import org.springframework.beans.factory.annotation.Autowired;
13 11 import org.springframework.stereotype.Component;
14 12 import org.springframework.util.ObjectUtils;
15 13  
  14 +import java.util.ArrayList;
  15 +import java.util.List;
  16 +
16 17 /**
17 18 * @description:视频流session管理器,管理视频预览、预览回放的通信句柄
18 19 * @author: swwheihei
... ... @@ -27,7 +28,8 @@ public class VideoStreamSessionManager {
27 28 public enum SessionType {
28 29 play,
29 30 playback,
30   - download
  31 + download,
  32 + broadcast
31 33 }
32 34  
33 35 /**
... ... @@ -50,9 +52,8 @@ public class VideoStreamSessionManager {
50 52 ssrcTransaction.setSsrc(ssrc);
51 53 ssrcTransaction.setMediaServerId(mediaServerId);
52 54 ssrcTransaction.setType(type);
53   -
54   - RedisUtil.set(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId()
55   - + "_" + deviceId + "_" + channelId + "_" + callId + "_" + stream, ssrcTransaction);
  55 + System.out.println(22222);
  56 + System.out.println(JSON.toJSONString(ssrcTransaction));
56 57 RedisUtil.set(VideoManagerConstants.MEDIA_TRANSACTION_USED_PREFIX + userSetting.getServerId()
57 58 + "_" + deviceId + "_" + channelId + "_" + callId + "_" + stream, ssrcTransaction);
58 59 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
... ... @@ -646,7 +646,7 @@ public class SIPCommander implements ISIPCommander {
646 646 * 视频流停止, 不使用回调
647 647 */
648 648 @Override
649   - public synchronized void streamByeCmd(Device device, String channelId, String stream, String callId) throws InvalidArgumentException, ParseException, SipException, SsrcTransactionNotFoundException {
  649 + public void streamByeCmd(Device device, String channelId, String stream, String callId) throws InvalidArgumentException, ParseException, SipException, SsrcTransactionNotFoundException {
650 650 streamByeCmd(device, channelId, stream, callId, null);
651 651 }
652 652  
... ... @@ -654,7 +654,7 @@ public class SIPCommander implements ISIPCommander {
654 654 * 视频流停止
655 655 */
656 656 @Override
657   - public synchronized void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException {
  657 + public void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException {
658 658 SsrcTransaction ssrcTransaction = streamSession.getSsrcTransaction(device.getDeviceId(), channelId, callId, stream);
659 659 if (ssrcTransaction == null) {
660 660 throw new SsrcTransactionNotFoundException(device.getDeviceId(), channelId, callId, stream);
... ... @@ -669,7 +669,7 @@ public class SIPCommander implements ISIPCommander {
669 669 }
670 670  
671 671 @Override
672   - public synchronized void streamByeCmd(Device device, String channelId, SipTransactionInfo sipTransactionInfo, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException {
  672 + public void streamByeCmd(Device device, String channelId, SipTransactionInfo sipTransactionInfo, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException {
673 673 Request byteRequest = headerProvider.createByteRequest(device, channelId, sipTransactionInfo);
674 674 sipSender.transmitRequest(device.getTransport(), byteRequest, null, okEvent);
675 675 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/AckRequestProcessor.java
... ... @@ -4,10 +4,10 @@ import com.alibaba.fastjson2.JSON;
4 4 import com.alibaba.fastjson2.JSONObject;
5 5 import com.genersoft.iot.vmp.conf.DynamicTask;
6 6 import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
7   -import com.genersoft.iot.vmp.gb28181.bean.*;
8   -import com.genersoft.iot.vmp.gb28181.session.AudioBroadcastManager;
  7 +import com.genersoft.iot.vmp.gb28181.bean.Device;
9 8 import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
10 9 import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
  10 +import com.genersoft.iot.vmp.gb28181.session.AudioBroadcastManager;
11 11 import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
12 12 import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander;
13 13 import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
... ... @@ -22,15 +22,12 @@ import com.genersoft.iot.vmp.service.bean.RequestPushStreamMsg;
22 22 import com.genersoft.iot.vmp.service.redisMsg.RedisGbPlayMsgListener;
23 23 import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
24 24 import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
25   -import gov.nist.javax.sip.message.SIPRequest;
26   -import gov.nist.javax.sip.stack.SIPDialog;
27 25 import org.slf4j.Logger;
28 26 import org.slf4j.LoggerFactory;
29 27 import org.springframework.beans.factory.InitializingBean;
30 28 import org.springframework.beans.factory.annotation.Autowired;
31 29 import org.springframework.stereotype.Component;
32 30  
33   -import javax.sip.*;
34 31 import javax.sip.InvalidArgumentException;
35 32 import javax.sip.RequestEvent;
36 33 import javax.sip.SipException;
... ... @@ -38,7 +35,6 @@ import javax.sip.address.SipURI;
38 35 import javax.sip.header.CallIdHeader;
39 36 import javax.sip.header.FromHeader;
40 37 import javax.sip.header.HeaderAddress;
41   -import java.text.ParseException;
42 38 import javax.sip.header.ToHeader;
43 39 import java.text.ParseException;
44 40 import java.util.HashMap;
... ... @@ -122,7 +118,8 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
122 118 }
123 119 String is_Udp = sendRtpItem.isTcp() ? "0" : "1";
124 120 MediaServerItem mediaInfo = mediaServerService.getOne(sendRtpItem.getMediaServerId());
125   - logger.info("收到ACK,rtp/{}开始向上级推流, 目标={}:{},SSRC={}", sendRtpItem.getStreamId(), sendRtpItem.getIp(), sendRtpItem.getPort(), sendRtpItem.getSsrc());
  121 + logger.info("收到ACK,rtp/{}开始向上级推流, 目标={}:{},SSRC={}, RTCP={}", sendRtpItem.getStreamId(),
  122 + sendRtpItem.getIp(), sendRtpItem.getPort(), sendRtpItem.getSsrc(), sendRtpItem.isRtcp());
126 123 Map<String, Object> param = new HashMap<>(12);
127 124 param.put("vhost","__defaultVhost__");
128 125 param.put("app",sendRtpItem.getApp());
... ... @@ -132,9 +129,9 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
132 129 param.put("pt", sendRtpItem.getPt());
133 130 param.put("use_ps", sendRtpItem.isUsePs() ? "1" : "0");
134 131 param.put("only_audio", sendRtpItem.isOnlyAudio() ? "1" : "0");
135   - if (!sendRtpItem.isTcp() && parentPlatform != null && parentPlatform.isRtcp()) {
  132 + if (!sendRtpItem.isTcp()) {
136 133 // 开启rtcp保活
137   - param.put("udp_rtcp_timeout", "1");
  134 + param.put("udp_rtcp_timeout", sendRtpItem.isRtcp()? "1":"0");
138 135 }
139 136  
140 137 JSONObject jsonObject;
... ... @@ -145,6 +142,9 @@ public class AckRequestProcessor extends SIPRequestProcessorParent implements In
145 142 param.put("dst_url", sendRtpItem.getIp());
146 143 param.put("dst_port", sendRtpItem.getPort());
147 144 jsonObject = zlmrtpServerFactory.startSendRtpStream(mediaInfo, param);
  145 + System.out.println(JSON.toJSONString(param));
  146 + System.out.println();
  147 + System.out.println(jsonObject);
148 148 }
149 149  
150 150 if (jsonObject == null) {
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
... ... @@ -126,6 +126,9 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
126 126 @Autowired
127 127 private SipConfig config;
128 128  
  129 + @Autowired
  130 + private VideoStreamSessionManager streamSession;
  131 +
129 132  
130 133  
131 134 @Autowired
... ... @@ -383,7 +386,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
383 386 }
384 387 SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId,
385 388 device.getDeviceId(), channelId,
386   - mediaTransmissionTCP);
  389 + mediaTransmissionTCP, platform.isRtcp());
387 390  
388 391 if (tcpActive != null) {
389 392 sendRtpItem.setTcpActive(tcpActive);
... ... @@ -579,7 +582,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
579 582 // 自平台内容
580 583 SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId,
581 584 gbStream.getApp(), gbStream.getStream(), channelId,
582   - mediaTransmissionTCP);
  585 + mediaTransmissionTCP, platform.isRtcp());
583 586  
584 587 if (sendRtpItem == null) {
585 588 logger.warn("服务器端口资源不足");
... ... @@ -619,7 +622,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
619 622 // 自平台内容
620 623 SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId,
621 624 gbStream.getApp(), gbStream.getStream(), channelId,
622   - mediaTransmissionTCP);
  625 + mediaTransmissionTCP, platform.isRtcp());
623 626  
624 627 if (sendRtpItem == null) {
625 628 logger.warn("服务器端口资源不足");
... ... @@ -736,7 +739,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
736 739 dynamicTask.stop(callIdHeader.getCallId());
737 740 if (serverId.equals(userSetting.getServerId())) {
738 741 SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, finalPort, ssrc, requesterId,
739   - app, stream, channelId, mediaTransmissionTCP);
  742 + app, stream, channelId, mediaTransmissionTCP, platform.isRtcp());
740 743  
741 744 if (sendRtpItem == null) {
742 745 logger.warn("上级点时创建sendRTPItem失败,可能是服务器端口资源不足");
... ... @@ -798,7 +801,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
798 801 // 发送redis消息
799 802 redisGbPlayMsgListener.sendMsg(streamPushItem.getServerId(), streamPushItem.getMediaServerId(),
800 803 streamPushItem.getApp(), streamPushItem.getStream(), addressStr, port, ssrc, requesterId,
801   - channelId, mediaTransmissionTCP, null, responseSendItemMsg -> {
  804 + channelId, mediaTransmissionTCP, platform.isRtcp(), null, responseSendItemMsg -> {
802 805 SendRtpItem sendRtpItem = responseSendItemMsg.getSendRtpItem();
803 806 if (sendRtpItem == null || responseSendItemMsg.getMediaServerItem() == null) {
804 807 logger.warn("服务器端口资源不足");
... ... @@ -904,6 +907,7 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
904 907 }
905 908 if (device != null) {
906 909 logger.info("收到设备" + requesterId + "的语音广播Invite请求");
  910 +
907 911 try {
908 912 responseAck(request, Response.TRYING);
909 913 } catch (SipException | InvalidArgumentException | ParseException e) {
... ... @@ -980,7 +984,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
980 984 }
981 985 SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, addressStr, port, ssrc, requesterId,
982 986 device.getDeviceId(), audioBroadcastCatch.getChannelId(),
983   - mediaTransmissionTCP);
  987 + mediaTransmissionTCP, false);
  988 +
984 989 if (sendRtpItem == null) {
985 990 logger.warn("服务器端口资源不足");
986 991 try {
... ... @@ -1006,12 +1011,16 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
1006 1011 sendRtpItem.setStreamId(stream);
1007 1012 sendRtpItem.setPt(8);
1008 1013 sendRtpItem.setUsePs(false);
  1014 + sendRtpItem.setRtcp(false);
1009 1015 sendRtpItem.setOnlyAudio(true);
1010 1016 redisCatchStorage.updateSendRTPSever(sendRtpItem);
1011 1017  
1012 1018 Boolean streamReady = zlmrtpServerFactory.isStreamReady(mediaServerItem, app, stream);
1013 1019 if (streamReady) {
1014   - sendOk(device, sendRtpItem, sdp, request, mediaServerItem, mediaTransmissionTCP, ssrc);
  1020 + SIPResponse sipResponse = sendOk(device, sendRtpItem, sdp, request, mediaServerItem, mediaTransmissionTCP, ssrc);
  1021 + // 添加事务信息
  1022 + streamSession.put(device.getDeviceId(), audioBroadcastCatch.getChannelId(), request.getCallIdHeader().getCallId()
  1023 + , stream, sendRtpItem.getSsrc(), mediaServerItem.getId(), sipResponse, VideoStreamSessionManager.SessionType.broadcast );
1015 1024 }else {
1016 1025 logger.warn("[语音通话], 未发现待推送的流,app={},stream={}", app, stream);
1017 1026 playService.stopAudioBroadcast(device.getDeviceId(), audioBroadcastCatch.getChannelId());
... ... @@ -1029,7 +1038,8 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
1029 1038 }
1030 1039 }
1031 1040  
1032   - void sendOk(Device device, SendRtpItem sendRtpItem, SessionDescription sdp, SIPRequest request, MediaServerItem mediaServerItem, boolean mediaTransmissionTCP, String ssrc){
  1041 + SIPResponse sendOk(Device device, SendRtpItem sendRtpItem, SessionDescription sdp, SIPRequest request, MediaServerItem mediaServerItem, boolean mediaTransmissionTCP, String ssrc){
  1042 + SIPResponse sipResponse = null;
1033 1043 try {
1034 1044 sendRtpItem.setStatus(2);
1035 1045 redisCatchStorage.updateSendRTPSever(sendRtpItem);
... ... @@ -1065,15 +1075,17 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
1065 1075 parentPlatform.setServerPort(device.getPort());
1066 1076 parentPlatform.setServerGBId(device.getDeviceId());
1067 1077  
1068   - SIPResponse sipResponse = responseSdpAck(request, content.toString(), parentPlatform);
  1078 + sipResponse = responseSdpAck(request, content.toString(), parentPlatform);
1069 1079  
1070 1080 AudioBroadcastCatch audioBroadcastCatch = audioBroadcastManager.get(device.getDeviceId(), sendRtpItem.getChannelId());
1071 1081  
1072 1082 audioBroadcastCatch.setStatus(AudioBroadcastCatchStatus.Ok);
1073 1083 audioBroadcastCatch.setSipTransactionInfoByRequset(sipResponse);
1074 1084 audioBroadcastManager.update(audioBroadcastCatch);
  1085 +
1075 1086 } catch (SipException | InvalidArgumentException | ParseException | SdpParseException e) {
1076 1087 logger.error("[命令发送失败] 语音对讲 回复200OK(SDP): {}", e.getMessage());
1077 1088 }
  1089 + return sipResponse;
1078 1090 }
1079 1091 }
... ...
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
... ... @@ -531,7 +531,7 @@ public class ZLMHttpHookListener {
531 531 // cmder.streamByeCmd(device, sendRtpItem.getChannelId(), audioBroadcastCatch.getSipTransactionInfo(), null);
532 532 }
533 533 }else {
534   - cmder.streamByeCmd(device, sendRtpItem.getChannelId(), param.getStream(), sendRtpItem.getCallId());
  534 + cmder.streamByeCmd(device, null, null, sendRtpItem.getCallId());
535 535 }
536 536  
537 537 }
... ... @@ -771,7 +771,7 @@ public class ZLMHttpHookListener {
771 771 @ResponseBody
772 772 @PostMapping(value = "/on_rtp_server_timeout", produces = "application/json;charset=UTF-8")
773 773 public JSONObject onRtpServerTimeout(HttpServletRequest request, @RequestBody OnRtpServerTimeoutHookParam param){
774   - logger.info("[ZLM HOOK] rtpServer收流超时:{}->{}({})", param.getMediaServerId(), param.getStream_id(), param.getSsrc());
  774 + logger.info("[ZLM HOOK] rtpServer rtp超时:{}->{}({})", param.getMediaServerId(), param.getStream_id(), param.getSsrc());
775 775  
776 776 JSONObject ret = new JSONObject();
777 777 ret.put("code", 0);
... ...
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRTPServerFactory.java
... ... @@ -177,7 +177,7 @@ public class ZLMRTPServerFactory {
177 177 * @param tcp 是否为tcp
178 178 * @return SendRtpItem
179 179 */
180   - public SendRtpItem createSendRtpItem(MediaServerItem serverItem, String ip, int port, String ssrc, String platformId, String deviceId, String channelId, boolean tcp){
  180 + public SendRtpItem createSendRtpItem(MediaServerItem serverItem, String ip, int port, String ssrc, String platformId, String deviceId, String channelId, boolean tcp, boolean rtcp){
181 181  
182 182 // 默认为随机端口
183 183 int localPort = 0;
... ... @@ -197,6 +197,7 @@ public class ZLMRTPServerFactory {
197 197 sendRtpItem.setDeviceId(deviceId);
198 198 sendRtpItem.setChannelId(channelId);
199 199 sendRtpItem.setTcp(tcp);
  200 + sendRtpItem.setRtcp(rtcp);
200 201 sendRtpItem.setApp("rtp");
201 202 sendRtpItem.setLocalPort(localPort);
202 203 sendRtpItem.setServerId(userSetting.getServerId());
... ... @@ -214,7 +215,7 @@ public class ZLMRTPServerFactory {
214 215 * @param tcp 是否为tcp
215 216 * @return SendRtpItem
216 217 */
217   - public SendRtpItem createSendRtpItem(MediaServerItem serverItem, String ip, int port, String ssrc, String platformId, String app, String stream, String channelId, boolean tcp){
  218 + public SendRtpItem createSendRtpItem(MediaServerItem serverItem, String ip, int port, String ssrc, String platformId, String app, String stream, String channelId, boolean tcp, boolean rtcp){
218 219 // 默认为随机端口
219 220 int localPort = 0;
220 221 if (userSetting.getGbSendStreamStrict()) {
... ... @@ -235,6 +236,7 @@ public class ZLMRTPServerFactory {
235 236 sendRtpItem.setLocalPort(localPort);
236 237 sendRtpItem.setServerId(userSetting.getServerId());
237 238 sendRtpItem.setMediaServerId(serverItem.getId());
  239 + sendRtpItem.setRtcp(rtcp);
238 240 return sendRtpItem;
239 241 }
240 242  
... ...
src/main/java/com/genersoft/iot/vmp/service/bean/RequestSendItemMsg.java
... ... @@ -63,10 +63,16 @@ public class RequestSendItemMsg {
63 63 private Boolean isTcp;
64 64  
65 65  
  66 + /**
  67 + * 是否使用TCP
  68 + */
  69 + private Boolean rtcp;
  70 +
  71 +
66 72  
67 73  
68 74 public static RequestSendItemMsg getInstance(String serverId, String mediaServerId, String app, String stream, String ip, int port,
69   - String ssrc, String platformId, String channelId, Boolean isTcp, String platformName) {
  75 + String ssrc, String platformId, String channelId, Boolean isTcp, Boolean rtcp, String platformName) {
70 76 RequestSendItemMsg requestSendItemMsg = new RequestSendItemMsg();
71 77 requestSendItemMsg.setServerId(serverId);
72 78 requestSendItemMsg.setMediaServerId(mediaServerId);
... ... @@ -79,6 +85,7 @@ public class RequestSendItemMsg {
79 85 requestSendItemMsg.setPlatformName(platformName);
80 86 requestSendItemMsg.setChannelId(channelId);
81 87 requestSendItemMsg.setTcp(isTcp);
  88 + requestSendItemMsg.setRtcp(rtcp);
82 89  
83 90 return requestSendItemMsg;
84 91 }
... ... @@ -170,4 +177,12 @@ public class RequestSendItemMsg {
170 177 public void setTcp(Boolean tcp) {
171 178 isTcp = tcp;
172 179 }
  180 +
  181 + public Boolean getRtcp() {
  182 + return rtcp;
  183 + }
  184 +
  185 + public void setRtcp(Boolean rtcp) {
  186 + this.rtcp = rtcp;
  187 + }
173 188 }
... ...
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
... ... @@ -347,7 +347,7 @@ public class PlayServiceImpl implements IPlayService {
347 347 // }
348 348 SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, ip, port, ssrcInfo.getSsrc(), device.getDeviceId(),
349 349 device.getDeviceId(), channelId,
350   - false);
  350 + false, false);
351 351  
352 352  
353 353 // if (sendRtpItem.getLocalPort() == 0) {
... ... @@ -375,6 +375,7 @@ public class PlayServiceImpl implements IPlayService {
375 375 sendRtpItem.setStreamId("1000");
376 376 sendRtpItem.setSsrc(ssrc);
377 377 sendRtpItem.setOnlyAudio(true);
  378 + sendRtpItem.setRtcp(false);
378 379 redisCatchStorage.updateSendRTPSever(sendRtpItem);
379 380  
380 381 Map<String, Object> param = new HashMap<>(12);
... ...
src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGbPlayMsgListener.java
... ... @@ -318,7 +318,7 @@ public class RedisGbPlayMsgListener implements MessageListener {
318 318 SendRtpItem sendRtpItem = zlmrtpServerFactory.createSendRtpItem(mediaServerItem, content.getIp(),
319 319 content.getPort(), content.getSsrc(), content.getPlatformId(),
320 320 content.getApp(), content.getStream(), content.getChannelId(),
321   - content.getTcp());
  321 + content.getTcp(), content.getRtcp());
322 322  
323 323 WVPResult<ResponseSendItemMsg> result = new WVPResult<>();
324 324 result.setCode(0);
... ... @@ -348,9 +348,9 @@ public class RedisGbPlayMsgListener implements MessageListener {
348 348 * @param callback 得到信息的回调
349 349 */
350 350 public void sendMsg(String serverId, String mediaServerId, String app, String stream, String ip, int port, String ssrc,
351   - String platformId, String channelId, boolean isTcp, String platformName, PlayMsgCallback callback, PlayMsgErrorCallback errorCallback) {
  351 + String platformId, String channelId, boolean isTcp, boolean rtcp, String platformName, PlayMsgCallback callback, PlayMsgErrorCallback errorCallback) {
352 352 RequestSendItemMsg requestSendItemMsg = RequestSendItemMsg.getInstance(
353   - serverId, mediaServerId, app, stream, ip, port, ssrc, platformId, channelId, isTcp, platformName);
  353 + serverId, mediaServerId, app, stream, ip, port, ssrc, platformId, channelId, isTcp, rtcp, platformName);
354 354 requestSendItemMsg.setServerId(serverId);
355 355 String key = UUID.randomUUID().toString();
356 356 WvpRedisMsg redisMsg = WvpRedisMsg.getRequestInstance(userSetting.getServerId(), serverId, WvpRedisMsgCmd.GET_SEND_ITEM,
... ...