Merge branch 'wvp-28181-2.0'

# Conflicts:
#	src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/InviteRequestProcessor.java
This commit is contained in:
648540858
2023-02-22 18:08:25 +08:00
42 changed files with 553 additions and 128 deletions

View File

@@ -1,43 +1,96 @@
package com.genersoft.iot.vmp.vmanager.bean;
import com.genersoft.iot.vmp.common.StreamInfo;
import io.swagger.v3.oas.annotations.media.Schema;
@Schema(description = "流信息")
public class StreamContent {
@Schema(description = "应用名")
private String app;
@Schema(description = "流ID")
private String stream;
@Schema(description = "IP")
private String ip;
@Schema(description = "HTTP-FLV流地址")
private String flv;
@Schema(description = "HTTPS-FLV流地址")
private String https_flv;
@Schema(description = "Websocket-FLV流地址")
private String ws_flv;
@Schema(description = "Websockets-FLV流地址")
private String wss_flv;
@Schema(description = "HTTP-FMP4流地址")
private String fmp4;
@Schema(description = "HTTPS-FMP4流地址")
private String https_fmp4;
@Schema(description = "Websocket-FMP4流地址")
private String ws_fmp4;
@Schema(description = "Websockets-FMP4流地址")
private String wss_fmp4;
@Schema(description = "HLS流地址")
private String hls;
@Schema(description = "HTTPS-HLS流地址")
private String https_hls;
@Schema(description = "Websocket-HLS流地址")
private String ws_hls;
@Schema(description = "Websockets-HLS流地址")
private String wss_hls;
@Schema(description = "HTTP-TS流地址")
private String ts;
@Schema(description = "HTTPS-TS流地址")
private String https_ts;
@Schema(description = "Websocket-TS流地址")
private String ws_ts;
@Schema(description = "Websockets-TS流地址")
private String wss_ts;
@Schema(description = "RTMP流地址")
private String rtmp;
@Schema(description = "RTMPS流地址")
private String rtmps;
@Schema(description = "RTSP流地址")
private String rtsp;
@Schema(description = "RTSPS流地址")
private String rtsps;
@Schema(description = "RTC流地址")
private String rtc;
@Schema(description = "RTCS流地址")
private String rtcs;
@Schema(description = "流媒体ID")
private String mediaServerId;
@Schema(description = "流编码信息")
private Object tracks;
@Schema(description = "开始时间")
private String startTime;
@Schema(description = "结束时间")
private String endTime;
private double progress;

View File

@@ -1,39 +1,30 @@
package com.genersoft.iot.vmp.vmanager.gb28181.MobilePosition;
import java.text.ParseException;
import java.util.List;
import java.util.UUID;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.bean.MobilePosition;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
import com.genersoft.iot.vmp.service.IDeviceChannelService;
import com.genersoft.iot.vmp.service.IDeviceService;
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import com.github.pagehelper.util.StringUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.async.DeferredResult;
import javax.sip.InvalidArgumentException;
import javax.sip.SipException;
import java.text.ParseException;
import java.util.List;
import java.util.UUID;
/**
* 位置信息管理
@@ -58,6 +49,9 @@ public class MobilePositionController {
@Autowired
private IDeviceService deviceService;
@Autowired
private IDeviceChannelService deviceChannelService;
/**
* 查询历史轨迹
* @param deviceId 设备ID
@@ -162,4 +156,24 @@ public class MobilePositionController {
throw new ControllerException(ErrorCode.ERROR100);
}
}
/**
* 数据位置信息格式处理
* @param deviceId 设备ID
* @return true = 命令发送成功
*/
@Operation(summary = "数据位置信息格式处理")
@Parameter(name = "deviceId", description = "设备国标编号", required = true)
@GetMapping("/transform/{deviceId}")
public void positionTransform(@PathVariable String deviceId) {
Device device = deviceService.getDevice(deviceId);
if (device == null) {
throw new ControllerException(ErrorCode.ERROR400.getCode(), "未找到设备: " + deviceId);
}
boolean result = deviceChannelService.updateAllGps(device);
if (!result) {
throw new ControllerException(ErrorCode.ERROR100);
}
}
}

View File

@@ -123,7 +123,7 @@ public class DeviceQuery {
@Parameter(name = "online", description = "是否在线")
@Parameter(name = "channelType", description = "设备/子目录-> false/true")
@Parameter(name = "catalogUnderDevice", description = "是否直属与设备的目录")
public PageInfo channels(@PathVariable String deviceId,
public PageInfo<DeviceChannel> channels(@PathVariable String deviceId,
int page, int count,
@RequestParam(required = false) String query,
@RequestParam(required = false) Boolean online,
@@ -223,7 +223,7 @@ public class DeviceQuery {
@Parameter(name = "online", description = "是否在线")
@Parameter(name = "channelType", description = "设备/子目录-> false/true")
@GetMapping("/sub_channels/{deviceId}/{channelId}/channels")
public PageInfo subChannels(@PathVariable String deviceId,
public PageInfo<DeviceChannel> subChannels(@PathVariable String deviceId,
@PathVariable String channelId,
int page,
int count,
@@ -237,8 +237,7 @@ public class DeviceQuery {
return deviceChannelPageResult;
}
PageInfo pageResult = storager.querySubChannels(deviceId, channelId, query, channelType, online, page, count);
return pageResult;
return storager.querySubChannels(deviceId, channelId, query, channelType, online, page, count);
}
/**