Use AVVideoScalingModeResizeAspect instead of abusing extended pixels
This not only eliminates the hand-rolled aspect ratio correction (which didn't actually handle scaling), but it also avoids us having to write to the GPU frames to add padding which improves performance.
This commit is contained in:
@@ -20,11 +20,6 @@ struct CaptureSession {
|
||||
@property (nonatomic, assign) OSType pixelFormat;
|
||||
@property (nonatomic, assign) int frameWidth;
|
||||
@property (nonatomic, assign) int frameHeight;
|
||||
@property (nonatomic, assign) float scaling;
|
||||
@property (nonatomic, assign) int paddingLeft;
|
||||
@property (nonatomic, assign) int paddingRight;
|
||||
@property (nonatomic, assign) int paddingTop;
|
||||
@property (nonatomic, assign) int paddingBottom;
|
||||
|
||||
typedef bool (^FrameCallbackBlock)(CMSampleBufferRef);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user