This commit is contained in:
启星
2025-08-08 10:49:36 +08:00
parent 6400cf78bb
commit b5ce3d580a
8780 changed files with 978183 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
// Created by Tencent on 2023/06/09.
// Copyright © 2023 Tencent. All rights reserved.
#import "TUICaptureVideoPreviewView.h"
@implementation TUICaptureVideoPreviewView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[(AVCaptureVideoPreviewLayer *)self.layer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
}
return self;
}
- (AVCaptureSession *)captureSessionsion {
return [(AVCaptureVideoPreviewLayer *)self.layer session];
}
- (void)setCaptureSessionsion:(AVCaptureSession *)session {
[(AVCaptureVideoPreviewLayer *)self.layer setSession:session];
}
- (CGPoint)captureDevicePointForPoint:(CGPoint)point {
AVCaptureVideoPreviewLayer *layer = (AVCaptureVideoPreviewLayer *)self.layer;
return [layer captureDevicePointOfInterestForPoint:point];
}
/**
* Make the layer method of the view return the AVCaptureVideoPreviewLayer class object
*/
+ (Class)layerClass {
return [AVCaptureVideoPreviewLayer class];
}
@end