优化多wvp国标级联推流
This commit is contained in:
@@ -219,5 +219,9 @@ public interface IRedisCatchStorage {
|
||||
|
||||
void addWaiteSendRtpItem(SendRtpItem sendRtpItem, int platformPlayTimeout);
|
||||
|
||||
SendRtpItem getWaiteSendRtpItem(String app, String stream);
|
||||
|
||||
void sendStartSendRtp(SendRtpItem sendRtpItem);
|
||||
|
||||
void sendPushStreamOnline(SendRtpItem sendRtpItem);
|
||||
}
|
||||
|
||||
@@ -685,9 +685,22 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
redisTemplate.opsForValue().set(key, platformPlayTimeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SendRtpItem getWaiteSendRtpItem(String app, String stream) {
|
||||
String key = VideoManagerConstants.WAITE_SEND_PUSH_STREAM + app + "_" + stream;
|
||||
return (SendRtpItem)redisTemplate.opsForValue().get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendStartSendRtp(SendRtpItem sendRtpItem) {
|
||||
String key = VideoManagerConstants.START_SEND_PUSH_STREAM + sendRtpItem.getApp() + "_" + sendRtpItem.getStream();
|
||||
redisTemplate.opsForValue().set(key, JSON.toJSONString(sendRtpItem));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendPushStreamOnline(SendRtpItem sendRtpItem) {
|
||||
String key = VideoManagerConstants.VM_MSG_STREAM_PUSH_CLOSE_REQUESTED;
|
||||
logger.info("[redis发送通知] 流上线 {}: {}/{}->{}", key, sendRtpItem.getApp(), sendRtpItem.getStream(), sendRtpItem.getPlatformId());
|
||||
redisTemplate.convertAndSend(key, JSON.toJSON(sendRtpItem));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user