feat(rustdesk): 优化视频编码协商和添加公共服务器支持

- 调整视频编码优先级为 H264 > H265 > VP8 > VP9,优先使用硬件编码
- 对接 RustDesk 客户端质量预设 (Low/Balanced/Best) 到 BitratePreset
- 添加 secrets.toml 编译时读取机制,支持配置公共服务器
- 默认公共服务器: rustdesk.mofeng.run:21116
- 前端 ID 服务器输入框添加问号提示,显示公共服务器信息
- 用户留空时自动使用公共服务器
This commit is contained in:
mofeng-git
2026-01-02 17:22:34 +08:00
parent be4de59f3b
commit 28ecf951df
29 changed files with 776 additions and 316 deletions

View File

@@ -109,11 +109,11 @@ pub async fn apply_stream_config(
}
// 更新码率
if old_config.bitrate_kbps != new_config.bitrate_kbps {
if old_config.bitrate_preset != new_config.bitrate_preset {
state
.stream_manager
.webrtc_streamer()
.set_bitrate(new_config.bitrate_kbps)
.set_bitrate_preset(new_config.bitrate_preset)
.await
.ok(); // Ignore error if no active stream
}
@@ -143,9 +143,9 @@ pub async fn apply_stream_config(
}
tracing::info!(
"Stream config applied: encoder={:?}, bitrate={} kbps",
"Stream config applied: encoder={:?}, bitrate={}",
new_config.encoder,
new_config.bitrate_kbps
new_config.bitrate_preset
);
Ok(())
}