|
@@ -1452,7 +1452,7 @@
|
|
|
CGFloat aspect = isFront ? cameraMgr.frontAspect : cameraMgr.backAspect;
|
|
|
aspect = isLandscape ? 1.0 / aspect : aspect;
|
|
|
[self.videoDataOutput setSampleBufferDelegate:self queue:self.videoDataQueue];
|
|
|
- [self.captureSession startRunning];
|
|
|
+// [self.captureSession startRunning];
|
|
|
ret = YES;
|
|
|
}
|
|
|
});
|
|
@@ -1474,9 +1474,10 @@
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:PCS_NotificationNameOrientationDidChange object:nil];
|
|
|
dispatch_async(self.videoDataQueue, ^{
|
|
|
|
|
|
+
|
|
|
[self.videoDataOutput setSampleBufferDelegate:nil queue:nil];
|
|
|
- [self.captureSession stopRunning];
|
|
|
-// [Renderer shared].cameraPass.texture = nil;
|
|
|
+// [self.captureSession stopRunning];
|
|
|
+ [Renderer shared].cameraPass.texture = nil;
|
|
|
});
|
|
|
[self stopMotion];
|
|
|
[self.panoramaGuideView showImageWith:nil];
|
|
@@ -3039,6 +3040,16 @@
|
|
|
if ([self.currentOperationNode isKindOfClass:[OperationNodeVideoBase class]]) {
|
|
|
base = (OperationNodeVideoBase *)self.currentOperationNode;
|
|
|
}
|
|
|
+ LenzResourceItemModel *model = nil;
|
|
|
+ if (self.mode == SDK_CAPTURE_MODE_PANORAMA) {
|
|
|
+ model = self.resourceModel.panoramArray.lastObject;
|
|
|
+ } else if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
+ model = self.resourceModel.aiPanoramArray.lastObject;
|
|
|
+ }
|
|
|
+ if (!model || (!base.isRecording && !self.isVideoStitchStopedWhenRecording)) {
|
|
|
+ [self.stitchkLock unlock];
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
if (self.isVideoStitchStopedWhenRecording &&
|
|
|
(self.stitchResult != LenVideoStitchResultFail && self.stitchResult != LenVideoStitchResultStitchFail)) {
|
|
@@ -3082,6 +3093,7 @@
|
|
|
|
|
|
UIImage *image = [LenStitcher getCurrentPanoramaShowImage];
|
|
|
UIImage *saveImage = [self rotateImageWith:image];
|
|
|
+ base.stitchResult = result;
|
|
|
LenzResourceItemModel *model = nil;
|
|
|
if (self.mode == SDK_CAPTURE_MODE_PANORAMA) {
|
|
|
model = self.resourceModel.panoramArray.lastObject;
|
|
@@ -3089,7 +3101,6 @@
|
|
|
model = self.resourceModel.aiPanoramArray.lastObject;
|
|
|
}
|
|
|
if (!image || !model) {
|
|
|
-// [self updateViewStatusWhenStitchSave:NO];
|
|
|
[self.stitchkLock unlock];
|
|
|
return;
|
|
|
}
|
|
@@ -3129,11 +3140,7 @@
|
|
|
} else {
|
|
|
[SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"拼接大图失败,流程结束"];
|
|
|
}
|
|
|
-
|
|
|
- if (self.isStitchBigImage) {
|
|
|
- self.isVideoStitchStopedWhenRecording = NO;
|
|
|
- self.isStitchBigImage = NO;
|
|
|
- }
|
|
|
+
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
[base takePhotoButtonTouched];
|
|
|
[self stopMotion];
|
|
@@ -3222,11 +3229,15 @@
|
|
|
- (void)removeLastStich {
|
|
|
if (self.mode == SDK_CAPTURE_MODE_PANORAMA) {
|
|
|
if (self.resourceModel.panoramArray.count > 0) {
|
|
|
- [self.resourceModel.panoramArray removeLastObject];
|
|
|
+ if (!self.resourceModel.panoramArray.lastObject.path.length) {
|
|
|
+ [self.resourceModel.panoramArray removeLastObject];
|
|
|
+ }
|
|
|
}
|
|
|
} else if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
if (self.resourceModel.aiPanoramArray.count > 0) {
|
|
|
- [self.resourceModel.aiPanoramArray removeLastObject];
|
|
|
+ if (!self.resourceModel.aiPanoramArray.lastObject.path.length) {
|
|
|
+ [self.resourceModel.aiPanoramArray removeLastObject];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|