Platforms to show: All Mac Windows Linux Cross-Platform
AVAssetImageGeneratorMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
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
- method cancelAllCGImageGeneration
- method CGImageAtTime(time as CMTimeMBS, byref actualTime as CMTimeMBS, byref error as NSErrorMBS) as Variant
- method Constructor(asset as AVAssetMBS)
- method generateCGImagesAsynchronouslyForTimes(times() as CMTimeMBS, tag as Variant = nil)
- 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
Result Constants
Constant | Value | Description |
---|---|---|
AVAssetImageGeneratorCancelled | 2 |
Indicates that generation was cancelled. |
AVAssetImageGeneratorFailed | 1 |
Indicates that generation failed. |
AVAssetImageGeneratorSucceeded | 0 |
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.
AVAssetExportSessionMBS - AVAssetMBS