---
title: "CVPixelBufferPoolCreate(_:_:_:_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvpixelbufferpoolcreate(_:_:_:_:)"
---

# CVPixelBufferPoolCreate(_:_:_:_:)

Creates a pixel buffer pool using the allocator and attributes that you specify.

## Declaration

```swift
func CVPixelBufferPoolCreate(_ allocator: CFAllocator?, _ poolAttributes: CFDictionary?, _ pixelBufferAttributes: CFDictionary?, _ poolOut: UnsafeMutablePointer<CVPixelBufferPool?>) -> CVReturn
```

## Parameters

- `allocator`: The allocator to use for creating the buffer pool. Pass doc://com.apple.documentation/documentation/CoreFoundation/kCFAllocatorDefault to use the default allocator. See doc://com.apple.documentation/documentation/CoreFoundation/predefined-allocators for additional values you can use.
- `poolAttributes`: A Core Foundation dictionary that contains the attributes for the pixel buffer pool. See the Constants topic group below for possible values.
- `pixelBufferAttributes`: An optional dictionary that contains the attributes to use to create new pixel buffers within the pool. See doc://com.apple.corevideo/documentation/CoreVideo/pixel-buffer-attribute-keys for possible values.
- `poolOut`: On output, the newly created pixel buffer pool.

## Return Value

Return Value A Core Video result code. See Result Codes for possible values.

## Discussion

Discussion Use CVPixelBufferPoolRelease to release ownership of the poolOut object when you’re done with it.

## See Also

### Creating pools

- [CVPixelBufferPoolCreatePixelBuffer(_:_:_:)](corevideo/cvpixelbufferpoolcreatepixelbuffer(_:_:_:).md)
- [CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)](corevideo/cvpixelbufferpoolcreatepixelbufferwithauxattributes(_:_:_:_:).md)
