aix
2024-08-09 174ff27d50bac8e578fabf7b3e7ec266c41422bc
获取直播返回直播设备id
2 files modified
9 ■■■■ changed files
src/main/java/com/dji/sample/manage/model/dto/LiveDTO.java 4 ●●●● patch | view | raw | blame | history
src/main/java/com/dji/sample/manage/service/impl/LiveStreamServiceImpl.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/com/dji/sample/manage/model/dto/LiveDTO.java
@@ -1,6 +1,7 @@
package com.dji.sample.manage.model.dto;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
@@ -17,4 +18,7 @@
    private String username;
    private String password;
    @JsonProperty("video_id")
    private String videoId;
}
src/main/java/com/dji/sample/manage/service/impl/LiveStreamServiceImpl.java
@@ -128,9 +128,11 @@
        //获取返回结果
        ServiceReply receiveReply = this.publishLiveStart(respTopic, liveParam);
        LiveDTO live = new LiveDTO();
        live.setVideoId(liveParam.getVideoId());
        //相机已经在直播中,请勿重复开启直播
        if (receiveReply.getResult() == 513003) {
            LiveDTO live = new LiveDTO();
            live.setUrl(liveParam.getUrl().replace("rtmp", "https").replace("735", "700") + ".flv");
//            LiveUrlGB28181DTO gb28181 = urlToGB28181(liveParam.getUrl());
//            live.setUrl(new StringBuilder()
@@ -148,7 +150,6 @@
        }
        LiveUrlTypeEnum urlType = LiveUrlTypeEnum.find(liveParam.getUrlType());
        LiveDTO live = new LiveDTO();
        //对不同的协议类型做处理
        switch (urlType) {