NSError* error = nil;
AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&error];
if (!input) {
- NSLog(@"error creating input %@", [error localizedDescription]);
+ NSLog(@"error creating input %@", [error description]);
}
// support for autofocus
device.focusMode = AVCaptureFocusModeContinuousAutoFocus;
[device unlockForConfiguration];
} else {
- NSLog(@"unable to lock device for autofocus configuration %@", [error localizedDescription]);
+ NSLog(@"unable to lock device for autofocus configuration %@", [error description]);
}
}
[self.captureSession addInput:input];
device.focusMode = AVCaptureFocusModeLocked;
[device unlockForConfiguration];
} else {
- NSLog(@"unable to lock device for locked focus configuration %@", [error localizedDescription]);
+ NSLog(@"unable to lock device for locked focus configuration %@", [error description]);
}
}
}
device.focusMode = AVCaptureFocusModeContinuousAutoFocus;
[device unlockForConfiguration];
} else {
- NSLog(@"unable to lock device for autofocus configuration %@", [error localizedDescription]);
+ NSLog(@"unable to lock device for autofocus configuration %@", [error description]);
}
}
}
device.exposureMode = AVCaptureExposureModeLocked;
[device unlockForConfiguration];
} else {
- NSLog(@"unable to lock device for locked exposure configuration %@", [error localizedDescription]);
+ NSLog(@"unable to lock device for locked exposure configuration %@", [error description]);
}
}
}
device.exposureMode = AVCaptureExposureModeContinuousAutoExposure;
[device unlockForConfiguration];
} else {
- NSLog(@"unable to lock device for autoexposure configuration %@", [error localizedDescription]);
+ NSLog(@"unable to lock device for autoexposure configuration %@", [error description]);
}
}
}
device.whiteBalanceMode = AVCaptureWhiteBalanceModeLocked;
[device unlockForConfiguration];
} else {
- NSLog(@"unable to lock device for locked white balance configuration %@", [error localizedDescription]);
+ NSLog(@"unable to lock device for locked white balance configuration %@", [error description]);
}
}
}
device.whiteBalanceMode = AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance;
[device unlockForConfiguration];
} else {
- NSLog(@"unable to lock device for auto white balance configuration %@", [error localizedDescription]);
+ NSLog(@"unable to lock device for auto white balance configuration %@", [error description]);
}
}
}