Repository navigation
Conversation
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.
Hosts can choose a forward window but cannot request an exact temporary VOD cache budget or tell whether cleanup succeeded. Add optional
LoadOptions.sessionCacheByteBudgetand a separateEngineDiagnostics.sessionCacheStatussnapshot with requested/effective budgets, resident bytes, protected-window overflow, producer parking, eviction and typed cleanup/failure results.Nil preserves existing automatic sizing. Explicit requests reuse the quarter-of-available-space safeguard and
RetentionClaimsallocation after other sessions' unwritten claims. Unknown capacity keeps the conservative ceiling. Zero keeps the necessary working window rather than promising zero I/O; the software disk path keeps a bounded working spool. A protected fMP4 playback window may exceed the request, which the snapshot reports explicitly. The tvOS memory default and live DVR policy remain unchanged; live reports this VOD byte policy as unsupported.State is sampled off-main from the segment ledger at the existing telemetry cadence. Cleanup may publish after stop, but session tokens reject callbacks from a superseded load/rebuild and an old startup callback cannot revive a stopped cache. Remote HLS is reported as AVPlayer/server managed, not successful zero-byte caching. Detailed snapshots cover fMP4 segment caching; software packets retain their existing telemetry.
Keep the existing #720 ENOSPC classification and #714 live DVR limits. A bounded stale-directory sweep retains the liveness marker, reports enumeration/deletion failures, and never reuses another session's bytes. This is not the cross-launch source cache discussed in #706. No UI settings or host-specific cache tiers are included.
This is independent of #827 (explicit packet-store selection), but both touch
SoftwarePlaybackHostconstruction and the LoadOptions inventory. If #827 lands first, the requested-byte resolution belongs inside its disk factory; the memory branch andautomaticplatform choice must stay unchanged. No combined-branch or device performance acceptance is claimed.Tests cover default equivalence, explicit/zero/unknown capacity, shared claims, actual segment writes and replacements, parking, hard-window overflow, bounded sweep, failed directory/write/adoption/cleanup, real engine load/stop cleanup and rejection of old-session updates.
Validation: 66 focused tests under the strict cooperative pool passed. Full serial host suite passed: 795 XCTest tests (1 existing skip) and 4,636 Swift Testing tests across 637 suites. Published documentation links and
git diff --checkpassed. Existing Issue451 creation-time/liveness assertions remain unchanged, and a callback-type regression preserves the public zero-argumentHLSVideoEngine.stop()API. Platform and optional-trait validation is left to CI; no new device acceptance is claimed.