import type { NobjcObject } from "objc-js";
import type { _MEDecodeFrameOptions } from "./MEDecodeFrameOptions.js";
import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSError } from "../Foundation/NSError.js";
import type { CGSize } from "../structs/CGSize.js";
import type { MEDecodeFrameStatus } from "./MEDecodeFrameStatus.js";
export interface _MEVideoDecoder {
    /**
     * @method decodeFrameFromSampleBuffer:options:completionHandler: @abstract Requests that the extension decode a video frame. @discussion The completionHandler block must be called for every decodeFrameFromSampleBuffer call when decode is complete. The completion handler block should return either a decoded pixelBuffer, an error, or a decodeStatus indicating the frame was dropped. @param sampleBuffer A CMSampleBuffer containing one video frame. @param options A MEDecodeFrameOptions containing specific requests for this frame. @param completionHandler The handler that will be invoked when a frame is decoded and ready to be sent back to caller. This block will not necessarily be called in display order. 'imageBuffer' Contains the decompressed frame if decompression was successful, otherwise NULL. The imageBuffer must be allocated using MEVideoDecoderPixelBufferManager. 'decodeStatus' Reports the status of decoding the sampleBuffer. 'error' An NSError object that will contain error information if the method fails, otherwise nil. Errors outside of MediaExtensionErrorDomain will be reported as kVTVideoDecoderUnknownErr to the VTDecompressionSession client.
     */
    decodeFrameFromSampleBuffer$options$completionHandler$?(sampleBuffer: NobjcObject, options: _MEDecodeFrameOptions, completionHandler: ((imageBuffer: NobjcObject, decodeStatus: MEDecodeFrameStatus, error: _NSError) => void) | null): void;
    /**
     * @method canAcceptFormatDescription: @abstract Asks the extension whether the decoder can decode frames with the given format description. @discussion Some video decoders are able to accommodate minor changes in format without needing to be completely reset in a new session. This function can be used to test whether a format change is allowed. @param formatDescription The new format description that need to be evaluated. @result YES if the decoder can continue decoding samples without being reset, NO if this is not possible. If this method returns NO, typically the VideoToolbox will release the current decoder instance and instantiate a new one using the new format description.
     */
    canAcceptFormatDescription$?(formatDescription: NobjcObject): boolean;
    /**
     * @property producesRAWOutput @abstract The extension should implement this property returning YES if the decoder produces RAW ouput which requires the use of an MERAWProcessor for post-decode processing to produce renderable output. @discussion This optional property is queried on the extension when a VideoToolbox client queries the kVTDecompressionPropertyKey_DecoderProducesRAWOutput property on the hosting VTDecompressionSession.
     */
    producesRAWOutput?(): boolean;
    /**
     * @property contentHasInterframeDependencies @abstract The extension should return whether the content being decoded has interframe dependencies, if the decoder knows. @discussion This optional property is queried on the extension when a VideoToolbox client queries the kVTDecompressionPropertyKey_ContentHasInterframeDependencies property on the hosting VTDecompressionSession.
     */
    contentHasInterframeDependencies?(): boolean;
    /**
     * @property recommendedThreadCount @abstract Sets the recommended number of threads to be used by the decoder. @discussion This optional property is set when a VideoToolbox client sets the kVTDecompressionPropertyKey_ThreadCount property on the hosting VTDecompressionSession.
     */
    recommendedThreadCount?(): number;
    setRecommendedThreadCount$?(value: number): void;
    /**
     * @property actualThreadCount @abstract Returns the actual number of threads used by decoder. @discussion This optional property is queried when a VideoToolbox client queries the kVTDecompressionPropertyKey_ThreadCount property on the hosting VTDecompressionSession.
     */
    actualThreadCount?(): number;
    /**
     * @property supportedPixelFormatsOrderedByQuality @abstract Provides hints about quality tradeoffs between pixel formats. @discussion This optional property value is an array of NSNumbers with CMPixelFormatTypes values, ordered by quality from best to worse. This property is queried when a VideoToolbox client queries the kVTDecompressionPropertyKey_SupportedPixelFormatsOrderedByQuality property on the hosting VTDecompressionSession.
     */
    supportedPixelFormatsOrderedByQuality?(): _NSArray;
    /**
     * @property reducedResolution @abstract Requests decoding at a smaller resolution than full-size. @discussion This optional property conveys a request for reduced resolution for decoding. Decoders that only support a fixed set of resolutions should pick the smallest resolution greater than or equal to the requested { width, height }. If the output CVPixelBuffer is not in a format where reduced resolution decoding is supported, this setting should be disregarded. This property is set on the extension when a VideoToolbox client sets the kVTDecompressionPropertyKey_ReducedResolutionDecode property on the hosting VTDecompressionSession.
     */
    reducedResolution?(): CGSize;
    setReducedResolution$?(value: CGSize): void;
    /**
     * @property pixelFormatsWithReducedResolutionDecodeSupport @abstract Provides a list of output pixel formats where the decoder supports reduced resolution decoding @discussion This optional property should return an array of NSNumbers holding CMPixelFormatType values. This property is queried when a VideoToolbox client queries the kVTDecompressionPropertyKey_PixelFormatsWithReducedResolutionSupport property on the hosting VTDecompressionSession.
     */
    pixelFormatsWithReducedResolutionDecodeSupport?(): _NSArray;
    /**
     * @property readyForMoreMediaData @abstract Indicates the readiness of the decoder to accept more sample buffers. @discussion Video decoders which operate asynchronously often have a fixed capacity for buffers in flight in the decoder. This property allows the decoder to signal to the VideoToolbox that its internal buffers are full and it cannot accept more samples at this time. The decoder must use MEVideoDecoderReadyForMoreMediaDataDidChangeNotification to notify the VideoToolbox when this property changes.
     */
    readyForMoreMediaData?(): boolean;
}
