Repository navigation
Player: a Play pressed while a held prime waits now resumes playback - #1439
Merged
Merged
Conversation
The matrix over `transport::set_transport_paused` -> `backend_transport_control` -> the Feed driver's dispatch, over a runner-started Engine (the fixture Engine `PlayerAdapter::install` makes has no attempt, so the door falls back to `player::resume` and the dispatch never runs). Each hold (initial prime, seek prime with the Pause after and before the seek, HLS internal rebuffer, ResumePrime) is graded with a preceding viewer Pause and without one, plus the claim hold's give-back (a backend Play with nothing user-held). The rows with a Pause fail on this tree: the Play is answered Queued and enqueued nothing while `prime_play` is armed, the clock stays user-held and the prime is refused for good. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…nsition `FeedDriver::dispatch` answered a Play `Queued` and enqueued nothing while `Engine::prime_play` was armed. A viewer Pause that lands on a held prime (`ClockHold::Initial`/`Seek`/`Rebuffer`/ `ResumePrime`) only marks the clock `user_held`, which fences the prime (`reserve_hls_prime_play` refuses while it stands), so the dropped Play left the contract at `viewer_paused = false`, the hold standing and every later Play a no-op until a seek or a stop cleared it. Seen on the TV during a hold (`run-e-diag`: `timeline paused` repeating until a reload). The pre-#1274 door called `player::resume` directly, so every viewer Play reached `prepare_hls_user_resume`; the `!prime_play` skip first appeared in the Feed's extraction (#1274) with no stated reason. What it protects is a Play with nothing to resume: a prime armed, nothing user-held (the claim hold's give-back, `claim_hold::release`, sends such a Play through `backend_transport_control` whatever the viewer's goal reads), where handing it on would answer `NoHold` and refuse it. The driver now hands a Play on when no prime is armed, when the clock is user-held, or when a paused-seek preroll holds the transport gate shut (`user_resume` closes it); otherwise the prime is left alone. Handing the Play on newly reaches the `Deferred` branch of `feed_pump::user_resume` for an Initial or Seek hold, whose `play_initial_now` (added for a retranscode landing, #1309) reserves the Fresh prime and plays at once: the viewer's Play would start the clock on empty lanes. It now fires only when the Resume IS the first Play (`startup_play_commanded` was false); once the runner's Play is commanded the prime's own media proof releases it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…he first Play The Deferred arm's block said every Resume under an Initial or Seek hold is the session's startup play command and fires the initial prime. It now fires only when `startup_play_commanded` was still false; a claim landing's `ResumeInitial` and a viewer Play that undoes a Pause held on the prime answer Fenced, and the physical Play is left to `note_transport_result` or the prime's `try_prime`. Comment only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The comment said the landing's resume fires `play_initial_now`; a landing's `ResumeInitial` answers Fenced since the held-prime fix and `note_transport_result` fires it. Comment only. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Backport to |
GLinnik21
pushed a commit
that referenced
this pull request
Nov 17, 2026
…layback (#1439) (#1448) A viewer's Play pressed while a held prime was still filling (after a seek, or at the initial start) was dropped by FeedDriver::dispatch yet answered Queued, so Pause then Play during the prime left playback paused for good. The driver now hands that Play on when the clock is user-held or a seek preroll is open; the prime keeps the physical Starfish Play and mirrors the ACB resume only after Starfish accepted it. user_resume no longer calls play_initial_now once the startup Play was commanded, which also removes a duplicate Play on a Resume of an immediate start. Regression tests: held_prime_play_tests (hostsim, through the viewer's door); 5 of them fail on the tests-only commit. TV (mock server, Guest): on main, Pause+Play inside a post-seek prime never resumed (2 of 2); with the fix the Play resumes in every row run. The in-place seek watchdog reload seen in some runs also happens with no keys pressed on main (1 of 3) and with the fix (2 of 3), so it is a pre-existing seek behaviour, not this change. (cherry picked from commit a3f1c06)
GLinnik21
added a commit
that referenced
this pull request
Nov 18, 2026
The release note and the authored half of the audit for v0.10.1, a patch released from release/v0.10: v0.10.0 plus the backports of #1438 (Realtek webOS 5 access() interposer), #1437 (seek snap-back on sets with no displayed-frame counter), #1405 (Continue Watching start position), #1439 (Play during a held prime) and #1370 (crash records filed under the uploading release). Compatibility is unchanged from 0.10.0. The audit records the device evidence each fix rests on and leaves the generated block for the release run.
GLinnik21
pushed a commit
that referenced
this pull request
Nov 18, 2026
The release note and the authored half of the audit for v0.10.1, a patch released from release/v0.10: v0.10.0 plus the backports of #1438 (Realtek webOS 5 access() interposer), #1437 (seek snap-back on sets with no displayed-frame counter), #1405 (Continue Watching start position), #1439 (Play during a held prime) and #1370 (crash records filed under the uploading release). Compatibility is unchanged from 0.10.0. The audit records the device evidence each fix rests on and leaves the generated block for the release run. (cherry picked from commit e2f8760)
nphil
added a commit
to nphil/Marquee
that referenced
this pull request
Nov 18, 2026
A film played at Original quality over a link slower than the file kept playing as its queues ran dry: the picture ran in slow motion and the sink then dropped frames to catch up. Only HLS had a rebuffer hold. The pump now holds a progressive stream the same way (one Pause, the Buffering read-out, the try_prime Play). The hold begins when the native position falls more than 100 ms behind the wall, net of a 5 % drift allowance, while the app's video queue holds under 1 MiB, or when the native clock stops over a remnant it will never spend. It releases on a full video or audio queue or the end of the stream, never on a runway. The debt constants are upstream's, measured on its TV, not yet on this one. stall_watch stays the reporter and the restarter of a source parked on a full lane; a hold never begins while a queue is at its cap, so the two never act on one stall. A seek takes the clock from a hold at once. The silence clock is wrap-safe and the position tick is published last, with Release. A Play pressed while a held prime waits (plxnative#1439) needs no port: resume already defers the Play to the hold's release. Ported from upstream 9f5ff48 (Player: a starved direct-play stream pauses and shows Buffering instead of slow motion (plxnative#1441)).
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.
Bug
While the native clock is held on a prime (
Engine::prime_playarmed: the initial prime, the prime after a seek, a progressive rebuffer, a resume prime),FeedDriver::dispatchinrust-modules/play-feed/src/feed_driver.rsdropped a viewer Play and still answeredQueued.A viewer Pause that lands on a held prime only marks the clock
user_held, which fences the prime until the Resume transition clears it. A Pause under a seek also leaves its one-frame preroll holding the transport gate shut. Because the Play was swallowed,user_resumenever ran, so the contract recordedviewer_paused = false, the hold stood,reserve_hls_prime_playrefused the prime, and every later Play was a no-op. Pause then Play during a post-seek or initial prime left playback paused until a seek or a stop cleared the hold.Fix
rust-modules/play-feed/src/feed_driver.rs: the Play is enqueued when the prime is not armed, or when the clock is user-held (Shared::clock_user_held, previously test-only), or when a seek preroll is open (FEED_TX.seek_preroll_active()). With no hold and no preroll there is nothing to resume and the prime is left alone; the claim hold's give-back sends such a Play and is not refused.rust-modules/play-feed/src/feed_pump.rs:user_resumenow fires the initial physical Play only when the Resume IS the first Play (startup_play_commandedwas still false). A viewer Play that undoes a Pause held on an Initial or Seek prime must not start the clock on empty lanes; the prime's own media proof releases the physical Play.rust-modules/play-feed/src/shared.rs:clock_user_heldis public (the test helper delegates to it).rust-modules/media/src/player/pump.rs: the flight-test rig helpers the new tests reuse are madepub(super), and the new test module is registered.Regression tests
rust-modules/media/src/player/held_prime_play_tests.rs(hostsim, 10held_prime_play_*tests) enters at the viewer's door,transport::set_transport_paused, over an Engine the common runner started (an Active attempt,startup_controlled). A fixture Engine installed withPlayerAdapter::installhas no attempt, so the door falls back toplayer::resumeand the driver's dispatch never runs; that is how a test callingplayer::pause/resumedirectly passed over this bug. Each hold (initial prime, internal rebuffer, resume prime, seek prime with the Pause after or before the seek) is graded with and without a preceding viewer Pause; the no-Pause rows pin that nothing moves.5 of them fail on the tests-only commit 58006f1 and pass at the tip.
TV evidence
Mock server, Guest profile, a test build of this fix with the mock's address patched in.
main: Pause then Play inside a post-seek prime never resumed in 2 of 2 runs (noacb play=2, queues frozen for 46 s or more).The resume heartbeat reads about 1000 permille and there is no repeating
timeline paused.in-place stuck -> reloadand the existing watchdog reloaded about 4 s later. The cause is undetermined; there was no key-less control run.Gates
make test-crate C=plx_play_feedon the committed merge tree (git status --shortempty before and after):test result: ok. 337 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.24smake test-hostsim C=plx_media T=held_prime,make check-nodef, fullmake checkand the ARM build are gated by CI. The local run of the first two was refused by the disk preflight (5.8 GiB free; the build needs 3.5 GiB plus a 3.0 GiB reserve).🤖 Generated with Claude Code