IPhone 4 AVFoundation: simultaneous shooting from the front and rear cameras

I was wondering if it is possible to shoot from both cameras simultaneously using the AVFoundation framework. In particular, my question is whether both front and rear AVCaptureDevices can work simultaneously or not.

Currently, I know that an AVCaptureSession instance can only support one input (and output). I create two AVCaptureSessions, attach the front camera device to one and the other to the other, then point the session outputs to the different SampleBufferDelegate functions. I see that one delegate function is active for several frames, then another takes over. It seems that AVFoundation somehow disconnects the camera device if another is used. Can anyone confirm this or share their experience on this?

Thanks in advance

+6
ios iphone avfoundation camera avcapturedevice
source share
1 answer

Answering my own question:

  • It's impossible.
  • Switching between the front and rear cameras to emulate similar behavior is too slow (Accepts about 500 ms per switch according to my tests)

Source: https://devforums.apple.com/message/369748#369748

+6
source share

All Articles