Contents

kCVPixelBufferPoolAllocationThresholdKey

The key that limits the number of pixel buffers the pool allocates.

Declaration

let kCVPixelBufferPoolAllocationThresholdKey: CFString

Discussion

Include this key in the auxiliary attributes dictionary you pass to CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:).

The value for this key specifies that the system shouldn’t allocate a new pixel buffer if the pool already holds at least the specified number of allocated pixel buffers. This key doesn’t prevent the system from recycling allocated buffers. If this key causes CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:) to fail, it returns the kCVReturnWouldExceedAllocationThreshold result code.

See Also

Constants