59 lines
2.9 KiB
Markdown
59 lines
2.9 KiB
Markdown
# RemoteDesk 技术栈
|
|
|
|
> Flutter/Dart 负责 Windows 操作界面。Rust 负责 Linux Agent、控制服务、协议、
|
|
> WebRTC、硬件解码和原生视频呈现。远程视频不经过 Flutter Texture、Dart 堆或 HTTP。
|
|
|
|
## 架构
|
|
|
|
```text
|
|
RemoteDesk.exe (Flutter Windows)
|
|
-> loopback remotedesk-control-service.exe (Rust, JSON control API)
|
|
-> remotedesk-linux-terminal.exe (Rust session helper)
|
|
-> WebRTC H.264/RTX/Opus/DataChannel
|
|
-> RemoteDesk Linux Agent
|
|
|
|
Fullscreen video:
|
|
Media Foundation H.264 MFT
|
|
-> NV12 DXGI surface on the selected D3D11 device
|
|
-> D3D11 VideoProcessor
|
|
-> native swap chain
|
|
```
|
|
|
|
Flutter only owns management, configuration, and the launch command. It never receives decoded frames. Fullscreen starts the native session helper, which owns its own window, input lifecycle, decoder, and D3D11 presentation path.
|
|
|
|
## Components
|
|
|
|
| Component | Technology | Responsibility |
|
|
|---|---|---|
|
|
| Control UI | Flutter Windows, Dart | Linux connection settings and session commands |
|
|
| Control service | Rust, tiny_http | Loopback API, helper lifecycle, persistent settings |
|
|
| Session helper | Rust, Tokio, winit | WebRTC connection, terminal, input, fullscreen lifecycle |
|
|
| Video renderer | Rust, Media Foundation, D3D11/DXGI | H.264 decode, video processing, native swap chain presentation |
|
|
| Linux Agent | Rust, Tokio, GStreamer, PipeWire/Portal, X11 | Capture, hardware encode, pairing, input, PTY and files |
|
|
| Transport | TLS WebSocket, WebRTC | Signed signaling, H.264/RTX/Opus and DataChannel |
|
|
| Edge | Rust services, TURN | Rendezvous, allocation and relay path |
|
|
| Local state | SQLite, Windows Credential Manager | Settings and Linux Agent identity material |
|
|
|
|
## Performance Policy
|
|
|
|
- The encoded H.264 access unit may cross normal memory, but decoded pixel frames must remain on the selected GPU path.
|
|
- Decoder, D3D11 VideoProcessor, and swap chain must use the same adapter.
|
|
- CPU mapping, software decode, or cross-adapter copies fail the strict `required_end_to_end` policy. They require the explicit compatibility mode.
|
|
- H.264 decode and presentation are isolated from the Flutter process. Dart FFI is not on the frame hot path.
|
|
- The current source performs device and surface validation. ETW/GPUView on a real remote session is required before reporting verified zero-copy.
|
|
|
|
## Product Boundary
|
|
|
|
The product does not ship a Windows RDP client, RDP protocol probe, `mstsc` launcher, RDP credential workflow, or Windows RDP service configuration. Windows remote control is provided only through the RemoteDesk Agent protocol.
|
|
|
|
## Validation
|
|
|
|
```powershell
|
|
cargo test -p remotedesk-control-service -p remotedesk-linux-terminal -p remotedesk-native-video
|
|
flutter analyze client/flutter_control
|
|
flutter test client/flutter_control
|
|
.\packaging\windows\package-portable.ps1
|
|
```
|
|
|
|
Run ETW/GPUView for a real fullscreen session to validate the decode engine, same-adapter path, and absence of CPU frame maps.
|