let VideoDevice = CameraWithPosition(AVCaptureDevicePosition.Back) // not working
let VideoDevice = CameraWithPosition(AVCaptureDevicePosition.Front) // working
if let stillOutput = self.stillImageOutput {
if let videoConnection = stillOutput.connectionWithMediaType(AVMediaTypeVideo)
{
println("stillOutput \(stillOutput)")
stillOutput.captureStillImageAsynchronouslyFromConnection(videoConnection){
(imageSampleBuffer : CMSampleBuffer!, _) in
println("imageSampleBuffer \(imageSampleBuffer)") //prints nil for back camera, works for front camera
...more code
I am able to capture image from Front Camera but same process not working for Back Camera of my Iphone, Is there any different settings for both camera?
Receiving imageSampleBuffer as nil for Back camera..
error log :
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo=0x1704682c0 {NSUnderlyingError=0x170255d20 "The operation couldn’t be completed. (OSStatus error -16803.)", NSLocalizedFailureReason=An unknown error occurred (-16803), NSLocalizedDescription=The operation could not be completed}