---
title: "CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)"
framework: corevideo
role: symbol
role_heading: Function
path: "corevideo/cvpixelbufferpoolcreatepixelbufferwithauxattributes(_:_:_:_:)"
---

# CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)

Creates a new pixel buffer with auxiliary attributes from the pool.

## Declaration

```swift
func CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_ allocator: CFAllocator?, _ pixelBufferPool: CVPixelBufferPool, _ auxAttributes: CFDictionary?, _ pixelBufferOut: UnsafeMutablePointer<CVPixelBuffer?>) -> 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.
- `pixelBufferPool`: The pixel buffer pool for creating the new pixel buffer.
- `auxAttributes`: An optional dictionary of auxiliary attributes that describes the allocation request. See the Constants topic group below for possible values.
- `pixelBufferOut`: On output, the newly created pixel buffer.

## Return Value

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

## Discussion

Discussion This function creates a new CVPixelBuffer object using the pixel buffer attributes specified during pool creation and the attributes specified in the auxAttributes parameter.

## See Also

### Creating pools

- [CVPixelBufferPoolCreate(_:_:_:_:)](corevideo/cvpixelbufferpoolcreate(_:_:_:_:).md)
- [CVPixelBufferPoolCreatePixelBuffer(_:_:_:)](corevideo/cvpixelbufferpoolcreatepixelbuffer(_:_:_:).md)
