09bd36b54f4eac5ca151ab3b988ea892def54585
- client.rs: 握手后添加后台读循环(Keepalive/UIBC/分辨率变更) - client.rs: send_frame/send_keepalive 使用实时时间戳 - client.rs: 防止重复连接(connect 重入检查) - frame.rs: 添加 FRAME_TYPE_H265_NAL(0x03) 和 FRAME_TYPE_AUDIO(0x04) - soft.rs: RGBA→YUV420P 逐行拷贝修复 stride 对齐问题 - lib.rs: Tauri State 持久化编码器和客户端实例(不走丢) - lib.rs: 新增 get_connection_state/disconnect_adp/send_frame/start_streaming 命令 - 清理无用导入,修复 mpsc::Receiver::clone 编译错误
AirDisplay Client
Cross-platform desktop screen mirroring client for AirDisplay Android app.
Overview
AirDisplay Client streams your PC screen to an Android device using the AirDisplay Protocol (ADP), a lightweight custom protocol over TCP. It supports Windows, macOS, and Linux.
Architecture
┌─────────────────────┐ ADP (TCP:7935) ┌──────────────────┐
│ AirDisplay Client │ ──────────────────────────► │ AirDisplay App │
│ (Desktop: Rust+ │ mDNS discovery │ (Android) │
│ Tauri+React) │ ◄────────────────────────── │ │
└─────────────────────┘ └──────────────────┘
Technology Stack
| Layer | Technology |
|---|---|
| Desktop Framework | Tauri v2 (Rust) |
| Frontend UI | React + TypeScript + Vite |
| Screen Capture | DXGI (Win) / CGDisplay (macOS) / PipeWire (Linux) |
| Video Encoding | x264 software (ffmpeg-next) / HW encoders (NVENC, QSV, VideoToolbox) |
| Protocol | ADP v1 (8-byte frame header + H.264 NAL over TCP) |
| Discovery | mDNS (_airdisplay._tcp) via mdns-sd |
Build
Prerequisites
- Rust 1.75+
- Node.js 18+
- Platform-specific system deps (see Tauri docs)
Build Steps
# Install dependencies
npm install
# Development mode
npm run tauri dev
# Production build
npm run tauri build
Protocol Support
| Protocol | Status | Description |
|---|---|---|
| ADP v1 | ✅ Planned | Custom lightweight frame protocol |
| Miracast | ❌ Not supported | Use Android app's built-in Miracast support |
| AirPlay | ❌ Not supported | Use macOS native screen mirroring to Android |
License
MIT
Description
Languages
Rust
64.5%
Shell
16.8%
TypeScript
12.5%
CSS
5.8%
HTML
0.4%