支持国标级联录像查询
parent
398e0930ae
commit
18214b8b82
|
@ -1,5 +1,6 @@
|
||||||
package com.genersoft.iot.vmp.gb28181;
|
package com.genersoft.iot.vmp.gb28181;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.common.CommonCallback;
|
||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
import com.genersoft.iot.vmp.common.StreamInfo;
|
||||||
import com.genersoft.iot.vmp.common.enums.DeviceControlType;
|
import com.genersoft.iot.vmp.common.enums.DeviceControlType;
|
||||||
|
@ -7,9 +8,10 @@ import com.genersoft.iot.vmp.conf.exception.ControllerException;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.DragZoomRequest;
|
import com.genersoft.iot.vmp.gb28181.bean.DragZoomRequest;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.RecordInfo;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.command.PTZCommand;
|
import com.genersoft.iot.vmp.gb28181.bean.command.PTZCommand;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.event.record.RecordEndEventListener;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander;
|
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander;
|
||||||
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
||||||
import com.genersoft.iot.vmp.service.IPlayService;
|
import com.genersoft.iot.vmp.service.IPlayService;
|
||||||
import com.genersoft.iot.vmp.service.IResourcePlayCallback;
|
import com.genersoft.iot.vmp.service.IResourcePlayCallback;
|
||||||
|
@ -18,8 +20,8 @@ import com.genersoft.iot.vmp.service.bean.CommonGbChannelType;
|
||||||
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
||||||
import com.genersoft.iot.vmp.storager.dao.DeviceChannelMapper;
|
import com.genersoft.iot.vmp.storager.dao.DeviceChannelMapper;
|
||||||
import com.genersoft.iot.vmp.storager.dao.DeviceMapper;
|
import com.genersoft.iot.vmp.storager.dao.DeviceMapper;
|
||||||
|
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||||
import org.aspectj.bridge.ICommand;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -27,8 +29,8 @@ import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.sip.InvalidArgumentException;
|
import javax.sip.InvalidArgumentException;
|
||||||
import javax.sip.SipException;
|
import javax.sip.SipException;
|
||||||
import javax.sip.message.Response;
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,6 +53,9 @@ public class GB28181ResourceServiceImpl implements IResourceService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISIPCommander commander;
|
private ISIPCommander commander;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RecordEndEventListener recordEndEventListener;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteChannel(CommonGbChannel commonGbChannel) {
|
public boolean deleteChannel(CommonGbChannel commonGbChannel) {
|
||||||
if (!CommonGbChannelType.GB28181.equals(commonGbChannel.getType())) {
|
if (!CommonGbChannelType.GB28181.equals(commonGbChannel.getType())) {
|
||||||
|
@ -275,6 +280,42 @@ public class GB28181ResourceServiceImpl implements IResourceService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryrecord(CommonGbChannel commonGbChannel, int sn, int secrecy, String type, String startTime, String endTime, CommonCallback<RecordInfo> callback) {
|
||||||
|
CheckCommonGbChannelResult checkResult = checkCommonGbChannel(commonGbChannel);
|
||||||
|
|
||||||
|
if (checkResult.errorMsg != null) {
|
||||||
|
logger.warn("[资源类-国标28181] 国标录像查询失败: {}", checkResult.errorMsg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (checkResult.device == null || checkResult.channel == null) {
|
||||||
|
logger.warn("[资源类-国标28181] 国标录像查询失败: 设备获取失败");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 接收录像数据
|
||||||
|
recordEndEventListener.addEndEventHandler(checkResult.device.getDeviceId(), checkResult.channel.getChannelId(), (recordInfo)->{
|
||||||
|
if (recordInfo == null ) {
|
||||||
|
logger.info("[资源类-国标28181] 录像查询, 结果为空,设备: {}, 通道:{}",
|
||||||
|
checkResult.device.getDeviceId(), checkResult.channel.getChannelId());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (recordInfo.getRecordList() == null) {
|
||||||
|
recordInfo.setRecordList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
logger.info("[资源类-国标28181] 录像查询收到数据,设备: {}, 通道:{},共{}条",
|
||||||
|
checkResult.device.getDeviceId(), checkResult.channel.getChannelId(), recordInfo.getRecordList().size());
|
||||||
|
if (callback != null) {
|
||||||
|
callback.run(recordInfo);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
commander.recordInfoQuery(checkResult.device, checkResult.channel.getChannelId(), DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(startTime),
|
||||||
|
DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(endTime), sn, secrecy, type, null, null);
|
||||||
|
} catch (InvalidArgumentException | ParseException | SipException e) {
|
||||||
|
logger.error("[命令发送失败] 录像查询: {}", e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void streamOffline(String app, String streamId) {
|
public void streamOffline(String app, String streamId) {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
package com.genersoft.iot.vmp.gb28181.event.record;
|
package com.genersoft.iot.vmp.gb28181.event.record;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.RecordInfo;
|
import com.genersoft.iot.vmp.gb28181.bean.RecordInfo;
|
||||||
import com.genersoft.iot.vmp.utils.redis.RedisUtil;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -43,9 +41,6 @@ public class RecordEndEventListener implements ApplicationListener<RecordEndEven
|
||||||
handlerMap.remove(deviceId + channelId);
|
handlerMap.remove(deviceId + channelId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
logger.info("录像查询完成事件触发, 但是订阅为空,取消发送,deviceId:{}, channelId: {}",
|
|
||||||
event.getRecordInfo().getDeviceId(), event.getRecordInfo().getChannelId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,18 +61,17 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent
|
||||||
public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {
|
public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {
|
||||||
|
|
||||||
SIPRequest request = (SIPRequest) evt.getRequest();
|
SIPRequest request = (SIPRequest) evt.getRequest();
|
||||||
|
try {
|
||||||
|
responseAck(request, Response.OK);
|
||||||
|
} catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
|
logger.error("[命令发送失败] 错误信息: {}", e.getMessage());
|
||||||
|
}
|
||||||
// 此处是上级发出的DeviceControl指令
|
// 此处是上级发出的DeviceControl指令
|
||||||
String targetGBId = ((SipURI) request.getToHeader().getAddress().getURI()).getUser();
|
String targetGBId = ((SipURI) request.getToHeader().getAddress().getURI()).getUser();
|
||||||
String channelId = XmlUtil.getText(rootElement, "DeviceID");
|
String channelId = XmlUtil.getText(rootElement, "DeviceID");
|
||||||
// 远程启动功能
|
// 远程启动功能
|
||||||
if (!ObjectUtils.isEmpty(XmlUtil.getText(rootElement, "TeleBoot"))) {
|
if (!ObjectUtils.isEmpty(XmlUtil.getText(rootElement, "TeleBoot"))) {
|
||||||
logger.warn("[国标级联]收到平台的远程启动命令, 不处理");
|
logger.warn("[国标级联]收到平台的远程启动命令, 不处理");
|
||||||
try {
|
|
||||||
responseAck(request, Response.OK);
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 错误信息: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DeviceControlType deviceControlType = DeviceControlType.typeOf(rootElement);
|
DeviceControlType deviceControlType = DeviceControlType.typeOf(rootElement);
|
||||||
|
@ -81,20 +80,13 @@ public class DeviceControlQueryMessageHandler extends SIPRequestProcessorParent
|
||||||
|
|
||||||
CommonGbChannel commonGbChannel = platformChannelService.queryChannelByPlatformIdAndChannelDeviceId(parentPlatform.getId(), channelId);
|
CommonGbChannel commonGbChannel = platformChannelService.queryChannelByPlatformIdAndChannelDeviceId(parentPlatform.getId(), channelId);
|
||||||
if (commonGbChannel == null) {
|
if (commonGbChannel == null) {
|
||||||
try {
|
logger.warn("[国标级联] 设备控制消息:为查询到关联通道,平台:{}, 通道: {} ", parentPlatform.getServerGBId(), channelId);
|
||||||
responseAck(request, Response.NOT_FOUND);
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 错误信息: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IResourceService resourceService = resourceServiceMap.get(commonGbChannel.getType());
|
IResourceService resourceService = resourceServiceMap.get(commonGbChannel.getType());
|
||||||
if (resourceService == null) {
|
if (resourceService == null) {
|
||||||
try {
|
logger.warn("[国标级联] 设备控制消息:为查询到资源处理类,平台:{}, 通道: {}, 资源类型:{} ",
|
||||||
responseAck(request, Response.FORBIDDEN);
|
parentPlatform.getServerGBId(), channelId, commonGbChannel.getType());
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 错误信息: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (deviceControlType) {
|
switch (deviceControlType) {
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd;
|
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
||||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
|
||||||
import gov.nist.javax.sip.message.SIPRequest;
|
import gov.nist.javax.sip.message.SIPRequest;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -32,18 +28,6 @@ public class AlarmQueryMessageHandler extends SIPRequestProcessorParent implemen
|
||||||
@Autowired
|
@Autowired
|
||||||
private QueryMessageHandler queryMessageHandler;
|
private QueryMessageHandler queryMessageHandler;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IVideoManagerStorage storager;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SIPCommanderFroPlatform cmderFroPlatform;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private SipConfig config;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private EventPublisher publisher;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
queryMessageHandler.addHandler(cmdType, this);
|
queryMessageHandler.addHandler(cmdType, this);
|
||||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
||||||
@Component
|
@Component
|
||||||
public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
||||||
|
|
||||||
private Logger logger = LoggerFactory.getLogger(CatalogQueryMessageHandler.class);
|
private final Logger logger = LoggerFactory.getLogger(CatalogQueryMessageHandler.class);
|
||||||
private final String cmdType = "Catalog";
|
private final String cmdType = "Catalog";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -9,7 +9,6 @@ import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessag
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
||||||
import com.genersoft.iot.vmp.service.IDeviceChannelService;
|
import com.genersoft.iot.vmp.service.IDeviceChannelService;
|
||||||
import com.genersoft.iot.vmp.service.IPlatformChannelService;
|
import com.genersoft.iot.vmp.service.IPlatformChannelService;
|
||||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
|
||||||
import gov.nist.javax.sip.message.SIPRequest;
|
import gov.nist.javax.sip.message.SIPRequest;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -30,7 +29,7 @@ import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getText;
|
||||||
@Component
|
@Component
|
||||||
public class DeviceInfoQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
public class DeviceInfoQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
||||||
|
|
||||||
private Logger logger = LoggerFactory.getLogger(DeviceInfoQueryMessageHandler.class);
|
private final Logger logger = LoggerFactory.getLogger(DeviceInfoQueryMessageHandler.class);
|
||||||
private final String cmdType = "DeviceInfo";
|
private final String cmdType = "DeviceInfo";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -57,7 +56,7 @@ public class DeviceInfoQueryMessageHandler extends SIPRequestProcessorParent imp
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {
|
public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {
|
||||||
logger.info("[DeviceInfo查询]消息");
|
logger.info("[DeviceInfo查询]消息: 平台: {}", parentPlatform.getServerGBId());
|
||||||
FromHeader fromHeader = (FromHeader) evt.getRequest().getHeader(FromHeader.NAME);
|
FromHeader fromHeader = (FromHeader) evt.getRequest().getHeader(FromHeader.NAME);
|
||||||
SIPRequest request = (SIPRequest) evt.getRequest();
|
SIPRequest request = (SIPRequest) evt.getRequest();
|
||||||
try {
|
try {
|
||||||
|
@ -81,16 +80,12 @@ public class DeviceInfoQueryMessageHandler extends SIPRequestProcessorParent imp
|
||||||
|
|
||||||
CommonGbChannel commonGbChannel = platformChannelService.queryChannelByPlatformIdAndChannelDeviceId(parentPlatform.getId(), channelId);
|
CommonGbChannel commonGbChannel = platformChannelService.queryChannelByPlatformIdAndChannelDeviceId(parentPlatform.getId(), channelId);
|
||||||
if (commonGbChannel == null) {
|
if (commonGbChannel == null) {
|
||||||
try {
|
logger.error("[DeviceInfo查询]失败:平台未关联通道 platformId {}, channelId: {}", parentPlatform.getServerGBId(), channelId);
|
||||||
responseAck(request, Response.NOT_FOUND);
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 错误信息: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
device = deviceChannelService.getDeviceByChannelCommonGbId(commonGbChannel.getCommonGbId());
|
device = deviceChannelService.getDeviceByChannelCommonGbId(commonGbChannel.getCommonGbId());
|
||||||
if (device ==null){
|
if (device ==null){
|
||||||
logger.error("[平台没有该通道的使用权限]:platformId"+parentPlatform.getServerGBId()+" deviceID:"+channelId);
|
logger.error("[DeviceInfo查询] 失败: 平台没有该通道的使用权限 platformId {}, channelId: {}", parentPlatform.getServerGBId(), channelId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd;
|
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
|
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
||||||
import com.genersoft.iot.vmp.service.IPlatformChannelService;
|
import com.genersoft.iot.vmp.service.IPlatformChannelService;
|
||||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
|
||||||
import gov.nist.javax.sip.message.SIPRequest;
|
import gov.nist.javax.sip.message.SIPRequest;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -32,24 +28,18 @@ import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.getText;
|
||||||
@Component
|
@Component
|
||||||
public class DeviceStatusQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
public class DeviceStatusQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
||||||
|
|
||||||
private Logger logger = LoggerFactory.getLogger(DeviceStatusQueryMessageHandler.class);
|
private final Logger logger = LoggerFactory.getLogger(DeviceStatusQueryMessageHandler.class);
|
||||||
private final String cmdType = "DeviceStatus";
|
private final String cmdType = "DeviceStatus";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private QueryMessageHandler queryMessageHandler;
|
private QueryMessageHandler queryMessageHandler;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IVideoManagerStorage storager;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SIPCommanderFroPlatform cmderFroPlatform;
|
private SIPCommanderFroPlatform cmderFroPlatform;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPlatformChannelService platformChannelService;
|
private IPlatformChannelService platformChannelService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private EventPublisher publisher;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
queryMessageHandler.addHandler(cmdType, this);
|
queryMessageHandler.addHandler(cmdType, this);
|
||||||
|
|
|
@ -1,23 +1,17 @@
|
||||||
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd;
|
package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.cmd;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
import com.genersoft.iot.vmp.conf.SipConfig;
|
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.event.record.RecordEndEventListener;
|
import com.genersoft.iot.vmp.gb28181.event.record.RecordEndEventListener;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
|
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler;
|
||||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.query.QueryMessageHandler;
|
||||||
import com.genersoft.iot.vmp.service.ICommonGbChannelService;
|
|
||||||
import com.genersoft.iot.vmp.service.IDeviceChannelService;
|
import com.genersoft.iot.vmp.service.IDeviceChannelService;
|
||||||
import com.genersoft.iot.vmp.service.IPlatformChannelService;
|
import com.genersoft.iot.vmp.service.IPlatformChannelService;
|
||||||
import com.genersoft.iot.vmp.service.bean.CommonGbChannelType;
|
import com.genersoft.iot.vmp.service.IResourceService;
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
|
||||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
|
||||||
import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo;
|
|
||||||
import gov.nist.javax.sip.message.SIPRequest;
|
import gov.nist.javax.sip.message.SIPRequest;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -31,19 +25,18 @@ import javax.sip.RequestEvent;
|
||||||
import javax.sip.SipException;
|
import javax.sip.SipException;
|
||||||
import javax.sip.message.Response;
|
import javax.sip.message.Response;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.List;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent implements InitializingBean, IMessageHandler {
|
||||||
|
|
||||||
private Logger logger = LoggerFactory.getLogger(RecordInfoQueryMessageHandler.class);
|
private final Logger logger = LoggerFactory.getLogger(RecordInfoQueryMessageHandler.class);
|
||||||
private final String cmdType = "RecordInfo";
|
private final String cmdType = "RecordInfo";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private QueryMessageHandler queryMessageHandler;
|
private QueryMessageHandler queryMessageHandler;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IVideoManagerStorage storager;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISIPCommanderForPlatform cmderFroPlatform;
|
private ISIPCommanderForPlatform cmderFroPlatform;
|
||||||
|
@ -60,6 +53,9 @@ public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent imp
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPlatformChannelService platformChannelService;
|
private IPlatformChannelService platformChannelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private Map<String, IResourceService> resourceServiceMap;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
queryMessageHandler.addHandler(cmdType, this);
|
queryMessageHandler.addHandler(cmdType, this);
|
||||||
|
@ -73,7 +69,14 @@ public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent imp
|
||||||
@Override
|
@Override
|
||||||
public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {
|
public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) {
|
||||||
|
|
||||||
|
logger.info("[国标级联] 录像查询, 平台:{}",parentPlatform.getServerGBId());
|
||||||
SIPRequest request = (SIPRequest) evt.getRequest();
|
SIPRequest request = (SIPRequest) evt.getRequest();
|
||||||
|
try {
|
||||||
|
responseAck(request, Response.OK);
|
||||||
|
} catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
|
logger.error("[命令发送失败] 错误信息: {}", e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
Element snElement = rootElement.element("SN");
|
Element snElement = rootElement.element("SN");
|
||||||
int sn = Integer.parseInt(snElement.getText());
|
int sn = Integer.parseInt(snElement.getText());
|
||||||
Element deviceIDElement = rootElement.element("DeviceID");
|
Element deviceIDElement = rootElement.element("DeviceID");
|
||||||
|
@ -88,6 +91,8 @@ public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent imp
|
||||||
if (endTimeElement != null) {
|
if (endTimeElement != null) {
|
||||||
endTime = endTimeElement.getText();
|
endTime = endTimeElement.getText();
|
||||||
}
|
}
|
||||||
|
logger.info("[国标级联] 录像查询, 平台:{}, 通道: {}, 时间: {}-{}",
|
||||||
|
parentPlatform.getServerGBId(), channelId, startTime, endTime);
|
||||||
Element secrecyElement = rootElement.element("Secrecy");
|
Element secrecyElement = rootElement.element("Secrecy");
|
||||||
int secrecy = 0;
|
int secrecy = 0;
|
||||||
if (secrecyElement != null) {
|
if (secrecyElement != null) {
|
||||||
|
@ -100,54 +105,84 @@ public class RecordInfoQueryMessageHandler extends SIPRequestProcessorParent imp
|
||||||
}
|
}
|
||||||
// 确认是直播还是国标, 国标直接请求下级,直播请求录像管理服务
|
// 确认是直播还是国标, 国标直接请求下级,直播请求录像管理服务
|
||||||
CommonGbChannel commonGbChannel = platformChannelService.queryChannelByPlatformIdAndChannelDeviceId(parentPlatform.getId(), channelId);
|
CommonGbChannel commonGbChannel = platformChannelService.queryChannelByPlatformIdAndChannelDeviceId(parentPlatform.getId(), channelId);
|
||||||
if (commonGbChannel.getType().equals(CommonGbChannelType.GB28181)) { // 国标
|
if (commonGbChannel == null) {
|
||||||
// 向国标设备请求录像数据
|
logger.error("[DeviceInfo查询]失败:平台未关联通道 platformId {}, channelId: {}", parentPlatform.getServerGBId(), channelId);
|
||||||
Device device = deviceChannelService.getDeviceByChannelCommonGbId(commonGbChannel.getCommonGbId());
|
return;
|
||||||
|
|
||||||
// 接收录像数据
|
|
||||||
recordEndEventListener.addEndEventHandler(device.getDeviceId(), channelId, (recordInfo)->{
|
|
||||||
try {
|
|
||||||
logger.info("[国标级联] 录像查询收到数据, 通道: {},准备转发===", channelId);
|
|
||||||
cmderFroPlatform.recordInfo(commonGbChannel, parentPlatform, request.getFromTag(), recordInfo);
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 国标级联 回复录像数据: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
try {
|
|
||||||
commander.recordInfoQuery(device, channelId, DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(startTime),
|
|
||||||
DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(endTime), sn, secrecy, type, (eventResult -> {
|
|
||||||
// 回复200 OK
|
|
||||||
try {
|
|
||||||
responseAck(request, Response.OK);
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 录像查询回复: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
}),(eventResult -> {
|
|
||||||
// 查询失败
|
|
||||||
try {
|
|
||||||
responseAck(request, eventResult.statusCode, eventResult.msg);
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 录像查询回复: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
} catch (InvalidArgumentException | ParseException | SipException e) {
|
|
||||||
logger.error("[命令发送失败] 录像查询: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}else if (commonGbChannel.getType().equals(CommonGbChannelType.PUSH)
|
|
||||||
|| commonGbChannel.getType().equals(CommonGbChannelType.PROXY)) { // 直播流
|
|
||||||
// TODO
|
|
||||||
try {
|
|
||||||
responseAck(request, Response.NOT_IMPLEMENTED); // 回复未实现
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 录像查询: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
}else { // 错误的请求
|
|
||||||
try {
|
|
||||||
responseAck(request, Response.BAD_REQUEST);
|
|
||||||
} catch (SipException | InvalidArgumentException | ParseException e) {
|
|
||||||
logger.error("[命令发送失败] 录像查询: {}", e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
IResourceService resourceService = resourceServiceMap.get(commonGbChannel.getType());
|
||||||
|
if (resourceService == null) {
|
||||||
|
logger.error("[DeviceInfo查询]失败:平台未关联通道 platformId {}, channelId: {}", parentPlatform.getServerGBId(), channelId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
resourceService.queryrecord(commonGbChannel, sn, secrecy, type, startTime, endTime, (recordInfo -> {
|
||||||
|
if (recordInfo == null ) {
|
||||||
|
logger.info("[DeviceInfo查询] 录像查询, 结果为空,platformId {}, channelId: {}",
|
||||||
|
parentPlatform.getServerGBId(), channelId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (recordInfo.getRecordList() == null) {
|
||||||
|
recordInfo.setRecordList(new ArrayList<>());
|
||||||
|
}
|
||||||
|
// 向上级发送录像数据
|
||||||
|
logger.info("[国标级联]录像查询收到数据, 共{}条, platformId {}, channelId: {}",
|
||||||
|
recordInfo.getRecordList().size(), parentPlatform.getServerGBId(), channelId);
|
||||||
|
try {
|
||||||
|
cmderFroPlatform.recordInfo(commonGbChannel, parentPlatform, request.getFromTag(), recordInfo);
|
||||||
|
} catch (InvalidArgumentException | ParseException | SipException e) {
|
||||||
|
logger.error("[命令发送失败] 国标级联-录像查询: {}", e.getMessage());
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
// if (commonGbChannel.getType().equals(CommonGbChannelType.GB28181)) { // 国标
|
||||||
|
// // 向国标设备请求录像数据
|
||||||
|
// Device device = deviceChannelService.getDeviceByChannelCommonGbId(commonGbChannel.getCommonGbId());
|
||||||
|
//
|
||||||
|
// // 接收录像数据
|
||||||
|
// recordEndEventListener.addEndEventHandler(device.getDeviceId(), channelId, (recordInfo)->{
|
||||||
|
// try {
|
||||||
|
// logger.info("[国标级联] 录像查询收到数据, 通道: {},准备转发===", channelId);
|
||||||
|
// cmderFroPlatform.recordInfo(commonGbChannel, parentPlatform, request.getFromTag(), recordInfo);
|
||||||
|
// } catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
|
// logger.error("[命令发送失败] 国标级联 回复录像数据: {}", e.getMessage());
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// try {
|
||||||
|
// commander.recordInfoQuery(device, channelId, DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(startTime),
|
||||||
|
// DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(endTime), sn, secrecy, type, (eventResult -> {
|
||||||
|
// // 回复200 OK
|
||||||
|
// try {
|
||||||
|
// responseAck(request, Response.OK);
|
||||||
|
// } catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
|
// logger.error("[命令发送失败] 录像查询回复: {}", e.getMessage());
|
||||||
|
// }
|
||||||
|
// }),(eventResult -> {
|
||||||
|
// // 查询失败
|
||||||
|
// try {
|
||||||
|
// responseAck(request, eventResult.statusCode, eventResult.msg);
|
||||||
|
// } catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
|
// logger.error("[命令发送失败] 录像查询回复: {}", e.getMessage());
|
||||||
|
// }
|
||||||
|
// }));
|
||||||
|
// } catch (InvalidArgumentException | ParseException | SipException e) {
|
||||||
|
// logger.error("[命令发送失败] 录像查询: {}", e.getMessage());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }else if (commonGbChannel.getType().equals(CommonGbChannelType.PUSH)
|
||||||
|
// || commonGbChannel.getType().equals(CommonGbChannelType.PROXY)) { // 直播流
|
||||||
|
// // TODO
|
||||||
|
// try {
|
||||||
|
// responseAck(request, Response.NOT_IMPLEMENTED); // 回复未实现
|
||||||
|
// } catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
|
// logger.error("[命令发送失败] 录像查询: {}", e.getMessage());
|
||||||
|
// }
|
||||||
|
// }else { // 错误的请求
|
||||||
|
// try {
|
||||||
|
// responseAck(request, Response.BAD_REQUEST);
|
||||||
|
// } catch (SipException | InvalidArgumentException | ParseException e) {
|
||||||
|
// logger.error("[命令发送失败] 录像查询: {}", e.getMessage());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package com.genersoft.iot.vmp.service;
|
package com.genersoft.iot.vmp.service;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.common.CommonCallback;
|
||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.DragZoomRequest;
|
import com.genersoft.iot.vmp.gb28181.bean.DragZoomRequest;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.RecordInfo;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.command.PTZCommand;
|
import com.genersoft.iot.vmp.gb28181.bean.command.PTZCommand;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -82,4 +83,8 @@ public interface IResourceService {
|
||||||
* 看守位控制
|
* 看守位控制
|
||||||
*/
|
*/
|
||||||
void setHomePosition(CommonGbChannel commonGbChannel, boolean enabled, Integer resetTime, Integer presetIndex);
|
void setHomePosition(CommonGbChannel commonGbChannel, boolean enabled, Integer resetTime, Integer presetIndex);
|
||||||
|
|
||||||
|
|
||||||
|
void queryrecord(CommonGbChannel commonGbChannel, int sn, int secrecy, String type,
|
||||||
|
String startTime, String endTime, CommonCallback<RecordInfo> callback);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
package com.genersoft.iot.vmp.service.bean;
|
|
||||||
|
|
||||||
public interface PlayBackCallback<T> {
|
|
||||||
|
|
||||||
void call(PlayBackResult<T> msg);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,12 +1,16 @@
|
||||||
package com.genersoft.iot.vmp.service.impl;
|
package com.genersoft.iot.vmp.service.impl;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.common.CommonCallback;
|
||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
import com.genersoft.iot.vmp.common.StreamInfo;
|
import com.genersoft.iot.vmp.gb28181.bean.DragZoomRequest;
|
||||||
import com.genersoft.iot.vmp.gb28181.GB28181ResourceServiceImpl;
|
import com.genersoft.iot.vmp.gb28181.bean.RecordInfo;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.command.PTZCommand;
|
import com.genersoft.iot.vmp.gb28181.bean.command.PTZCommand;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
|
||||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamProxy;
|
import com.genersoft.iot.vmp.media.zlm.dto.StreamProxy;
|
||||||
import com.genersoft.iot.vmp.service.*;
|
import com.genersoft.iot.vmp.service.IMediaServerService;
|
||||||
|
import com.genersoft.iot.vmp.service.IResourcePlayCallback;
|
||||||
|
import com.genersoft.iot.vmp.service.IResourceService;
|
||||||
|
import com.genersoft.iot.vmp.service.IStreamProxyPlayService;
|
||||||
import com.genersoft.iot.vmp.service.bean.CommonGbChannelType;
|
import com.genersoft.iot.vmp.service.bean.CommonGbChannelType;
|
||||||
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
||||||
import com.genersoft.iot.vmp.storager.dao.StreamProxyMapper;
|
import com.genersoft.iot.vmp.storager.dao.StreamProxyMapper;
|
||||||
|
@ -94,4 +98,44 @@ public class StreamProxyResourceServiceImpl implements IResourceService {
|
||||||
public void startDownload(CommonGbChannel channel, Long startTime, Long stopTime, Integer downloadSpeed, IResourcePlayCallback playCallback) {
|
public void startDownload(CommonGbChannel channel, Long startTime, Long stopTime, Integer downloadSpeed, IResourcePlayCallback playCallback) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resetAlarm(CommonGbChannel commonGbChannel, Integer alarmMethod, Integer alarmType) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setGuard(CommonGbChannel commonGbChannel, boolean setGuard) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setRecord(CommonGbChannel commonGbChannel, Boolean isRecord) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIFame(CommonGbChannel commonGbChannel) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTeleBoot(CommonGbChannel commonGbChannel) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dragZoom(CommonGbChannel commonGbChannel, DragZoomRequest.DragZoom dragZoom, boolean isIn) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setHomePosition(CommonGbChannel commonGbChannel, boolean enabled, Integer resetTime, Integer presetIndex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryrecord(CommonGbChannel commonGbChannel, int sn, int secrecy, String type, String startTime, String endTime, CommonCallback<RecordInfo> callback) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package com.genersoft.iot.vmp.service.impl;
|
package com.genersoft.iot.vmp.service.impl;
|
||||||
|
|
||||||
|
import com.genersoft.iot.vmp.common.CommonCallback;
|
||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.DragZoomRequest;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.RecordInfo;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.command.PTZCommand;
|
import com.genersoft.iot.vmp.gb28181.bean.command.PTZCommand;
|
||||||
import com.genersoft.iot.vmp.service.IResourcePlayCallback;
|
import com.genersoft.iot.vmp.service.IResourcePlayCallback;
|
||||||
import com.genersoft.iot.vmp.service.IResourceService;
|
import com.genersoft.iot.vmp.service.IResourceService;
|
||||||
|
@ -43,4 +46,44 @@ public class StreamPushResourceServiceImpl implements IResourceService {
|
||||||
public void startDownload(CommonGbChannel channel, Long startTime, Long stopTime, Integer downloadSpeed, IResourcePlayCallback playCallback) {
|
public void startDownload(CommonGbChannel channel, Long startTime, Long stopTime, Integer downloadSpeed, IResourcePlayCallback playCallback) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resetAlarm(CommonGbChannel commonGbChannel, Integer alarmMethod, Integer alarmType) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setGuard(CommonGbChannel commonGbChannel, boolean setGuard) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setRecord(CommonGbChannel commonGbChannel, Boolean isRecord) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIFame(CommonGbChannel commonGbChannel) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTeleBoot(CommonGbChannel commonGbChannel) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dragZoom(CommonGbChannel commonGbChannel, DragZoomRequest.DragZoom dragZoom, boolean isIn) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setHomePosition(CommonGbChannel commonGbChannel, boolean enabled, Integer resetTime, Integer presetIndex) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryrecord(CommonGbChannel commonGbChannel, int sn, int secrecy, String type, String startTime, String endTime, CommonCallback<RecordInfo> callback) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -538,6 +538,6 @@ public interface DeviceChannelMapper {
|
||||||
" </script>"})
|
" </script>"})
|
||||||
List<Integer> getCommonChannelIdList(@Param("deviceId") String deviceId, @Param("online") Boolean online);
|
List<Integer> getCommonChannelIdList(@Param("deviceId") String deviceId, @Param("online") Boolean online);
|
||||||
|
|
||||||
@Select("select de.* from wvp_device de left join wvp_device_channel dc on de.device_id = dc.deviceId where dc.common_gb_channel_id=#{commonGbId}")
|
@Select("select de.* from wvp_device de left join wvp_device_channel dc on de.device_id = dc.device_id where dc.common_gb_channel_id=#{commonGbId}")
|
||||||
Device getDeviceByChannelCommonGbId(@Param("commonGbId") int commonGbId);
|
Device getDeviceByChannelCommonGbId(@Param("commonGbId") int commonGbId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,7 @@ package com.genersoft.iot.vmp.storager.dao;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
import com.genersoft.iot.vmp.common.CommonGbChannel;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
||||||
import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo;
|
|
||||||
import org.apache.ibatis.annotations.*;
|
import org.apache.ibatis.annotations.*;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -22,7 +20,7 @@ public interface ParentPlatformMapper {
|
||||||
"status,start_offline_push,catalog_group,create_time,update_time) " +
|
"status,start_offline_push,catalog_group,create_time,update_time) " +
|
||||||
" VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIP}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " +
|
" VALUES (#{enable}, #{name}, #{serverGBId}, #{serverGBDomain}, #{serverIP}, #{serverPort}, #{deviceGBId}, #{deviceIp}, " +
|
||||||
" #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, " +
|
" #{devicePort}, #{username}, #{password}, #{expires}, #{keepTimeout}, #{transport}, #{characterSet}, #{ptz}, " +
|
||||||
" #{rtcp}, #{asMessageChannel}, #{autoPushChannel}, #{shareAllChannel}, #{shareGroup}, #{shareRegion, #{systemCatalog}, " +
|
" #{rtcp}, #{asMessageChannel}, #{autoPushChannel}, #{shareAllChannel}, #{shareGroup}, #{shareRegion}, #{systemCatalog}, " +
|
||||||
" #{status}, #{startOfflinePush}, #{catalogGroup}, #{createTime}, #{updateTime})")
|
" #{status}, #{startOfflinePush}, #{catalogGroup}, #{createTime}, #{updateTime})")
|
||||||
int addParentPlatform(ParentPlatform parentPlatform);
|
int addParentPlatform(ParentPlatform parentPlatform);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue