Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Resuming a retained session while backgrounded bypasses playing-session policy, allowing disabled background playback or continued software video feeding.
1 open issue
What changed in this PR
Adds opt-in retention of paused video pipelines to avoid rebuilding them after background suspension when the system preserves the decoder.
Changes:
- Adds
retainsVideoPipelineWhenBackgrounded, defaulting to false, to background lifecycle policy. - Recovers failed software video queues before playback resumes while preserving healthy queues.
- Documents retention limitations and adds policy and recovery-order tests.
| File | Description |
|---|---|
| Tests/AetherEngineTests/SampleBufferRendererLookaheadTests.swift | Tests failed-queue recovery order and healthy-queue preservation. |
| Tests/AetherEngineTests/BackgroundKeepaliveTests.swift | Tests the opt-in default and paused-session policy. |
| Sources/AetherEngine/Renderer/SampleBufferRenderer.swift | Adds failed-queue recovery and queue injection for tests. |
| Sources/AetherEngine/Native/SoftwarePlaybackHost.swift | Recovers the video queue before resuming transport. |
| Sources/AetherEngine/AetherEngine.swift | Exposes retention configuration and updates background policy. |
| docs/api.md | Documents retention behavior and host reload responsibility. |
| CHANGELOG.md | Records the retention option and queue recovery behavior. |
Review effort: Balanced
| state: PlaybackState, | ||
| retainPausedVideoPipeline: Bool = false | ||
| ) -> BackgroundAction { | ||
| if retainPausedVideoPipeline && state == .paused { return .doNothing } |
jonluca
force-pushed
the
feat/paused-pipeline-retention
branch
from
October 25, 2026 18:27
da1f430 to
79c945f
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.

Summary
Add an opt-in for hosts that want a paused video pipeline to survive background suspension, avoiding a rebuild when the system preserves it. Recover a failed software video queue before waking its feeder, while leaving healthy buffered frames intact.
What changed
retainsVideoPipelineWhenBackgrounded, defaulting to false and applying only to paused sessions.Test plan
-warnings-as-errors.git diff --checkpass.Checklist
CHANGELOG.mdupdated