Repository navigation
feat: configurable JPEG/WebP streaming with bounded buffering - #29
Merged
Merged
Conversation
fython
force-pushed
the
codex/image-stream-pipeline
branch
from
October 21, 2026 03:29
41c3bd2 to
6169624
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
图片串流固定 JPEG 和质量参数、并逐帧等待浏览器 ACK,限制了用户对画质、CPU 与带宽的取舍。本改动增加可配置的 JPEG / WebP 图片串流与有界流水线,保留旧协议兼容路径。
在「设置 → 画面与串流」选择 JPEG / WebP,并输入 1–100 的图片质量,默认 WebP、75。设置持久化,保存后用于后续图片,无需重连手机或浏览器;静态画面也会重新编码。它同时适用于图片兼容模式与 WebRTC 回退,不改变 H.264 / HEVC 视频质量。
用户选择 JPEG 优先于浏览器的 WebP 声明;选择 WebP 时仍需真实解码探测。编码或解码失败回退 JPEG,并保留用户质量值;一次编码使用同一份不可变设置,诊断数据报告实际格式和质量。
使用 media=2&images=3 协商携带格式的 v3 图片包。旧服务端继续返回 v2 JPEG,旧客户端继续使用 JPEG 和单帧 ACK。
最多两帧在途、三个 img 缓冲位。较新帧先完成时淘汰旧任务,逐帧 ACK 校验 sessionId / videoEpoch / sequence;重复、迟到或无编号 ACK 不能释放错误槽位。
在途 payload 预算为 2 MiB(单张超预算帧可独占);ACK 等待达到 250 ms 时收缩为单帧窗口。只保留最新待发源帧,在 RTC 接管或重连时取消待解码工作。
增加 window.wheelplayStats.image 诊断,更新英、简中、繁中文案和 docs/IMAGE_STREAM.md。
HTTPS 设置 UI 测试等待后台保存后的实际界面刷新,避免只等待偏好落盘导致的可见性断言竞态;CI 失败时保留单元测试 XML 和 HTML 报告。
验证:
设备测试覆盖真实 EGL 静态画面的格式 / 质量切换,但尚未在设备上执行,iPhone / 车机性能仍需硬件验证。源发布上限仍约 15 fps;WebP 编码成本与带宽收益依设备和画面而异,本 PR 不承诺实测性能提升百分比。