One Logo Pool Ball
CoreVideo · IOS API REFERENCE

CVError

struct · iOS 26.0+ · SDK 27.1

@frozen struct CVError

`CVError` wraps `CVReturn` values to present them as Swift Error values. This type is used for all errors thrown in the CoreVideo framework. All `CVReturn` values are provided as static constants.

Members (18)

get · iOS 26.0+

description

TypeScript
getDescription($self: CVError): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 26.0+

invalidSize

TypeScript
get invalidSize(): CVError
Swift declaration
static let invalidSize: CVError

The requested size (most likely too big) is not supported for the CVBuffer type.

get · iOS 26.0+

unsupported

TypeScript
get unsupported(): CVError
Swift declaration
static let unsupported: CVError

This operation is unsupported on this data type.

get · iOS 26.0+

internalError

TypeScript
get internalError(): CVError
Swift declaration
static let internalError: CVError

Error with an undetermined cause.

get · iOS 26.0+

invalidArgument

TypeScript
get invalidArgument(): CVError
Swift declaration
static let invalidArgument: CVError

At least one of the arguments passed in is not valid. Either out of range or the wrong type.

get · iOS 26.0+

allocationFailed

TypeScript
get allocationFailed(): CVError
Swift declaration
static let allocationFailed: CVError

The allocation for a buffer or buffer pool failed. Most likely because of lack of resources.

get · iOS 26.0+

errorDescription

TypeScript
getErrorDescription($self: CVError): (string) | null
Swift declaration
var errorDescription: String? { get }

Localized messages describing the error.

get · iOS 26.0+

invalidPixelFormat

TypeScript
get invalidPixelFormat(): CVError
Swift declaration
static let invalidPixelFormat: CVError

The requested pixel format is not supported for the CVBuffer type.

get · iOS 26.0+

poolAllocationFailed

TypeScript
get poolAllocationFailed(): CVError
Swift declaration
static let poolAllocationFailed: CVError

The allocation for the buffer pool failed. Most likely because of lack of resources. Check if your parameters are in range.

get · iOS 26.0+

invalidPoolAttributes

TypeScript
get invalidPoolAttributes(): CVError
Swift declaration
static let invalidPoolAttributes: CVError

A CVBufferPool cannot be created with the given attributes.

get · iOS 26.0+

invalidPixelBufferAttributes

TypeScript
get invalidPixelBufferAttributes(): CVError
Swift declaration
static let invalidPixelBufferAttributes: CVError

A CVBuffer cannot be created with the given attributes.

get · iOS 26.0+

pixelBufferNotMetalCompatible

TypeScript
get pixelBufferNotMetalCompatible(): CVError
Swift declaration
static let pixelBufferNotMetalCompatible: CVError

The Buffer cannot be used with Metal as either its size, pixel format or attributes are not supported by Metal.

get · iOS 26.0+

wouldExceedAllocationThreshold

TypeScript
get wouldExceedAllocationThreshold(): CVError
Swift declaration
static let wouldExceedAllocationThreshold: CVError

The allocation request failed because it would have exceeded a specified allocation threshold (see kCVPixelBufferPoolAllocationThresholdKey).

static · iOS 26.0+

check

TypeScript
check(status: number): void
Swift declaration
static func check(_ status: CVReturn) throws(CVError)

Throws an instance of `CVError` if `status` is not `kCVReturnSuccess`

get · iOS 26.0+

retry

TypeScript
get retry(): CVError
Swift declaration
static let retry: CVError

A scan hasn't completely traversed the CVBufferPool due to a concurrent operation. The client can retry the scan.

init · iOS 26.0+

init

TypeScript
init(rawValue: number): (CVError) | null
Swift declaration
init?(rawValue: CVReturn)

Creates `CVError` with the given error code. Returns nil if `rawValue` is `kCVReturnSuccess`

get · iOS 26.0+

rawValue

TypeScript
getRawValue($self: CVError): number
Swift declaration
var rawValue: CVReturn

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

set · iOS 26.0+

rawValue

TypeScript
setRawValue($self: CVError, value: number): void
Swift declaration
var rawValue: CVReturn

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

Skipped declarations

No declarations were skipped in this snapshot.

All CoreVideo types →