Post

Replies

Boosts

Views

Activity

Reply to AVCaptureMultiCamSession & AVCaptureSession runtime error
You were right, the multicam session was not released, KVO observation was holding it and that was copied from AVMultiCamPip sample code. I fixed the KVO observation and the multicam session is now released. But the problem never stops. I have the same AVCaptureVideoPreviewLayer that is passed between the two sessions and on stopping the multi cam session, deallocating it, and creating AVCaptureSession with default 1080p session preset now crashes the app. I am wondering if this piece of code of switching between sessions is bug free in AVFoundation. Assertion failed: (_internal->figCaptureSession == NULL), function -[AVCaptureVideoPreviewLayer attachToFigCaptureSession:]_block_invoke, file /Library/Caches/com.apple.xbs/Sources/EmbeddedAVFoundation/EmbeddedAVFoundation-1850.2/Aspen/Capture/Sources/AVCaptureVideoPreviewLayer.m, line 1082.
Jun ’20
Reply to AVCaptureMultiCamSession & AVCaptureSession runtime error
And even if I set the videoPreviewLayer.session = nil after stopping session, I get crashes when I add AVCaptureVideoDataOutput:#10x00000001bdd83058 in KVO_IS_RETAINING_ALL_OBSERVERS_OF_THIS_OBJECT_IF_IT_CRASHES_AN_OBSERVER_WAS_OVERRELEASED_OR_SMASHED ()#20x00000001bdd80a20 in NSKeyValueWillChangeWithPerThreadPendingNotifications ()#30x00000001c7eff9ac in -[AVCaptureFigVideoDevice _setActiveFormat:resetVideoZoomFactorAndMinMaxFrameDurations:] ()#40x00000001c7f324f0 in -[AVCaptureSession _updateDeviceActiveFormatsAndActiveConnections] ()#50x00000001c7f31224 in -[AVCaptureSession _buildAndRunGraph] ()#60x00000001c7f2b174 in -[AVCaptureSession _commitConfiguration] ()#70x00000001c7f2ccec in -[AVCaptureSession addOutput:] ()
Jun ’20
Reply to iPhone XS stereo recording
Thanks for the response. Will this API work with RemoteIO Audio Unit as well to get raw audio samples in stereo format from the builtin mic? Also, will it be possible to get raw samples from both the Airpods in one Audio session (or atleast dynamically switch from one Airpod to another using AVAudioSession API)?
Jun ’20
Reply to XCode12 beta build errors with AVAudioSession APIs
I found it eventually but this is driving me crazy to share projects between XCode11 and XCode12. At times I need XCode12 to test new iOS14 APIs but then XCode12 beta 3 is too buggy so coming back to XCode11 is painful. There are lot of code changes required to make the project compatible with XCode11. For instance, this code if usingFrontCamera {    preferredAutoMicrophoneOrientation = AVAudioSession.Orientation.front } else {  preferredAutoMicrophoneOrientation = AVAudioSession.Orientation.back } It requires a different approach altogether in XCode11. Setting it to AVAudioSession.Orientation.orientationFront doesn't work!
Jul ’20
Reply to UIKit strange layout bug in iOS14
Dear UIKit Engineers, This is a bug with XCode projects not having UISceneDelegate (pre iOS 13) and is very simple to reproduce. Just have an XCode project without UISceneDelegate and have a hidden subview with white background in the Storyboard. Unhide this subview in viewDidLoad and see the glitch on startup in landscape mode. I have filed feedback FB8400870. Is there any known workaround? This is causing very bad app load experience.
Aug ’20