CVPixelBufferPoolCreatePixelBuffer(_:_:_:)
Creates a pixel buffer from a pixel buffer pool, using the allocator that you specify.
Declaration
func CVPixelBufferPoolCreatePixelBuffer(_ allocator: CFAllocator?, _ pixelBufferPool: CVPixelBufferPool, _ pixelBufferOut: UnsafeMutablePointer<CVPixelBuffer?>) -> CVReturnParameters
- allocator:
The allocator to use for creating the pixel buffer. Pass Kcfallocatordefault to use the default allocator. See Predefined Allocators for additional values you can use.
- pixelBufferPool:
The pixel buffer pool for creating the new pixel buffer.
- pixelBufferOut:
On output, the newly created pixel buffer.
Return Value
A Core Video result code. See Result Codes for possible values.
Discussion
This function creates a new pixel buffer using the pixel buffer attributes specified during pool creation. This buffer has default attachments as specified in the pixelBufferAttributes parameter of CVPixelBufferPoolCreate(_:_:_:_:), using either the kCVBufferPropagatedAttachmentsKey or kCVBufferNonPropagatedAttachmentsKey attributes.