Audit: - docs/AUDIT-2026-05-25.md: full protocol audit covering 8 findings (4 critical, 2 high, 5 medium, 4 low) with code references and fix effort estimates - vault/Audit/Tasks.md: Obsidian Tasks plugin file tracking all audit items with priorities, due dates, and per-step checklists Architecture docs updated for Wire format v2 and Wave 5/6 features: - ARCHITECTURE.md: adds wzp-video to dependency graph and project structure; wire format updated to v2 (16B header, 5B MiniHeader); relay concurrency section corrected (DashMap+RwLock is current, not a future optimization); test count 571→702; Android note - PROGRESS.md: Wave 5 and Wave 6 sections appended; test count 372→702; current status and open blockers as of 2026-05-25 - ROAD-TO-VIDEO.md: implementation status table inserted (✅/🟡/🔴/🔲 per phase); 6-step critical path to first video call - WZP-SPEC.md: MediaHeader updated to v2 (16B byte-aligned); MiniHeader updated to 5B with seq_delta; codec IDs 9-12 added (H.264/H.265/AV1); version negotiation section added Obsidian vault (vault/): - 114 files across Architecture/, PRDs/, Reports/, Android/, Reference/, Audit/ with YAML frontmatter - 00 - Home.md index note with wiki links - .obsidian/app.json config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.7 KiB
2.7 KiB
tags, type, status
| tags | type | status | ||
|---|---|---|---|---|
|
report | Approved |
T5.3 — EncoderMode::SlideFallback for ScreenShare
Status: Approved
Agent: Kimi Code CLI
Started: 2026-05-12T18:00Z
Completed: 2026-05-12T18:10Z
Commit: c48cb6f
PRD: ../PRD-video-quality-priority.md
What I changed
crates/wzp-video/src/encoder_mode.rs— New file.EncoderModeenum withNormal(default) andSlideFallbackvariants.crates/wzp-video/src/lib.rs:11,18— Addedpub mod encoder_mode;and re-exportedEncoderMode.crates/wzp-video/src/encoder.rs:47-50— Addedset_mode(&mut self, mode: EncoderMode)default no-op method toVideoEncodertrait. Platform encoders override when slide-mode reconfiguration is implemented.crates/wzp-video/src/controller.rs:113-115— AddedSD_VIDEO_FLOOR_KBPS = 150constant.crates/wzp-video/src/controller.rs:164-180— Addedencoder_mode()method: returnsSlideFallbackwhenPriorityMode::ScreenShare+ video budget < 150 kbps, otherwiseNormal.crates/wzp-video/src/controller.rs:420-442— Added 3 tests: screenshare-above-floor-normal, screenshare-below-floor-slide, non-screenshare-never-slide.
Deviations from the task spec
Skeleton task. Followed PRD "ScreenShare slide-fallback" section. The actual hardware-encoder slide-mode implementation (configuring VTCompressionSession / AMediaCodec to emit one I-frame every 2–5 s) is deferred — the trait method is a no-op default so existing encoders don't break.
Verification output
$ cargo test -p wzp-video --lib
test result: ok. 43 passed; 0 failed; 0 ignored
$ cargo build -p wzp-video -p wzp-proto -p wzp-relay -p wzp-client -p wzp-android -p wzp-codec -p wzp-desktop
# Finished successfully
$ cargo fmt --all -- --check
# pass
Test summary
- Tests added: 3 (
screenshare_above_floor_is_normal,screenshare_below_floor_is_slide_fallback,non_screenshare_never_slide_fallback) - Tests modified: 0
cargo clippy -p wzp-video --all-targets -- -D warnings: passcargo fmt --all -- --check: pass
Risks / follow-ups
- Hardware encoder slide mode not implemented — VideoToolbox and MediaCodec
set_mode()are no-ops. Real implementation needs platform-specific code to setkVTEncodeFrameRate/KEY_FRAME_RATEto ~0.33 fps and force every frame as keyframe. - Caller not yet wiring
encoder_mode()— The engine code that callsVideoQualityController::tick()also needs to callencoder_mode()and pass the result toencoder.set_mode().
Reviewer checklist (filled in by reviewer)
- Code matches PRD intent
- Verification output is real
- No backward-incompat surprises
- Tests cover the new behavior
- Approved