| | |
| | | } |
| | | |
| | | @Override |
| | | public void closeRTPServer(Device device, String channelId) { |
| | | String mediaServerId = streamSession.getMediaServerId(device.getDeviceId(), channelId); |
| | | public void closeRTPServer(Device device, String channelId, String stream) { |
| | | String mediaServerId = streamSession.getMediaServerId(device.getDeviceId(), channelId, stream); |
| | | String ssrc = streamSession.getSSRC(device.getDeviceId(), channelId, stream); |
| | | MediaServerItem mediaServerItem = this.getOne(mediaServerId); |
| | | if (mediaServerItem != null) { |
| | | String streamId = String.format("%s_%s", device.getDeviceId(), channelId); |
| | | zlmrtpServerFactory.closeRTPServer(mediaServerItem, streamId); |
| | | releaseSsrc(mediaServerItem, streamSession.getSSRC(device.getDeviceId(), channelId)); |
| | | releaseSsrc(mediaServerItem, ssrc); |
| | | } |
| | | streamSession.remove(device.getDeviceId(), channelId); |
| | | streamSession.remove(device.getDeviceId(), channelId, stream); |
| | | } |
| | | |
| | | @Override |
| | |
| | | String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetup.getServerId() + "_" + id; |
| | | redisUtil.del(key); |
| | | } |
| | | @Override |
| | | public void deleteDb(String id){ |
| | | //同步删除数据库中的数据 |
| | | mediaServerMapper.delOne(id); |
| | | } |
| | | |
| | | @Override |
| | | public void updateMediaServerKeepalive(String mediaServerId, JSONObject data) { |