From 3e03d333f1bdcad4a89c54df3bf52a009b2df6dc Mon Sep 17 00:00:00 2001 From: astar76 Date: Thu, 12 Nov 2026 22:25:30 -0600 Subject: [PATCH] S028: MSE on main: mse + crash-adblock green on main; PROGRESS, plan, INDEX Co-Authored-By: Claude Opus 5.5 --- Plans/05 Engine/S028-mse-player.md | 6 +++--- Plans/INDEX.md | 2 +- docs/PROGRESS.md | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Plans/05 Engine/S028-mse-player.md b/Plans/05 Engine/S028-mse-player.md index 9c3b149..931e1d2 100644 --- a/Plans/05 Engine/S028-mse-player.md +++ b/Plans/05 Engine/S028-mse-player.md @@ -30,10 +30,10 @@ work happens on main. when dav1d is installed); unit test for the mime/codec mapping - [x] Full smoke set green on the branch (launch, basics, input, chrome, keys, mse, settings; heavy-web where the network allows) and `nice cargo test --release -j 2` -- [ ] Merge `s022-mse-proto` into main; build main; mse smoke green on main; remove the worktree -- [ ] DESIGN.md: media section (MSE path, vendored crates, patched gst_mse); "Engine limits": drop the MSE line, +- [x] Merge `s022-mse-proto` into main; build main; mse smoke green on main; remove the worktree +- [x] DESIGN.md: media section (MSE path, vendored crates, patched gst_mse); "Engine limits": drop the MSE line, keep DRM; FEATURES rows -- [ ] PROGRESS entry, INDEX line, commit `S028: …`, push main +- [x] PROGRESS entry, INDEX line, commit `S028: …`, push main ## End criteria - mse smoke (seek, rate, ended, errors, split A/V) passes on main; `cargo test` green; no smoke regressions. diff --git a/Plans/INDEX.md b/Plans/INDEX.md index fb7b2bf..937f1dc 100644 --- a/Plans/INDEX.md +++ b/Plans/INDEX.md @@ -37,7 +37,7 @@ Tracker: https://claude.ai/artifact/9AD7fPfwJ4ASFzVTJGKU4h - [x] [S022 — MediaSource (MSE) spike](05%20Engine/S022-mse-spike.md) · Opus high · 🧑 - [x] [S026 — Fix gst_mse for split audio/video MSE](05%20Engine/S026-gst-mse-fixes.md) · Opus high - [x] [S027 — MSE DOM to spec](05%20Engine/S027-mse-dom-spec.md) · Opus high -- [ ] [S028 — MSE player integration and merge to main](05%20Engine/S028-mse-player.md) · Opus high +- [x] [S028 — MSE player integration and merge to main](05%20Engine/S028-mse-player.md) · Opus high - [ ] [S029 — YouTube and Reddit video pass](05%20Engine/S029-youtube-reddit-pass.md) · Opus high · 🧑 - [ ] [S030 — Ship GStreamer with MSE (AppImage and Windows)](05%20Engine/S030-media-packaging.md) · Opus medium diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 7fa50bf..0293710 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -329,11 +329,13 @@ Later: S010 list: user checks the Discord icon with their own client (the Discor - Reruns (resumed session): crash-adblock 3/3, net-adblock, launch green (visible); heavy-web ×2 no SIGSEGV and no core, both reach `status done`; their failed asserts are YouTube search/playback/PiP (main has no MSE, S028). `cargo test` 70 green. - S028 merge: the MSE branch also vendors `vendor/servo-script`; take the branch's files and re-apply the two `Nacre patch (S031)` hunks in `event_loop/timers.rs` (the branch's timers.rs is the pristine 0.7.0 file). -## S028 — MSE player integration (WIP, stopped for the weekly limit, 2026-11-12, branch s022-mse-proto) -- Done: main merged in (mse smoke green). Attach doesn't block the script thread (max stall 35 ms, was ~1 s). loadedmetadata after the init segment (own MP4/WebM byte-stream check; gst_mse reports it only with frames), readyState from buffered at currentTime, byte-stream append errors (garbage / media before init), `buffered` throws once removed, failure steps detach the MediaSource, codec table (vp09, Opus/fLaC, vorbis, hevc). New `tests/smoke/mse-player.txt`: 7/9 cases. -- Next: two gst_mse C fixes: (1) msesrc sends no EOS after endOfStream (S027's abort patch dropped it), so no `ended`: set EOS on the track buffers at end of stream, clear on reopen; (2) `on_duration_changed` shrinks a page-set duration (breaks seek past buffered): only raise it. Then cargo test (new unit tests never run), WPT rerun (baseline 239/407), full smoke set, DESIGN/FEATURES, merge. -- Merge note: main vendors servo-script too (S031, 0ecfd0f): take the branch's servo-script files and re-apply the two `Nacre patch (S031)` hunks in event_loop/timers.rs. -- State (stopped by orchestrator, 2026-11-12): gst_mse patches 10-11 (EOS at endOfStream, duration only grows) committed; mse-player 9/9, cargo test 70 + media crate tests 11 green; DESIGN/FEATURES/CLAUDE docs done; plan boxes 1-5 ticked. origin/main merged into the branch (servo-script = branch files + main's S031 timers.rs), merge NOT built. Smokes on the pre-merge binary: launch, basics, input, chrome, keys green; mse.txt fails `reopen` (mse-spec.html, regression from patch 10's clear-EOS on reopen? check first); settings, mse-player rerun, heavy-web, WPT not run. Next: fix `reopen`, build the merged branch, rerun smokes + crash-adblock + WPT, then merge into main. +## S028 — MSE player integration, merged to main (2026-11-12) +- Done: attach never blocks the script thread (max gap 26 ms); loadedmetadata after the init segment (own MP4/WebM byte-stream check); readyState from buffered at currentTime; seeks inside/outside buffered, rate, `ended` after endOfStream; decode error, garbage and media-before-init append errors; `buffered` throws once removed; codec table (`isTypeSupported` = `canPlayType`: vp09, Opus/fLaC, vorbis, hevc, av01 with dav1d). gst_mse patches 10-12 (EOS reaches msesrc; duration only grows; coded frames raise it to the buffered end) + a reopen deadlock fix (append after endOfStream took TRACKS_LOCK twice and hung the script thread). `s022-mse-proto` merged into main (merge commit, S031 timers hunks kept); main built, mse.txt (11 spec cases + leak check) and crash-adblock.txt green on main (hidden). +- Tests: C tests 7/7 (`/mse/reopen-append`, `/mse/duration-from-frames` new), cargo test 70 + media crates 11. Visible smoke set on the branch: launch, basics, input, chrome, keys, mse, mse-player 9/9, mse-off, settings, crash-adblock green; heavy-web only fails the YouTube results list (S006 layout gap); YouTube watch plays over MSE (blob: src, currentTime > 1), PiP works. +- Reference (Chromium in the app's browser pane, D-030): mse-basic mp4/split match (duration 5.08 / 5.023 after patch 12; was 1.009). Chromium rejects the WebM test clip ("block with a timecode before the previous block"), Nacre plays it. Chromium fails mse-player `garbage`/`garbageFirst` (spec cases Nacre passes). YouTube watch at 772 px (desktop site in both; the pane's viewport under 768 px emulates a phone and got m.youtube.com, so not used): Chromium paints the video frame in the player; Nacre's player area stays black while currentTime advances, its title/channel skeletons sit inside the black area, the search box is drawn twice, header light vs Chromium's dark theme (S029). +- Not done: WPT rerun (baseline 239/407); worktree `~/Projects/Nacre-s022` not removed (the S028 session runs in it; remove with `git worktree remove ~/Projects/Nacre-s022` once it ends, branch stays on origin). +- Seen: `/mse/split-audio-video` final ready-state check failed 2 in ~70 rounds after patch 12 (0 in 24 before; msesrc reads position from pad segments, Nacre's DOM computes readyState itself). +- Later: `endOfStream()` aborts gst's parser but not `ByteStreamCheck` (a page continuing a cut box after reopen would differ); a real `tools/refshot.py` (S029). ## Later - Turnstile widget paints as a black half-disc (Servo painting of its iframe/shadow DOM, S006 site doctor).