Merge branch 'master' into 重构/1078
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
package com.genersoft.iot.vmp.common;
|
||||
|
||||
public interface GeneralCallback<T>{
|
||||
void run(int code, String msg, T data);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
package com.genersoft.iot.vmp.common;
|
||||
|
||||
public class RemoteAddressInfo {
|
||||
private String ip;
|
||||
@@ -34,5 +34,5 @@ public class SipConfig {
|
||||
|
||||
private boolean alarm = false;
|
||||
|
||||
private long timeout = 150;
|
||||
private long timeout = 500;
|
||||
}
|
||||
|
||||
@@ -190,5 +190,11 @@ public class UserSetting {
|
||||
*/
|
||||
private boolean autoRegisterPlatform = false;
|
||||
|
||||
/**
|
||||
* 按需发送推流设备位置, 默认发送移动位置订阅时如果位置不变则不发送, 设置为false按照国标间隔持续发送
|
||||
*/
|
||||
private boolean sendPositionOnDemand = true;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -86,6 +86,18 @@ public class CommonGBChannel {
|
||||
@Schema(description = "国标-纬度 WGS-84坐标系")
|
||||
private Double gbLatitude;
|
||||
|
||||
@Schema(description = "")
|
||||
private Double gpsAltitude;
|
||||
|
||||
@Schema(description = "")
|
||||
private Double gpsSpeed;
|
||||
|
||||
@Schema(description = "")
|
||||
private Double gpsDirection;
|
||||
|
||||
@Schema(description = "")
|
||||
private String gpsTime;
|
||||
|
||||
@Schema(description = "国标-虚拟组织所属的业务分组ID")
|
||||
private String gbBusinessGroupId;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.dao;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.dao.provider.ChannelProvider;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@@ -451,13 +452,18 @@ public interface CommonGBChannelMapper {
|
||||
List<CommonGBChannel> queryListByStreamPushList(@Param("dataType") Integer dataType, List<StreamPush> streamPushList);
|
||||
|
||||
@Update(value = {" <script>" +
|
||||
" <foreach collection='channels' item='item' separator=';' >" +
|
||||
" <foreach collection='gpsMsgInfoList' item='item' separator=';' >" +
|
||||
" UPDATE wvp_device_channel " +
|
||||
" SET gb_longitude=#{item.gbLongitude}, gb_latitude=#{item.gbLatitude} " +
|
||||
" WHERE data_type = #{dataType} AND gb_device_id=#{item.gbDeviceId} "+
|
||||
" SET gb_longitude=#{item.lng}" +
|
||||
", gb_latitude=#{item.lat} " +
|
||||
", gps_speed=#{item.speed} " +
|
||||
", gps_altitude=#{item.altitude} " +
|
||||
", gps_direction=#{item.direction} " +
|
||||
", gps_time=#{item.time} " +
|
||||
" WHERE gb_device_id=#{item.id} "+
|
||||
"</foreach>"+
|
||||
" </script>"})
|
||||
void updateGpsByDeviceIdForStreamPush(@Param("dataType") Integer dataType, List<CommonGBChannel> channels);
|
||||
void updateGpsByDeviceId(List<GPSMsgInfo> gpsMsgInfoList);
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryList")
|
||||
List<CommonGBChannel> queryList(@Param("query") String query, @Param("online") Boolean online,
|
||||
|
||||
@@ -262,6 +262,10 @@ public interface PlatformChannelMapper {
|
||||
" wdc.data_device_id,\n" +
|
||||
" wdc.create_time,\n" +
|
||||
" wdc.update_time,\n" +
|
||||
" wdc.gps_altitude,\n" +
|
||||
" wdc.gps_speed,\n" +
|
||||
" wdc.gps_direction,\n" +
|
||||
" wdc.gps_time,\n" +
|
||||
" coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" +
|
||||
" coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" +
|
||||
" coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" +
|
||||
|
||||
@@ -373,7 +373,7 @@ public class ChannelProvider {
|
||||
StringBuilder sqlBuild = new StringBuilder();
|
||||
sqlBuild.append(BASE_SQL);
|
||||
|
||||
sqlBuild.append(" where channel_type = 0 and data_type = #{dataType} and data_device_id in ( ");
|
||||
sqlBuild.append(" where channel_type = 0 and data_type = #{dataType} and data_device_id in ( ");
|
||||
Collection<StreamPush> ids = (Collection<StreamPush>)params.get("streamPushList");
|
||||
boolean first = true;
|
||||
for (StreamPush streamPush : ids) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.service;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
@@ -84,8 +85,6 @@ public interface IGbChannelService {
|
||||
|
||||
List<CommonGBChannel> queryListByStreamPushList(List<StreamPush> streamPushList);
|
||||
|
||||
void updateGpsByDeviceIdForStreamPush(List<CommonGBChannel> channels);
|
||||
|
||||
PageInfo<CommonGBChannel> queryList(int page, int count, String query, Boolean online, Boolean hasRecordPlan, Integer channelType);
|
||||
|
||||
void queryRecordInfo(CommonGBChannel channel, String startTime, String endTime, ErrorCallback<RecordInfo> callback);
|
||||
@@ -97,4 +96,7 @@ public interface IGbChannelService {
|
||||
PageInfo<CommonGBChannel> queryListByParentForUnusual(int page, int count, String query, Boolean online, Integer channelType);
|
||||
|
||||
void clearChannelParent(Boolean all, List<Integer> channelIds);
|
||||
|
||||
void updateGPSFromGPSMsgInfo(List<GPSMsgInfo> gpsMsgInfoList);
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.genersoft.iot.vmp.gb28181.service.IDeviceChannelService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IPlatformChannelService;
|
||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||
@@ -715,11 +716,6 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
||||
return commonGBChannelMapper.queryListByStreamPushList(ChannelDataType.STREAM_PUSH.value, streamPushList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateGpsByDeviceIdForStreamPush(List<CommonGBChannel> channels) {
|
||||
commonGBChannelMapper.updateGpsByDeviceIdForStreamPush(ChannelDataType.STREAM_PUSH.value, channels);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<CommonGBChannel> queryList(int page, int count, String query, Boolean online, Boolean hasRecordPlan, Integer channelType) {
|
||||
PageHelper.startPage(page, count);
|
||||
@@ -797,4 +793,12 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
||||
}
|
||||
commonGBChannelMapper.removeParentIdByChannelIds(channelIdsForClear);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateGPSFromGPSMsgInfo(List<GPSMsgInfo> gpsMsgInfoList) {
|
||||
if (gpsMsgInfoList == null || gpsMsgInfoList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
commonGBChannelMapper.updateGpsByDeviceId(gpsMsgInfoList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,12 +559,26 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||
}
|
||||
for (CommonGBChannel channel : channelList) {
|
||||
GPSMsgInfo gpsMsgInfo = redisCatchStorage.getGpsMsgInfo(channel.getGbDeviceId());
|
||||
|
||||
// 无最新位置则发送当前位置
|
||||
if (gpsMsgInfo != null && (gpsMsgInfo.getLng() == 0 && gpsMsgInfo.getLat() == 0)) {
|
||||
gpsMsgInfo = null;
|
||||
}
|
||||
|
||||
|
||||
if (gpsMsgInfo == null && !userSetting.isSendPositionOnDemand()){
|
||||
gpsMsgInfo = new GPSMsgInfo();
|
||||
gpsMsgInfo.setId(channel.getGbDeviceId());
|
||||
gpsMsgInfo.setLng(channel.getGbLongitude());
|
||||
gpsMsgInfo.setLat(channel.getGbLatitude());
|
||||
gpsMsgInfo.setAltitude(channel.getGpsAltitude());
|
||||
gpsMsgInfo.setSpeed(channel.getGpsSpeed());
|
||||
gpsMsgInfo.setDirection(channel.getGpsDirection());
|
||||
gpsMsgInfo.setTime(channel.getGpsTime());
|
||||
}
|
||||
|
||||
// 无最新位置不发送
|
||||
if (gpsMsgInfo != null) {
|
||||
// 经纬度都为0不发送
|
||||
if (gpsMsgInfo.getLng() == 0 && gpsMsgInfo.getLat() == 0) {
|
||||
continue;
|
||||
}
|
||||
// 发送GPS消息
|
||||
try {
|
||||
commanderForPlatform.sendNotifyMobilePosition(platform, gpsMsgInfo, channel, subscribe);
|
||||
|
||||
@@ -84,18 +84,16 @@ public class SIPProcessorObserver implements ISIPProcessorObserver {
|
||||
|
||||
// Success
|
||||
if (((status >= Response.OK) && (status < Response.MULTIPLE_CHOICES)) || status == Response.UNAUTHORIZED) {
|
||||
if (status != Response.UNAUTHORIZED && responseEvent.getResponse() != null && !sipSubscribe.isEmpty() ) {
|
||||
CallIdHeader callIdHeader = response.getCallIdHeader();
|
||||
CSeqHeader cSeqHeader = response.getCSeqHeader();
|
||||
if (callIdHeader != null) {
|
||||
SipEvent sipEvent = sipSubscribe.getSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
|
||||
if (sipEvent != null) {
|
||||
if (sipEvent.getOkEvent() != null) {
|
||||
SipSubscribe.EventResult<ResponseEvent> eventResult = new SipSubscribe.EventResult<>(responseEvent);
|
||||
sipEvent.getOkEvent().response(eventResult);
|
||||
}
|
||||
sipSubscribe.removeSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
|
||||
CallIdHeader callIdHeader = response.getCallIdHeader();
|
||||
CSeqHeader cSeqHeader = response.getCSeqHeader();
|
||||
if (callIdHeader != null) {
|
||||
SipEvent sipEvent = sipSubscribe.getSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
|
||||
if (sipEvent != null) {
|
||||
if (sipEvent.getOkEvent() != null) {
|
||||
SipSubscribe.EventResult<ResponseEvent> eventResult = new SipSubscribe.EventResult<>(responseEvent);
|
||||
sipEvent.getOkEvent().response(eventResult);
|
||||
}
|
||||
sipSubscribe.removeSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
|
||||
}
|
||||
}
|
||||
ISIPResponseProcessor sipRequestProcessor = responseProcessorMap.get(response.getCSeqHeader().getMethod());
|
||||
|
||||
@@ -136,7 +136,7 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
|
||||
if (errorEvent != null ) {
|
||||
errorEvent.response(event);
|
||||
}
|
||||
}, okEvent, 5L);
|
||||
}, okEvent, 2000L);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -369,7 +369,7 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
|
||||
.append("<CmdType>MobilePosition</CmdType>\r\n")
|
||||
.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n")
|
||||
.append("<DeviceID>" + channel.getGbDeviceId() + "</DeviceID>\r\n")
|
||||
.append("<Time>" + gpsMsgInfo.getTime() + "</Time>\r\n")
|
||||
.append("<Time>" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(gpsMsgInfo.getTime()) + "</Time>\r\n")
|
||||
.append("<Longitude>" + gpsMsgInfo.getLng() + "</Longitude>\r\n")
|
||||
.append("<Latitude>" + gpsMsgInfo.getLat() + "</Latitude>\r\n")
|
||||
.append("<Speed>" + gpsMsgInfo.getSpeed() + "</Speed>\r\n")
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.gb28181.auth.DigestServerAuthenticationHelper;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.GbSipDate;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.RemoteAddressInfo;
|
||||
import com.genersoft.iot.vmp.common.RemoteAddressInfo;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.SipTransactionInfo;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IDeviceService;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Platform;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.RemoteAddressInfo;
|
||||
import com.genersoft.iot.vmp.common.RemoteAddressInfo;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.SipMsgInfo;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IDeviceService;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
|
||||
|
||||
@@ -78,7 +78,7 @@ public class MobilePositionNotifyMessageHandler extends SIPRequestProcessorParen
|
||||
String channelId = getText(rootElementAfterCharset, "DeviceID");
|
||||
DeviceChannel deviceChannel = deviceChannelService.getOne(device.getDeviceId(), channelId);
|
||||
if (deviceChannel == null) {
|
||||
log.warn("[解析报警消息] 未找到通道:{}/{}", device.getDeviceId(), channelId);
|
||||
log.warn("[解析移动位置通知] 未找到通道:{}/{}", device.getDeviceId(), channelId);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.genersoft.iot.vmp.gb28181.utils;
|
||||
|
||||
import com.genersoft.iot.vmp.gb28181.bean.Gb28181Sdp;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.RemoteAddressInfo;
|
||||
import com.genersoft.iot.vmp.common.RemoteAddressInfo;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import com.genersoft.iot.vmp.utils.GitUtil;
|
||||
import gov.nist.javax.sip.address.AddressImpl;
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.genersoft.iot.vmp.media.bean;
|
||||
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.ZLMServerConfig;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
@Schema(description = "流媒体服务信息")
|
||||
@Data
|
||||
public class MediaServer {
|
||||
|
||||
@Schema(description = "ID")
|
||||
@@ -135,268 +137,4 @@ public class MediaServer {
|
||||
transcodeSuffix = zlmServerConfig.getTranscodeSuffix();
|
||||
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getHookIp() {
|
||||
return hookIp;
|
||||
}
|
||||
|
||||
public void setHookIp(String hookIp) {
|
||||
this.hookIp = hookIp;
|
||||
}
|
||||
|
||||
public String getSdpIp() {
|
||||
return sdpIp;
|
||||
}
|
||||
|
||||
public void setSdpIp(String sdpIp) {
|
||||
this.sdpIp = sdpIp;
|
||||
}
|
||||
|
||||
public String getStreamIp() {
|
||||
return streamIp;
|
||||
}
|
||||
|
||||
public void setStreamIp(String streamIp) {
|
||||
this.streamIp = streamIp;
|
||||
}
|
||||
|
||||
public int getHttpPort() {
|
||||
return httpPort;
|
||||
}
|
||||
|
||||
public void setHttpPort(int httpPort) {
|
||||
this.httpPort = httpPort;
|
||||
}
|
||||
|
||||
public int getHttpSSlPort() {
|
||||
return httpSSlPort;
|
||||
}
|
||||
|
||||
public void setHttpSSlPort(int httpSSlPort) {
|
||||
this.httpSSlPort = httpSSlPort;
|
||||
}
|
||||
|
||||
public int getRtmpPort() {
|
||||
return rtmpPort;
|
||||
}
|
||||
|
||||
public void setRtmpPort(int rtmpPort) {
|
||||
this.rtmpPort = rtmpPort;
|
||||
}
|
||||
|
||||
public int getRtmpSSlPort() {
|
||||
return rtmpSSlPort;
|
||||
}
|
||||
|
||||
public void setRtmpSSlPort(int rtmpSSlPort) {
|
||||
this.rtmpSSlPort = rtmpSSlPort;
|
||||
}
|
||||
|
||||
public int getRtpProxyPort() {
|
||||
return rtpProxyPort;
|
||||
}
|
||||
|
||||
public void setRtpProxyPort(int rtpProxyPort) {
|
||||
this.rtpProxyPort = rtpProxyPort;
|
||||
}
|
||||
|
||||
public int getRtspPort() {
|
||||
return rtspPort;
|
||||
}
|
||||
|
||||
public void setRtspPort(int rtspPort) {
|
||||
this.rtspPort = rtspPort;
|
||||
}
|
||||
|
||||
public int getRtspSSLPort() {
|
||||
return rtspSSLPort;
|
||||
}
|
||||
|
||||
public void setRtspSSLPort(int rtspSSLPort) {
|
||||
this.rtspSSLPort = rtspSSLPort;
|
||||
}
|
||||
|
||||
public boolean isAutoConfig() {
|
||||
return autoConfig;
|
||||
}
|
||||
|
||||
public void setAutoConfig(boolean autoConfig) {
|
||||
this.autoConfig = autoConfig;
|
||||
}
|
||||
|
||||
public String getSecret() {
|
||||
return secret;
|
||||
}
|
||||
|
||||
public void setSecret(String secret) {
|
||||
this.secret = secret;
|
||||
}
|
||||
|
||||
public boolean isRtpEnable() {
|
||||
return rtpEnable;
|
||||
}
|
||||
|
||||
public void setRtpEnable(boolean rtpEnable) {
|
||||
this.rtpEnable = rtpEnable;
|
||||
}
|
||||
|
||||
public String getRtpPortRange() {
|
||||
return rtpPortRange;
|
||||
}
|
||||
|
||||
public void setRtpPortRange(String rtpPortRange) {
|
||||
this.rtpPortRange = rtpPortRange;
|
||||
}
|
||||
|
||||
public int getRecordAssistPort() {
|
||||
return recordAssistPort;
|
||||
}
|
||||
|
||||
public void setRecordAssistPort(int recordAssistPort) {
|
||||
this.recordAssistPort = recordAssistPort;
|
||||
}
|
||||
|
||||
public boolean isDefaultServer() {
|
||||
return defaultServer;
|
||||
}
|
||||
|
||||
public void setDefaultServer(boolean defaultServer) {
|
||||
this.defaultServer = defaultServer;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public boolean isStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(boolean status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getLastKeepaliveTime() {
|
||||
return lastKeepaliveTime;
|
||||
}
|
||||
|
||||
public void setLastKeepaliveTime(String lastKeepaliveTime) {
|
||||
this.lastKeepaliveTime = lastKeepaliveTime;
|
||||
}
|
||||
|
||||
public Float getHookAliveInterval() {
|
||||
return hookAliveInterval;
|
||||
}
|
||||
|
||||
public void setHookAliveInterval(Float hookAliveInterval) {
|
||||
this.hookAliveInterval = hookAliveInterval;
|
||||
}
|
||||
|
||||
public String getSendRtpPortRange() {
|
||||
return sendRtpPortRange;
|
||||
}
|
||||
|
||||
public void setSendRtpPortRange(String sendRtpPortRange) {
|
||||
this.sendRtpPortRange = sendRtpPortRange;
|
||||
}
|
||||
|
||||
public int getRecordDay() {
|
||||
return recordDay;
|
||||
}
|
||||
|
||||
public void setRecordDay(int recordDay) {
|
||||
this.recordDay = recordDay;
|
||||
}
|
||||
|
||||
public String getRecordPath() {
|
||||
return recordPath;
|
||||
}
|
||||
|
||||
public void setRecordPath(String recordPath) {
|
||||
this.recordPath = recordPath;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getFlvPort() {
|
||||
return flvPort;
|
||||
}
|
||||
|
||||
public void setFlvPort(int flvPort) {
|
||||
this.flvPort = flvPort;
|
||||
}
|
||||
|
||||
public int getFlvSSLPort() {
|
||||
return flvSSLPort;
|
||||
}
|
||||
|
||||
public void setFlvSSLPort(int flvSSLPort) {
|
||||
this.flvSSLPort = flvSSLPort;
|
||||
}
|
||||
|
||||
public int getWsFlvPort() {
|
||||
return wsFlvPort;
|
||||
}
|
||||
|
||||
public void setWsFlvPort(int wsFlvPort) {
|
||||
this.wsFlvPort = wsFlvPort;
|
||||
}
|
||||
|
||||
public int getWsFlvSSLPort() {
|
||||
return wsFlvSSLPort;
|
||||
}
|
||||
|
||||
public void setWsFlvSSLPort(int wsFlvSSLPort) {
|
||||
this.wsFlvSSLPort = wsFlvSSLPort;
|
||||
}
|
||||
|
||||
public String getTranscodeSuffix() {
|
||||
return transcodeSuffix;
|
||||
}
|
||||
|
||||
public void setTranscodeSuffix(String transcodeSuffix) {
|
||||
this.transcodeSuffix = transcodeSuffix;
|
||||
}
|
||||
|
||||
public String getServerId() {
|
||||
return serverId;
|
||||
}
|
||||
|
||||
public void setServerId(String serverId) {
|
||||
this.serverId = serverId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -794,7 +794,11 @@ public class MediaServerServiceImpl implements IMediaServerService {
|
||||
if (streamInfoList == null || streamInfoList.isEmpty()) {
|
||||
return null;
|
||||
}else {
|
||||
return streamInfoList.get(0);
|
||||
StreamInfo streamInfo = streamInfoList.get(0);
|
||||
if (addr != null && !addr.isEmpty()) {
|
||||
streamInfo.changeStreamIp(addr);
|
||||
}
|
||||
return streamInfo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -177,6 +177,9 @@ public class ZLMHttpHookListener {
|
||||
ret.put("code", 0);
|
||||
return ret;
|
||||
}
|
||||
if (mediaInfo.getTranscodeSuffix() != null && param.getStream().endsWith(mediaInfo.getTranscodeSuffix())) {
|
||||
param.setStream(param.getStream().substring(0, param.getStream().lastIndexOf(mediaInfo.getTranscodeSuffix()) - 1));
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(mediaInfo.getTranscodeSuffix())
|
||||
&& !"null".equalsIgnoreCase(mediaInfo.getTranscodeSuffix())
|
||||
&& param.getStream().endsWith(mediaInfo.getTranscodeSuffix()) ) {
|
||||
|
||||
@@ -186,7 +186,6 @@ public class ZLMMediaServerStatusManager {
|
||||
log.info("[ZLM-连接成功] ID:{}, 地址: {}:{}", mediaServerItem.getId(), mediaServerItem.getIp(), mediaServerItem.getHttpPort());
|
||||
mediaServerItem.setStatus(true);
|
||||
mediaServerItem.setHookAliveInterval(10F);
|
||||
mediaServerService.update(mediaServerItem);
|
||||
// 发送上线通知
|
||||
eventPublisher.mediaServerOnlineEventPublish(mediaServerItem);
|
||||
if(mediaServerItem.isAutoConfig()) {
|
||||
@@ -243,6 +242,11 @@ public class ZLMMediaServerStatusManager {
|
||||
if (mediaServerItem.getWsFlvSSLPort() == 0) {
|
||||
mediaServerItem.setWsFlvSSLPort(zlmServerConfig.getHttpSSLport());
|
||||
}
|
||||
if (Objects.isNull(zlmServerConfig.getTranscodeSuffix())) {
|
||||
mediaServerItem.setTranscodeSuffix(null);
|
||||
}else {
|
||||
mediaServerItem.setTranscodeSuffix(zlmServerConfig.getTranscodeSuffix());
|
||||
}
|
||||
mediaServerItem.setHookAliveInterval(10F);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,11 @@ package com.genersoft.iot.vmp.media.zlm.dto;
|
||||
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.HookParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ZLMServerConfig extends HookParam {
|
||||
|
||||
@JSONField(name = "api.apiDebug")
|
||||
@@ -334,892 +338,4 @@ public class ZLMServerConfig extends HookParam {
|
||||
@JSONField(name = "transcode.suffix")
|
||||
private String transcodeSuffix;
|
||||
|
||||
|
||||
public String getHookIp() {
|
||||
return hookIp;
|
||||
}
|
||||
|
||||
public void setHookIp(String hookIp) {
|
||||
this.hookIp = hookIp;
|
||||
}
|
||||
|
||||
public String getApiDebug() {
|
||||
return apiDebug;
|
||||
}
|
||||
|
||||
public void setApiDebug(String apiDebug) {
|
||||
this.apiDebug = apiDebug;
|
||||
}
|
||||
|
||||
public String getApiSecret() {
|
||||
return apiSecret;
|
||||
}
|
||||
|
||||
public void setApiSecret(String apiSecret) {
|
||||
this.apiSecret = apiSecret;
|
||||
}
|
||||
|
||||
public String getFfmpegBin() {
|
||||
return ffmpegBin;
|
||||
}
|
||||
|
||||
public void setFfmpegBin(String ffmpegBin) {
|
||||
this.ffmpegBin = ffmpegBin;
|
||||
}
|
||||
|
||||
public String getFfmpegCmd() {
|
||||
return ffmpegCmd;
|
||||
}
|
||||
|
||||
public void setFfmpegCmd(String ffmpegCmd) {
|
||||
this.ffmpegCmd = ffmpegCmd;
|
||||
}
|
||||
|
||||
public String getFfmpegLog() {
|
||||
return ffmpegLog;
|
||||
}
|
||||
|
||||
public void setFfmpegLog(String ffmpegLog) {
|
||||
this.ffmpegLog = ffmpegLog;
|
||||
}
|
||||
|
||||
public String getGeneralEnableVhost() {
|
||||
return generalEnableVhost;
|
||||
}
|
||||
|
||||
public void setGeneralEnableVhost(String generalEnableVhost) {
|
||||
this.generalEnableVhost = generalEnableVhost;
|
||||
}
|
||||
|
||||
public String getGeneralMediaServerId() {
|
||||
return generalMediaServerId;
|
||||
}
|
||||
|
||||
public void setGeneralMediaServerId(String generalMediaServerId) {
|
||||
this.generalMediaServerId = generalMediaServerId;
|
||||
}
|
||||
|
||||
public String getGeneralFlowThreshold() {
|
||||
return generalFlowThreshold;
|
||||
}
|
||||
|
||||
public void setGeneralFlowThreshold(String generalFlowThreshold) {
|
||||
this.generalFlowThreshold = generalFlowThreshold;
|
||||
}
|
||||
|
||||
public String getGeneralMaxStreamWaitMS() {
|
||||
return generalMaxStreamWaitMS;
|
||||
}
|
||||
|
||||
public void setGeneralMaxStreamWaitMS(String generalMaxStreamWaitMS) {
|
||||
this.generalMaxStreamWaitMS = generalMaxStreamWaitMS;
|
||||
}
|
||||
|
||||
public int getGeneralStreamNoneReaderDelayMS() {
|
||||
return generalStreamNoneReaderDelayMS;
|
||||
}
|
||||
|
||||
public void setGeneralStreamNoneReaderDelayMS(int generalStreamNoneReaderDelayMS) {
|
||||
this.generalStreamNoneReaderDelayMS = generalStreamNoneReaderDelayMS;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getSdpIp() {
|
||||
return sdpIp;
|
||||
}
|
||||
|
||||
public void setSdpIp(String sdpIp) {
|
||||
this.sdpIp = sdpIp;
|
||||
}
|
||||
|
||||
public String getStreamIp() {
|
||||
return streamIp;
|
||||
}
|
||||
|
||||
public void setStreamIp(String streamIp) {
|
||||
this.streamIp = streamIp;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getHlsFileBufSize() {
|
||||
return hlsFileBufSize;
|
||||
}
|
||||
|
||||
public void setHlsFileBufSize(String hlsFileBufSize) {
|
||||
this.hlsFileBufSize = hlsFileBufSize;
|
||||
}
|
||||
|
||||
public String getHlsFilePath() {
|
||||
return hlsFilePath;
|
||||
}
|
||||
|
||||
public void setHlsFilePath(String hlsFilePath) {
|
||||
this.hlsFilePath = hlsFilePath;
|
||||
}
|
||||
|
||||
public String getHlsSegDur() {
|
||||
return hlsSegDur;
|
||||
}
|
||||
|
||||
public void setHlsSegDur(String hlsSegDur) {
|
||||
this.hlsSegDur = hlsSegDur;
|
||||
}
|
||||
|
||||
public String getHlsSegNum() {
|
||||
return hlsSegNum;
|
||||
}
|
||||
|
||||
public void setHlsSegNum(String hlsSegNum) {
|
||||
this.hlsSegNum = hlsSegNum;
|
||||
}
|
||||
|
||||
public String getHookAccessFileExceptHLS() {
|
||||
return hookAccessFileExceptHLS;
|
||||
}
|
||||
|
||||
public void setHookAccessFileExceptHLS(String hookAccessFileExceptHLS) {
|
||||
this.hookAccessFileExceptHLS = hookAccessFileExceptHLS;
|
||||
}
|
||||
|
||||
public String getHookAdminParams() {
|
||||
return hookAdminParams;
|
||||
}
|
||||
|
||||
public void setHookAdminParams(String hookAdminParams) {
|
||||
this.hookAdminParams = hookAdminParams;
|
||||
}
|
||||
|
||||
public String getHookEnable() {
|
||||
return hookEnable;
|
||||
}
|
||||
|
||||
public void setHookEnable(String hookEnable) {
|
||||
this.hookEnable = hookEnable;
|
||||
}
|
||||
|
||||
public String getHookOnFlowReport() {
|
||||
return hookOnFlowReport;
|
||||
}
|
||||
|
||||
public void setHookOnFlowReport(String hookOnFlowReport) {
|
||||
this.hookOnFlowReport = hookOnFlowReport;
|
||||
}
|
||||
|
||||
public String getHookOnHttpAccess() {
|
||||
return hookOnHttpAccess;
|
||||
}
|
||||
|
||||
public void setHookOnHttpAccess(String hookOnHttpAccess) {
|
||||
this.hookOnHttpAccess = hookOnHttpAccess;
|
||||
}
|
||||
|
||||
public String getHookOnPlay() {
|
||||
return hookOnPlay;
|
||||
}
|
||||
|
||||
public void setHookOnPlay(String hookOnPlay) {
|
||||
this.hookOnPlay = hookOnPlay;
|
||||
}
|
||||
|
||||
public String getHookOnPublish() {
|
||||
return hookOnPublish;
|
||||
}
|
||||
|
||||
public void setHookOnPublish(String hookOnPublish) {
|
||||
this.hookOnPublish = hookOnPublish;
|
||||
}
|
||||
|
||||
public String getHookOnRecordMp4() {
|
||||
return hookOnRecordMp4;
|
||||
}
|
||||
|
||||
public void setHookOnRecordMp4(String hookOnRecordMp4) {
|
||||
this.hookOnRecordMp4 = hookOnRecordMp4;
|
||||
}
|
||||
|
||||
public String getHookOnRtspAuth() {
|
||||
return hookOnRtspAuth;
|
||||
}
|
||||
|
||||
public void setHookOnRtspAuth(String hookOnRtspAuth) {
|
||||
this.hookOnRtspAuth = hookOnRtspAuth;
|
||||
}
|
||||
|
||||
public String getHookOnRtspRealm() {
|
||||
return hookOnRtspRealm;
|
||||
}
|
||||
|
||||
public void setHookOnRtspRealm(String hookOnRtspRealm) {
|
||||
this.hookOnRtspRealm = hookOnRtspRealm;
|
||||
}
|
||||
|
||||
public String getHookOnShellLogin() {
|
||||
return hookOnShellLogin;
|
||||
}
|
||||
|
||||
public void setHookOnShellLogin(String hookOnShellLogin) {
|
||||
this.hookOnShellLogin = hookOnShellLogin;
|
||||
}
|
||||
|
||||
public String getHookOnStreamChanged() {
|
||||
return hookOnStreamChanged;
|
||||
}
|
||||
|
||||
public void setHookOnStreamChanged(String hookOnStreamChanged) {
|
||||
this.hookOnStreamChanged = hookOnStreamChanged;
|
||||
}
|
||||
|
||||
public String getHookOnStreamNoneReader() {
|
||||
return hookOnStreamNoneReader;
|
||||
}
|
||||
|
||||
public void setHookOnStreamNoneReader(String hookOnStreamNoneReader) {
|
||||
this.hookOnStreamNoneReader = hookOnStreamNoneReader;
|
||||
}
|
||||
|
||||
public String getHookOnStreamNotFound() {
|
||||
return hookOnStreamNotFound;
|
||||
}
|
||||
|
||||
public void setHookOnStreamNotFound(String hookOnStreamNotFound) {
|
||||
this.hookOnStreamNotFound = hookOnStreamNotFound;
|
||||
}
|
||||
|
||||
public String getHookTimeoutSec() {
|
||||
return hookTimeoutSec;
|
||||
}
|
||||
|
||||
public void setHookTimeoutSec(String hookTimeoutSec) {
|
||||
this.hookTimeoutSec = hookTimeoutSec;
|
||||
}
|
||||
|
||||
public String getHttpCharSet() {
|
||||
return httpCharSet;
|
||||
}
|
||||
|
||||
public void setHttpCharSet(String httpCharSet) {
|
||||
this.httpCharSet = httpCharSet;
|
||||
}
|
||||
|
||||
public String getHttpKeepAliveSecond() {
|
||||
return httpKeepAliveSecond;
|
||||
}
|
||||
|
||||
public void setHttpKeepAliveSecond(String httpKeepAliveSecond) {
|
||||
this.httpKeepAliveSecond = httpKeepAliveSecond;
|
||||
}
|
||||
|
||||
public String getHttpMaxReqCount() {
|
||||
return httpMaxReqCount;
|
||||
}
|
||||
|
||||
public void setHttpMaxReqCount(String httpMaxReqCount) {
|
||||
this.httpMaxReqCount = httpMaxReqCount;
|
||||
}
|
||||
|
||||
public String getHttpMaxReqSize() {
|
||||
return httpMaxReqSize;
|
||||
}
|
||||
|
||||
public void setHttpMaxReqSize(String httpMaxReqSize) {
|
||||
this.httpMaxReqSize = httpMaxReqSize;
|
||||
}
|
||||
|
||||
public String getHttpNotFound() {
|
||||
return httpNotFound;
|
||||
}
|
||||
|
||||
public void setHttpNotFound(String httpNotFound) {
|
||||
this.httpNotFound = httpNotFound;
|
||||
}
|
||||
|
||||
public int getHttpPort() {
|
||||
return httpPort;
|
||||
}
|
||||
|
||||
public void setHttpPort(int httpPort) {
|
||||
this.httpPort = httpPort;
|
||||
}
|
||||
|
||||
public String getHttpRootPath() {
|
||||
return httpRootPath;
|
||||
}
|
||||
|
||||
public void setHttpRootPath(String httpRootPath) {
|
||||
this.httpRootPath = httpRootPath;
|
||||
}
|
||||
|
||||
public String getHttpSendBufSize() {
|
||||
return httpSendBufSize;
|
||||
}
|
||||
|
||||
public void setHttpSendBufSize(String httpSendBufSize) {
|
||||
this.httpSendBufSize = httpSendBufSize;
|
||||
}
|
||||
|
||||
public int getHttpSSLport() {
|
||||
return httpSSLport;
|
||||
}
|
||||
|
||||
public void setHttpSSLport(int httpSSLport) {
|
||||
this.httpSSLport = httpSSLport;
|
||||
}
|
||||
|
||||
public String getMulticastAddrMax() {
|
||||
return multicastAddrMax;
|
||||
}
|
||||
|
||||
public void setMulticastAddrMax(String multicastAddrMax) {
|
||||
this.multicastAddrMax = multicastAddrMax;
|
||||
}
|
||||
|
||||
public String getMulticastAddrMin() {
|
||||
return multicastAddrMin;
|
||||
}
|
||||
|
||||
public void setMulticastAddrMin(String multicastAddrMin) {
|
||||
this.multicastAddrMin = multicastAddrMin;
|
||||
}
|
||||
|
||||
public String getMulticastUdpTTL() {
|
||||
return multicastUdpTTL;
|
||||
}
|
||||
|
||||
public void setMulticastUdpTTL(String multicastUdpTTL) {
|
||||
this.multicastUdpTTL = multicastUdpTTL;
|
||||
}
|
||||
|
||||
public String getRecordAppName() {
|
||||
return recordAppName;
|
||||
}
|
||||
|
||||
public void setRecordAppName(String recordAppName) {
|
||||
this.recordAppName = recordAppName;
|
||||
}
|
||||
|
||||
public String getRecordFilePath() {
|
||||
return recordFilePath;
|
||||
}
|
||||
|
||||
public void setRecordFilePath(String recordFilePath) {
|
||||
this.recordFilePath = recordFilePath;
|
||||
}
|
||||
|
||||
public String getRecordFileSecond() {
|
||||
return recordFileSecond;
|
||||
}
|
||||
|
||||
public void setRecordFileSecond(String recordFileSecond) {
|
||||
this.recordFileSecond = recordFileSecond;
|
||||
}
|
||||
|
||||
public String getRecordFileSampleMS() {
|
||||
return recordFileSampleMS;
|
||||
}
|
||||
|
||||
public void setRecordFileSampleMS(String recordFileSampleMS) {
|
||||
this.recordFileSampleMS = recordFileSampleMS;
|
||||
}
|
||||
|
||||
public String getRtmpHandshakeSecond() {
|
||||
return rtmpHandshakeSecond;
|
||||
}
|
||||
|
||||
public void setRtmpHandshakeSecond(String rtmpHandshakeSecond) {
|
||||
this.rtmpHandshakeSecond = rtmpHandshakeSecond;
|
||||
}
|
||||
|
||||
public String getRtmpKeepAliveSecond() {
|
||||
return rtmpKeepAliveSecond;
|
||||
}
|
||||
|
||||
public void setRtmpKeepAliveSecond(String rtmpKeepAliveSecond) {
|
||||
this.rtmpKeepAliveSecond = rtmpKeepAliveSecond;
|
||||
}
|
||||
|
||||
public String getRtmpModifyStamp() {
|
||||
return rtmpModifyStamp;
|
||||
}
|
||||
|
||||
public void setRtmpModifyStamp(String rtmpModifyStamp) {
|
||||
this.rtmpModifyStamp = rtmpModifyStamp;
|
||||
}
|
||||
|
||||
public int getRtmpPort() {
|
||||
return rtmpPort;
|
||||
}
|
||||
|
||||
public void setRtmpPort(int rtmpPort) {
|
||||
this.rtmpPort = rtmpPort;
|
||||
}
|
||||
|
||||
public int getRtmpSslPort() {
|
||||
return rtmpSslPort;
|
||||
}
|
||||
|
||||
public void setRtmpSslPort(int rtmpSslPort) {
|
||||
this.rtmpSslPort = rtmpSslPort;
|
||||
}
|
||||
|
||||
public String getRtpAudioMtuSize() {
|
||||
return rtpAudioMtuSize;
|
||||
}
|
||||
|
||||
public void setRtpAudioMtuSize(String rtpAudioMtuSize) {
|
||||
this.rtpAudioMtuSize = rtpAudioMtuSize;
|
||||
}
|
||||
|
||||
public String getRtpClearCount() {
|
||||
return rtpClearCount;
|
||||
}
|
||||
|
||||
public void setRtpClearCount(String rtpClearCount) {
|
||||
this.rtpClearCount = rtpClearCount;
|
||||
}
|
||||
|
||||
public String getRtpCycleMS() {
|
||||
return rtpCycleMS;
|
||||
}
|
||||
|
||||
public void setRtpCycleMS(String rtpCycleMS) {
|
||||
this.rtpCycleMS = rtpCycleMS;
|
||||
}
|
||||
|
||||
public String getRtpMaxRtpCount() {
|
||||
return rtpMaxRtpCount;
|
||||
}
|
||||
|
||||
public void setRtpMaxRtpCount(String rtpMaxRtpCount) {
|
||||
this.rtpMaxRtpCount = rtpMaxRtpCount;
|
||||
}
|
||||
|
||||
public String getRtpVideoMtuSize() {
|
||||
return rtpVideoMtuSize;
|
||||
}
|
||||
|
||||
public void setRtpVideoMtuSize(String rtpVideoMtuSize) {
|
||||
this.rtpVideoMtuSize = rtpVideoMtuSize;
|
||||
}
|
||||
|
||||
public String getRtpProxyCheckSource() {
|
||||
return rtpProxyCheckSource;
|
||||
}
|
||||
|
||||
public void setRtpProxyCheckSource(String rtpProxyCheckSource) {
|
||||
this.rtpProxyCheckSource = rtpProxyCheckSource;
|
||||
}
|
||||
|
||||
public String getRtpProxyDumpDir() {
|
||||
return rtpProxyDumpDir;
|
||||
}
|
||||
|
||||
public void setRtpProxyDumpDir(String rtpProxyDumpDir) {
|
||||
this.rtpProxyDumpDir = rtpProxyDumpDir;
|
||||
}
|
||||
|
||||
public int getRtpProxyPort() {
|
||||
return rtpProxyPort;
|
||||
}
|
||||
|
||||
public void setRtpProxyPort(int rtpProxyPort) {
|
||||
this.rtpProxyPort = rtpProxyPort;
|
||||
}
|
||||
|
||||
public String getRtpProxyTimeoutSec() {
|
||||
return rtpProxyTimeoutSec;
|
||||
}
|
||||
|
||||
public void setRtpProxyTimeoutSec(String rtpProxyTimeoutSec) {
|
||||
this.rtpProxyTimeoutSec = rtpProxyTimeoutSec;
|
||||
}
|
||||
|
||||
public String getRtspAuthBasic() {
|
||||
return rtspAuthBasic;
|
||||
}
|
||||
|
||||
public void setRtspAuthBasic(String rtspAuthBasic) {
|
||||
this.rtspAuthBasic = rtspAuthBasic;
|
||||
}
|
||||
|
||||
public String getRtspHandshakeSecond() {
|
||||
return rtspHandshakeSecond;
|
||||
}
|
||||
|
||||
public void setRtspHandshakeSecond(String rtspHandshakeSecond) {
|
||||
this.rtspHandshakeSecond = rtspHandshakeSecond;
|
||||
}
|
||||
|
||||
public String getRtspKeepAliveSecond() {
|
||||
return rtspKeepAliveSecond;
|
||||
}
|
||||
|
||||
public void setRtspKeepAliveSecond(String rtspKeepAliveSecond) {
|
||||
this.rtspKeepAliveSecond = rtspKeepAliveSecond;
|
||||
}
|
||||
|
||||
public int getRtspPort() {
|
||||
return rtspPort;
|
||||
}
|
||||
|
||||
public void setRtspPort(int rtspPort) {
|
||||
this.rtspPort = rtspPort;
|
||||
}
|
||||
|
||||
public int getRtspSSlport() {
|
||||
return rtspSSlport;
|
||||
}
|
||||
|
||||
public void setRtspSSlport(int rtspSSlport) {
|
||||
this.rtspSSlport = rtspSSlport;
|
||||
}
|
||||
|
||||
public String getShellMaxReqSize() {
|
||||
return shellMaxReqSize;
|
||||
}
|
||||
|
||||
public void setShellMaxReqSize(String shellMaxReqSize) {
|
||||
this.shellMaxReqSize = shellMaxReqSize;
|
||||
}
|
||||
|
||||
public String getShellPhell() {
|
||||
return shellPhell;
|
||||
}
|
||||
|
||||
public void setShellPhell(String shellPhell) {
|
||||
this.shellPhell = shellPhell;
|
||||
}
|
||||
|
||||
public Float getHookAliveInterval() {
|
||||
return hookAliveInterval;
|
||||
}
|
||||
|
||||
public void setHookAliveInterval(Float hookAliveInterval) {
|
||||
this.hookAliveInterval = hookAliveInterval;
|
||||
}
|
||||
|
||||
public String getPortRange() {
|
||||
return portRange;
|
||||
}
|
||||
|
||||
public void setPortRange(String portRange) {
|
||||
this.portRange = portRange;
|
||||
}
|
||||
|
||||
public String getApiSnapRoot() {
|
||||
return apiSnapRoot;
|
||||
}
|
||||
|
||||
public void setApiSnapRoot(String apiSnapRoot) {
|
||||
this.apiSnapRoot = apiSnapRoot;
|
||||
}
|
||||
|
||||
public String getApiDefaultSnap() {
|
||||
return apiDefaultSnap;
|
||||
}
|
||||
|
||||
public void setApiDefaultSnap(String apiDefaultSnap) {
|
||||
this.apiDefaultSnap = apiDefaultSnap;
|
||||
}
|
||||
|
||||
public String getFfmpegSnap() {
|
||||
return ffmpegSnap;
|
||||
}
|
||||
|
||||
public void setFfmpegSnap(String ffmpegSnap) {
|
||||
this.ffmpegSnap = ffmpegSnap;
|
||||
}
|
||||
|
||||
public String getFfmpegRestartSec() {
|
||||
return ffmpegRestartSec;
|
||||
}
|
||||
|
||||
public void setFfmpegRestartSec(String ffmpegRestartSec) {
|
||||
this.ffmpegRestartSec = ffmpegRestartSec;
|
||||
}
|
||||
|
||||
public String getProtocolModifyStamp() {
|
||||
return protocolModifyStamp;
|
||||
}
|
||||
|
||||
public void setProtocolModifyStamp(String protocolModifyStamp) {
|
||||
this.protocolModifyStamp = protocolModifyStamp;
|
||||
}
|
||||
|
||||
public String getProtocolEnableAudio() {
|
||||
return protocolEnableAudio;
|
||||
}
|
||||
|
||||
public void setProtocolEnableAudio(String protocolEnableAudio) {
|
||||
this.protocolEnableAudio = protocolEnableAudio;
|
||||
}
|
||||
|
||||
public String getProtocolAddMuteAudio() {
|
||||
return protocolAddMuteAudio;
|
||||
}
|
||||
|
||||
public void setProtocolAddMuteAudio(String protocolAddMuteAudio) {
|
||||
this.protocolAddMuteAudio = protocolAddMuteAudio;
|
||||
}
|
||||
|
||||
public String getProtocolContinuePushMs() {
|
||||
return protocolContinuePushMs;
|
||||
}
|
||||
|
||||
public void setProtocolContinuePushMs(String protocolContinuePushMs) {
|
||||
this.protocolContinuePushMs = protocolContinuePushMs;
|
||||
}
|
||||
|
||||
public String getProtocolEnableHls() {
|
||||
return protocolEnableHls;
|
||||
}
|
||||
|
||||
public void setProtocolEnableHls(String protocolEnableHls) {
|
||||
this.protocolEnableHls = protocolEnableHls;
|
||||
}
|
||||
|
||||
public String getProtocolEnableMp4() {
|
||||
return protocolEnableMp4;
|
||||
}
|
||||
|
||||
public void setProtocolEnableMp4(String protocolEnableMp4) {
|
||||
this.protocolEnableMp4 = protocolEnableMp4;
|
||||
}
|
||||
|
||||
public String getProtocolEnableRtsp() {
|
||||
return protocolEnableRtsp;
|
||||
}
|
||||
|
||||
public void setProtocolEnableRtsp(String protocolEnableRtsp) {
|
||||
this.protocolEnableRtsp = protocolEnableRtsp;
|
||||
}
|
||||
|
||||
public String getProtocolEnableRtmp() {
|
||||
return protocolEnableRtmp;
|
||||
}
|
||||
|
||||
public void setProtocolEnableRtmp(String protocolEnableRtmp) {
|
||||
this.protocolEnableRtmp = protocolEnableRtmp;
|
||||
}
|
||||
|
||||
public String getProtocolEnableTs() {
|
||||
return protocolEnableTs;
|
||||
}
|
||||
|
||||
public void setProtocolEnableTs(String protocolEnableTs) {
|
||||
this.protocolEnableTs = protocolEnableTs;
|
||||
}
|
||||
|
||||
public String getProtocolEnableFmp4() {
|
||||
return protocolEnableFmp4;
|
||||
}
|
||||
|
||||
public void setProtocolEnableFmp4(String protocolEnableFmp4) {
|
||||
this.protocolEnableFmp4 = protocolEnableFmp4;
|
||||
}
|
||||
|
||||
public String getProtocolMp4AsPlayer() {
|
||||
return protocolMp4AsPlayer;
|
||||
}
|
||||
|
||||
public void setProtocolMp4AsPlayer(String protocolMp4AsPlayer) {
|
||||
this.protocolMp4AsPlayer = protocolMp4AsPlayer;
|
||||
}
|
||||
|
||||
public String getProtocolMp4MaxSecond() {
|
||||
return protocolMp4MaxSecond;
|
||||
}
|
||||
|
||||
public void setProtocolMp4MaxSecond(String protocolMp4MaxSecond) {
|
||||
this.protocolMp4MaxSecond = protocolMp4MaxSecond;
|
||||
}
|
||||
|
||||
public String getProtocolMp4SavePath() {
|
||||
return protocolMp4SavePath;
|
||||
}
|
||||
|
||||
public void setProtocolMp4SavePath(String protocolMp4SavePath) {
|
||||
this.protocolMp4SavePath = protocolMp4SavePath;
|
||||
}
|
||||
|
||||
public String getProtocolHlsSavePath() {
|
||||
return protocolHlsSavePath;
|
||||
}
|
||||
|
||||
public void setProtocolHlsSavePath(String protocolHlsSavePath) {
|
||||
this.protocolHlsSavePath = protocolHlsSavePath;
|
||||
}
|
||||
|
||||
public String getProtocolHlsDemand() {
|
||||
return protocolHlsDemand;
|
||||
}
|
||||
|
||||
public void setProtocolHlsDemand(String protocolHlsDemand) {
|
||||
this.protocolHlsDemand = protocolHlsDemand;
|
||||
}
|
||||
|
||||
public String getProtocolRtspDemand() {
|
||||
return protocolRtspDemand;
|
||||
}
|
||||
|
||||
public void setProtocolRtspDemand(String protocolRtspDemand) {
|
||||
this.protocolRtspDemand = protocolRtspDemand;
|
||||
}
|
||||
|
||||
public String getProtocolRtmpDemand() {
|
||||
return protocolRtmpDemand;
|
||||
}
|
||||
|
||||
public void setProtocolRtmpDemand(String protocolRtmpDemand) {
|
||||
this.protocolRtmpDemand = protocolRtmpDemand;
|
||||
}
|
||||
|
||||
public String getProtocolTsDemand() {
|
||||
return protocolTsDemand;
|
||||
}
|
||||
|
||||
public void setProtocolTsDemand(String protocolTsDemand) {
|
||||
this.protocolTsDemand = protocolTsDemand;
|
||||
}
|
||||
|
||||
public String getProtocolFmp4Demand() {
|
||||
return protocolFmp4Demand;
|
||||
}
|
||||
|
||||
public void setProtocolFmp4Demand(String protocolFmp4Demand) {
|
||||
this.protocolFmp4Demand = protocolFmp4Demand;
|
||||
}
|
||||
|
||||
public String getGeneralResetWhenRePlay() {
|
||||
return generalResetWhenRePlay;
|
||||
}
|
||||
|
||||
public void setGeneralResetWhenRePlay(String generalResetWhenRePlay) {
|
||||
this.generalResetWhenRePlay = generalResetWhenRePlay;
|
||||
}
|
||||
|
||||
public String getGeneralMergeWriteMS() {
|
||||
return generalMergeWriteMS;
|
||||
}
|
||||
|
||||
public void setGeneralMergeWriteMS(String generalMergeWriteMS) {
|
||||
this.generalMergeWriteMS = generalMergeWriteMS;
|
||||
}
|
||||
|
||||
public String getGeneralWaitTrackReadyMs() {
|
||||
return generalWaitTrackReadyMs;
|
||||
}
|
||||
|
||||
public void setGeneralWaitTrackReadyMs(String generalWaitTrackReadyMs) {
|
||||
this.generalWaitTrackReadyMs = generalWaitTrackReadyMs;
|
||||
}
|
||||
|
||||
public String getGeneralWaitAddTrackMs() {
|
||||
return generalWaitAddTrackMs;
|
||||
}
|
||||
|
||||
public void setGeneralWaitAddTrackMs(String generalWaitAddTrackMs) {
|
||||
this.generalWaitAddTrackMs = generalWaitAddTrackMs;
|
||||
}
|
||||
|
||||
public String getGeneralUnreadyFrameCache() {
|
||||
return generalUnreadyFrameCache;
|
||||
}
|
||||
|
||||
public void setGeneralUnreadyFrameCache(String generalUnreadyFrameCache) {
|
||||
this.generalUnreadyFrameCache = generalUnreadyFrameCache;
|
||||
}
|
||||
|
||||
public String getHlsSegRetain() {
|
||||
return hlsSegRetain;
|
||||
}
|
||||
|
||||
public void setHlsSegRetain(String hlsSegRetain) {
|
||||
this.hlsSegRetain = hlsSegRetain;
|
||||
}
|
||||
|
||||
public String getHlsBroadcastRecordTs() {
|
||||
return hlsBroadcastRecordTs;
|
||||
}
|
||||
|
||||
public void setHlsBroadcastRecordTs(String hlsBroadcastRecordTs) {
|
||||
this.hlsBroadcastRecordTs = hlsBroadcastRecordTs;
|
||||
}
|
||||
|
||||
public String getHlsDeleteDelaySec() {
|
||||
return hlsDeleteDelaySec;
|
||||
}
|
||||
|
||||
public void setHlsDeleteDelaySec(String hlsDeleteDelaySec) {
|
||||
this.hlsDeleteDelaySec = hlsDeleteDelaySec;
|
||||
}
|
||||
|
||||
public String getHlsSegKeep() {
|
||||
return hlsSegKeep;
|
||||
}
|
||||
|
||||
public void setHlsSegKeep(String hlsSegKeep) {
|
||||
this.hlsSegKeep = hlsSegKeep;
|
||||
}
|
||||
|
||||
public String getHookOnServerStarted() {
|
||||
return hookOnServerStarted;
|
||||
}
|
||||
|
||||
public void setHookOnServerStarted(String hookOnServerStarted) {
|
||||
this.hookOnServerStarted = hookOnServerStarted;
|
||||
}
|
||||
|
||||
public String getHookOnServerKeepalive() {
|
||||
return hookOnServerKeepalive;
|
||||
}
|
||||
|
||||
public void setHookOnServerKeepalive(String hookOnServerKeepalive) {
|
||||
this.hookOnServerKeepalive = hookOnServerKeepalive;
|
||||
}
|
||||
|
||||
public String getHookOnSendRtpStopped() {
|
||||
return hookOnSendRtpStopped;
|
||||
}
|
||||
|
||||
public void setHookOnSendRtpStopped(String hookOnSendRtpStopped) {
|
||||
this.hookOnSendRtpStopped = hookOnSendRtpStopped;
|
||||
}
|
||||
|
||||
public String getHookOnRtpServerTimeout() {
|
||||
return hookOnRtpServerTimeout;
|
||||
}
|
||||
|
||||
public void setHookOnRtpServerTimeout(String hookOnRtpServerTimeout) {
|
||||
this.hookOnRtpServerTimeout = hookOnRtpServerTimeout;
|
||||
}
|
||||
|
||||
public String getTranscodeSuffix() {
|
||||
return transcodeSuffix;
|
||||
}
|
||||
|
||||
public void setTranscodeSuffix(String transcodeSuffix) {
|
||||
this.transcodeSuffix = transcodeSuffix;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class GPSMsgInfo {
|
||||
/**
|
||||
* 速度,单位:km/h (可选)
|
||||
*/
|
||||
private double speed;
|
||||
private Double speed;
|
||||
|
||||
/**
|
||||
* 产生通知时间, 时间格式: 2020-01-14T14:32:12
|
||||
@@ -40,23 +40,23 @@ public class GPSMsgInfo {
|
||||
/**
|
||||
* 方向,取值为当前摄像头方向与正北方的顺时针夹角,取值范围0°~360°,单位:(°)(可选)
|
||||
*/
|
||||
private String direction;
|
||||
private Double direction;
|
||||
|
||||
/**
|
||||
* 海拔高度,单位:m(可选)
|
||||
*/
|
||||
private String altitude;
|
||||
private Double altitude;
|
||||
|
||||
private boolean stored;
|
||||
|
||||
public static GPSMsgInfo getInstance(MobilePosition mobilePosition) {
|
||||
GPSMsgInfo gpsMsgInfo = new GPSMsgInfo();
|
||||
gpsMsgInfo.setChannelId(mobilePosition.getChannelId());
|
||||
gpsMsgInfo.setAltitude(mobilePosition.getAltitude() + "");
|
||||
gpsMsgInfo.setAltitude(mobilePosition.getAltitude());
|
||||
gpsMsgInfo.setLng(mobilePosition.getLongitude());
|
||||
gpsMsgInfo.setLat(mobilePosition.getLatitude());
|
||||
gpsMsgInfo.setSpeed(mobilePosition.getSpeed());
|
||||
gpsMsgInfo.setDirection(mobilePosition.getDirection() + "");
|
||||
gpsMsgInfo.setDirection(mobilePosition.getDirection());
|
||||
gpsMsgInfo.setTime(DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime()));
|
||||
return gpsMsgInfo;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.genersoft.iot.vmp.service.redisMsg;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.streamPush.service.IStreamPushService;
|
||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -15,9 +17,11 @@ import org.springframework.stereotype.Component;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 接收来自redis的GPS更新通知, 此处只针对推流设备
|
||||
* 接收来自redis的GPS更新通知
|
||||
*
|
||||
* @author lin
|
||||
* 监听: SUBSCRIBE VM_MSG_GPS
|
||||
@@ -33,6 +37,9 @@ public class RedisGpsMsgListener implements MessageListener {
|
||||
@Autowired
|
||||
private IStreamPushService streamPushService;
|
||||
|
||||
@Autowired
|
||||
private IGbChannelService channelService;
|
||||
|
||||
private final ConcurrentLinkedQueue<Message> taskQueue = new ConcurrentLinkedQueue<>();
|
||||
|
||||
|
||||
@@ -42,7 +49,7 @@ public class RedisGpsMsgListener implements MessageListener {
|
||||
taskQueue.offer(message);
|
||||
}
|
||||
|
||||
@Scheduled(fixedDelay = 200) //每400毫秒执行一次
|
||||
@Scheduled(fixedDelay = 200, timeUnit = TimeUnit.MILLISECONDS) //每400毫秒执行一次
|
||||
public void executeTaskQueue() {
|
||||
if (taskQueue.isEmpty()) {
|
||||
return;
|
||||
@@ -61,6 +68,7 @@ public class RedisGpsMsgListener implements MessageListener {
|
||||
for (Message msg : messageDataList) {
|
||||
try {
|
||||
GPSMsgInfo gpsMsgInfo = JSON.parseObject(msg.getBody(), GPSMsgInfo.class);
|
||||
gpsMsgInfo.setTime(DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(gpsMsgInfo.getTime()));
|
||||
log.info("[REDIS的位置变化通知], {}", JSON.toJSONString(gpsMsgInfo));
|
||||
// 只是放入redis缓存起来
|
||||
redisCatchStorage.updateGpsMsgInfo(gpsMsgInfo);
|
||||
@@ -74,15 +82,18 @@ public class RedisGpsMsgListener implements MessageListener {
|
||||
/**
|
||||
* 定时将经纬度更新到数据库
|
||||
*/
|
||||
@Scheduled(fixedDelay = 2 * 1000) //每2秒执行一次
|
||||
@Scheduled(fixedDelay = 2, timeUnit = TimeUnit.SECONDS) //每2秒执行一次
|
||||
public void execute() {
|
||||
// 需要查询到
|
||||
List<GPSMsgInfo> gpsMsgInfoList = redisCatchStorage.getAllGpsMsgInfo();
|
||||
if (!gpsMsgInfoList.isEmpty()) {
|
||||
streamPushService.updateGPSFromGPSMsgInfo(gpsMsgInfoList);
|
||||
for (GPSMsgInfo msgInfo : gpsMsgInfoList) {
|
||||
msgInfo.setStored(true);
|
||||
redisCatchStorage.updateGpsMsgInfo(msgInfo);
|
||||
gpsMsgInfoList = gpsMsgInfoList.stream().filter(gpsMsgInfo -> !gpsMsgInfo.isStored()).collect(Collectors.toList());;
|
||||
if (!gpsMsgInfoList.isEmpty()) {
|
||||
channelService.updateGPSFromGPSMsgInfo(gpsMsgInfoList);
|
||||
for (GPSMsgInfo msgInfo : gpsMsgInfoList) {
|
||||
msgInfo.setStored(true);
|
||||
redisCatchStorage.updateGpsMsgInfo(msgInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class RedisPushStreamStatusMsgListener implements MessageListener, Applic
|
||||
streamPushService.online(streamStatusMessage.getOnlineStreams());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("[REDIS消息-推流设备状态变化] 发现未处理的异常, \r\n{}", JSON.toJSONString(msg));
|
||||
log.warn("[REDIS消息-推流设备状态变化] 发现未处理的异常, \r\n{}", JSON.parseObject(msg.getBody()));
|
||||
log.error("[REDIS消息-推流设备状态变化] 异常内容: ", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public interface MediaServerMapper {
|
||||
|
||||
@Update(value = {" <script>" +
|
||||
"UPDATE wvp_media_server " +
|
||||
"SET update_time=#{updateTime}" +
|
||||
"SET update_time=#{updateTime}, transcode_suffix=#{transcodeSuffix} " +
|
||||
"<if test=\"ip != null\">, ip=#{ip}</if>" +
|
||||
"<if test=\"hookIp != null\">, hook_ip=#{hookIp}</if>" +
|
||||
"<if test=\"sdpIp != null\">, sdp_ip=#{sdpIp}</if>" +
|
||||
@@ -106,7 +106,6 @@ public interface MediaServerMapper {
|
||||
"<if test=\"hookAliveInterval != null\">, hook_alive_interval=#{hookAliveInterval}</if>" +
|
||||
"<if test=\"recordDay != null\">, record_day=#{recordDay}</if>" +
|
||||
"<if test=\"recordPath != null\">, record_path=#{recordPath}</if>" +
|
||||
"<if test=\"transcodeSuffix != null\">, transcode_suffix=#{transcodeSuffix}</if>" +
|
||||
"<if test=\"serverId != null\">, server_id=#{serverId}</if>" +
|
||||
"<if test=\"type != null\">, type=#{type}</if>" +
|
||||
"WHERE id=#{id}"+
|
||||
|
||||
@@ -500,7 +500,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
public void removePushListItem(String app, String stream, String mediaServerId) {
|
||||
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
||||
MediaInfo param = (MediaInfo)redisTemplate.opsForValue().get(key);
|
||||
if (param != null && param.getMediaServer().getId().equalsIgnoreCase(mediaServerId)) {
|
||||
if (param != null) {
|
||||
redisTemplate.delete(key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,30 @@ public class StreamPush extends CommonGBChannel implements Comparable<StreamPush
|
||||
@Schema(description = "拉起离线推流")
|
||||
private boolean startOfflinePush;
|
||||
|
||||
/**
|
||||
* 速度,单位:km/h (可选)
|
||||
*/
|
||||
@Schema(description = "GPS的速度")
|
||||
private Double gpsSpeed;
|
||||
|
||||
/**
|
||||
* 方向,取值为当前摄像头方向与正北方的顺时针夹角,取值范围0°~360°,单位:(°)(可选)
|
||||
*/
|
||||
@Schema(description = "GPS的方向")
|
||||
private Double gpsDirection;
|
||||
|
||||
/**
|
||||
* 海拔高度,单位:m(可选)
|
||||
*/
|
||||
@Schema(description = "GPS的海拔高度")
|
||||
private Double gpsAltitude;
|
||||
|
||||
/**
|
||||
* GPS的更新时间
|
||||
*/
|
||||
@Schema(description = "GPS的更新时间")
|
||||
private String gpsTime;
|
||||
|
||||
private String uniqueKey;
|
||||
|
||||
private Integer dataType = ChannelDataType.STREAM_PUSH.value;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.genersoft.iot.vmp.streamPush.service;
|
||||
|
||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.service.bean.StreamPushItemFromRedis;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
|
||||
@@ -98,5 +97,4 @@ public interface IStreamPushService {
|
||||
|
||||
void batchRemove(Set<Integer> ids);
|
||||
|
||||
void updateGPSFromGPSMsgInfo(List<GPSMsgInfo> gpsMsgInfoList);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.OriginType;
|
||||
import com.genersoft.iot.vmp.service.ISendRtpServerService;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.service.bean.StreamPushItemFromRedis;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
|
||||
@@ -471,6 +470,9 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
||||
public void online(List<StreamPushItemFromRedis> onlineStreams) {
|
||||
// 更新部分设备上线streamPushService
|
||||
List<StreamPush> streamPushList = streamPushMapper.getListFromRedis(onlineStreams);
|
||||
if (streamPushList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
List<CommonGBChannel> commonGBChannelList = gbChannelService.queryListByStreamPushList(streamPushList);
|
||||
gbChannelService.online(commonGBChannelList);
|
||||
}
|
||||
@@ -583,17 +585,4 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
||||
streamPushMapper.batchDel(streamPushList);
|
||||
gbChannelService.delete(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateGPSFromGPSMsgInfo(List<GPSMsgInfo> gpsMsgInfoList) {
|
||||
List<CommonGBChannel> channels = new ArrayList<>();
|
||||
for (GPSMsgInfo gpsMsgInfo : gpsMsgInfoList) {
|
||||
CommonGBChannel channel = new CommonGBChannel();
|
||||
channel.setGbDeviceId(gpsMsgInfo.getId());
|
||||
channel.setGbLongitude(gpsMsgInfo.getLng());
|
||||
channel.setGbLatitude(gpsMsgInfo.getLat());
|
||||
channels.add(channel);
|
||||
}
|
||||
gbChannelService.updateGpsByDeviceIdForStreamPush(channels);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user