From a0741df5a2cff792740d7d31f7101ba2339ba3ec Mon Sep 17 00:00:00 2001
From: zhaowenyu <35589726@qq.com>
Date: Tue, 09 Dec 2025 15:30:36 +0800
Subject: [PATCH] 2025-12-09 zwy 增加机场飞行器摄像头切换状态通道,增加LiveStatusTwoReceiver路由
---
ard-admin/src/main/java/com/ard/web/controller/sample/LiveStreamController.java | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/ard-admin/src/main/java/com/ard/web/controller/sample/LiveStreamController.java b/ard-admin/src/main/java/com/ard/web/controller/sample/LiveStreamController.java
index 1e0f8f1..5b20d0c 100644
--- a/ard-admin/src/main/java/com/ard/web/controller/sample/LiveStreamController.java
+++ b/ard-admin/src/main/java/com/ard/web/controller/sample/LiveStreamController.java
@@ -9,6 +9,8 @@
import com.ard.sample.manage.model.dto.LiveTypeDTO;
import com.ard.sample.manage.model.param.RemoteDebugParam;
import com.ard.sample.manage.model.receiver.LiveCapacityReceiver;
+import com.ard.sample.manage.model.receiver.LiveStatusTwoReceiver;
+import com.ard.sample.manage.service.IDeviceService;
import com.ard.sample.manage.service.ILiveStreamService;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.annotations.Api;
@@ -55,6 +57,15 @@
liveStreamService.saveLiveCapacity(liveCapacity, headers.getTimestamp());
}
+
+ /**
+ * 处理摄像头返回状态
+ * */
+ @ServiceActivator(inputChannel = ChannelName.INBOUND_STATE_STATUS)
+ public void LiveStateStatus(LiveStatusTwoReceiver liveReceiver, MessageHeaders headers) {
+ log.info("摄像头返回状态通道INBOUND_STATE_STATUS:{}", liveReceiver);
+ }
+
/**
* Get live capability data of all drones in the current user's workspace from the database.
*
@@ -73,16 +84,17 @@
@ApiOperation("获取video_id")
@PostMapping("/videoid/{sn}")
- public String getVideoId(@PathVariable String sn) {
- String videoId = "";
+ public ResponseResult<LiveTypeDTO> getVideoId(@PathVariable String sn) {
+ LiveTypeDTO liveTypeDTO = new LiveTypeDTO();
try{
- videoId = _liveStreamHandler.getLiveParam(sn).getVideoId();
+ liveTypeDTO = _liveStreamHandler.getLiveParam(sn);
+
}
catch (Exception e){
- videoId = e.getMessage();
+ // videoId = e.getMessage();
e.printStackTrace();
}
- return videoId;
+ return ResponseResult.success(liveTypeDTO);
}
/**
--
Gitblit v1.9.3