|class||AVFoundation||MBS AVFoundation Plugin||13.2||✅ Yes||❌ No||❌ No||✅ Yes||All|
AVAssetImageGenerator uses the default enabled video track(s) to generate images. Generating a single image in isolation can require the decoding of a large number of video frames with complex interdependencies. If you require a series of images, you can achieve far greater efficiency using the asynchronous method, CGImageAtTime, which employs decoding efficiencies similar to those used during playback.
You create an asset generator using initWithAsset: or assetImageGeneratorWithAsset. These methods may succeed even if the asset possesses no visual tracks at the time of initialization. You can test whether an asset has any tracks with the visual characteristic using tracksWithMediaCharacteristic (AVAsset).
The actual time of a generated image is within the range [requestedTime-requestedTimeToleranceBefore, requestedTime+requestedTimeToleranceAfter] and may differ from the requested time for efficiency.
Assets that represent mutable compositions or mutable movies may gain visual tracks after initialization of an associated image generator.
- 9 properties
- property apertureMode as string
- property appliesPreferredTrackTransform as boolean
- property asset as AVAssetMBS
- property customVideoCompositor as AVVideoCompositingMBS
- property Handle as Integer
- property videoComposition as AVVideoCompositionMBS
- property maximumSize as CGSizeMBS
- property requestedTimeToleranceAfter as CMTimeMBS
- property requestedTimeToleranceBefore as CMTimeMBS
- 4 methods
- 5 shared methods
- shared method assetImageGeneratorWithAsset(asset as AVAssetMBS) as AVAssetImageGeneratorMBS
- shared method available as boolean
- shared method AVAssetImageGeneratorApertureModeCleanAperture as string
- shared method AVAssetImageGeneratorApertureModeEncodedPixels as string
- shared method AVAssetImageGeneratorApertureModeProductionAperture as string
- 3 constants
Indicates that generation was cancelled.
Indicates that generation failed.
Indicates that generation succeeded.
This class has no sub classes.
Some events using this class:
- AVFoundationMBS.generateCGImagesAsynchronouslyForTimesCompleted(generator as AVAssetImageGeneratorMBS, requestedTime as CMTimeMBS, image as Variant, actualTime as CMTimeMBS, result as Integer, error as NSErrorMBS, tag as Variant)
Some examples using this class:
Xojo Developer Magazine
The items on this page are in the following plugins: MBS AVFoundation Plugin.
Feedback: Report problem or ask question.