mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-13 02:54:26 +08:00
fix: 完善 RK3588 HDMI RX 信号检测与自动恢复
- 统一使用 QUERY_DV_TIMINGS 判断 HDMI RX 输入状态 - 增加 source-following 设备状态 API 与前端只读展示 - 支持长时间无信号后的 MJPEG/WebRTC 自动恢复 - 修复模式切换时采集设备尚未释放导致的 EBUSY - 取消陈旧 WebRTC 重连并统一采集恢复策略 - 移除视频输入状态区域的冗余标题
This commit is contained in:
@@ -358,29 +358,9 @@ impl VideoStreamManager {
|
||||
.update_video_config(resolution, format, fps)
|
||||
.await;
|
||||
if let Some(device_path) = device_path {
|
||||
// Resolve the paired subdev so the WebRTC pipeline can run the
|
||||
// RK628 STREAMON gate + SOURCE_CHANGE polling identically to the
|
||||
// MJPEG path. See `csi_bridge::discover_subdev_for_video`.
|
||||
let (subdev_path, bridge_kind, v4l2_driver) = self
|
||||
.streamer
|
||||
.current_device()
|
||||
.await
|
||||
.map(|d| {
|
||||
(
|
||||
d.subdev_path.clone(),
|
||||
d.bridge_kind.clone(),
|
||||
Some(d.driver.clone()),
|
||||
)
|
||||
})
|
||||
.unwrap_or((None, None, None));
|
||||
let device_info = self.streamer.current_device().await;
|
||||
self.webrtc_streamer
|
||||
.set_capture_device(
|
||||
device_path,
|
||||
jpeg_quality,
|
||||
subdev_path,
|
||||
bridge_kind,
|
||||
v4l2_driver,
|
||||
)
|
||||
.set_capture_device(device_path, jpeg_quality, device_info)
|
||||
.await;
|
||||
} else {
|
||||
warn!("No capture device configured while syncing WebRTC capture source");
|
||||
@@ -434,7 +414,7 @@ impl VideoStreamManager {
|
||||
let closed = self
|
||||
.webrtc_streamer
|
||||
.close_all_sessions_and_release_device()
|
||||
.await;
|
||||
.await?;
|
||||
if closed > 0 {
|
||||
info!("Closed {} WebRTC sessions", closed);
|
||||
}
|
||||
@@ -549,26 +529,9 @@ impl VideoStreamManager {
|
||||
}
|
||||
if let Some(device_path) = device_path {
|
||||
info!("Configuring direct capture for WebRTC after config change");
|
||||
let (subdev_path, bridge_kind, v4l2_driver) = self
|
||||
.streamer
|
||||
.current_device()
|
||||
.await
|
||||
.map(|d| {
|
||||
(
|
||||
d.subdev_path.clone(),
|
||||
d.bridge_kind.clone(),
|
||||
Some(d.driver.clone()),
|
||||
)
|
||||
})
|
||||
.unwrap_or((None, None, None));
|
||||
let device_info = self.streamer.current_device().await;
|
||||
self.webrtc_streamer
|
||||
.set_capture_device(
|
||||
device_path,
|
||||
jpeg_quality,
|
||||
subdev_path,
|
||||
bridge_kind,
|
||||
v4l2_driver,
|
||||
)
|
||||
.set_capture_device(device_path, jpeg_quality, device_info)
|
||||
.await;
|
||||
} else {
|
||||
warn!("No capture device configured for WebRTC after config change");
|
||||
|
||||
Reference in New Issue
Block a user