mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
feat: 添加 RustDesk 协议支持和项目文档
- 新增 RustDesk 模块,支持与 RustDesk 客户端连接 - 实现会合服务器协议和 P2P 连接 - 支持 NaCl 加密和密钥交换 - 添加视频帧和 HID 事件适配器 - 添加 Protobuf 协议定义 (message.proto, rendezvous.proto) - 新增完整项目文档 - 各功能模块文档 (video, hid, msd, otg, webrtc 等) - hwcodec 和 RustDesk 协议技术报告 - 系统架构和技术栈文档 - 更新 Web 前端 RustDesk 配置界面和 API
This commit is contained in:
@@ -293,6 +293,26 @@ impl WebRtcStreamer {
|
||||
Ok(pipeline)
|
||||
}
|
||||
|
||||
/// Ensure video pipeline is running and return it for external consumers
|
||||
///
|
||||
/// This is a public wrapper around ensure_video_pipeline for external
|
||||
/// components (like RustDesk) that need to share the encoded video stream.
|
||||
pub async fn ensure_video_pipeline_for_external(
|
||||
&self,
|
||||
tx: broadcast::Sender<VideoFrame>,
|
||||
) -> Result<Arc<SharedVideoPipeline>> {
|
||||
self.ensure_video_pipeline(tx).await
|
||||
}
|
||||
|
||||
/// Get the current pipeline configuration (if pipeline is running)
|
||||
pub async fn get_pipeline_config(&self) -> Option<SharedVideoPipelineConfig> {
|
||||
if let Some(ref pipeline) = *self.video_pipeline.read().await {
|
||||
Some(pipeline.config().await)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
// === Audio Management ===
|
||||
|
||||
/// Check if audio is enabled
|
||||
|
||||
Reference in New Issue
Block a user