|
@@ -3124,33 +3124,73 @@
|
|
|
|
|
|
if (self.isVideoStitchStopedWhenRecording &&
|
|
if (self.isVideoStitchStopedWhenRecording &&
|
|
(self.stitchResult != LenVideoStitchResultFail && self.stitchResult != LenVideoStitchResultStitchFail)) {
|
|
(self.stitchResult != LenVideoStitchResultFail && self.stitchResult != LenVideoStitchResultStitchFail)) {
|
|
- [self updateViewStatusWhenStitchSave:YES];
|
|
|
|
- self.isStitchBigImage = YES;
|
|
|
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
+ if (self.stitchView.hidden) {
|
|
|
|
+ [self updateViewStatusWhenStitchSave:YES];
|
|
|
|
+ self.isStitchBigImage = YES;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
LenVideoStitchDirction dirction = LenVideoStitchDirctionLeft;
|
|
LenVideoStitchDirction dirction = LenVideoStitchDirctionLeft;
|
|
if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewUp) {
|
|
if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewUp) {
|
|
- if (self.currentTgDirection == TgDirectionDown) {
|
|
|
|
|
|
+// if (self.currentTgDirection == TgDirectionDown) {
|
|
|
|
+// dirction = LenVideoStitchDirctionDown;
|
|
|
|
+// } else {
|
|
|
|
+// dirction = LenVideoStitchDirctionUp;
|
|
|
|
+// }
|
|
|
|
+ if (self.currentTgDirection == TgDirectionPortrait) {
|
|
|
|
+ dirction = LenVideoStitchDirctionUp;
|
|
|
|
+ } else if (self.currentTgDirection == TgDirectionDown) {
|
|
dirction = LenVideoStitchDirctionDown;
|
|
dirction = LenVideoStitchDirctionDown;
|
|
|
|
+ } else if (self.currentTgDirection == TgDirectionLeft) {
|
|
|
|
+ dirction = LenVideoStitchDirctionRight;
|
|
} else {
|
|
} else {
|
|
- dirction = LenVideoStitchDirctionUp;
|
|
|
|
|
|
+ dirction = LenVideoStitchDirctionLeft;
|
|
}
|
|
}
|
|
} else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewDown) {
|
|
} else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewDown) {
|
|
- if (self.currentTgDirection == TgDirectionDown) {
|
|
|
|
|
|
+// if (self.currentTgDirection == TgDirectionDown) {
|
|
|
|
+// dirction = LenVideoStitchDirctionUp;
|
|
|
|
+// } else {
|
|
|
|
+// dirction = LenVideoStitchDirctionDown;
|
|
|
|
+// }
|
|
|
|
+ if (self.currentTgDirection == TgDirectionPortrait) {
|
|
|
|
+ dirction = LenVideoStitchDirctionDown;
|
|
|
|
+ } else if (self.currentTgDirection == TgDirectionDown) {
|
|
dirction = LenVideoStitchDirctionUp;
|
|
dirction = LenVideoStitchDirctionUp;
|
|
|
|
+ } else if (self.currentTgDirection == TgDirectionLeft) {
|
|
|
|
+ dirction = LenVideoStitchDirctionLeft;
|
|
} else {
|
|
} else {
|
|
- dirction = LenVideoStitchDirctionDown;
|
|
|
|
|
|
+ dirction = LenVideoStitchDirctionRight;
|
|
}
|
|
}
|
|
} else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewLeft) {
|
|
} else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewLeft) {
|
|
- if (self.currentTgDirection == TgDirectionDown) {
|
|
|
|
|
|
+// if (self.currentTgDirection == TgDirectionDown) {
|
|
|
|
+// dirction = LenVideoStitchDirctionRight;
|
|
|
|
+// } else {
|
|
|
|
+// dirction = LenVideoStitchDirctionLeft;
|
|
|
|
+// }
|
|
|
|
+ if (self.currentTgDirection == TgDirectionPortrait) {
|
|
|
|
+ dirction = LenVideoStitchDirctionLeft;
|
|
|
|
+ } else if (self.currentTgDirection == TgDirectionDown) {
|
|
dirction = LenVideoStitchDirctionRight;
|
|
dirction = LenVideoStitchDirctionRight;
|
|
|
|
+ } else if (self.currentTgDirection == TgDirectionLeft) {
|
|
|
|
+ dirction = LenVideoStitchDirctionUp;
|
|
} else {
|
|
} else {
|
|
- dirction = LenVideoStitchDirctionLeft;
|
|
|
|
|
|
+ dirction = LenVideoStitchDirctionDown;
|
|
}
|
|
}
|
|
} else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewRight) {
|
|
} else if (self.panoramOrientationGuideView.selectedItemIndex == PanoramaOrientationViewRight) {
|
|
- if (self.currentTgDirection == TgDirectionDown) {
|
|
|
|
|
|
+// if (self.currentTgDirection == TgDirectionDown) {
|
|
|
|
+// dirction = LenVideoStitchDirctionLeft;
|
|
|
|
+// } else {
|
|
|
|
+// dirction = LenVideoStitchDirctionRight;
|
|
|
|
+// }
|
|
|
|
+ if (self.currentTgDirection == TgDirectionPortrait) {
|
|
|
|
+ dirction = LenVideoStitchDirctionRight;
|
|
|
|
+ } else if (self.currentTgDirection == TgDirectionDown) {
|
|
dirction = LenVideoStitchDirctionLeft;
|
|
dirction = LenVideoStitchDirctionLeft;
|
|
|
|
+ } else if (self.currentTgDirection == TgDirectionLeft) {
|
|
|
|
+ dirction = LenVideoStitchDirctionDown;
|
|
} else {
|
|
} else {
|
|
- dirction = LenVideoStitchDirctionRight;
|
|
|
|
|
|
+ dirction = LenVideoStitchDirctionUp;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
dirction = LenVideoStitchDirctionAny;
|
|
dirction = LenVideoStitchDirctionAny;
|
|
@@ -3161,7 +3201,6 @@
|
|
isStop:self.isVideoStitchStopedWhenRecording
|
|
isStop:self.isVideoStitchStopedWhenRecording
|
|
complete:^(LenVideoStitchResult result, LenVideoStitchNeedSave needSave) {
|
|
complete:^(LenVideoStitchResult result, LenVideoStitchNeedSave needSave) {
|
|
self.stitchResult = result;
|
|
self.stitchResult = result;
|
|
-
|
|
|
|
UIImage *image = [LenStitcher getCurrentPanoramaShowImage];
|
|
UIImage *image = [LenStitcher getCurrentPanoramaShowImage];
|
|
UIImage *saveImage = [self rotateImageWith:image];
|
|
UIImage *saveImage = [self rotateImageWith:image];
|
|
base.stitchResult = result;
|
|
base.stitchResult = result;
|
|
@@ -3182,26 +3221,28 @@
|
|
} else {
|
|
} else {
|
|
|
|
|
|
if (!base.isRecording && self.isVideoStitchStopedWhenRecording) {
|
|
if (!base.isRecording && self.isVideoStitchStopedWhenRecording) {
|
|
- //停止拼接,移除保存中 非success数据
|
|
|
|
- if (self.mode == SDK_CAPTURE_MODE_PANORAMA) {
|
|
|
|
- NSMutableArray *array = [NSMutableArray array];
|
|
|
|
- [self.resourceModel.panoramArray enumerateObjectsUsingBlock:^(LenzResourceItemModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
- if (obj.path.length) {
|
|
|
|
- [array addObject:obj];
|
|
|
|
- }
|
|
|
|
- }];
|
|
|
|
- self.resourceModel.panoramArray = array;
|
|
|
|
- } else if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
|
- NSMutableArray *array = [NSMutableArray array];
|
|
|
|
- [self.resourceModel.aiPanoramArray enumerateObjectsUsingBlock:^(LenzResourceItemModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
- if (obj.path.length) {
|
|
|
|
- [array addObject:obj];
|
|
|
|
- }
|
|
|
|
- }];
|
|
|
|
- self.resourceModel.aiPanoramArray = array;
|
|
|
|
|
|
+ if (result == LenVideoStitchResultFail || result == LenVideoStitchResultStitchFail) {
|
|
|
|
+ //停止拼接,移除保存中 非success数据
|
|
|
|
+ if (self.mode == SDK_CAPTURE_MODE_PANORAMA) {
|
|
|
|
+ NSMutableArray *array = [NSMutableArray array];
|
|
|
|
+ [self.resourceModel.panoramArray enumerateObjectsUsingBlock:^(LenzResourceItemModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
+ if (obj.path.length) {
|
|
|
|
+ [array addObject:obj];
|
|
|
|
+ }
|
|
|
|
+ }];
|
|
|
|
+ self.resourceModel.panoramArray = array;
|
|
|
|
+ } else if (self.mode == SDK_CAPTURE_MODE_INTELLEGENCE_PANORAMA) {
|
|
|
|
+ NSMutableArray *array = [NSMutableArray array];
|
|
|
|
+ [self.resourceModel.aiPanoramArray enumerateObjectsUsingBlock:^(LenzResourceItemModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
|
|
+ if (obj.path.length) {
|
|
|
|
+ [array addObject:obj];
|
|
|
|
+ }
|
|
|
|
+ }];
|
|
|
|
+ self.resourceModel.aiPanoramArray = array;
|
|
|
|
+ }
|
|
|
|
+ [self updateViewStatusWhenStitchSave:NO];
|
|
|
|
+ [self updateViewStatus];
|
|
}
|
|
}
|
|
- [self updateViewStatusWhenStitchSave:NO];
|
|
|
|
- [self updateViewStatus];
|
|
|
|
[self.stitchkLock unlock];
|
|
[self.stitchkLock unlock];
|
|
return;
|
|
return;
|
|
}
|
|
}
|