PixelBufferYUV
public class PixelBufferYUV : Output
PixelBufferYUV output presents provided OffscreenRenderTarget
into the CVPixelBuffer
with defined pixelFormatType
and orientation
.
Uses CGImage
and Accelerate
to speedup orientation and color space transformations.
-
Declaration
Swift
public enum PixelFormat
-
Create pixel buffer YUV output
Declaration
Swift
public init( onPresent: @escaping (CVPixelBuffer?) -> Void, pixelFormatType: PixelFormat = .k420YpCbCr8BiPlanarFullRange, orientation: CGImagePropertyOrientation = .up )
Parameters
onPresent
callback is fired when frame is presented
pixelFormatType
YUV pixel format
orientation
frame orientation
-
Declaration
Swift
public func present(renderTarget: OffscreenRenderTarget)