优化ssrc释放逻辑,优化级联点播速度,去除等待流格式的配置项
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.genersoft.iot.vmp.vmanager.gb28181.device;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||
import com.genersoft.iot.vmp.gb28181.event.DeviceOffLineDetector;
|
||||
@@ -13,7 +14,6 @@ import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@@ -57,6 +57,9 @@ public class DeviceQuery {
|
||||
@Autowired
|
||||
private IDeviceService deviceService;
|
||||
|
||||
@Autowired
|
||||
private DynamicTask dynamicTask;
|
||||
|
||||
/**
|
||||
* 使用ID查询国标设备
|
||||
* @param deviceId 国标ID
|
||||
@@ -209,6 +212,8 @@ public class DeviceQuery {
|
||||
boolean isSuccess = storager.delete(deviceId);
|
||||
if (isSuccess) {
|
||||
redisCatchStorage.clearCatchByDeviceId(deviceId);
|
||||
// 停止此设备的订阅更新
|
||||
dynamicTask.stop(deviceId);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("deviceId", deviceId);
|
||||
return new ResponseEntity<>(json.toString(),HttpStatus.OK);
|
||||
|
||||
@@ -2,8 +2,9 @@ package com.genersoft.iot.vmp.vmanager.gb28181.platform;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.CatalogData;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||
import com.genersoft.iot.vmp.conf.UserSetup;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.PlatformCatalog;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||
@@ -39,6 +40,9 @@ public class PlatformController {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(PlatformController.class);
|
||||
|
||||
@Autowired
|
||||
private UserSetup userSetup;
|
||||
|
||||
@Autowired
|
||||
private IVideoManagerStorager storager;
|
||||
|
||||
@@ -51,6 +55,9 @@ public class PlatformController {
|
||||
@Autowired
|
||||
private SipConfig sipConfig;
|
||||
|
||||
@Autowired
|
||||
private DynamicTask dynamicTask;
|
||||
|
||||
/**
|
||||
* 获取国标服务的配置
|
||||
*
|
||||
@@ -222,7 +229,7 @@ public class PlatformController {
|
||||
if (updateResult) {
|
||||
// 保存时启用就发送注册
|
||||
if (parentPlatform.isEnable()) {
|
||||
if (parentPlatformOld.isStatus()) {
|
||||
if (parentPlatformOld != null && parentPlatformOld.isStatus()) {
|
||||
commanderForPlatform.unregister(parentPlatformOld, null, null);
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
@@ -287,8 +294,9 @@ public class PlatformController {
|
||||
boolean deleteResult = storager.deleteParentPlatform(parentPlatform);
|
||||
storager.delCatalogByPlatformId(parentPlatform.getServerGBId());
|
||||
storager.delRelationByPlatformId(parentPlatform.getServerGBId());
|
||||
|
||||
|
||||
// 停止发送位置订阅定时任务
|
||||
String key = VideoManagerConstants.SIP_SUBSCRIBE_PREFIX + userSetup.getServerId() + "_MobilePosition_" + parentPlatform.getServerGBId();
|
||||
dynamicTask.stop(key);
|
||||
if (deleteResult) {
|
||||
return new ResponseEntity<>("success", HttpStatus.OK);
|
||||
} else {
|
||||
|
||||
@@ -88,7 +88,7 @@ public class PlayController {
|
||||
// 获取可用的zlm
|
||||
Device device = storager.queryVideoDevice(deviceId);
|
||||
MediaServerItem newMediaServerItem = playService.getNewMediaServerItem(device);
|
||||
PlayResult playResult = playService.play(newMediaServerItem, deviceId, channelId, null, null);
|
||||
PlayResult playResult = playService.play(newMediaServerItem, deviceId, channelId, null, null, null);
|
||||
|
||||
return playResult.getResult();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user