From a3955c07369b0948a256ecba0a7a9cff9f7f8e89 Mon Sep 17 00:00:00 2001 From: Dean Xu Date: Mon, 3 Aug 2020 12:20:08 +0800 Subject: [PATCH] ios takes advantage of NV12 pixelbuffer --- packages/camera/ios/Classes/CameraPlugin.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/camera/ios/Classes/CameraPlugin.m b/packages/camera/ios/Classes/CameraPlugin.m index 42cdb6d5fdf9..c615f512896f 100644 --- a/packages/camera/ios/Classes/CameraPlugin.m +++ b/packages/camera/ios/Classes/CameraPlugin.m @@ -212,6 +212,9 @@ @implementation FLTCam { } // Format used for video and image streaming. FourCharCode const videoFormat = kCVPixelFormatType_32BGRA; +// Set videoFormat to kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange to output +// pixelbuffer in 420v format, the engine compiled with this PR(https://github.com/flutter/engine/pull/20082) can render 420v +//FourCharCode const videoFormat = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange; - (instancetype)initWithCameraName:(NSString *)cameraName resolutionPreset:(NSString *)resolutionPreset