lxy 1 year ago
parent
commit
4b29a09db3

+ 2 - 2
LenzCameraNativeModuleForRN/Classes/inner/Manager/CameraManager.m

@@ -86,8 +86,8 @@
         [device setActiveFormat:bestFormat];
     }
     
-    [device setActiveVideoMaxFrameDuration:CMTimeMake(1, 10)];
-    [device setActiveVideoMinFrameDuration:CMTimeMake(1, 10)];
+    [device setActiveVideoMaxFrameDuration:CMTimeMake(1, 20)];
+    [device setActiveVideoMinFrameDuration:CMTimeMake(1, 20)];
     
     [device unlockForConfiguration];
     

+ 13 - 7
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -1477,7 +1477,7 @@
     });
     [self stopMotion];
     [self.panoramaGuideView showImageWith:nil];
-    [self updateViewStatus];
+//    [self updateViewStatus];
 
 }
 - (void)updateViewStatusWhenStitchSave:(BOOL)isSaveIng {
@@ -3031,7 +3031,7 @@
 - (void)captureOutput:(AVCaptureOutput *)output didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
     @autoreleasepool {
         if (connection == [self.videoDataOutput connectionWithMediaType:AVMediaTypeVideo]) {
-            
+
             [self.stitchkLock lock];
             OperationNodeVideoBase *base = nil;
             if ([self.currentOperationNode isKindOfClass:[OperationNodeVideoBase class]]) {
@@ -3078,7 +3078,6 @@
                                 complete:^(LenVideoStitchResult result, LenVideoStitchNeedSave needSave) {
                 self.stitchResult = result;
                 
-                self.isVideoStitchStopedWhenRecording = NO;
                 UIImage *image = [LenStitcher getCurrentPanoramaShowImage];
                 UIImage *saveImage = [self rotateImageWith:image];
                 LenzResourceItemModel *model = nil;
@@ -3088,6 +3087,7 @@
                     model = self.resourceModel.aiPanoramArray.lastObject;
                 }
                 if (!image || !model) {
+//                    [self updateViewStatusWhenStitchSave:NO];
                     [self.stitchkLock unlock];
                     return;
                 }
@@ -3097,7 +3097,7 @@
                     [self saveStitch:model image:image saveImage:saveImage base:base needSave:needSave];
                 } else {
  
-                    if (!base.isRecording) {
+                    if (!base.isRecording && self.isVideoStitchStopedWhenRecording) {
                         //停止拼接,移除保存中 非success数据
                         if (self.mode == SDK_CAPTURE_MODE_PANORAMA) {
                             NSMutableArray *array = [NSMutableArray array];
@@ -3128,8 +3128,10 @@
                             [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"拼接大图失败,流程结束"];
                         }
                         
-                        self.isVideoStitchStopedWhenRecording = NO;
-                        self.isStitchBigImage = NO;
+                        if (self.isStitchBigImage) {
+                            self.isVideoStitchStopedWhenRecording = NO;
+                            self.isStitchBigImage = NO;
+                        }
                         dispatch_async(dispatch_get_main_queue(), ^{
                             [base takePhotoButtonTouched];
                             [self stopMotion];
@@ -3177,11 +3179,15 @@
                 NSString *path = [LenzDataManager saveImageWith:UIImageJPEGRepresentation(saveImage, .8) mode:self.mode];
                 model.path = path;
             }
+            if (self.isStitchBigImage) {
+                self.isVideoStitchStopedWhenRecording = NO;
+                self.isStitchBigImage = NO;
+            }
             [self updateViewStatusWhenStitchSave:NO];
-            self.isStitchBigImage = NO;
             [self.panoramaGuideView clearImage];
             [self updateViewStatus];
             [self.panoramaGuideView showImageWith:nil];
+
         } else {
             if (base.isRecording) {
                 __block BOOL keyFrame = NO;

+ 1 - 1
LenzSDK.podspec

@@ -8,7 +8,7 @@
 
 Pod::Spec.new do |s|
   s.name             = 'LenzSDK'
-  s.version          = '2.3.3'
+  s.version          = '2.3.4'
   s.summary          = 'A short description of LenzSDK.'
 
 # This description is used to generate tags and improve search results.