| | |
| | | @Override |
| | | public void resetAllSN() { |
| | | String scanKey = VideoManagerConstants.SIP_SN_PREFIX + userSetting.getServerId() + "_*"; |
| | | List<Object> keys = RedisUtil.scan(scanKey, null); |
| | | List<Object> keys = RedisUtil.scan(scanKey); |
| | | for (Object o : keys) { |
| | | String key = (String) o; |
| | | RedisUtil.set(key, 1); |
| | |
| | | } |
| | | @Override |
| | | public StreamInfo queryPlayByStreamId(String streamId) { |
| | | List<Object> playLeys = RedisUtil.scan(String.format("%S_%s_*_%s_*", VideoManagerConstants.PLAYER_PREFIX, userSetting.getServerId(), streamId), 1); |
| | | List<Object> playLeys = RedisUtil.scan(String.format("%S_%s_*_%s_*", VideoManagerConstants.PLAYER_PREFIX, userSetting.getServerId(), streamId)); |
| | | if (playLeys == null || playLeys.size() == 0) { |
| | | return null; |
| | | } |
| | |
| | | List<Object> playLeys = RedisUtil.scan(String.format("%S_%s_*_*_%s_%s", VideoManagerConstants.PLAYER_PREFIX, |
| | | userSetting.getServerId(), |
| | | deviceId, |
| | | channelId), 1); |
| | | channelId)); |
| | | if (playLeys == null || playLeys.size() == 0) { |
| | | return null; |
| | | } |
| | |
| | | stream, |
| | | callId |
| | | ); |
| | | List<Object> streamInfoScan = RedisUtil.scan(key, 1); |
| | | List<Object> streamInfoScan = RedisUtil.scan(key); |
| | | if (streamInfoScan.size() > 0) { |
| | | return (StreamInfo) RedisUtil.get((String) streamInfoScan.get(0)); |
| | | }else { |
| | |
| | | stream, |
| | | callId |
| | | ); |
| | | List<Object> streamInfoScan = RedisUtil.scan(key, 1); |
| | | List<Object> streamInfoScan = RedisUtil.scan(key); |
| | | return (String) streamInfoScan.get(0); |
| | | } |
| | | |
| | |
| | | + channelId + "_" |
| | | + streamId + "_" |
| | | + callId; |
| | | List<Object> scan = RedisUtil.scan(key, 1); |
| | | List<Object> scan = RedisUtil.scan(key); |
| | | if (scan.size() > 0) { |
| | | return (SendRtpItem)RedisUtil.get((String)scan.get(0)); |
| | | }else { |
| | |
| | | String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX |
| | | + userSetting.getServerId() + "_*_*_" |
| | | + channelId + "*_" + "*_"; |
| | | List<Object> RtpStreams = RedisUtil.scan(key, 1); |
| | | List<Object> RtpStreams = RedisUtil.scan(key); |
| | | if (RtpStreams.size() > 0) { |
| | | return true; |
| | | } else { |
| | |
| | | stream, |
| | | callId |
| | | ); |
| | | List<Object> streamInfoScan = RedisUtil.scan(key, 1); |
| | | List<Object> streamInfoScan = RedisUtil.scan(key); |
| | | if (streamInfoScan.size() > 0) { |
| | | return (StreamInfo) RedisUtil.get((String) streamInfoScan.get(0)); |
| | | }else { |
| | |
| | | String scanKey = VideoManagerConstants.WVP_SERVER_STREAM_PREFIX + userSetting.getServerId() + "_*_" + app + "_" + streamId + "_" + mediaServerId; |
| | | |
| | | OnStreamChangedHookParam result = null; |
| | | List<Object> keys = RedisUtil.scan(scanKey, 1); |
| | | List<Object> keys = RedisUtil.scan(scanKey); |
| | | if (keys.size() > 0) { |
| | | String key = (String) keys.get(0); |
| | | result = (OnStreamChangedHookParam)RedisUtil.get(key); |