piemonte / PBJVision

📸 iOS Media Capture – features touch-to-record video, slow motion, and photography
MIT License
1.93k stars 324 forks source link

iPhone 7 #327

Closed arthurbelair closed 2 years ago

arthurbelair commented 7 years ago

On iPhone 7 in video mode, PBJVision has an odd behavior, the video session keeps starting and stopping... I looked for where this was coming from and realized the issue is all about audio. When deactivating audio, everything works properly. Even more odd, when plugging in the iPhone headset, the issue also disappears (with audio activated), as if there was a problem with the builtin mic but not the headset one. AVFoundation spits out an unknown error, so kind of hard to investigate.

Any idea why this might be happening?

Here are some logs (those keep repeating as the session starts and stops)

2016-10-20 17:52:51.262 [14651:3291534] VISION: camera destroyed 2016-10-20 17:52:51.265 [14651:3291534] VISION: camera setup 2016-10-20 17:52:51.266 [14651:3291534] VISION: switchDevice 1 switchMode 1 2016-10-20 17:52:51.278 [14651:3291534] VISION: capture session setup 2016-10-20 17:52:51.492 [14651:3291005] VISION: session was started 2016-10-20 17:52:51.492 [14651:3291534] VISION: capture session running 2016-10-20 17:52:51.925 [14651:3291005] VISION: cancel video capture 2016-10-20 17:52:51.977 [14651:3291870] VISION: capture session stopped 2016-10-20 17:52:51.261 [14651:3291534] VISION: error media services failed, error (Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x170645580 {Error Domain=NSOSStatusErrorDomain Code=1852797029 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (1852797029), NSLocalizedDescription=The operation could not be completed})