调整
This commit is contained in:
parent
b0733e985b
commit
00a5ab9dde
@ -241,7 +241,7 @@ public class Gb28181DownloadService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
String existUrl = RedisUtil.StringOps.get(CacheUtil.getKey(deviceCode, MediaSdpHelper.Action.PLAY.getAction()));
|
String existUrl = RedisUtil.StringOps.get(CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), deviceCode));
|
||||||
if(Optional.ofNullable(existUrl).isPresent()){
|
if(Optional.ofNullable(existUrl).isPresent()){
|
||||||
result.setResult(JsonResponse.success(existUrl));
|
result.setResult(JsonResponse.success(existUrl));
|
||||||
return result;
|
return result;
|
||||||
@ -260,7 +260,7 @@ public class Gb28181DownloadService {
|
|||||||
StringUtils.replace(videoInfo.getUrl(), zlmMediaConfig.getUrl(), proxySipConfig.getProxyMediaUrl()):
|
StringUtils.replace(videoInfo.getUrl(), zlmMediaConfig.getUrl(), proxySipConfig.getProxyMediaUrl()):
|
||||||
videoInfo.getUrl();
|
videoInfo.getUrl();
|
||||||
|
|
||||||
RedisUtil.StringOps.set(CacheUtil.getKey(deviceCode, MediaSdpHelper.Action.PLAY.getAction()), url);
|
RedisUtil.StringOps.set(CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), deviceCode), url);
|
||||||
result.setResult(JsonResponse.success(url));
|
result.setResult(JsonResponse.success(url));
|
||||||
});
|
});
|
||||||
}, 200, TimeUnit.MILLISECONDS);
|
}, 200, TimeUnit.MILLISECONDS);
|
||||||
@ -298,7 +298,7 @@ public class Gb28181DownloadService {
|
|||||||
|
|
||||||
String cacheKey = CacheUtil.getKey(docking.getGbDeviceId(), device.getGbDeviceChannelId());
|
String cacheKey = CacheUtil.getKey(docking.getGbDeviceId(), device.getGbDeviceChannelId());
|
||||||
String existCallId = RedisUtil.StringOps.get(cacheKey);
|
String existCallId = RedisUtil.StringOps.get(cacheKey);
|
||||||
RedisUtil.KeyOps.delete(CacheUtil.getKey(deviceCode, MediaSdpHelper.Action.PLAY.getAction()));
|
RedisUtil.KeyOps.delete(CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), deviceCode));
|
||||||
String infoKey = CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), existCallId);
|
String infoKey = CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), existCallId);
|
||||||
VideoInfo videoInfo = JsonUtils.parse(RedisUtil.StringOps.get(infoKey), VideoInfo.class);
|
VideoInfo videoInfo = JsonUtils.parse(RedisUtil.StringOps.get(infoKey), VideoInfo.class);
|
||||||
if(videoInfo != null){
|
if(videoInfo != null){
|
||||||
|
Loading…
Reference in New Issue
Block a user