增加上级点播停止后通知设备停止推流功能,并自动与本地播放协同

This commit is contained in:
lawrencehj
2021-03-14 21:20:47 +08:00
parent 32fbfd8d1e
commit a71063dd1f
6 changed files with 93 additions and 19 deletions

View File

@@ -89,4 +89,17 @@ public interface IRedisCatchStorage {
*/
SendRtpItem querySendRTPServer(String platformGbId, String channelId);
/**
* 删除RTP推送信息缓存
* @param platformGbId
* @param channelId
*/
void deleteSendRTPServer(String platformGbId, String channelId);
/**
* 查询某个通道是否存在上级点播RTP推送
* @param channelId
*/
boolean isChannelSendingRTP(String channelId);
}

View File

@@ -225,4 +225,30 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
return (SendRtpItem)redis.get(key);
}
/**
* 删除RTP推送信息缓存
* @param platformGbId
* @param channelId
*/
@Override
public void deleteSendRTPServer(String platformGbId, String channelId) {
String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX + platformGbId + "_" + channelId;
redis.del(key);
}
/**
* 查询某个通道是否存在上级点播RTP推送
* @param channelId
*/
@Override
public boolean isChannelSendingRTP(String channelId) {
String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX + "*_" + channelId;
List<Object> RtpStreams = redis.scan(key);
if (RtpStreams.size() > 0) {
return true;
} else {
return false;
}
}
}