feat(v1): add replayable video source

This commit is contained in:
ila
2026-07-21 09:49:28 +08:00
parent f5a7ec7412
commit d4eb11b909
8 changed files with 330 additions and 14 deletions
+15
View File
@@ -71,6 +71,21 @@ FallEvent = {
`FallEvent` 只在状态首次进入 `CONFIRMED` 时创建一次。连续帧更新 UI 状态,但不重复创建事件。
## 视频来源帧合约
```text
FramePacket = {
image: ndarray | null,
timestamp_monotonic: float,
status: "connected" | "retrying" | "error" | "eof" | "closed",
error: string | null
}
```
- 录像优先使用容器时间戳;首帧时间戳无效或倒退时,回退为帧序号/FPS,保证回放时间单调。
- `retrying`、`error`、`eof` 和 `closed` 都没有图像,且绝不伪造人员、姿态或摔倒事件。
- 可重连来源以有界指数退避重新打开;断流不推进状态机的证据时间。
## 事件合约
| 事件 | 触发者 | 负载 | 结果 |