feat: 增加了摄像头硬件复位和唤醒逻辑

This commit is contained in:
alivender
2025-07-13 13:55:17 +08:00
parent c29c3652bc
commit 4e5dc91f10
5 changed files with 3538 additions and 3423 deletions

View File

@@ -340,7 +340,7 @@ import {
AlertTriangle,
MoreHorizontal,
} from "lucide-vue-next";
import { VideoStreamClient, CameraConfigRequest } from "@/APIClient";
import { VideoStreamClient, CameraConfigRequest, ResolutionConfigRequest } from "@/APIClient";
import { useEquipments } from "@/stores/equipments";
const eqps = useEquipments();
@@ -597,7 +597,8 @@ const refreshResolutions = async () => {
try {
addLog("info", "正在获取支持的分辨率列表...");
const resolutions = await videoClient.getSupportedResolutions();
supportedResolutions.value = resolutions;
supportedResolutions.value = resolutions.resolutions;
console.log("支持的分辨率列表:", supportedResolutions.value);
// 获取当前分辨率
const currentRes = await videoClient.getCurrentResolution();
@@ -629,7 +630,11 @@ const changeResolution = async () => {
}
// 设置新分辨率
const success = await videoClient.setResolution(selectedResolution.value.width, selectedResolution.value.height);
const resolutionRequest = new ResolutionConfigRequest({
width: selectedResolution.value.width,
height: selectedResolution.value.height
});
const success = await videoClient.setResolution(resolutionRequest);
if (success) {
// 刷新流信息