|
@@ -1858,9 +1858,11 @@
|
|
|
|
|
|
- (void)takePhotoButtonTouchUpInside:(id)sender{
|
|
|
self.takePhotoButton.enabled = NO;
|
|
|
- if (self.outputSettings.flashMode == AVCaptureFlashModeOn && (self.mode == SDK_CAPTURE_MODE_SINGLE || self.mode == SDK_CAPTURE_MODE_CONTINUOUS || self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA)) {
|
|
|
+ if ((self.outputSettings.flashMode == AVCaptureFlashModeOn || self.outputSettings.flashMode == AVCaptureFlashModeAuto) && (self.mode == SDK_CAPTURE_MODE_SINGLE || self.mode == SDK_CAPTURE_MODE_CONTINUOUS || self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA)) {
|
|
|
+ self.panGesture.enabled = NO;
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
self.takePhotoButton.enabled = YES;
|
|
|
+ self.panGesture.enabled = YES;
|
|
|
});
|
|
|
} else {
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
@@ -2425,15 +2427,15 @@
|
|
|
#pragma mark - AVCaptureFileOutputRecordingDelegate
|
|
|
- (void)captureOutput:(AVCaptureFileOutput *)output didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray<AVCaptureConnection *> *)connections error:(NSError *)error{
|
|
|
//视频录制
|
|
|
+ [self.timerLabel updateWith:0];
|
|
|
+
|
|
|
BOOL recordedSuccessfully = YES;
|
|
|
if(error.code == AVErrorMaximumDurationReached){
|
|
|
- }
|
|
|
- else if (error.code == AVErrorDiskFull){
|
|
|
+ } else if (error.code == AVErrorDiskFull){
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
[[NSNotificationCenter defaultCenter] postNotificationName:LenzSDKNotificationDiskIsFull object:error];
|
|
|
});
|
|
|
- }
|
|
|
- else if (error.code == AVErrorSessionWasInterrupted){
|
|
|
+ }else if (error.code == AVErrorSessionWasInterrupted){
|
|
|
}
|
|
|
id value = [[error userInfo] objectForKey:AVErrorRecordingSuccessfullyFinishedKey];
|
|
|
if (value) {
|
|
@@ -2467,7 +2469,6 @@
|
|
|
self.resourceModel.lastIndex = self.mode;
|
|
|
|
|
|
[self updateViewStatus];
|
|
|
- [self.timerLabel updateWith:0];
|
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
[self.currentOperationNode triggered];
|