iOS Developer Library

Developer

AVFoundation Framework Reference AVVideoCompositionValidationHandling Protocol Reference

Options
Deployment Target:

On This Page
Language:

AVVideoCompositionValidationHandling

Inheritance


Not Applicable

Conforms To


Import Statement


Swift

import AVFoundation

Objective-C

@import AVFoundation;

Availability


Available in iOS 5.0 and later.

The AVVideoCompositionValidationHandling protocol declares methods that you can implement in the delegate of an AVVideoComposition object to indicate whether validation of a video composition should continue after specific errors have been found.

You might chose to stop validation after particular errors have been found so as to avoid unnecessary subsequent processing following an eror from which there is no suitable recovery.

  • Reports that a key that has an invalid value.

    Declaration

    Swift

    optional func videoComposition(_ videoComposition: AVVideoComposition!, shouldContinueValidatingAfterFindingInvalidValueForKey key: String!) -> Bool

    Objective-C

    - (BOOL)videoComposition:(AVVideoComposition *)videoComposition shouldContinueValidatingAfterFindingInvalidValueForKey:(NSString *)key

    Parameters

    videoComposition

    The video composition being validated.

    key

    The key being validated.

    Return Value

    YEStrue if the video composition should continue validation in order to report additional problems that may exist, otherwise NOfalse.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 5.0 and later.

  • Reports a time range that has no corresponding video composition instruction.

    Declaration

    Swift

    optional func videoComposition(_ videoComposition: AVVideoComposition!, shouldContinueValidatingAfterFindingEmptyTimeRange timeRange: CMTimeRange) -> Bool

    Objective-C

    - (BOOL)videoComposition:(AVVideoComposition *)videoComposition shouldContinueValidatingAfterFindingEmptyTimeRange:(CMTimeRange)timeRange

    Parameters

    videoComposition

    The video composition being validated.

    timeRange

    The time range that has no corresponding video composition instruction.

    Return Value

    YEStrue if the video composition should continue validation in order to report additional problems that may exist, otherwise NOfalse.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 5.0 and later.

  • Reports a video composition instruction with a time range that is invalid, that overlaps with the time range of a prior instruction, or that contains times earlier than the time range of a prior instruction.

    Declaration

    Swift

    optional func videoComposition(_ videoComposition: AVVideoComposition!, shouldContinueValidatingAfterFindingInvalidTimeRangeInInstruction videoCompositionInstruction: AVVideoCompositionInstructionProtocol!) -> Bool

    Objective-C

    - (BOOL)videoComposition:(AVVideoComposition *)videoComposition shouldContinueValidatingAfterFindingInvalidTimeRangeInInstruction:(id<AVVideoCompositionInstruction>)videoCompositionInstruction

    Parameters

    videoComposition

    The video composition being validated.

    videoCompositionInstruction

    The video composition instruction.

    Return Value

    YEStrue if the video composition should continue validation in order to report additional problems that may exist, otherwise NOfalse.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 5.0 and later.

  • Reports a video composition layer instruction with a track ID that does not correspond either to the track ID used for the composition’s animation tool or to a track of the asset specified in isValidForAsset:timeRange:delegate:.

    Declaration

    Swift

    optional func videoComposition(_ videoComposition: AVVideoComposition!, shouldContinueValidatingAfterFindingInvalidTrackIDInInstruction videoCompositionInstruction: AVVideoCompositionInstructionProtocol!, layerInstruction layerInstruction: AVVideoCompositionLayerInstruction!, asset asset: AVAsset!) -> Bool

    Objective-C

    - (BOOL)videoComposition:(AVVideoComposition *)videoComposition shouldContinueValidatingAfterFindingInvalidTrackIDInInstruction:(id<AVVideoCompositionInstruction>)videoCompositionInstruction layerInstruction:(AVVideoCompositionLayerInstruction *)layerInstruction asset:(AVAsset *)asset

    Parameters

    videoComposition

    The video composition being validated.

    videoCompositionInstruction

    The video composition instruction.

    layerInstruction

    The layer instruction.

    asset

    The underlying asset.

    Return Value

    YEStrue if the video composition should continue validation in order to report additional problems that may exist, otherwise NOfalse.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 5.0 and later.