拆分redis中device与channel的存储方式

支持分页
接口直接返回播放地址
This commit is contained in:
648540858
2020-09-25 17:22:22 +08:00
parent 956fd47ed6
commit da14c7f24c
21 changed files with 1445 additions and 78 deletions

View File

@@ -49,7 +49,9 @@ public class Device {
/**
* 通道列表
*/
private Map<String,DeviceChannel> channelMap;
// private Map<String,DeviceChannel> channelMap;
private int channelCount;
public String getDeviceId() {
@@ -84,13 +86,13 @@ public class Device {
this.host = host;
}
public Map<String, DeviceChannel> getChannelMap() {
return channelMap;
}
public void setChannelMap(Map<String, DeviceChannel> channelMap) {
this.channelMap = channelMap;
}
// public Map<String, DeviceChannel> getChannelMap() {
// return channelMap;
// }
//
// public void setChannelMap(Map<String, DeviceChannel> channelMap) {
// this.channelMap = channelMap;
// }
public String getManufacturer() {
return manufacturer;
@@ -123,4 +125,12 @@ public class Device {
public void setOnline(int online) {
this.online = online;
}
public int getChannelCount() {
return channelCount;
}
public void setChannelCount(int channelCount) {
this.channelCount = channelCount;
}
}

View File

@@ -100,7 +100,12 @@ public class DeviceChannel {
/**
* 密码
*/
private String password;
private String password;
/**
* 云台控制
*/
private int PTZType;
/**
* 在线/离线
@@ -123,6 +128,11 @@ public class DeviceChannel {
*/
private double latitude;
/**
* 流唯一编号,存在表示正在直播
*/
private String ssrc;
public String getChannelId() {
return channelId;
}
@@ -306,4 +316,20 @@ public class DeviceChannel {
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public int getPTZType() {
return PTZType;
}
public void setPTZType(int PTZType) {
this.PTZType = PTZType;
}
public String getSsrc() {
return ssrc;
}
public void setSsrc(String ssrc) {
this.ssrc = ssrc;
}
}