aix
2024-08-09 174ff27d50bac8e578fabf7b3e7ec266c41422bc
src/main/java/com/dji/sample/manage/service/impl/LiveStreamServiceImpl.java
@@ -128,18 +128,20 @@
        //获取返回结果
        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()
                    .append("https://wrj.shuixiongit.com/zb/rtp/")
                    .append(gb28181.getAgentID())
                    .append("_")
                    .append(gb28181.getChannel())
                    .append(".live.flv")
                    .toString());
            live.setUrl(liveParam.getUrl().replace("rtmp", "https").replace("735", "700") + ".flv");
//            LiveUrlGB28181DTO gb28181 = urlToGB28181(liveParam.getUrl());
//            live.setUrl(new StringBuilder()
//                    .append("https://wrj.shuixiongit.com/zb/rtp/")
//                    .append(gb28181.getAgentID())
//                    .append("_")
//                    .append(gb28181.getChannel())
//                    .append(".live.flv")
//                    .toString());
            return ResponseResult.success(live);
        }
@@ -148,7 +150,6 @@
        }
        LiveUrlTypeEnum urlType = LiveUrlTypeEnum.find(liveParam.getUrlType());
        LiveDTO live = new LiveDTO();
        //对不同的协议类型做处理
        switch (urlType) {
@@ -202,7 +203,6 @@
        liveParam.setUrlType(3);
        liveParam.setVideoId(getVedioId(getLiveCapacity(workspaceId, deviceSn), deviceSn,deviceName));
        liveParam.setVideoQuality(0);
        System.out.println(liveStart(liveParam));
        return liveStart(liveParam);
    }