Skip to content

feat(preview): bound disposable source-backed snapshot work - #717

Merged
superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
yucelokan:codex/bounded-source-snapshots
Oct 7, 2026
Merged

superuser404notfound merged 1 commit into
superuser404notfound:mainfrom
yucelokan:codex/bounded-source-snapshots

Conversation

@yucelokan

@yucelokan yucelokan commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Apply caller-provided time, byte and cancellation budgets across opening, analysis, seek and decode for disposable snapshots. Report a measured timestamp when the decoded frame provides one.

What changed

  • Add boundedSnapshot and BoundedStillFrame without changing ordinary snapshot behavior.
  • Interrupt HTTP headers and all later decode stages through ProbeCancellation.
  • Reject already-open extractors and close the temporary context on every outcome.

Test plan

  • Device / OS: Apple M1 Pro Mac, macOS 27.0.1; Xcode 27.0 (27A266a), Swift 6.4.
  • Source media: MP4 with two 64×64 HEVC Main 10 frames, PQ/BT.2020 and HDR10+ prefix SEI, no audio (existing repository fixture); controlled localhost HTTP header stall. Existing ordinary-extractor tests also use the MPEG-4 Part 2 fixture.
  • Result: 19 XCTest and 73 Swift Testing cases passed with swift test --jobs 4 --filter 'BoundedFrameExtractorTests|FrameExtractor|FrameDecodeContextHardwareTests|ProbeControlTests|ProbeHTTP|PublicAPIDocumentationTests|DocumentedConstantsTests'. Zero input/time budgets reject work, a decoded still returns finite measured PTS, and the deadline interrupts a stalled HTTP header. swift build --jobs 4, documentation links and git diff --check pass.
  • Production use: this behavior already ships in WUW's App Store release, with physical iPhone and Apple TV use. The isolated PR revision is based on upstream 7.28.3; the reproducible checks above describe this revision rather than claiming a new device run.

Integration with related contributions

This branch builds and tests against main independently. It shares FrameExtractor and FrameDecodeContext with #716. Preserve both timestamp callbacks (including hardware-fallback recursion), the resident decode deadline and the disposable extraction control. A new resident request must also cancel a previous bounded extraction through boundedCancellation, while shutdown and ordinary extraction retain their cancellation handling. These shared-code integration points require resolving the branches together, not dropping either side of a conflict.

Checklist

  • CHANGELOG.md updated
  • Commit messages follow Conventional Commits (feat(...), fix(...), chore(...))
  • The fix lives in the engine, not in a host-side workaround
  • Public API changes are intentional and documented

@superuser404notfound

Copy link
Copy Markdown
Owner

Thank you. Merged after #716 and released in 7.30.0 (beed2cc5).

Resolved as described: decodeFrame keeps both callbacks through the hardware-fallback recursion, and residentPreview now cancels a boundedCancellation still in flight on the same extractor. boundedSnapshot is documented in the FrameExtractor row of the Picture table, BoundedStillFrame under Value types.

yucelokan added a commit to yucelokan/AetherEngine that referenced this pull request Oct 13, 2026
Merge upstream main through the post-release superuser404notfound#748 integration, including maintainer follow-ups to superuser404notfound#708–superuser404notfound#717 and superuser404notfound#745–superuser404notfound#748. Runtime sources and tests match upstream; retain only fork provenance and GPL text. Full engine suite, strict-pool replay/recovery/origin tests and iOS/tvOS library builds passed.
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