| | |
| | | import com.genersoft.iot.vmp.common.StreamInfo; |
| | | import com.genersoft.iot.vmp.common.VideoManagerConstants; |
| | | import com.genersoft.iot.vmp.conf.MediaServerConfig; |
| | | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; |
| | | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; |
| | | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch; |
| | | import com.genersoft.iot.vmp.gb28181.bean.PlatformRegister; |
| | | import com.genersoft.iot.vmp.gb28181.bean.*; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.dao.DeviceChannelMapper; |
| | | import com.genersoft.iot.vmp.utils.redis.RedisUtil; |
| | |
| | | public void delPlatformRegisterInfo(String callId) { |
| | | redis.del(VideoManagerConstants.PLATFORM_REGISTER_INFO_PREFIX + callId); |
| | | } |
| | | |
| | | @Override |
| | | public void updateSendRTPSever(SendRtpItem sendRtpItem) { |
| | | String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX + sendRtpItem.getPlatformId() + "_" + sendRtpItem.getChannelId(); |
| | | redis.set(key, sendRtpItem); |
| | | } |
| | | |
| | | @Override |
| | | public SendRtpItem querySendRTPServer(String platformGbId, String channelId) { |
| | | String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX + platformGbId + "_" + channelId; |
| | | return (SendRtpItem)redis.get(key); |
| | | } |
| | | |
| | | /** |
| | | * 删除RTP推送信息缓存 |
| | | * @param platformGbId |
| | | * @param channelId |
| | | */ |
| | | @Override |
| | | public void deleteSendRTPServer(String platformGbId, String channelId) { |
| | | String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX + platformGbId + "_" + channelId; |
| | | redis.del(key); |
| | | } |
| | | |
| | | /** |
| | | * 查询某个通道是否存在上级点播(RTP推送) |
| | | * @param channelId |
| | | */ |
| | | @Override |
| | | public boolean isChannelSendingRTP(String channelId) { |
| | | String key = VideoManagerConstants.PLATFORM_SEND_RTP_INFO_PREFIX + "*_" + channelId; |
| | | List<Object> RtpStreams = redis.scan(key); |
| | | if (RtpStreams.size() > 0) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | } |