feat: make Sim Cam production ready#17
Merged
Merged
Conversation
- Fix seqlock pattern to canonical seq+1/seq+2 - Fix CMSampleBuffer use-after-free - Add zero-copy frame delivery path - Daemonize FrameHost to survive terminal close - Remove duplicate SharedFrameReader leaks - Fix unchecked entitlement errors - Update offset comments and gitignore
Apps using PermissionManager-style patterns configure the camera session but never call startRunning(), leaving AVCaptureVideoPreviewLayer in a dormant state and producing a frozen black frame. Changes in CaptureHooks.mm: - Add gAVSessionStarted flag (set in msc_startRunning) to track whether the app explicitly called startRunning so we don't double-start - Add MSCFakeCaptureDevice.deviceType returning builtInWideAngleCamera so discovery-session filters (e.g. bestPossibleBackCamera) match via the preferred-type loop rather than the last-resort fallback - In msc_setSession:, init_mscWithSession:, and initWithSessionWithNoConnection:, dispatch a 500 ms delayed block that calls startRunning if the app never did — the delay ensures onAppear and any explicit startRunning the app calls have already fired, preventing a double-start crash on Simulator; wrapped in @try/@catch as an additional safety net
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.
What was changed
1. Build Pipeline Fixes
2. CI/CD Linting Exclusions
cmd/cam*.goto suppress hyper-strict formatting and stylistic linters.3. Camera Host Management Bug Fixes
sim cam stopto properly clean up global temporary.statusand.pidfiles.