Platforms to show: All Mac Windows Linux Cross-Platform
Back to AVAssetExportSessionMBS class.
AVAssetExportSessionMBS.cancelExport
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
AVAssetExportSessionMBS.Constructor(asset as AVAssetMBS, presetName as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
asset: The asset you want to export.
presetName: A string constant specifying the name of the preset template for the export.
AVAssetExportSessionMBS.determineCompatibleFileTypes(tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 14.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
calls later AVFoundationMBS.determineCompatibleFileTypesCompleted event.
This method operates on the asset object and preset information that was used to initialize the export session. It uses this information to determine the file types that the export session can write.
This method performs its checks asynchronously on a secondary thread and returns immediately. The results are similarly reported to the specified block on a secondary thread. Because this method actually inspects the asset's tracks, the tracks are loaded if they have not been already.
Available in OS X v10.9 and later.
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.
AVAssetExportSessionMBS.exportAsynchronously(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 |
This method starts an asynchronous export operation and returns immediately. status signals the terminal state of the export session, and if a failure occurs, error describes the problem.
This method calls AVFoundationMBS.exportAsynchronouslyCompleted event later. Tag is passed so you can pass information needed to finish work.
If internal preparation for export fails, event is invoked synchronously. The event may also be called asynchronously, after the method returns, in the following cases:
- If a failure occurs during the export, including failures of loading, re-encoding, or writing media data to the output.
- If cancelExport is invoked.
- After the export session succeeds, having completely written its output to the outputURL.
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.
AVAssetExportSessionMBS.exportMT
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 18.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Same as exportAsynchronously, but run synchronous, so the plugin waits.
The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
AVAssetExportSessionMBS.metadata as AVMetadataItemMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
AVAssetExportSessionMBS.outputFileExtension as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Some examples using this method:
AVAssetExportSessionMBS.setMetadata(items() as AVMetadataItemMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If the array is empty, any existing metadata in the exported asset will be translated as accurately as possible into the appropriate metadata key space for the output file and written to the output.
AVAssetExportSessionMBS.supportedFileTypes as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The types of files the session can write are determined by the asset and and export preset with which the session was initialized. If you need to determine the compatible file formats before initiating the export operation, use the determineCompatibleFileTypesWithCompletionHandler: method.
Some examples using this method:
AVAssetExportSessionMBS.timeRange as CMTimeRangeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The default time range of an export session is kCMTimeZero to kCMTimePositiveInfinity, meaning that (modulo a possible limit on file length) the full duration of the asset will be exported.
(Read and Write computed property)
The items on this page are in the following plugins: MBS AVFoundation Plugin.