import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _NSString } from "../Foundation/NSString.js";
import type { _NSURL } from "../Foundation/NSURL.js";
import type { _AVAsset } from "./AVAsset.js";
import type { _AVAudioMix } from "./AVAudioMix.js";
import type { _AVMetadataItemFilter } from "./AVMetadataItemFilter.js";
import type { _AVVideoCompositing } from "./AVVideoCompositing.js";
import type { _AVVideoComposition } from "./AVVideoComposition.js";
import type { CMTime } from "../structs/CMTime.js";
import type { CMTimeRange } from "../structs/CMTimeRange.js";
import type { AVAssetExportSessionStatus } from "./AVAssetExportSessionStatus.js";
import type { AVAssetTrackGroupOutputHandling } from "./AVAssetTrackGroupOutputHandling.js";
import type { AVAudioTimePitchAlgorithm } from "./AVAudioTimePitchAlgorithm.js";
export declare class _AVAssetExportSession extends _NSObject {
    static alloc(): _AVAssetExportSession;
    static new(): _AVAssetExportSession;
    init(): _AVAssetExportSession;
    /**
     * @method exportSessionWithAsset:presetName: @abstract Returns an instance of AVAssetExportSession for the specified source asset and preset. @param asset An AVAsset object that is intended to be exported. @param presetName An NSString specifying the name of the preset template for the export. @result An instance of AVAssetExportSession. @discussion If the specified asset belongs to a mutable subclass of AVAsset, AVMutableComposition or AVMutableMovie, the results of any export-related operation are undefined if you mutate the asset after the operation commences. These operations include but are not limited to: 1) testing the compatibility of export presets with the asset, 2) calculating the maximum duration or estimated length of the output file, and 3) the export operation itself.
     */
    static exportSessionWithAsset$presetName$(asset: _AVAsset, presetName: _NSString): _AVAssetExportSession | null;
    /**
     * @method allExportPresets @abstract Returns all available export preset names. @discussion Returns an array of NSStrings with the names of all available presets. Note that not all presets are compatible with all AVAssets. @result An NSArray containing an NSString for each of the available preset names.
     */
    static allExportPresets(): _NSArray;
    /**
     * @method exportPresetsCompatibleWithAsset: @abstract Returns only the identifiers compatible with the given AVAsset object. @discussion Not all export presets are compatible with all AVAssets. For example an video only asset is not compatible with an audio only preset. This method returns only the identifiers for presets that will be compatible with the given asset. A client should pass in an AVAsset that is ready to be exported. In order to ensure that the setup and running of an export operation will succeed using a given preset no significant changes (such as adding or deleting tracks) should be made to the asset between retrieving compatible identifiers and performing the export operation. This method will access the tracks property of the AVAsset to build the returned NSArray. To avoid blocking the calling thread, the tracks property should be loaded using the AVAsynchronousKeyValueLoading protocol before calling this method. @param asset An AVAsset object that is intended to be exported. @result An NSArray containing NSString values for the identifiers of compatible export types. The array is a complete list of the valid identifiers that can be used as arguments to initWithAsset:presetName: with the specified asset.
     * @deprecated determineCompatibilityOfExportPreset:withAsset:outputFileType:completionHandler:
     */
    static exportPresetsCompatibleWithAsset$(asset: _AVAsset): _NSArray;
    /**
     * @method determineCompatibilityOfExportPreset:withAsset:outputFileType:completionHandler: @abstract Performs an inspection on the compatibility of an export preset, AVAsset and output file type. Calls the completion handler with YES if the arguments are compatible; NO otherwise. @discussion Not all export presets are compatible with all AVAssets and file types. This method can be used to query compatibility. In order to ensure that the setup and running of an export operation will succeed using a given preset no significant changes (such as adding or deleting tracks) should be made to the asset between retrieving compatible identifiers and performing the export operation. @param presetName An NSString specifying the name of the preset template for the export. @param asset An AVAsset object that is intended to be exported. @param outputFileType An AVFileType indicating a file type to check; or nil, to query whether there are any compatible types. @param handler A block called with the compatibility result.
     */
    static determineCompatibilityOfExportPreset$withAsset$outputFileType$completionHandler$(presetName: _NSString, asset: _AVAsset, outputFileType: _NSString | null, handler: (compatible: boolean) => void): void;
    /**
     * @method initWithAsset:presetName: @abstract Initialize an AVAssetExportSession with the specified preset and set the source to the contents of the asset. @param asset An AVAsset object that is intended to be exported. @param presetName An NSString specifying the name of the preset template for the export. @result Returns the initialized AVAssetExportSession. @discussion If the specified asset belongs to a mutable subclass of AVAsset, AVMutableComposition or AVMutableMovie, the results of any export-related operation are undefined if you mutate the asset after the operation commences. These operations include but are not limited to: 1) testing the compatibility of export presets with the asset, 2) calculating the maximum duration or estimated length of the output file, and 3) the export operation itself.
     */
    initWithAsset$presetName$(asset: _AVAsset, presetName: _NSString): _AVAssetExportSession | null;
    /**
     * @method exportAsynchronouslyWithCompletionHandler: @abstract Starts the asynchronous execution of an export session. @param handler If internal preparation for export fails, the handler will be invoked synchronously. The handler may also be called asynchronously after -exportAsynchronouslyWithCompletionHandler: returns, in the following cases: 1) if a failure occurs during the export, including failures of loading, re-encoding, or writing media data to the output, 2) if -cancelExport is invoked, 3) if export session succeeds, having completely written its output to the outputURL. In each case, AVAssetExportSession.status will signal the terminal state of the asset reader, and if a failure occurs, the NSError that describes the failure can be obtained from the error property. @discussion Initiates an asynchronous export operation and returns immediately.
     * @deprecated export(to:as:) async throws
     */
    exportAsynchronouslyWithCompletionHandler$(handler: () => void): void;
    /**
     * @method cancelExport @abstract Cancels the execution of an export session. @discussion Cancel can be invoked when the export is running.
     * @deprecated Use Task.cancel() instead
     */
    cancelExport(): void;
    /**
     * @method determineCompatibleFileTypesWithCompletionHandler: @abstract Performs an inspection on the AVAsset and Preset the object was initialized with to determine a list of file types the ExportSession can write. @param handler Called when the inspection completes with an array of file types the ExportSession can write. Note that this may have a count of zero. @discussion This method is different than the supportedFileTypes property in that it performs an inspection of the AVAsset in order to determine its compatibility with each of the session's supported file types.
     */
    determineCompatibleFileTypesWithCompletionHandler$(handler: (compatibleFileTypes: _NSArray) => void): void;
    /**
     * @method estimateMaximumDurationWithCompletionHandler: @abstract Starts the asynchronous execution of estimating the maximum duration of the export based on the asset, preset, and fileLengthLimit associated with the export session. @discussion If fileLengthLimit is not set on the export session, fileLengthLimit will be assumed to be the maximum file size specified by the preset (if any); else infinite. @param handler A block called with the estimated maximum duration, or kCMTimeInvalid if an error occurs. The error parameter will be non-nil if an error occurs.
     */
    estimateMaximumDurationWithCompletionHandler$(handler: ((estimatedMaximumDuration: CMTime, error: _NSError) => void) | null): void;
    /**
     * @method estimateOutputFileLengthWithCompletionHandler: @abstract Starts the asynchronous execution of estimating the output file length of the export based on the asset, preset, and timeRange associated with the export session. @discussion If timeRange is not set on the export session, timeRange will be assumed to be the full time range of the asset. @param handler A block called with the estimated output file length in bytes, if it can be determined; 0 otherwise. The error parameter will be non-nil if an error occurs.
     */
    estimateOutputFileLengthWithCompletionHandler$(handler: ((estimatedOutputFileLength: number, error: _NSError) => void) | null): void;
    /** Indicates the name of the preset with which the AVExportSession was initialized */
    presetName(): _NSString;
    /**
     * Indicates the instance of AVAsset with which the AVExportSession was initialized
     */
    asset(): _AVAsset;
    /**
     * Indicates the type of file to be written by the session. The value of this property must be set before you invoke -exportAsynchronouslyWithCompletionHandler:; otherwise -exportAsynchronouslyWithCompletionHandler: will raise an NSInternalInconsistencyException. Setting the value of this property to a file type that's not among the session's supported file types will result in an NSInvalidArgumentException. See supportedFileTypes.
     * @deprecated Use export(to:as:) async throws instead
     */
    outputFileType(): _NSString | null;
    setOutputFileType$(value: _NSString | null): void;
    /**
     * Indicates the URL of the export session's output. You may use [[UTType typeWithIdentifier:outputFileType] preferredFilenameExtension] to obtain an appropriate path extension for the outputFileType you have specified. For more information, see <UniformTypeIdentifiers/UTType.h>.
     * @deprecated Use export(to:as:) async throws instead
     */
    outputURL(): _NSURL | null;
    setOutputURL$(value: _NSURL | null): void;
    /**
     * indicates that the output file should be optimized for network use, e.g. that a QuickTime movie file should support "fast start"
     */
    shouldOptimizeForNetworkUse(): boolean;
    setShouldOptimizeForNetworkUse$(value: boolean): void;
    /**
     * defaults to YES
     * @deprecated Use states(updateInterval:) instead
     */
    allowsParallelizedExport(): boolean;
    setAllowsParallelizedExport$(value: boolean): void;
    /**
     * indicates the status of the export session
     * @deprecated Use states(updateInterval:) instead
     */
    status(): AVAssetExportSessionStatus;
    /**
     * describes the error that occured if the export status is AVAssetExportSessionStatusFailed
     * @deprecated Use export(to:as:) async throws instead
     */
    error(): _NSError | null;
    /**
     * Specifies the progress of the export on a scale from 0 to 1.0. A value of 0 means the export has not yet begun, A value of 1.0 means the export is complete. This property is not key-value observable.
     * @deprecated Use states(updateInterval:) instead
     */
    progress(): number;
    /**
     * Indicates the types of files the target can write, according to the preset the target was initialized with. Does not perform an inspection of the AVAsset to determine whether its contents are compatible with the supported file types. If you need to make that determination before initiating the export, use - (void)determineCompatibleFileTypesWithCompletionHandler:(void (^)(NSArray *compatibleFileTypes))handler:.
     */
    supportedFileTypes(): _NSArray;
    /**
     * Specifies a time range to be exported from the source. The default timeRange of an export session is kCMTimeZero..kCMTimePositiveInfinity, meaning that the full duration of the asset will be exported.
     * @deprecated Use estimateMaximumDurationWithCompletionHandler: instead
     */
    timeRange(): CMTimeRange;
    setTimeRange$(value: CMTimeRange): void;
    /**
     * Provides an estimate of the maximum duration of exported media that is possible given the source asset, the export preset, and the current value of fileLengthLimit. The export will not stop when it reaches this maximum duration; set the timeRange property to export only a certain time range.
     * @deprecated Use estimateMaximumDurationWithCompletionHandler: instead
     */
    maxDuration(): CMTime;
    /**
     * Indicates the estimated byte size of exported file. Returns zero when export preset is AVAssetExportPresetPassthrough, AVAssetExportPresetAppleProRes422LPCM or AVAssetExportPresetAppleProRes4444LPCM. This property will also return zero if a numeric value (ie. not invalid, indefinite, or infinite) for the timeRange property has not been set. Note that the returned value does not take into account the source asset information. For a more accurate estimation, use estimateOutputFileLengthWithCompletionHandler.
     * @deprecated Use estimateOutputFileLengthWithCompletionHandler: instead
     */
    estimatedOutputFileLength(): number;
    /**
     * Indicates the file length that the output of the session should not exceed. Depending on the content of the source asset, it is possible for the output to slightly exceed the file length limit. The length of the output file should be tested if you require that a strict limit be observed before making use of the output. See also maxDuration and timeRange.
     */
    fileLengthLimit(): number;
    setFileLengthLimit$(value: number): void;
    /**
     * Specifies an NSArray of AVMetadataItems that are to be written to the output file by the export session. If the value of this key is nil, any existing metadata in the exported asset will be translated as accurately as possible into the appropriate metadata keyspace for the output file and written to the output.
     */
    metadata(): _NSArray | null;
    setMetadata$(value: _NSArray | null): void;
    /**
     * Specifies a filter object to be used during export to determine which metadata items should be transferred from the source asset. If the value of this key is nil, no filter will be applied. This is the default. The filter will not be applied to metadata set with via the metadata property. To apply the filter to metadata before it is set on the metadata property, see the methods in AVMetadataItem's AVMetadataItemArrayFiltering category.
     */
    metadataItemFilter(): _AVMetadataItemFilter;
    setMetadataItemFilter$(value: _AVMetadataItemFilter): void;
    /**
     * Indicates the processing algorithm used to manage audio pitch for scaled audio edits. Constants for various time pitch algorithms, e.g. AVAudioTimePitchAlgorithmSpectral, are defined in AVAudioProcessingSettings.h. An NSInvalidArgumentException will be raised if this property is set to a value other than the constants defined in that file. The default value is AVAudioTimePitchAlgorithmSpectral.
     */
    audioTimePitchAlgorithm(): AVAudioTimePitchAlgorithm;
    setAudioTimePitchAlgorithm$(value: AVAudioTimePitchAlgorithm): void;
    /**
     * Indicates whether non-default audio mixing is enabled for export and supplies the parameters for audio mixing. Ignored when export preset is AVAssetExportPresetPassthrough.
     */
    audioMix(): _AVAudioMix | null;
    setAudioMix$(value: _AVAudioMix | null): void;
    /**
     * Indicates whether video composition is enabled for export and supplies the instructions for video composition. Ignored when export preset is AVAssetExportPresetPassthrough.
     */
    videoComposition(): _AVVideoComposition | null;
    setVideoComposition$(value: _AVVideoComposition | null): void;
    /** Indicates the custom video compositor instance used, if any */
    customVideoCompositor(): _AVVideoCompositing;
    /**
     * @property audioTrackGroupHandling @abstract Defines export policy for handling alternate audio tracks @discussion Specifies the handling of audio tracks that are members of the same alternate track group corresponding to an exported audio track in the source asset. If no audio track group is present, the value of this property has no effect. If necessary, use the trackGroups property of AVAsset to determine whether any audio track groups are present. The AVAudioMix property is not allowed to be used when also specifying alternate track output handling. An exception will be thrown if both are specified.
     */
    audioTrackGroupHandling(): AVAssetTrackGroupOutputHandling;
    setAudioTrackGroupHandling$(value: AVAssetTrackGroupOutputHandling): void;
    /**
     * @property canPerformMultiplePassesOverSourceMediaData @abstract Determines whether the export session can perform multiple passes over the source media to achieve better results. @discussion When the value for this property is YES, the export session can produce higher quality results at the expense of longer export times. Setting this property to YES may also require the export session to write temporary data to disk during the export. To control the location of temporary data, use the property directoryForTemporaryFiles. The default value is NO. Not all export session configurations can benefit from performing multiple passes over the source media. In these cases, setting this property to YES has no effect. This property cannot be set after the export has started.
     */
    canPerformMultiplePassesOverSourceMediaData(): boolean;
    setCanPerformMultiplePassesOverSourceMediaData$(value: boolean): void;
    /**
     * @property directoryForTemporaryFiles @abstract Specifies a directory that is suitable for containing temporary files generated during the export process @discussion AVAssetExportSession may need to write temporary files when configured in certain ways, such as when canPerformMultiplePassesOverSourceMediaData is set to YES. This property can be used to control where in the filesystem those temporary files are created. All temporary files will be deleted when the export is completed, is canceled, or fails. When the value of this property is nil, the export session will choose a suitable location when writing temporary files. The default value is nil. This property cannot be set after the export has started. The export will fail if the URL points to a location that is not a directory, does not exist, is not on the local file system, or if a file cannot be created in this directory (for example, due to insufficient permissions or sandboxing restrictions).
     */
    directoryForTemporaryFiles(): _NSURL;
    setDirectoryForTemporaryFiles$(value: _NSURL): void;
}
