feat(discovery): 被控端免填 IP,UDP 信标自动发现

- Rust: 新增 discovery::beacon(UDP 41003),被动接收 offer、用包源地址作设备 IP、单播回 host;FFI 增加 ttstd_discovery_start/devices/connect/stop(ABI 3)

- Android: 新增 HostBeacon 广播自身并解析 host 应答;ReceiverSession 在 host 为空时等信标再拨号;主界面移除 IP/信令输入框,改为显示发现状态

- Flutter: discover 优先取同网段信标结果并与信令合并去重;connect 先起监听再通知设备拨号;设备卡片标注「UDP 自动发现」

- 视频诊断: 缺少 SPS/PPS 的提示改为收到关键帧后才告警,避免刚接入就误报

- 文档: DEMO 增加发现流程、防火墙与模拟器 NAT 说明及实测截图
This commit is contained in:
tongtong committed 2026-11-27 05:48:40 +08:00
1 parent df2affa9e2
commit 5442dbff2c
13 files changed
+835 -74

No files matched your search

@@ -133,8 +133,14 @@ class _DeviceCard extends StatelessWidget {
],
),
const SizedBox(height: 6),
Text('指纹 ${device.shortFingerprint} · ${device.resolution}',
style: theme.textTheme.labelSmall?.copyWith(color: theme.colorScheme.outline)),
Text(
[
if (device.fingerprint.isNotEmpty) '指纹 ${device.shortFingerprint}',
if (device.resolution.isNotEmpty) device.resolution,
'UDP 自动发现',
].join(' · '),
style: theme.textTheme.labelSmall?.copyWith(color: theme.colorScheme.outline),
),
],
),
),
@@ -159,7 +165,8 @@ class _EmptyState extends StatelessWidget {
const Text('未发现设备'),
const SizedBox(height: 4),
Text(
'本机监听端点已移至设置;请确认被控端与主控端处于同一网段',
'被控端开启投屏后会自动出现(UDP 41003 自动发现,无需填写 IP)\n'
'若长时间未出现,请确认两端在同一网段且防火墙放行 UDP 41003',
style: Theme.of(context).textTheme.bodySmall,
textAlign: TextAlign.center,
),