Commit 61e5226122e7816dbaa18baec907d0e5934ee170
Merge branch '2.6.8' into wvp-28181-2.0
# Conflicts: # src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java
Showing
1 changed file
with
7 additions
and
6 deletions
src/main/java/com/genersoft/iot/vmp/vmanager/rtp/RtpController.java
| ... | ... | @@ -30,10 +30,8 @@ import org.slf4j.LoggerFactory; |
| 30 | 30 | import org.springframework.beans.factory.annotation.Autowired; |
| 31 | 31 | import org.springframework.beans.factory.annotation.Value; |
| 32 | 32 | import org.springframework.data.redis.core.RedisTemplate; |
| 33 | -import org.springframework.web.bind.annotation.GetMapping; | |
| 34 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 35 | -import org.springframework.web.bind.annotation.ResponseBody; | |
| 36 | -import org.springframework.web.bind.annotation.RestController; | |
| 33 | +import org.springframework.util.ObjectUtils; | |
| 34 | +import org.springframework.web.bind.annotation.*; | |
| 37 | 35 | |
| 38 | 36 | import java.io.IOException; |
| 39 | 37 | import java.util.HashMap; |
| ... | ... | @@ -101,7 +99,7 @@ public class RtpController { |
| 101 | 99 | @Parameter(name = "stream", description = "形成的流的ID", required = true) |
| 102 | 100 | @Parameter(name = "tcpMode", description = "收流模式, 0为UDP, 1为TCP被动", required = true) |
| 103 | 101 | @Parameter(name = "callBack", description = "回调地址,如果收流超时会通道回调通知,回调为get请求,参数为callId", required = true) |
| 104 | - public OtherRtpSendInfo openRtpServer(Boolean isSend, String ssrc, String callId, String stream, Integer tcpMode, String callBack) { | |
| 102 | + public OtherRtpSendInfo openRtpServer(Boolean isSend, @RequestParam(required = false)String ssrc, String callId, String stream, Integer tcpMode, String callBack) { | |
| 105 | 103 | |
| 106 | 104 | logger.info("[第三方服务对接->开启收流和获取发流信息] isSend->{}, ssrc->{}, callId->{}, stream->{}, tcpMode->{}, callBack->{}", |
| 107 | 105 | isSend, ssrc, callId, stream, tcpMode==0?"UDP":"TCP被动", callBack); |
| ... | ... | @@ -186,9 +184,12 @@ public class RtpController { |
| 186 | 184 | @Parameter(name = "onlyAudio", description = "是否只有音频", required = true) |
| 187 | 185 | @Parameter(name = "isUdp", description = "是否为UDP", required = true) |
| 188 | 186 | @Parameter(name = "streamType", description = "流类型,1为es流,2为ps流, 默认es流", required = false) |
| 189 | - public void sendRTP(String ssrc, String ip, Integer port, String app, String stream, String callId, Boolean onlyAudio, Boolean isUdp, Integer streamType) { | |
| 187 | + public void sendRTP(String ssrc, String ip, Integer port, String app, String stream, String callId, Boolean onlyAudio, Boolean isUdp, @RequestParam(required = false)Integer streamType) { | |
| 190 | 188 | logger.info("[第三方服务对接->发送流] ssrc->{}, ip->{}, port->{}, app->{}, stream->{}, callId->{}, onlyAudio->{}, streamType->{}", |
| 191 | 189 | ssrc, ip, port, app, stream, callId, onlyAudio, streamType == 1? "ES":"PS"); |
| 190 | + if (ObjectUtils.isEmpty(streamType)) { | |
| 191 | + streamType = 1; | |
| 192 | + } | |
| 192 | 193 | MediaServerItem mediaServerItem = mediaServerService.getDefaultMediaServer(); |
| 193 | 194 | String key = VideoManagerConstants.WVP_OTHER_SEND_RTP_INFO + userSetting.getServerId() + callId; |
| 194 | 195 | OtherRtpSendInfo sendInfo = (OtherRtpSendInfo)redisTemplate.opsForValue().get(key); | ... | ... |