优化拉流代理国标级联点播

This commit is contained in:
648540858
2024-06-20 19:46:48 +08:00
parent afe80a7be1
commit 45410d8091
4 changed files with 19 additions and 1 deletions

View File

@@ -135,6 +135,8 @@ public interface IRedisCatchStorage {
MediaInfo getStreamInfo(String app, String streamId, String mediaServerId);
MediaInfo getProxyStream(String app, String streamId);
void addCpuInfo(double cpuInfo);
void addMemInfo(double memInfo);

View File

@@ -496,6 +496,20 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
return result;
}
@Override
public MediaInfo getProxyStream(String app, String streamId) {
String scanKey = VideoManagerConstants.WVP_SERVER_STREAM_PREFIX + userSetting.getServerId() + "_PULL_" + app + "_" + streamId + "_*";
MediaInfo result = null;
List<Object> keys = RedisUtil.scan(redisTemplate, scanKey);
if (keys.size() > 0) {
String key = (String) keys.get(0);
result = JsonUtil.redisJsonToObject(redisTemplate, key, MediaInfo.class);
}
return result;
}
@Override
public void addCpuInfo(double cpuInfo) {
String key = VideoManagerConstants.SYSTEM_INFO_CPU_PREFIX + userSetting.getServerId();