Merge branch 'wvp-28181-2.0' into main-dev

This commit is contained in:
648540858
2023-07-24 09:42:32 +08:00
15 changed files with 308 additions and 150 deletions

View File

@@ -139,8 +139,8 @@ public class RtpController {
redisTemplate.opsForValue().set(receiveKey, otherRtpSendInfo);
if (isSend != null && isSend) {
// 预创建发流信息
int portForVideo = sendRtpPortManager.getNextPort(mediaServerItem.getId());
int portForAudio = sendRtpPortManager.getNextPort(mediaServerItem.getId());
int portForVideo = sendRtpPortManager.getNextPort(mediaServerItem);
int portForAudio = sendRtpPortManager.getNextPort(mediaServerItem);
otherRtpSendInfo.setSendLocalIp(mediaServerItem.getSdpIp());
otherRtpSendInfo.setSendLocalPortForVideo(portForVideo);

View File

@@ -8,6 +8,7 @@ import com.genersoft.iot.vmp.conf.SipConfig;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.VersionInfo;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
import com.genersoft.iot.vmp.media.zlm.dto.IHookSubscribe;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
@@ -72,6 +73,9 @@ public class ServerController {
@Autowired
private IRedisCatchStorage redisCatchStorage;
@Autowired
private SendRtpPortManager sendRtpPortManager;
@GetMapping(value = "/media_server/list")
@ResponseBody
@@ -262,4 +266,12 @@ public class ServerController {
return result;
}
@PostMapping(value = "/test/getPort")
@ResponseBody
public int getPort() {
int result = sendRtpPortManager.getNextPort(mediaServerService.getDefaultMediaServer());
System.out.println(result);
return result;
}
}