[英]SIGABRT when navigating from ARView with cameraMode = `nonAR` to a regular AR mode ARView
[英]PBJVISION - Error switching from cameraMode.Video to cameraMode.Photo
我在Instagram應用中使用“ PBJVISION”,例如觸摸錄制功能。 它工作正常,但是當我嘗試從PBJCameraMode.Video切換到PBJCameraMode.Photo時,出現錯誤;
原因:-[AVCaptureStillImageOutput captureStillImageAsynchronouslyFromConnection:completionHandler:]-狀態不一致。
我的代碼非常簡單;
@IBAction func changeCameraModeAction(sender: AnyObject) {
if recordFlag == false {
PBJVision.sharedInstance().maximumCaptureDuration = CMTimeMakeWithSeconds(kTotalVideoLength, kVideoFramePerSec)
PBJVision.sharedInstance().cameraMode = PBJCameraMode.Video
recordFlag = true
} else {
progressBarView.hidden = true
PBJVision.sharedInstance().cameraMode = PBJCameraMode.Photo
recordFlag = false
}
}
你能幫我么?
謝謝,E。
在刪除並設置AVCaptureSession之前,我遇到了相同的錯誤。
我只在iPhone 6中發現過。
即使在主線程中執行此操作,也會發生某些事情。 我還沒有使用PBJVISION。 我的錯誤
App crashing with exception: *** -[AVCaptureStillImageOutput captureStillImageAsynchronouslyFromConnection:completionHandler:] - inconsistent state.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVCaptureStillImageOutput captureStillImageAsynchronouslyFromConnection:completionHandler:] - inconsistent state.'
如果對此有更多了解,我將進行更新。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.