import type { NobjcObject } from "objc-js";
import type { _NSError } from "../Foundation/NSError.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _AVAsset } from "./AVAsset.js";
import type { _AVSampleBufferGeneratorBatch } from "./AVSampleBufferGeneratorBatch.js";
import type { _AVSampleBufferRequest } from "./AVSampleBufferRequest.js";
export declare class _AVSampleBufferGenerator extends _NSObject {
    static alloc(): _AVSampleBufferGenerator;
    static new(): _AVSampleBufferGenerator;
    init(): _AVSampleBufferGenerator;
    /**
     * @method notifyOfDataReadyForSampleBuffer: completionHandler: @abstract Allows the client to get notified when the sample buffer data is ready, or as soon as an error has occured. @param completionHandler The completionHandler will be called, when the sample buffer data is ready, or as soon as an error has occurred.
     */
    static notifyOfDataReadyForSampleBuffer$completionHandler$(sbuf: NobjcObject, completionHandler: ((dataReady: boolean, error: _NSError) => void) | null): void;
    /**
     * @method initWithAsset: timebase: @abstract Creates an instance of AVSampleBufferGenerator to generate sample buffers from the specified asset. @param asset The asset from which sample buffers will be created. @param timebase The generator timebase, which governs when sample data for sample buffers is loaded. If NULL, sample data is loaded synchronously. @result An instance of AVSampleBufferGenerator. @discussion If the specified asset is an HTTP Live Streaming asset, the generator cannot create sample buffers.
     */
    initWithAsset$timebase$(asset: _AVAsset, timebase: NobjcObject | null): _AVSampleBufferGenerator;
    /**
     * @method createSampleBufferForRequest: error: @abstract Creates a sample buffer and if requested, attempts to load its data asynchronously. Attempt may fail based on generator configuration or file format. See [AVSampleBufferGenerator notifyOfDataReadyForSampleBuffer: completionHandler:] to get notified when the sample buffer data is available. @param request An instance of AVSampleBufferRequest representing the CMSampleBuffer creation request. @param outError A pointer to an NSError object that will be populated with failure information, if sample buffer creation fails. @result A CMSampleBuffer object referencing the output sample buffer. @discussion If the AVSampleBufferGenerator was created with a NULL timebase, any associated AVSampleBufferRequest will default to using AVSampleBufferRequestModeImmediate.
     * @deprecated Use -createSampleBufferForRequest: error:, passing NULL for the error if not required
     */
    createSampleBufferForRequest$error$(request: _AVSampleBufferRequest, outError: NobjcObject | null): NobjcObject | null;
    /**
     * It is an error to use an AVSampleBufferRequest with mode set to AVSampleBufferRequestModeScheduled when the AVSampleBufferGenerator was created with a NULL timebase.
     * @deprecated Use -createSampleBufferForRequest: error:, passing NULL for the error if not required
     */
    createSampleBufferForRequest$(request: _AVSampleBufferRequest): NobjcObject | null;
    /**
     * @method makeBatch @abstract Creates a batch to handle multiple sample buffers, allowing to asynchronously load sample data and optimize I/O when possible. @result An instance of an AVSampleBufferGeneratorBatch that can be used in calls to createSampleBufferForRequest:addingToBatch:error: of the same AVSampleBufferGenerator instance.
     */
    makeBatch(): _AVSampleBufferGeneratorBatch;
    /**
     * @method createSampleBufferForRequest: addingToBatch: error: @abstract Creates a sample buffer and attempts to defer I/O for its data. Attempt may fail based on generator configuration or file format. The [AVSampleBufferGeneratorBatch makeDataReadyWithCompletionHandler:] should be called once to commence I/O and load sample data for all CMSampleBuffers within a batch. Any subsequent calls to createSampleBufferForRequest:addingToBatch:error: will throw an exception. @param request An instance of AVSampleBufferRequest representing the CMSampleBuffer creation request @param batch An instance of AVSampleBufferGeneratorBatch to contain the output sample buffer. If nil, an exception is thrown. Must be created by calling makeBatch on the same instance of AVSampleBufferGenerator. An exception will be thrown otherwise. @param outError A pointer to an NSError object that will be populated with failure information, if sample buffer creation fails. @result A CMSampleBuffer object referencing the output sample buffer. The generator may defer I/O to fetch sample data depending on the source of the sample data and the generator's timebase.
     */
    createSampleBufferForRequest$addingToBatch$error$(request: _AVSampleBufferRequest, batch: _AVSampleBufferGeneratorBatch, outError: NobjcObject | null): NobjcObject | null;
}
