piemonte / PBJVision

📸 iOS Media Capture – features touch-to-record video, slow motion, and photography

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wtih a phone call in the background, PBJVision is unable to capture video

ataranlen opened this issue · comments

  1. Start a FaceTime Video call or phone call.
  2. Open an app that uses PBJVision as the viewfinder in Video mode.

The preview layer flashes like a strobe light, with the log being spammed by errors.
Trying to record does starts "recording" but doesn't actually record anything.

2015-10-13 11:56:55.730 ClipFeed[632:524268] VISION: change device (0) mode (0) format (0)

2015-10-13 11:56:55.759 ClipFeed[632:524307] VISION: camera setup

2015-10-13 11:56:55.761 ClipFeed[632:524307] VISION: switchDevice 1 switchMode 1

2015-10-13 11:56:55.777 ClipFeed[632:524307] VISION: capture session setup

2015-10-13 11:56:55.971 ClipFeed[632:524268] VISION: session was started

2015-10-13 11:56:55.971 ClipFeed[632:524307] VISION: capture session running

2015-10-13 11:56:56.037 ClipFeed[632:524307] VISION: error media services failed, error (Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x125a3d6c0 {Error Domain=NSOSStatusErrorDomain Code=561017449 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (561017449), NSLocalizedDescription=The operation could not be completed})

2015-10-13 11:56:56.038 ClipFeed[632:524307] VISION: camera destroyed

2015-10-13 11:56:56.042 ClipFeed[632:524307] VISION: camera setup

2015-10-13 11:56:56.042 ClipFeed[632:524307] VISION: switchDevice 1 switchMode 1

2015-10-13 11:56:56.050 ClipFeed[632:524307] VISION: capture session setup

2015-10-13 11:56:56.201 ClipFeed[632:524268] VISION: session was started

2015-10-13 11:56:56.205 ClipFeed[632:524307] VISION: capture session running

2015-10-13 11:56:56.281 ClipFeed[632:524305] VISION: error media services failed, error (Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x125a2ea80 {Error Domain=NSOSStatusErrorDomain Code=561017449 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (561017449), NSLocalizedDescription=The operation could not be completed})

2015-10-13 11:56:56.285 ClipFeed[632:524305] VISION: camera destroyed

2015-10-13 11:56:56.289 ClipFeed[632:524305] VISION: camera setup

2015-10-13 11:56:56.289 ClipFeed[632:524305] VISION: switchDevice 1 switchMode 1

2015-10-13 11:56:56.295 ClipFeed[632:524305] VISION: capture session setup

2015-10-13 11:56:56.451 ClipFeed[632:524268] VISION: session was started

2015-10-13 11:56:56.451 ClipFeed[632:524305] VISION: capture session running

2015-10-13 11:56:56.524 ClipFeed[632:524308] VISION: error media services failed, error (Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x125a1cc40 {Error Domain=NSOSStatusErrorDomain Code=561017449 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (561017449), NSLocalizedDescription=The operation could not be completed})

2015-10-13 11:56:56.525 ClipFeed[632:524308] VISION: camera destroyed

Did you ever figure out this issue? I have the same with just a normal phone call

2015-10-28 17:20:45.379 Channels[2370:810241] VISION: change device (0) mode (1) format (0)
2015-10-28 17:20:45.380 Channels[2370:810241] VISION: change device (0) mode (0) format (0)
2015-10-28 17:20:45.489 Channels[2370:810413] VISION: camera setup
2015-10-28 17:20:45.490 Channels[2370:810413] VISION: switchDevice 1 switchMode 1
2015-10-28 17:20:45.526 Channels[2370:810413] VISION: capture session setup
2015-10-28 17:20:46.035 Channels[2370:810413] VISION: capture session running
2015-10-28 17:20:46.036 Channels[2370:810241] VISION: session was started
2015-10-28 17:20:46.037 Channels[2370:810486] VISION: session was stopped
2015-10-28 17:20:46.042 Channels[2370:810241] VISION: session was interrupted

No. I did notice that the Video output of the FaceTime call gets paused when in the background. This leads me to think it might be audio related.

I suspected that it is an audio thing. I try to test the instagram app's video just to see if it was PBJ specific or a general iOS thing. the app seemed to behave fine showing the camera view at the same time. So must mean it's something with PBJVision/PBJVideoPlayer

the library doesn't fully support backgrounding. unfortunately, i'm not sure when i'll be able to get that added. but it's tracked here:

📎 #2

This isn't an issue with PBJVision being in the background, it is an issue with PBJVision being in the foreground with a call in progress in the background.

This issue occurs without the app using PBJVision being sent to the background.

yeah, @piemonte set this up to use audio samples but it seems like the phone call is causing an issue with collecting those samples properly. he's supposed to fix it with #2

thx, yep.

📎 #178