使用设备Id+通道Id作为session的识别标识,解决点播异常时无法释放session的问题
This commit is contained in:
@@ -36,7 +36,7 @@ public interface IRedisCatchStorage {
|
||||
|
||||
StreamInfo queryPlaybackByStreamId(String steamId);
|
||||
|
||||
StreamInfo queryPlayByDevice(String deviceId, String code);
|
||||
StreamInfo queryPlayByDevice(String deviceId, String channelId);
|
||||
|
||||
/**
|
||||
* 更新流媒体信息
|
||||
|
||||
@@ -75,11 +75,11 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
}
|
||||
|
||||
@Override
|
||||
public StreamInfo queryPlayByDevice(String deviceId, String code) {
|
||||
public StreamInfo queryPlayByDevice(String deviceId, String channelId) {
|
||||
// List<Object> playLeys = redis.keys(String.format("%S_*_%s_%s", VideoManagerConstants.PLAYER_PREFIX,
|
||||
List<Object> playLeys = redis.scan(String.format("%S_*_%s_%s", VideoManagerConstants.PLAYER_PREFIX,
|
||||
deviceId,
|
||||
code));
|
||||
channelId));
|
||||
if (playLeys == null || playLeys.size() == 0) return null;
|
||||
return (StreamInfo)redis.get(playLeys.get(0).toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user