From b10a65483d709838fbe7d871b83fd5d42f2ef37e Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 4 Mar 2022 10:30:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8E=BB=E9=99=A4lombok=EF=BC=8Creadme?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 19 ++++-- pom.xml | 4 -- .../PlatformCycleRegisterEventLister.java | 13 ++-- .../iot/vmp/utils/node/BaseNode.java | 32 +++++++++- .../iot/vmp/utils/node/ForestNode.java | 11 ++-- .../iot/vmp/utils/node/TreeNode.java | 29 +++++++-- .../vmp/vmanager/bean/DeviceChannelTree.java | 64 +++++++++++++++++-- .../vmanager/bean/DeviceChannelTreeNode.java | 44 +++++++++++-- .../iot/vmp/vmanager/bean/WVPResult.java | 38 +++++++++-- 9 files changed, 214 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 93b3ffba..b77e6c37 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-yellow.svg)](https://github.com/xia-chu/ZLMediaKit/pulls) -WEB VIDEO PLATFORM是一个基于GB28181-2016标准实现的开箱即用的网络视频平台,负责实现核心信令与设备管理后台部分,支持NAT穿透,支持海康、大华、宇视等品牌的IPC、NVR、DVR接入。支持国标级联,支持rtsp/rtmp等视频流转发到国标平台,支持rtsp/rtmp等推流转发到国标平台。 +WEB VIDEO PLATFORM是一个基于GB28181-2016标准实现的开箱即用的网络视频平台,负责实现核心信令与设备管理后台部分,支持NAT穿透,支持海康、大华、宇视等品牌的IPC、NVR接入。支持国标级联,支持将不带国标功能的摄像机/直播流/直播推流转发到其他国标平台。 流媒体服务基于ZLMediaKit-https://github.com/xiongziliang/ZLMediaKit @@ -31,11 +31,13 @@ WEB VIDEO PLATFORM是一个基于GB28181-2016标准实现的开箱即用的网 https://gitee.com/pan648540858/wvp-GB28181-pro.git # 截图 -![build_1.png](https://github.com/648540858/wiki/blob/master/images/Screenshot_1.png) -![build_1.png](https://github.com/648540858/wiki/blob/master/images/Screenshot_2.png) -![build_1.png](https://github.com/648540858/wiki/blob/master/images/Screenshot_20201012_151459.png) -![build_1.png](https://github.com/648540858/wiki/blob/master/images/Screenshot_20201012_152643.png) -![build_1.png](https://github.com/648540858/wiki/blob/master/images/Screenshot_20201012_151606.png) +![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101513_79632720_1018729.png "2022-03-04_09-51.png") +![build_1.png](https://images.gitee.com/uploads/images/2022/0304/103025_5df016f9_1018729.png "2022-03-04_10-27.png") +![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101706_088fbafa_1018729.png "2022-03-04_09-52_1.png") +![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101756_3d662828_1018729.png "2022-03-04_10-00_1.png") +![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101823_19050c66_1018729.png "2022-03-04_10-12_1.png") +![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101848_e5a39557_1018729.png "2022-03-04_10-12_2.png") +![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101919_ee5b8c79_1018729.png "2022-03-04_10-13.png"") # 1.0 基础特性 1. 视频预览; @@ -79,7 +81,7 @@ https://gitee.com/pan648540858/wvp-GB28181-pro.git - [X] 移动位置通知处理 - [X] 报警事件订阅 - [X] 报警事件通知处理 - - [ ] 设备目录订阅 + - [X] 设备目录订阅 - [X] 设备目录通知处理 16. 移动位置查询和显示,可通过配置文件设置移动位置历史是否存储 @@ -96,6 +98,9 @@ https://gitee.com/pan648540858/wvp-GB28181-pro.git - [X] 平台信息查询 - [X] 平台远程启动 - [X] 每个级联平台可自定义的虚拟目录 + - [X] 目录订阅与通知 + - [X] 录像查看与播放 + - [X] GPS订阅与通知(直播推流) - [X] 添加RTSP视频 - [X] 添加接口鉴权 - [X] 添加RTMP视频 diff --git a/pom.xml b/pom.xml index 9d31f729..2dde4da9 100644 --- a/pom.xml +++ b/pom.xml @@ -253,10 +253,6 @@ spring-boot-starter-test - - org.projectlombok - lombok - diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformCycleRegisterEventLister.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformCycleRegisterEventLister.java index 996f65dd..4df77a05 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformCycleRegisterEventLister.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformCycleRegisterEventLister.java @@ -4,7 +4,8 @@ import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; import com.genersoft.iot.vmp.storager.IVideoManagerStorager; -import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; @@ -12,9 +13,11 @@ import org.springframework.stereotype.Component; import java.util.Timer; import java.util.TimerTask; -@Slf4j @Component public class PlatformCycleRegisterEventLister implements ApplicationListener { + + private final static Logger logger = LoggerFactory.getLogger(PlatformCycleRegisterEventLister.class); + @Autowired private IVideoManagerStorager storager; @Autowired @@ -22,10 +25,10 @@ public class PlatformCycleRegisterEventLister implements ApplicationListener implements INode { private static final long serialVersionUID = 1L; @@ -51,4 +49,34 @@ public class BaseNode implements INode { } } + @Override + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + @Override + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + @Override + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } + + public void setHasChildren(Boolean hasChildren) { + this.hasChildren = hasChildren; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNode.java b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNode.java index d0500a1e..21a48df3 100644 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNode.java +++ b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNode.java @@ -1,15 +1,11 @@ package com.genersoft.iot.vmp.utils.node; -import lombok.Data; -import lombok.EqualsAndHashCode; /** * 森林节点类 * */ -@Data -@EqualsAndHashCode(callSuper = false) public class ForestNode extends BaseNode { private static final long serialVersionUID = 1L; @@ -25,4 +21,11 @@ public class ForestNode extends BaseNode { this.content = content; } + public Object getContent() { + return content; + } + + public void setContent(Object content) { + this.content = content; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/TreeNode.java b/src/main/java/com/genersoft/iot/vmp/utils/node/TreeNode.java index 9df6f11f..71f1b2b5 100644 --- a/src/main/java/com/genersoft/iot/vmp/utils/node/TreeNode.java +++ b/src/main/java/com/genersoft/iot/vmp/utils/node/TreeNode.java @@ -1,14 +1,11 @@ package com.genersoft.iot.vmp.utils.node; -import lombok.Data; -import lombok.EqualsAndHashCode; + /** * 树型节点类 * */ -@Data -@EqualsAndHashCode(callSuper = false) public class TreeNode extends BaseNode { private static final long serialVersionUID = 1L; @@ -18,4 +15,28 @@ public class TreeNode extends BaseNode { private String key; private String value; + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTree.java b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTree.java index 4eaf5987..73928a46 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTree.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTree.java @@ -4,14 +4,10 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; import com.genersoft.iot.vmp.utils.node.INode; import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; import java.util.ArrayList; import java.util.List; -@Data -@EqualsAndHashCode(callSuper = true) @ApiModel(value = "DeviceChannelTree对象", description = "DeviceChannelTree对象") public class DeviceChannelTree extends DeviceChannel implements INode { private static final long serialVersionUID = 1L; @@ -62,4 +58,64 @@ public class DeviceChannelTree extends DeviceChannel implements INode children) { + this.children = children; + } + + public void setHasChildren(Boolean hasChildren) { + this.hasChildren = hasChildren; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTreeNode.java b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTreeNode.java index 29d82bed..96577d1f 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTreeNode.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTreeNode.java @@ -1,11 +1,7 @@ package com.genersoft.iot.vmp.vmanager.bean; import com.genersoft.iot.vmp.utils.node.TreeNode; -import lombok.Data; -import lombok.EqualsAndHashCode; -@Data -@EqualsAndHashCode(callSuper = true) public class DeviceChannelTreeNode extends TreeNode { private Integer status; @@ -17,4 +13,44 @@ public class DeviceChannelTreeNode extends TreeNode { private Double lng; private Double lat; + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getDeviceId() { + return deviceId; + } + + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + public String getChannelId() { + return channelId; + } + + public void setChannelId(String channelId) { + this.channelId = channelId; + } + + public Double getLng() { + return lng; + } + + public void setLng(Double lng) { + this.lng = lng; + } + + public Double getLat() { + return lat; + } + + public void setLat(Double lat) { + this.lat = lat; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/WVPResult.java b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/WVPResult.java index b4e3eb41..91ed22c2 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/bean/WVPResult.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/bean/WVPResult.java @@ -1,14 +1,17 @@ package com.genersoft.iot.vmp.vmanager.bean; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -@Data -@NoArgsConstructor -@AllArgsConstructor public class WVPResult { + public WVPResult() { + } + + public WVPResult(int code, String msg, T data) { + this.code = code; + this.msg = msg; + this.data = data; + } + private int code; private String msg; private T data; @@ -32,4 +35,27 @@ public class WVPResult { return fail(FAILED, msg); } + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } } From 1f39c6c62f0d20f8798b699e8525b5c8d8684367 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 4 Mar 2022 10:32:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?readme=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b77e6c37..564b1973 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ https://gitee.com/pan648540858/wvp-GB28181-pro.git ![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101756_3d662828_1018729.png "2022-03-04_10-00_1.png") ![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101823_19050c66_1018729.png "2022-03-04_10-12_1.png") ![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101848_e5a39557_1018729.png "2022-03-04_10-12_2.png") -![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101919_ee5b8c79_1018729.png "2022-03-04_10-13.png"") +![build_1.png](https://images.gitee.com/uploads/images/2022/0304/101919_ee5b8c79_1018729.png "2022-03-04_10-13.png") # 1.0 基础特性 1. 视频预览; From 16e8aa323f7faf7e62035d2d01ac618bba096d81 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 4 Mar 2022 11:26:53 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=9E=E6=94=BE?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=87=BA=E7=8E=B0=E8=84=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E4=BB=A5=E5=8F=8A=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8B=89=E6=B5=81=E4=BB=A3=E7=90=86=E5=88=A4=E6=96=AD=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java | 1 + .../iot/vmp/storager/impl/VideoManagerStoragerImpl.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java index 9c87a0a6..2087f16e 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java @@ -314,6 +314,7 @@ public class PlayServiceImpl implements IPlayService { }, event -> { msg.setData(String.format("回放失败, 错误码: %s, %s", event.statusCode, event.msg)); callback.call(msg); + streamSession.remove(device.getDeviceId(), channelId, ssrcInfo.getStream()); }); return result; } diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java index bd8f379c..08f4b269 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java @@ -716,7 +716,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager { try { if (streamProxyMapper.add(streamProxyItem) > 0) { if (!StringUtils.isEmpty(streamProxyItem.getGbId())) { - if (gbStreamMapper.add(streamProxyItem) > 0) { + if (gbStreamMapper.add(streamProxyItem) <= 0) { //事务回滚 dataSourceTransactionManager.rollback(transactionStatus); return false;