feat: unlock 1080p60 on capable devices via StreamCapability - #28
Merged
Conversation
Replace the hard-coded 720px / 30fps encode ceilings with a device- derived StreamCapability (1080p60 on 6GB+ / 6-core hardware, 1080p30 on 4GB, 720p30 on 3GB). encodeSize now takes a maxShortEdge and a new encodeFrameRate(maxFrameRate:) clamps fps, both fed by the capability so a high-end pick never asks a device for more than it can sustain. The thermal governor and adaptive controller continue to pull the live rate down from this static ceiling at runtime. Settings pickers gain 60fps and 10/12 Mbps options, filtered to the device ceiling. Closes #17. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
joeblau
added a commit
that referenced
this pull request
Jul 4, 2026
#17) (#29) The 1080p60 unlock (#28) gated the Quality and Frame Rate pickers by StreamCapability but left the collapsed Video launcher summary interpolating the raw persisted videoQuality/frameRate. On a device whose ceiling is below a stored value — e.g. a settings blob restored via iCloud/backup from a more capable phone — the row rendered "1080p · … · 60 fps" while the pickers and the actual encoded stream were correctly capped, reintroducing the exact over-promise #17 set out to remove. Show the effective (min'd) values so the summary matches what streams. Also pins two StreamCore contracts an adversarial review flagged as untested: the StreamCapability core-count boundary at exactly 6 (5 cores + ample RAM -> 30 fps) and the zero-dimension encodeSize fallback at a 1080 ceiling and under clamping. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Closes #17. Replaces the hard-coded
maxStreamShortEdge = 720/min(fps, 30)ceilings — which made the headline 1080p60 target unreachable — with a device-derivedStreamCapability.StreamCapability(StreamCore): a pure, injectable derivation of the resolution/fps ceiling from real device signals (core count + physical memory):currentreads liveProcessInfo(app only);device(processorCount:physicalMemory:)is injectable so tests never depend on the CI runner's hardware.StreamSettings:encodeSize(...)now takes amaxShortEdge, and a newencodeFrameRate(maxFrameRate:)clamps fps — both fed by the capability. The old scatteredmin(frameRate, 30)is gone.ScreenCaptureController,RTMPPublisher, andSessionPublishercap encode size and pacing to the device ceiling. The ABR controller's frame-rate clamp is raised from 30 to a sane 120 hardware max, which makes the previously-dead> 30congestion tier reachable.ThermalPowerGovernor+ the adaptive controller still pull the live rate down from this static ceiling when the device runs warm or low on power.Testing
StreamCoreTests: 57 tests in 14 suites passed — including newStreamCapabilityTests,StreamSettingsFrameRateTests, and updatedStreamSettingsEncodeSizeTests(1080p reachable on capable ceiling, honestly clamped on 720 devices, aspect preserved, even dimensions).xcodebuild buildfor theStreamscheme on the iOS 27 simulator SDK: BUILD SUCCEEDED.StreamCoreonly (runners lack the iOS 27 SDK); live 1080p60 behavior is verified on a physical iOS 27 device.🤖 Generated with Claude Code