AVFoundation macOS 12.3 to 13.0 API Differences

AVAsset.h
Added AVURLAssetHTTPUserAgentKey
Added AVURLAssetPrimarySessionIdentifierKey
Added AVURLAsset.httpSessionIdentifier
Modified -[AVAsset trackWithTrackID:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTrackWithTrackID:completionHandler:

Modified -[AVAsset tracksWithMediaType:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTracksWithMediaType:completionHandler:

Modified -[AVAsset tracksWithMediaCharacteristic:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTracksWithMediaCharacteristic:completionHandler:

Modified -[AVAsset metadataForFormat:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadMetadataForFormat:completionHandler:

Modified -[AVAsset chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadChapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:completionHandler:

Modified -[AVAsset chapterMetadataGroupsBestMatchingPreferredLanguages:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadChapterMetadataGroupsBestMatchingPreferredLanguages:completionHandler

Modified -[AVAsset mediaSelectionGroupForMediaCharacteristic:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadMediaSelectionGroupForMediaCharacteristic:completionHandler:

Modified -[AVURLAsset compatibleTrackForCompositionTrack:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedfindCompatibleTrackForCompositionTrack:completionHandler:

Modified -[AVFragmentedAsset trackWithTrackID:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTrackWithTrackID:completionHandler:

Modified -[AVFragmentedAsset tracksWithMediaType:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTracksWithMediaType:completionHandler:

Modified -[AVFragmentedAsset tracksWithMediaCharacteristic:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTracksWithMediaCharacteristic:completionHandler:

AVAssetExportSession.h
Added AVAssetTrackGroupOutputHandling
Added AVAssetTrackGroupOutputHandlingNone
Added AVAssetTrackGroupOutputHandlingPreserveAlternateTracks
Added AVAssetTrackGroupOutputHandlingDefaultPolicy
Added AVAssetExportSession.audioTrackGroupHandling
Modified +[AVAssetExportSession exportPresetsCompatibleWithAsset:]
AvailabilityReplacement
FromAvailablenone
ToDeprecateddetermineCompatibilityOfExportPreset:withAsset:outputFileType:completionHandler:

AVAssetImageGenerator.h
Added -[AVAssetImageGenerator generateCGImageAsynchronouslyForTime:completionHandler:]
Modified -[AVAssetImageGenerator copyCGImageAtTime:actualTime:error:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedgenerateCGImageAsynchronouslyForTime:completionHandler:

AVAssetPlaybackAssistant.h
Added AVAssetPlaybackConfigurationOption
Added AVAssetPlaybackConfigurationOptionStereoVideo
Added AVAssetPlaybackConfigurationOptionStereoMultiviewVideo
Added AVAssetPlaybackAssistant
Added +[AVAssetPlaybackAssistant assetPlaybackAssistantWithAsset:]
Added -[AVAssetPlaybackAssistant loadPlaybackConfigurationOptionsWithCompletionHandler:]
AVAssetResourceLoader.h
Added AVAssetResourceLoadingContentInformationRequest.entireLengthAvailableOnDemand
AVAssetTrack.h
Modified -[AVAssetTrack segmentForTrackTime:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadSegmentForTrackTime:completionHandler:

Modified -[AVAssetTrack samplePresentationTimeForTrackTime:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadSamplePresentationTimeForTrackTime:completionHandler:

Modified -[AVAssetTrack metadataForFormat:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadMetadataForFormat:completionHandler:

Modified -[AVAssetTrack associatedTracksOfType:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadAssociatedTracksOfType:completionHandler:

AVBase.h
Added #def AVF_DEPRECATED_FOR_SWIFT_ONLY
Added #def AVF_DEPLOYING_TO_2022_RELEASES_AND_LATER
AVCaption.h
Added -[AVCaptionRegion encodeWithCoder:]
Added -[AVCaptionRegion isEqual:]
Added -[AVCaptionRegion mutableCopyWithZone:]
AVCaptureDevice.h
Added AVCaptureDeviceTypeDeskViewCamera
Added AVCaptureDevice.userPreferredCamera
Added AVCaptureDevice.systemPreferredCamera
Added AVCaptureDevice.continuityCamera
Added AVCaptureDevice.companionDeskViewCamera
Added AVCaptureDevice.studioLightEnabled
Added AVCaptureDevice.studioLightActive
Added AVCaptureDeviceFormat.studioLightSupported
Added AVCaptureDeviceFormat.videoFrameRateRangeForStudioLight
AVCaptureMetadataOutput.h
Added AVCaptureMetadataOutput
Added -[AVCaptureMetadataOutput init]
Added +[AVCaptureMetadataOutput new]
Added -[AVCaptureMetadataOutput setMetadataObjectsDelegate:queue:]
Added AVCaptureMetadataOutput.metadataObjectsDelegate
Added AVCaptureMetadataOutput.metadataObjectsCallbackQueue
Added AVCaptureMetadataOutput.availableMetadataObjectTypes
Added AVCaptureMetadataOutput.metadataObjectTypes
Added AVCaptureMetadataOutput.rectOfInterest
Added AVCaptureMetadataOutputObjectsDelegate
Added -[AVCaptureMetadataOutputObjectsDelegate captureOutput:didOutputMetadataObjects:fromConnection:]
AVCapturePhotoOutput.h
Added AVCapturePhotoQualityPrioritizationSpeed
Added AVCapturePhotoQualityPrioritizationBalanced
Added AVCapturePhotoQualityPrioritizationQuality
Added AVCapturePhotoOutput.maxPhotoQualityPrioritization
Added AVCapturePhotoOutput.supportedFlashModes
Added AVCapturePhotoSettings.flashMode
Added AVCapturePhotoSettings.photoQualityPrioritization
Added AVCapturePhotoSettings.highResolutionPhotoEnabled
AVComposition.h
Added -[AVMutableComposition insertTimeRange:ofAsset:atTime:completionHandler:]
Added -[AVComposition metadataForFormat:]
Added -[AVComposition chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:]
Added -[AVComposition chapterMetadataGroupsBestMatchingPreferredLanguages:]
Added -[AVComposition mediaSelectionGroupForMediaCharacteristic:]
Added -[AVComposition unusedTrackID]
Modified -[AVMutableComposition insertTimeRange:ofAsset:atTime:error:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedinsertTimeRange:ofAsset:atTime:completionHandler:

AVCompositionTrack.h
Added -[AVCompositionTrack hasMediaCharacteristic:]
Added -[AVCompositionTrack samplePresentationTimeForTrackTime:]
Added -[AVCompositionTrack metadataForFormat:]
Added -[AVCompositionTrack associatedTracksOfType:]
AVError.h
Added AVErrorInvalidSampleCursor
Added AVErrorFailedToLoadSampleData
Added AVErrorAirPlayReceiverTemporarilyUnavailable
AVGeometry.h
Added NSValue (NSValueCMVideoDimensionsExtensions)
Added +[NSValue valueWithCMVideoDimensions:]
Added NSValue.CMVideoDimensionsValue
AVMovie.h
Added -[AVMutableMovie metadataForFormat:]
Added -[AVMutableMovie chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:]
Added -[AVMutableMovie chapterMetadataGroupsBestMatchingPreferredLanguages:]
Added -[AVMutableMovie mediaSelectionGroupForMediaCharacteristic:]
Added -[AVMutableMovie unusedTrackID]
Modified -[AVMovie trackWithTrackID:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTrackWithTrackID:completionHandler:

Modified -[AVMovie tracksWithMediaType:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTracksWithMediaType:completionHandler:

Modified -[AVMovie tracksWithMediaCharacteristic:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTracksWithMediaCharacteristic:completionHandler:

Modified -[AVFragmentedMovie trackWithTrackID:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTrackWithTrackID:completionHandler:

Modified -[AVFragmentedMovie tracksWithMediaType:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedloadTracksWithMediaType:completionHandler:

Modified -[AVFragmentedMovie tracksWithMediaCharacteristic:]
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedloadTracksWithMediaCharacteristic:completionHandler:

AVMovieTrack.h
Added -[AVMutableMovieTrack hasMediaCharacteristic:]
Added -[AVMutableMovieTrack segmentForTrackTime:]
Added -[AVMutableMovieTrack samplePresentationTimeForTrackTime:]
Added -[AVMutableMovieTrack metadataForFormat:]
Added -[AVMutableMovieTrack associatedTracksOfType:]
AVPlayer.h
Added AVPlayer.defaultRate
AVPlayerInterstitialEventController.h
Added AVPlayerInterstitialEventCue
Added AVPlayerInterstitialEventNoCue
Added AVPlayerInterstitialEventJoinCue
Added AVPlayerInterstitialEventLeaveCue
Added +[AVPlayerInterstitialEvent interstitialEventWithPrimaryItem:time:]
Added +[AVPlayerInterstitialEvent interstitialEventWithPrimaryItem:date:]
Added AVPlayerInterstitialEvent.alignsStartWithPrimarySegmentBoundary
Added AVPlayerInterstitialEvent.alignsResumptionWithPrimarySegmentBoundary
Added AVPlayerInterstitialEvent.cue
Added AVPlayerInterstitialEvent.willPlayOnce
Modified AVPlayerInterstitialEvent
Protocols
Fromnone
ToNSCopying

Modified +[AVPlayerInterstitialEvent interstitialEventWithPrimaryItem:identifier:time:templateItems:restrictions:resumptionOffset:playoutLimit:userDefinedAttributes:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedinterstitialEventWithPrimaryItem:time:

Modified +[AVPlayerInterstitialEvent interstitialEventWithPrimaryItem:identifier:date:templateItems:restrictions:resumptionOffset:playoutLimit:userDefinedAttributes:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedinterstitialEventWithPrimaryItem:date:

Modified AVPlayerInterstitialEvent.primaryItem
Declaration
From@property (nonatomic, readonly, weak) AVPlayerItem *primaryItem
To@property (nonatomic, readwrite, weak) AVPlayerItem *primaryItem

Modified AVPlayerInterstitialEvent.identifier
Declaration
From@property (nonatomic, readonly) NSString *identifier
To@property (nonatomic, readwrite, copy) NSString *identifier

Modified AVPlayerInterstitialEvent.time
Declaration
From@property (nonatomic, readonly) CMTime time
To@property (nonatomic, readwrite) CMTime time

Modified AVPlayerInterstitialEvent.date
Declaration
From@property (nonatomic, readonly) NSDate *date
To@property (nonatomic, readwrite, copy) NSDate *date

Modified AVPlayerInterstitialEvent.templateItems
Declaration
From@property (nonatomic, readonly) NSArray<AVPlayerItem *> *templateItems
To@property (nonatomic, readwrite, copy) NSArray<AVPlayerItem *> *templateItems

Modified AVPlayerInterstitialEvent.restrictions
Declaration
From@property (nonatomic, readonly) AVPlayerInterstitialEventRestrictions restrictions
To@property (nonatomic, readwrite) AVPlayerInterstitialEventRestrictions restrictions

Modified AVPlayerInterstitialEvent.resumptionOffset
Declaration
From@property (nonatomic, readonly) CMTime resumptionOffset
To@property (nonatomic, readwrite) CMTime resumptionOffset

Modified AVPlayerInterstitialEvent.playoutLimit
Declaration
From@property (nonatomic, readonly) CMTime playoutLimit
To@property (nonatomic, readwrite) CMTime playoutLimit

Modified AVPlayerInterstitialEvent.userDefinedAttributes
Declaration
From@property (nonatomic, readonly) NSDictionary *userDefinedAttributes
To@property (nonatomic, readwrite, copy) NSDictionary *userDefinedAttributes

Modified AVPlayerInterstitialEventMonitor.events
Declaration
From@property (readonly) NSArray<AVPlayerInterstitialEvent *> *events
To@property (readonly, copy) NSArray<AVPlayerInterstitialEvent *> *events

AVSampleBufferGenerator.h
Added -[AVSampleBufferGenerator createSampleBufferForRequest:error:]
Added -[AVSampleBufferGenerator makeBatch]
Added -[AVSampleBufferGenerator createSampleBufferForRequest:addingToBatch:error:]
Added AVSampleBufferGeneratorBatch
Added -[AVSampleBufferGeneratorBatch makeDataReadyWithCompletionHandler:]
Added -[AVSampleBufferGeneratorBatch cancel]
Modified -[AVSampleBufferGenerator createSampleBufferForRequest:]
AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse -createSampleBufferForRequest: error:, passing NULL for the error if not required

AVVideoComposition.h
Added +[AVVideoComposition videoCompositionWithPropertiesOfAsset:completionHandler:]
Added +[AVVideoComposition videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler:]
Added +[AVMutableVideoComposition videoCompositionWithPropertiesOfAsset:completionHandler:]
Added +[AVMutableVideoComposition videoCompositionWithPropertiesOfAsset:prototypeInstruction:completionHandler:]
Added +[AVMutableVideoComposition videoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler:]
Added -[AVVideoComposition determineValidityForAsset:timeRange:validationDelegate:completionHandler:]
Modified +[AVVideoComposition videoCompositionWithPropertiesOfAsset:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedvideoCompositionWithPropertiesOfAsset:completionHandler:

Modified +[AVVideoComposition videoCompositionWithAsset:applyingCIFiltersWithHandler:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedvideoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler:

Modified +[AVMutableVideoComposition videoCompositionWithPropertiesOfAsset:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedvideoCompositionWithPropertiesOfAsset:completionHandler:

Modified +[AVMutableVideoComposition videoCompositionWithPropertiesOfAsset:prototypeInstruction:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedvideoCompositionWithPropertiesOfAsset:prototypeInstruction:completionHandler:

Modified +[AVMutableVideoComposition videoCompositionWithAsset:applyingCIFiltersWithHandler:]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedvideoCompositionWithAsset:applyingCIFiltersWithHandler:completionHandler:

Modified -[AVAsset unusedTrackID]
AvailabilityReplacement
FromAvailablenone
ToDeprecatedfindUnusedTrackIDWithCompletionHandler:

Modified -[AVVideoComposition isValidForAsset:timeRange:validationDelegate:]
AvailabilityReplacement
FromAvailablenone
ToDeprecateddetermineValidityForAsset:timeRange:validationDelegate:completionHandler:

AVVideoSettings.h
Added AVVideoTransferFunction_Linear