Merge branch 'wvp-28181-2.0' into wvp-pro-record
# Conflicts: # src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
This commit is contained in:
commit
d6d226ef2c
19
README.md
19
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视频
|
||||
|
4
pom.xml
4
pom.xml
@ -253,10 +253,6 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<!-- <scope>test</scope>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
@ -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<PlatformCycleRegisterEvent> {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(PlatformCycleRegisterEventLister.class);
|
||||
|
||||
@Autowired
|
||||
private IVideoManagerStorager storager;
|
||||
@Autowired
|
||||
@ -22,10 +25,10 @@ public class PlatformCycleRegisterEventLister implements ApplicationListener<Pla
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(PlatformCycleRegisterEvent event) {
|
||||
log.info("上级平台周期注册事件");
|
||||
logger.info("上级平台周期注册事件");
|
||||
ParentPlatform parentPlatform = storager.queryParentPlatByServerGBId(event.getPlatformGbID());
|
||||
if (parentPlatform == null) {
|
||||
log.info("[ 平台未注册事件 ] 平台已经删除!!! 平台国标ID:" + event.getPlatformGbID());
|
||||
logger.info("[ 平台未注册事件 ] 平台已经删除!!! 平台国标ID:" + event.getPlatformGbID());
|
||||
return;
|
||||
}
|
||||
Timer timer = new Timer();
|
||||
@ -36,7 +39,7 @@ public class PlatformCycleRegisterEventLister implements ApplicationListener<Pla
|
||||
timer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
log.info("[平台注册]再次向平台注册,平台国标ID:" + event.getPlatformGbID());
|
||||
logger.info("[平台注册]再次向平台注册,平台国标ID:" + event.getPlatformGbID());
|
||||
sipCommanderFroPlatform.register(parentPlatform, null, okEvent);
|
||||
}
|
||||
}, 15*1000 ,Long.parseLong(parentPlatform.getExpires())* 1000);
|
||||
|
@ -116,8 +116,11 @@ public class PlayServiceImpl implements IPlayService {
|
||||
msg.setData(wvpResult);
|
||||
// 点播超时回复BYE
|
||||
cmder.streamByeCmd(device.getDeviceId(), channelId, streamInfo.getStream());
|
||||
// 释放rtpserver
|
||||
mediaServerService.closeRTPServer(playResult.getDevice(), channelId, streamInfo.getStream());
|
||||
// 回复之前所有的点播请求
|
||||
resultHolder.invokeAllResult(msg);
|
||||
// TODO 释放ssrc
|
||||
});
|
||||
result.onCompletion(()->{
|
||||
// 点播结束时调用截图接口
|
||||
@ -333,6 +336,7 @@ public class PlayServiceImpl implements IPlayService {
|
||||
playBackResult.setData(msg);
|
||||
playBackResult.setEvent(event);
|
||||
callback.call(playBackResult);
|
||||
streamSession.remove(device.getDeviceId(), channelId, ssrcInfo.getStream());
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
@ -717,7 +717,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;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.genersoft.iot.vmp.utils.node;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -10,7 +9,6 @@ import java.util.List;
|
||||
* 节点基类
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class BaseNode<T> implements INode<T> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -51,4 +49,34 @@ public class BaseNode<T> implements INode<T> {
|
||||
}
|
||||
}
|
||||
|
||||
@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<T> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<T> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public void setHasChildren(Boolean hasChildren) {
|
||||
this.hasChildren = hasChildren;
|
||||
}
|
||||
}
|
||||
|
@ -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<ForestNode> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -25,4 +21,11 @@ public class ForestNode extends BaseNode<ForestNode> {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Object getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(Object content) {
|
||||
this.content = content;
|
||||
}
|
||||
}
|
||||
|
@ -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<TreeNode> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -18,4 +15,28 @@ public class TreeNode extends BaseNode<TreeNode> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -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<DeviceChannelTree> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -62,4 +58,64 @@ public class DeviceChannelTree extends DeviceChannel implements INode<DeviceChan
|
||||
return this.hasChildren;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentName() {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName(String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void setChildren(List<DeviceChannelTree> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public void setHasChildren(Boolean hasChildren) {
|
||||
this.hasChildren = hasChildren;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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<T> {
|
||||
|
||||
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<T> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user