CVPixelBufferPool

A utility object for managing a recyclable set of pixel buffer objects.

Topics

Flushing Pools

Inspecting Pools

func CVPixelBufferPoolGetAttributes(CVPixelBufferPool) -> CFDictionary?

Returns the pool attributes dictionary for a pixel buffer pool.

func CVPixelBufferPoolGetPixelBufferAttributes(CVPixelBufferPool) -> CFDictionary?

Returns the attributes of pixel buffers that will be created from this pool.

func CVPixelBufferPoolGetTypeID() -> CFTypeID

Returns the Core Foundation type identifier of the pixel buffer pool type.

Data Types

class CVPixelBufferPool

A reference to a pixel buffer pool object.

struct CVPixelBufferPoolFlushFlags

Flags to pass to when flushing the pool.

Constants

let kCVPixelBufferPoolMinimumBufferCountKey: CFString

The minimum number of buffers allowed in the pixel buffer pool (type CFNumber).

let kCVPixelBufferPoolMaximumBufferAgeKey: CFString

The maximum allowable age for a buffer in the pixel buffer pool (type CFAbsoluteTime).

let kCVPixelBufferPoolAllocationThresholdKey: CFString

When set, the value associated with this key indicates that a new pixel buffer should not be allocated if the pool already has this many or more pixel buffers allocated. This doesn’t prevent buffers that have already been allocated from being recycled. If this key causes CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:) to fail, it will return kCVReturnWouldExceedAllocationThreshold. (type CFNumber)

Notifications

let kCVPixelBufferPoolFreeBufferNotification: CFString

This notification is posted if a buffer becomes available after the CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:) function has failed due to the value of the kCVPixelBufferPoolAllocationThresholdKey key. This notification will not be posted by the pool if a value for the kCVPixelBufferPoolAllocationThresholdKey key has never been passed to the CVPixelBufferPoolCreatePixelBufferWithAuxAttributes function.

See Also

Data Processing

CVBuffer

An abstract base class that defines how to interact with data buffers.

CVImageBuffer

An interface for managing different types of image data.

CVPixelBuffer

An image buffer that holds pixels in main memory.

CVPixelFormatDescription

An API that provides functions and types for defining custom pixel formats.