<!--
{
  "documentType" : "article",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/result-codes",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Result Codes"
}
-->

# Result Codes

Describes the result codes generated by Core Video operations.

## Topics

### Common

Result codes related to a number of Core Video operations.

[`kCVReturnAllocationFailed`](/documentation/CoreVideo/kCVReturnAllocationFailed)

Memory allocation for a buffer or buffer pool failed.

[`kCVReturnError`](/documentation/CoreVideo/kCVReturnError)

An otherwise undefined error occurred.

[`kCVReturnInvalidArgument`](/documentation/CoreVideo/kCVReturnInvalidArgument)

Invalid function parameter. For example, out of range or the wrong type.

[`kCVReturnSuccess`](/documentation/CoreVideo/kCVReturnSuccess)

Indicates the operation completed successfully.

[`kCVReturnUnsupported`](/documentation/CoreVideo/kCVReturnUnsupported)

[`kCVReturnLast`](/documentation/CoreVideo/kCVReturnLast)

Placeholder to mark the end of Core Video result codes (not returned by any functions).

[`kCVReturnFirst`](/documentation/CoreVideo/kCVReturnFirst)

Placeholder to mark the beginning of Core Video result codes (not returned by any functions).

### Pixel Buffer

Result codes related to [CVPixelBuffer](/documentation/CoreVideo/cvpixelbuffer-q2e)

An image buffer that holds pixels in main memory. operations.

[`kCVReturnInvalidPixelBufferAttributes`](/documentation/CoreVideo/kCVReturnInvalidPixelBufferAttributes)

A buffer cannot be created with the specified attributes.

[`kCVReturnInvalidPixelFormat`](/documentation/CoreVideo/kCVReturnInvalidPixelFormat)

The buffer does not support the specified pixel format.

[`kCVReturnInvalidSize`](/documentation/CoreVideo/kCVReturnInvalidSize)

The buffer cannot support the requested buffer size (usually too big).

[`kCVReturnPixelBufferNotMetalCompatible`](/documentation/CoreVideo/kCVReturnPixelBufferNotMetalCompatible)

The pixel buffer is not compatible with Metal due to an unsupported buffer size, pixel format, or attribute.

[`kCVReturnPixelBufferNotOpenGLCompatible`](/documentation/CoreVideo/kCVReturnPixelBufferNotOpenGLCompatible)

The pixel buffer is not compatible with OpenGL due to an unsupported buffer size, pixel format, or attribute.

### Buffer Pool

Result codes related to [CVPixelBufferPool](/documentation/CoreVideo/CVPixelBufferPool-77o)

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

[`kCVReturnRetry`](/documentation/CoreVideo/kCVReturnRetry)

A scan hasn’t completely traversed the `CVBufferPool` due to a concurrent operation.

[`kCVReturnInvalidPoolAttributes`](/documentation/CoreVideo/kCVReturnInvalidPoolAttributes)

A buffer pool cannot be created with the specified attributes.

[`kCVReturnPoolAllocationFailed`](/documentation/CoreVideo/kCVReturnPoolAllocationFailed)

Allocation for a buffer pool failed, most likely due to a lack of resources. Check to make sure your parameters are in range.

[`kCVReturnWouldExceedAllocationThreshold`](/documentation/CoreVideo/kCVReturnWouldExceedAllocationThreshold)

Allocation for a pixel buffer failed because the threshold value set for the [`kCVPixelBufferPoolAllocationThresholdKey`](/documentation/CoreVideo/kCVPixelBufferPoolAllocationThresholdKey) key in the [`CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)`](/documentation/CoreVideo/CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)) function would be surpassed.

### Display Link

Result codes related to [CVDisplayLink](/documentation/CoreVideo/cvdisplaylink-k0k)

A high-priority thread that notifies your app when a given display will need each frame. operations.

[`kCVReturnInvalidDisplay`](/documentation/CoreVideo/kCVReturnInvalidDisplay)

The display specified when creating a display link is invalid.

[`kCVReturnDisplayLinkAlreadyRunning`](/documentation/CoreVideo/kCVReturnDisplayLinkAlreadyRunning)

The specified display link is already running.

[`kCVReturnDisplayLinkNotRunning`](/documentation/CoreVideo/kCVReturnDisplayLinkNotRunning)

The specified display link is not running.

[`kCVReturnDisplayLinkCallbacksNotSet`](/documentation/CoreVideo/kCVReturnDisplayLinkCallbacksNotSet)

No callback registered for the specified display link. You must set either the output callback or both the render and display callbacks.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)