临时提交
This commit is contained in:
@@ -146,11 +146,6 @@ public interface IMediaServerService {
|
||||
|
||||
void startSendRtp(MediaServer mediaServer, SendRtpInfo sendRtpItem);
|
||||
|
||||
SendRtpInfo createSendRtpItem(MediaServer mediaServerItem, String addressStr, int port, String ssrc, String requesterId, String deviceId, Integer channelId, boolean mediaTransmissionTCP, boolean rtcp);
|
||||
|
||||
SendRtpInfo createSendRtpItem(MediaServer serverItem, String ip, int port, String ssrc, String platformId,
|
||||
String app, String stream, Integer channelId, boolean tcp, boolean rtcp);
|
||||
|
||||
MediaServer getMediaServerByAppAndStream(String app, String stream);
|
||||
|
||||
Long updateDownloadProcess(MediaServer mediaServerItem, String app, String stream);
|
||||
|
||||
@@ -82,11 +82,6 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
||||
@Autowired
|
||||
private MediaConfig mediaConfig;
|
||||
|
||||
@Autowired
|
||||
private SendRtpPortManager sendRtpPortManager;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 流到来的处理
|
||||
*/
|
||||
@@ -867,50 +862,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
||||
mediaNodeServerService.startSendRtpStream(mediaServer, sendRtpItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SendRtpInfo createSendRtpItem(MediaServer mediaServer, String ip, int port, String ssrc, String requesterId, String deviceId, Integer channelId, boolean isTcp, boolean rtcp) {
|
||||
int localPort = sendRtpPortManager.getNextPort(mediaServer);
|
||||
if (localPort == 0) {
|
||||
return null;
|
||||
}
|
||||
SendRtpInfo sendRtpItem = new SendRtpInfo();
|
||||
sendRtpItem.setIp(ip);
|
||||
sendRtpItem.setPort(port);
|
||||
sendRtpItem.setSsrc(ssrc);
|
||||
sendRtpItem.setDeviceId(deviceId);
|
||||
sendRtpItem.setChannelId(channelId);
|
||||
sendRtpItem.setTcp(isTcp);
|
||||
sendRtpItem.setRtcp(rtcp);
|
||||
sendRtpItem.setApp("rtp");
|
||||
sendRtpItem.setLocalPort(localPort);
|
||||
sendRtpItem.setServerId(userSetting.getServerId());
|
||||
sendRtpItem.setMediaServerId(mediaServer.getId());
|
||||
return sendRtpItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SendRtpInfo createSendRtpItem(MediaServer serverItem, String ip, int port, String ssrc, String platformId,
|
||||
String app, String stream, Integer channelId, boolean tcp, boolean rtcp){
|
||||
|
||||
int localPort = sendRtpPortManager.getNextPort(serverItem);
|
||||
if (localPort <= 0) {
|
||||
throw new PlayException(javax.sip.message.Response.SERVER_INTERNAL_ERROR, "server internal error");
|
||||
}
|
||||
SendRtpInfo sendRtpItem = new SendRtpInfo();
|
||||
sendRtpItem.setIp(ip);
|
||||
sendRtpItem.setPort(port);
|
||||
sendRtpItem.setSsrc(ssrc);
|
||||
sendRtpItem.setApp(app);
|
||||
sendRtpItem.setStream(stream);
|
||||
sendRtpItem.setPlatformId(platformId);
|
||||
sendRtpItem.setChannelId(channelId);
|
||||
sendRtpItem.setTcp(tcp);
|
||||
sendRtpItem.setLocalPort(localPort);
|
||||
sendRtpItem.setServerId(userSetting.getServerId());
|
||||
sendRtpItem.setMediaServerId(serverItem.getId());
|
||||
sendRtpItem.setRtcp(rtcp);
|
||||
return sendRtpItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MediaServer getMediaServerByAppAndStream(String app, String stream) {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class SendRtpPortManager {
|
||||
return -1;
|
||||
}
|
||||
String sendIndexKey = KEY + userSetting.getServerId() + "_" + mediaServer.getId();
|
||||
String key = VideoManagerConstants.SEND_RTP_INFO_PREFIX
|
||||
String key = VideoManagerConstants.SEND_RTP_INFO
|
||||
+ userSetting.getServerId() + "_*";
|
||||
List<Object> queryResult = RedisUtil.scan(redisTemplate, key);
|
||||
Map<Integer, SendRtpInfo> sendRtpItemMap = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user