| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.genersoft.iot.vmp.common.VideoManagerConstants; |
| | | import com.genersoft.iot.vmp.conf.MediaConfig; |
| | | import com.genersoft.iot.vmp.conf.SipConfig; |
| | | import com.genersoft.iot.vmp.conf.UserSetup; |
| | | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| | |
| | | } |
| | | |
| | | @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 |
| | |
| | | |
| | | @Override |
| | | public MediaServerItem getDefaultMediaServer() { |
| | | |
| | | return mediaServerMapper.queryDefault(); |
| | | } |
| | | |