优化拉流代理国标级联点播
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user