Skip to content

Player: a terminal playback error lets go of the pipeline and the video plane - #937

Merged
GLinnik21 merged 3 commits into
GLinnik21:mainfrom
tiper:fix/error-screen-releases-pipeline
Oct 25, 2026
Merged

GLinnik21 merged 3 commits into
GLinnik21:mainfrom
tiper:fix/error-screen-releases-pipeline

Conversation

@tiper

@tiper tiper commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Before: After a terminal playback error the failure read-out stood on a loaded Engine, so the native pipeline and video window stayed up. webOS read that as playback still going and reset the screensaver timer every 30 s, so the screensaver never came on over the error screen.

After: An Engine that failed for good is released the frame after, using the same teardown an app switch uses. The read-out keeps its cause and the playhead in the session. Try again, Play automatically, a quality pick and Back behave as before; Back still reports the stop position once.

How: release_failed_engine runs in pump after a terminal failure and calls suspend_bufferfeed. PlaybackSession::engine_failure keeps the Error state and cause, and the unpresented resume slot keeps the retry position. An Engine-less pump frame now also discards a stale recovery landing. Tests cover the release, a retry after it, and Back after it.

Verified on an LG C1: the screensaver now comes on over the error screen and Try again resumes.

tiper and others added 3 commits October 22, 2026 17:15
…eo plane

The failure read-out stood on a loaded Engine: the native pipeline and the video window stayed up
behind it, which the television reads as playback still going, so its screen manager reset the
screensaver timer every 30 s for as long as the read-out was shown and the screensaver never came
on (it does on Home, where no pipeline is loaded).

An Engine that put a picture up and then failed for good is now released the frame after, with the
teardown an app switch uses (suspend_bufferfeed: the session, URL and transcode session stay, nothing
is reported as stopped). What the read-out and its actions need stays in the session, as the
engine-less refusals already do: the cause (PlaybackSession::engine_failure, which player::state
derives Error from and error_now reads), and the playhead a retry resumes from (the unpresented
resume slot retry_failed_playback already reads). Try again, Play automatically and a quality pick
start a new playback from scratch and end the standing error with their request; Back ends the
session with a real stop that still reports the position the Engine stopped at, once.

An Engine-less pump frame now also discards a stale recovery landing, so a replacement encoder a
worker registered for a flight that ended is stopped without waiting for the next playback.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Tiago Pereira <1698241+tiper@users.noreply.github.com>
…ease guards

Behaviour unchanged.

- player/mod.rs: the four-signal `runtime_failure(...)` read that `error_now` did
  inline is now `live_runtime_failure(ps)`, which `error_now` and
  `release_failed_engine` both call, so the cause a released Engine freezes into
  the session cannot drift from the one the read-out derives while an Engine is up.
- player/pump.rs: the two sites that fail an Engine for good repeated
  `fail_current_engine(); set_state(Error); arm_failed_engine_release();`; they
  call one `fail_engine_for_good()`.
- player/engine.rs `release_failed_engine`: the "Engine already replaced" case
  (disarm and return) is its own early return instead of a second `is_live()`
  check inside the combined guard; the remaining conditions keep their order.
- player/engine.rs `teardown`: the Engine-less real-stop branch reads duration,
  playhead and rating key only when a released Engine's failure stands, and builds
  `final_report` inside that branch.
- route/decision_plan_tests.rs: pass the new `version` argument (`None`) to
  `request_play`, which main gained after this branch was cut, so the PR's test
  compiles against the merged tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GLinnik21
GLinnik21 merged commit f86a6be into GLinnik21:main Oct 25, 2026
13 checks passed
@GLinnik21

Copy link
Copy Markdown
Owner

Thanks @tiper, nice catch on the screensaver. Merged.

What I changed on the branch before merging, behaviour the same:

  • merged main (62 commits, no conflicts). Your new test needed None for the version argument Add FF/REW tap seeking and independent playback navigation options #921 added to request_play.
  • fail_or_wait_for_recovery and land_recovery_flight now share one fail_engine_for_good step: fail the engine, go to Error, arm the release.
  • error_now and release_failed_engine read the failure through one live_runtime_failure helper.
  • teardown builds the end report only when there really was an engine failure.

GLinnik21 added a commit to tiper/fin-native that referenced this pull request Oct 25, 2026
…21#937's shared step

GLinnik21#937 made fail_engine_for_good (fail the Engine, enter Error, arm the pipeline release)
the one place an Engine ends for good. The two sites this branch adds, the learned
Load refusal and the learned native-audio stall, open-coded the old fail-and-Error pair
and so skipped arming the release; they call the shared step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tiper added a commit to tiper/fin-native that referenced this pull request Oct 26, 2026
The maintainer pushed "Simplify:" commits onto every PR of ours he merged (GLinnik21#839, GLinnik21#937, GLinnik21#1018,
GLinnik21#1034), behaviour unchanged each time. The skill writes down what he changed (reuse the existing
path, one owner per state, values over globals, one named step for a repeated sequence, no
redundant guards, docs kept true) and the steps to take before opening an upstream PR so he does
not have to.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@tiper
tiper deleted the fix/error-screen-releases-pipeline branch October 26, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants