The error codes for the AVError domain.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
- Xcode 8.0+
Framework
- AVFoundation
Declaration
struct AVError
The error codes for the AVError domain.
SDKs
Framework
struct AVError
var error Code: Int
The error code returned.
var error User Info: [String : Any]
The user info associated with the error.
var device: AVCapture Device?
The capture device in use.
var file Size: Int64?
The asset file size.
var file Type: AVFile Type?
The asset file type.
var localized Description: String
The error's localized description.
var media Subtypes: [Int]?
An array of media subtypes.
var media Type: AVMedia Type?
The asset media type.
var persistent Track ID: CMPersistent Track ID?
The persistent track ID, if the track exists.
var presentation Time Stamp: CMTime?
The presentation time stamp.
var process ID: Int?
The process ID.
var recording Successfully Finished: Bool?
A Boolean value indicating whether recording finished successfully.
var time: CMTime?
The time duration of the error.
static var error Domain: String
The error domain as a string.
let AVFoundation Error Domain: String
Domain for AVFoundation errors.
let AVError PIDKey: String
The corresponding value is an NSNumber
object containing a process ID number.
let AVError Time Key: String
The corresponding value is an NSValue
object containing a CMTime.
let AVError Device Key: String
The corresponding value is an NSString
object with the name of the device.
let AVError File Size Key: String
The corresponding value is an NSNumber
object containing the size of the file in bytes.
let AVError Media Type Key: String
The corresponding value is an NSString
object that specifies a media type such as video, audio, or metadata. For a list of possible values, see AVFoundation Constants.
let AVError Media Sub Type Key: String
The corresponding value is an array of NSNumber
objects that specify media subtypes. The types are represented by four character codes (4ccs), as defined in Core
for audio media and in CMFormat
for video media.
let AVError Recording Successfully Finished Key: String
The corresponding value is an NSNumber
object with a Boolean value indicating whether recording finished successfully.
static var air Play Controller Requires Internet: AVError .Code
The AirPlay controller requires internet to function.
static var air Play Receiver Requires Internet: AVError .Code
The AirPlay receiver requires internet to function.
static var application Is Not Authorized: AVError .Code
The application is not authorized to play media.
static var application Is Not Authorized To Use Device: AVError .Code
The user has denied this application permission for media capture.
static var composition Track Segments Not Contiguous: AVError .Code
The source media can’t be added because it contains gaps.
static var content Is Not Authorized: AVError .Code
The user is not authorized to play the media.
static var content Is Protected: AVError .Code
The application is not authorized to open the media.
static var content Is Unavailable: AVError .Code
Captured content is unavailable.
static var content Not Updated: AVError .Code
Captured content couldn’t be updated.
static var create Content Key Request Failed: AVError .Code
The app couldn't create a content key request.
static var decode Failed: AVError .Code
The operation could not be completed because some source media could not be decoded.
static var decoder Not Found: AVError .Code
The decoder for the given media was not found.
static var decoder Temporarily Unavailable: AVError .Code
The appropriate decoder is currently not available.
static var device Already Used By Another Session: AVError .Code
Media could not be captured from the device because it is already in use elsewhere in this application.
static var device In Use By Another Application: AVError .Code
The device could not be opened because it is in use by another application.
static var device Is Not Available In Background: AVError .Code
You attempted to start a capture session in the background, which is not allowed on iOS.
static var device Locked For Configuration By Another Process: AVError .Code
You cannot change the settings for the device because another app process is controlling the device.
static var device Not Connected: AVError .Code
The device could not be opened because it is not connected or turned on.
static var device Was Disconnected: AVError .Code
Recording stopped because the device was turned off or disconnected.
static var disk Full: AVError .Code
Recording stopped because the disk is getting full.
static var display Was Disabled: AVError .Code
Screen capture failed because the display was inactive.
static var encoder Not Found: AVError .Code
The requested encoder was not found.
static var encoder Temporarily Unavailable: AVError .Code
The appropriate encoder is currently not available.
static var export Failed: AVError .Code
The export could not be completed.
static var external Playback Not Supported For Asset: AVError .Code
The current asset doesn’t support playback.
static var failed To Load Media Data: AVError .Code
The media resource does not contain all of the data required and cannot be loaded.
static var failed To Parse: AVError .Code
The media resource couldn’t be parsed and cannot be loaded.
static var file Already Exists: AVError .Code
The file couldn’t be created because a file with the same name already exists in the same location.
static var file Failed To Parse: AVError .Code
The media couldn't be parsed.
static var file Format Not Recognized: AVError .Code
The media could not be opened because it is not in a recognized format.
static var file Type Does Not Support Sample References: AVError .Code
The file type doesn’t support sample references.
static var format Unsupported: AVError .Code
The current asset format isn’t supported.
static var incompatible Asset: AVError .Code
The media could not be displayed because the iOS device is not capable of playing the content.
static var invalid Composition Track Segment Duration: AVError .Code
The source media can’t be added because its duration in the destination is invalid.
static var invalid Composition Track Segment Source Duration: AVError .Code
The source media can’t be added because it has no duration.
static var invalid Composition Track Segment Source Start Time: AVError .Code
The source media can’t be added because its start time in the destination is invalid.
static var invalid Output URLPath Extension: AVError .Code
The path extension of the URL was invalid.
static var invalid Source Media: AVError .Code
The operation could not be completed because some source media could not be read.
static var invalid Video Composition: AVError .Code
You attempted to perform a video composition operation that is not supported.
static var malformed Depth: AVError .Code
The depth data wasn’t properly structured.
static var maximum Duration Reached: AVError .Code
Recording stopped because the maximum duration for the file was reached.
static var maximum File Size Reached: AVError .Code
Recording stopped because the maximum size for the file was reached.
static var maximum Number Of Samples For File Format Reached: AVError .Code
Recording stopped because the maximum number of samples for the file was reached.
static var maximum Still Image Capture Requests Exceeded: AVError .Code
The photo could not be taken because there are too many photo requests that haven’t completed yet.
static var media Changed: AVError .Code
Recording stopped because the format of the source media changed.
static var media Discontinuity: AVError .Code
Recording stopped because there was an interruption in the input media.
static var media Services Were Reset: AVError .Code
The operation could not be completed because media services became unavailable.
static var no Compatible Alternates For External Display: AVError .Code
No compatible external displays were found.
static var no Data Captured: AVError .Code
Recording failed because no data was received.
static var no Image At Time: AVError .Code
There is no image at that time in the media.
static var no Longer Playable: AVError .Code
The asset is no longer playable.
static var no Source Track: AVError .Code
The asset has no source track.
static var operation Interrupted: AVError .Code
An interruption occurred while an AVAssetWriter, AVAsset
or AVAsset
was executing.
static var operation Not Allowed: AVError .Code
The user requested an unsupported operation.
static var operation Not Supported For Asset: AVError .Code
You attempted to perform an operation with the asset that is not supported.
static var operation Not Supported For Preset: AVError .Code
You attempted to perform an operation that’s not supported for the current preset.
static var out Of Memory: AVError .Code
The operation could not be completed because there is not enough memory to process all of the media.
static var recording Already In Progress: AVError .Code
Movie file output on iOS supports only one recording at a time.
static var reference Forbidden By Reference Policy: AVError .Code
The asset attempted to follow a reference that was not allowed.
static var screen Capture Failed: AVError .Code
There was an unexpected problem that prevented screen capture.
static var server Incorrectly Configured: AVError .Code
The HTTP server sending the media resource is not configured as expected.
static var session Configuration Changed: AVError .Code
Recording stopped because the configuration of media sources and destinations changed.
static var session Hardware Cost Overage: AVError .Code
You requested too many camera hardware resources.
static var session Not Running: AVError .Code
The recording couldn’t start because the session isn’t running.
static var session Was Interrupted: AVError .Code
Recording stopped because it was interrupted.
static var torch Level Unavailable: AVError .Code
The specified torch level is valid but currently unavailable, possibly due to overheating.
static var undecodable Media Data: AVError .Code
The media data could not be decoded.
static var unknown: AVError .Code
Reason for the error is unknown.
static var unsupported Output Settings: AVError .Code
The user requested unsupported output settings.
static var video Compositor Failed: AVError .Code
The video compositor couldn’t composite frames.
static func != (AVError, AVError) -> Bool
Returns a Boolean value indicating whether two values are not equal.
enum AVError .Code
An enumeration of possible error codes encountered in AVCapture.