Browse Source

修改直播视频地址playUrl

tags/V1.0.1^2
chengwang 1 year ago
parent
commit
58d1a98903
8 changed files with 27 additions and 22 deletions
  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 View File

*/ */
private String name; private String name;


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

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

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

/** /**
* 直播地址 * 直播地址
*/ */
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 View File

/** /**
* 直播视频url * 直播视频url
*/ */
private String pullUrl;
private String playUrl;


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

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

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

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

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

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

if (ObjectUtil.isNull(liveChannel)) { if (ObjectUtil.isNull(liveChannel)) {
return JsonResult.error(QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getMsg()); 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()) { if (15 == inspection.getStatus()) {
return JsonResult.error(QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getCode(), QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getMsg()); return JsonResult.error(QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getCode(), QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getMsg());
} }
liveChannelVo.setVideoUrl(CommonConfig.videoURL + inspection.getVideoUrl()); liveChannelVo.setVideoUrl(CommonConfig.videoURL + inspection.getVideoUrl());
liveChannelVo.setAiVideoUrl(CommonConfig.videoURL + inspection.getAiVideoUrl());
} }
return JsonResult.success(liveChannelVo); return JsonResult.success(liveChannelVo);
} }
.eq(LiveChannel::getInspectionId, inspection.getId()) .eq(LiveChannel::getInspectionId, inspection.getId())
.eq(LiveChannel::getStatus, 1)); .eq(LiveChannel::getStatus, 1));
if (ObjectUtil.isNotNull(liveChannel)) { 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 View File

if (liveChannelDto == null || org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getCode()) if (liveChannelDto == null || org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getCode())
|| liveChannelDto.getStatus() == null || liveChannelDto.getStatus() == null
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPushUrl()) || 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("获取通道状态信息不完整!"); log.error("获取通道状态信息不完整!");
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "获取通道状态信息不完整!"); 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 View File

map3.put("ename", "pull_url"); map3.put("ename", "pull_url");
map3.put("evalue", dto.getPullUrl()); map3.put("evalue", dto.getPullUrl());
reqMapList.add(map3); 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); paramMap.put("serviceInstReqList", reqMapList);


log.info(String.format("DSP入参:%s", paramMap)); log.info(String.format("DSP入参:%s", paramMap));
// 修改通道名 // 修改通道名
liveChannel.setName(dto.getName()); liveChannel.setName(dto.getName());
liveChannel.setTenantId(inspection.getTenantId()); liveChannel.setTenantId(inspection.getTenantId());
liveChannel.setPlayUrl(dspCallbackVo.getPlayUrl());
liveChannel.setPushUrl(dspCallbackVo.getPushUrl()); liveChannel.setPushUrl(dspCallbackVo.getPushUrl());
liveChannel.setPullUrl(dspCallbackVo.getPlayUrl()); liveChannel.setPullUrl(dspCallbackVo.getPlayUrl());
liveChannel.setAipushUrl(dspCallbackVo.getAipushUrl()); liveChannel.setAipushUrl(dspCallbackVo.getAipushUrl());

Loading…
Cancel
Save