feat(video): 打通桌面端真实视频画面链路
- Rust: 新增 media::stream 访问单元队列与分片重组,FFI 增加 ttstd_video_next/pending/stats(ABI 2) - Windows: runner 内嵌 Media Foundation 解码纹理插件(NV12/RGB32→BGRA),开启 CODECAPI_AVLowLatencyMode 消除约 36 帧积压,按显示区域裁掉 16 对齐补齐行 - Android: 大帧按 1200 字节分片发送;csd(SPS/PPS) 随每个关键帧重发,修复先投屏后连接时只收到 P 帧导致的黑屏 - Flutter: 独立 ttstd/video 通道获取 textureId 与统计,VideoView 渲染 Texture 并显示分辨率/PTS/失败原因 - 诊断: stats 增加 format/auBytes/keyframes/submitHr;缺插件、缺 SPS/PPS 显式提示;TTSTD_DUMP_VIDEO 可抓码流配合 ffprobe 定位 - 发现与服务检查: mDNS 发现客户端、服务地址探测、设置页与连接状态卡片(启动本机监听/停止) - 工具与文档: video_feed 推流示例、一键打包脚本、DEMO 出画面排查表与实测截图
This commit is contained in:
1 parent
adaa23f895
commit
df2affa9e2
30 files changed
+2814
-134
No files matched your search
@@ -0,0 +1,57 @@
|
||||
import 'dart:io';
|
||||
|
||||
class DiagnosticLog {
|
||||
DiagnosticLog([this.fileName = 'ttstd_connect.log']);
|
||||
|
||||
final String fileName;
|
||||
File? _file;
|
||||
|
||||
String get path => _file?.path ?? '';
|
||||
|
||||
void start() {
|
||||
final directories = <Directory>[
|
||||
File(Platform.resolvedExecutable).parent,
|
||||
Directory.current,
|
||||
Directory.systemTemp,
|
||||
];
|
||||
for (final directory in directories) {
|
||||
try {
|
||||
final candidate = File(
|
||||
'${directory.path}${Platform.pathSeparator}$fileName',
|
||||
);
|
||||
candidate.writeAsStringSync(
|
||||
'=== TTSTD Connect diagnostic log ===\n'
|
||||
'started: ${DateTime.now().toIso8601String()}\n',
|
||||
mode: FileMode.write,
|
||||
flush: true,
|
||||
);
|
||||
_file = candidate;
|
||||
return;
|
||||
} on Object catch (_) {}
|
||||
}
|
||||
}
|
||||
|
||||
void write(String message) {
|
||||
final file = _file;
|
||||
if (file == null) return;
|
||||
try {
|
||||
if (file.lengthSync() > 2 * 1024 * 1024) {
|
||||
file.writeAsStringSync(
|
||||
'=== log rotated: ${DateTime.now().toIso8601String()} ===\n',
|
||||
mode: FileMode.write,
|
||||
flush: true,
|
||||
);
|
||||
}
|
||||
file.writeAsStringSync(
|
||||
'${DateTime.now().toIso8601String()} $message\n',
|
||||
mode: FileMode.append,
|
||||
flush: true,
|
||||
);
|
||||
} on Object catch (_) {}
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
write('=== stopped ===');
|
||||
_file = null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user