Platforms to show: All Mac Windows Linux Cross-Platform
Back to AVAssetImageGeneratorMBS class.
AVAssetImageGeneratorMBS.cancelAllCGImageGeneration
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This method calls the AVFoundationMBS.generateCGImagesAsynchronouslyForTimesCompleted event with AVAssetImageGeneratorCancelled for each image time in every previous invocation of generateCGImagesAsynchronouslyForTimes for which images have not yet been supplied.
AVAssetImageGeneratorMBS.CGImageAtTime(time as CMTimeMBS, byref actualTime as CMTimeMBS, byref error as NSErrorMBS) as Variant
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
requestedTime: The time at which the image of the asset is to be created.
actualTime: Upon return, contains the time at which the image was actually generated.
Error: If an error occurs, upon return contains an NSError object that describes the problem.
Returns a CGImageMBS for the asset at or near a specified time, or nil if the image could not be created.
This method returns the image synchronously.
Some examples using this method:
AVAssetImageGeneratorMBS.Constructor(asset as AVAssetMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
asset: The asset from which images will be extracted.
This method may succeed even if the asset possesses no visual tracks at the time of initialization.
AVAssetImageGeneratorMBS.generateCGImagesAsynchronouslyForTimes(times() as CMTimeMBS, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
requestedTimes: An array of CMTimeMBS, specifying the asset times at which an image is requested.
This method uses an efficient "batch mode" to get images in time order.
The client receives exactly one event call to AVFoundationMBS.generateCGImagesAsynchronouslyForTimesCompleted for each requested time in requestedTimes. Changes to the generator's properties (snap behavior, maximum size, and so on) do not affect pending asynchronous image generation requests.
With tag you can pass any value you like to the event later. This can be for example an object reference or a number in an array. Be aware that the reference to this tag value is kept until the event is called and can cause memory reference cycles.
Some examples using this method:
AVAssetImageGeneratorMBS.maximumSize as CGSizeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The default value is CGSizeZero, which specifies the asset's unscaled dimensions.
AVAssetImageGenerator scales images such that they fit within the defined bounding box. Images are never scaled up. The aspect ratio of the scaled image is defined by the apertureMode property.
(Read and Write computed property)
AVAssetImageGeneratorMBS.requestedTimeToleranceAfter as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The default value is kCMTimePositiveInfinity.
Set the values of requestedTimeToleranceBefore and requestedTimeToleranceAfter to kCMTimeZero to request frame-accurate image generation; this may incur additional decoding delay.
(Read and Write computed property)
AVAssetImageGeneratorMBS.requestedTimeToleranceBefore as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The default value is kCMTimePositiveInfinity.
Set the values of requestedTimeToleranceBefore and requestedTimeToleranceAfter to kCMTimeZero to request frame-accurate image generation; this may incur additional decoding delay.
(Read and Write computed property)
The items on this page are in the following plugins: MBS AVFoundation Plugin.