Procházet zdrojové kódy

修改直播视频地址playUrl

tags/V1.0.1^2
chengwang před 1 rokem
rodič
revize
58d1a98903
8 změnil soubory, kde provedl 27 přidání a 22 odebrání
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/LiveChannel.java
  2. +1
    -12
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/LiveChannelVo.java
  3. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/VideoUrlVo.java
  4. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspection/QueryVideoServiceEnum.java
  5. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionAndAirportStatusService.java
  6. +8
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryVideoService.java
  7. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/GetLiveStatusService.java
  8. +7
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/OnlineIdentifService.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/LiveChannel.java Zobrazit soubor

@@ -36,6 +36,11 @@ public class LiveChannel extends BaseEntity {
*/
private String name;

/**
* 无人机直播视频原地址
*/
private String playUrl;

/**
*无人机推流地址
*/

+ 1
- 12
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/LiveChannelVo.java Zobrazit soubor

@@ -12,18 +12,7 @@ public class LiveChannelVo {
/**
* 直播地址
*/
private String aipullUrl;

/**
* 直播地址
*/
private String pullUrl;


/**
* AI识别后视频地址
*/
private String aiVideoUrl;
private String playUrl;

/**
* 回放视频地址

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/VideoUrlVo.java Zobrazit soubor

@@ -12,7 +12,7 @@ public class VideoUrlVo {
/**
* 直播视频url
*/
private String pullUrl;
private String playUrl;

/**
* 机场外部监控地址

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspection/QueryVideoServiceEnum.java Zobrazit soubor

@@ -9,7 +9,7 @@ public enum QueryVideoServiceEnum {
QUERY_IS_FAILED(1230700, "获取数据失败"),
INSPECTION_ID_IS_NULL(1230701, "任务id为空"),
LIVE_CHANNEL_IS_NOT_EXIST(1230702, "直播通道为空"),
PULL_URL_IS_NULL(1230703, "直播地址为空"),
PLAY_URL_IS_NULL(1230703, "直播地址为空"),
VIDEO_URL_IS_NULL(1230704, "回放地址为空"),
DRONE_ID_IS_NULL(1230705, "无人机id为空"),
INSPECTION_IS_NOT_EXIST(1230706, "任务不存在");

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionAndAirportStatusService.java Zobrazit soubor

@@ -10,6 +10,7 @@ import com.tuoheng.admin.entity.domain.User;
import com.tuoheng.admin.entity.vo.airport.AirPortStatusVO;
import com.tuoheng.admin.entity.vo.inspection.InspectionScrollbarVo;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.enums.InspectionTypeEnum;
import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.utils.CurrentUserUtil;
@@ -49,6 +50,7 @@ public class QueryInspectionAndAirportStatusService {
List<Inspection> inspectionList = inspectionMapper.selectList(Wrappers.<Inspection>lambdaQuery()
.eq(Inspection::getTenantId, tenantId)
.eq(Inspection::getMark, MarkEnum.VALID.getCode())
.notIn(Inspection::getInspectionType, InspectionTypeEnum.MABNNEDFLIGHT.getCode())
.in(Inspection::getStatus, InspectionStatusEnum.IN_FLIGHT.getCode(), InspectionStatusEnum.PREPARING.getCode()));
if(CollectionUtils.isEmpty(inspectionList) || inspectionList.size() == 0){
log.info("任务列表为空");

+ 8
- 7
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryVideoService.java Zobrazit soubor

@@ -71,11 +71,13 @@ public class QueryVideoService {
if (ObjectUtil.isNull(liveChannel)) {
return JsonResult.error(QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getMsg());
}
if (StringUtils.isEmpty(liveChannel.getPullUrl())) {
return JsonResult.error(QueryVideoServiceEnum.PULL_URL_IS_NULL.getCode(), QueryVideoServiceEnum.PULL_URL_IS_NULL.getMsg());
if (StringUtils.isEmpty(liveChannel.getPlayUrl())) {
return JsonResult.error(QueryVideoServiceEnum.PLAY_URL_IS_NULL.getCode(), QueryVideoServiceEnum.PLAY_URL_IS_NULL.getMsg());
}
liveChannelVo.setAipullUrl(liveChannel.getAipullUrl());
liveChannelVo.setPullUrl(liveChannel.getPullUrl());
if(StringUtils.isNotEmpty(liveChannel.getPlayUrl())){
liveChannelVo.setPlayUrl(liveChannel.getPlayUrl());
}


}
if (15 == inspection.getStatus()) {
@@ -84,7 +86,6 @@ public class QueryVideoService {
return JsonResult.error(QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getCode(), QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getMsg());
}
liveChannelVo.setVideoUrl(CommonConfig.videoURL + inspection.getVideoUrl());
liveChannelVo.setAiVideoUrl(CommonConfig.videoURL + inspection.getAiVideoUrl());
}
return JsonResult.success(liveChannelVo);
}
@@ -117,8 +118,8 @@ public class QueryVideoService {
.eq(LiveChannel::getInspectionId, inspection.getId())
.eq(LiveChannel::getStatus, 1));
if (ObjectUtil.isNotNull(liveChannel)) {
if (StringUtils.isNotEmpty(liveChannel.getPullUrl())) {
vo.setPullUrl(liveChannel.getPullUrl());
if (StringUtils.isNotEmpty(liveChannel.getPlayUrl())) {
vo.setPlayUrl(liveChannel.getPullUrl());
}
}
//获取机场内外部视频

+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/GetLiveStatusService.java Zobrazit soubor

@@ -49,7 +49,8 @@ public class GetLiveStatusService {
if (liveChannelDto == null || org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getCode())
|| liveChannelDto.getStatus() == null
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPushUrl())
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPullUrl())) {
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPullUrl())
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPullM3u8())) {
log.error("获取通道状态信息不完整!");
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "获取通道状态信息不完整!");
}

+ 7
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/OnlineIdentifService.java Zobrazit soubor

@@ -116,6 +116,12 @@ public class OnlineIdentifService {
map3.put("ename", "pull_url");
map3.put("evalue", dto.getPullUrl());
reqMapList.add(map3);

Map<String,Object> playUrlMap = new HashMap<>();
playUrlMap.put("ename","play_url");
playUrlMap.put("evalue",dto.getPullM3u8());
reqMapList.add(playUrlMap);

paramMap.put("serviceInstReqList", reqMapList);

log.info(String.format("DSP入参:%s", paramMap));
@@ -146,6 +152,7 @@ public class OnlineIdentifService {
// 修改通道名
liveChannel.setName(dto.getName());
liveChannel.setTenantId(inspection.getTenantId());
liveChannel.setPlayUrl(dspCallbackVo.getPlayUrl());
liveChannel.setPushUrl(dspCallbackVo.getPushUrl());
liveChannel.setPullUrl(dspCallbackVo.getPlayUrl());
liveChannel.setAipushUrl(dspCallbackVo.getAipushUrl());

Načítá se…
Zrušit
Uložit