Instance Method


Indicates whether the time ranges of the composition’s instructions conform to validation requirements.


- (BOOL)isValidForAsset:(AVAsset *)asset timeRange:(CMTimeRange)timeRange validationDelegate:(id<AVVideoCompositionValidationHandling>)validationDelegate;



An AVAsset object, if you wish to validate the time ranges of the instructions against the duration of the asset and the track IDs of the layer instructions against the asset’s tracks.

Pass nil to skip that validation.


A time range.

Only those instructions with time ranges that overlap with this time range will be validated. To validate all instructions that may be used for playback or other processing, regardless of time range, pass CMTimeRangeMake(kCMTimeZero, kCMTimePositiveInfinity).


Indicates an object implementing the AVVideoCompositionValidationHandling protocol to receive detailed information about problematic portions of a video composition during processing.

Pass nil if you don’t want to be informed about details.

Return Value

YES if the time ranges of the composition’s instructions conform to validation requirements, otherwise NO.


In the course of validation, the receiver will invoke its delegate (if there is one) with reference to any trouble spots in the video composition.

This method raises an exception if the delegate modifies the receiver’s array of instructions or the array of layer instructions of any AVVideoCompositionInstruction object contained therein during validation.

See Also

Validating the Time Range


Methods you can implement to indicate whether validation of a video composition should continue after specific errors are found.