import type { _NSArray } from "../Foundation/NSArray.js";
import type { _NSObject } from "../Foundation/NSObject.js";
import type { _AVCaptureInputPort } from "./AVCaptureInputPort.js";
import type { _AVCaptureOutput } from "./AVCaptureOutput.js";
import type { _AVCaptureVideoPreviewLayer } from "./AVCaptureVideoPreviewLayer.js";
import type { CMTime } from "../structs/CMTime.js";
import type { AVCaptureVideoOrientation } from "./AVCaptureVideoOrientation.js";
import type { AVCaptureVideoStabilizationMode } from "./AVCaptureVideoStabilizationMode.js";
import type { AVVideoFieldMode } from "./AVVideoFieldMode.js";
export declare class _AVCaptureConnection extends _NSObject {
    static alloc(): _AVCaptureConnection;
    static new(): _AVCaptureConnection;
    init(): _AVCaptureConnection;
    /**
     * @method connectionWithInputPorts:output: @abstract Returns an AVCaptureConnection instance describing a connection between the specified inputPorts and the specified output. @param ports An array of AVCaptureInputPort objects associated with AVCaptureInput objects. @param output An AVCaptureOutput object. @result An AVCaptureConnection instance joining the specified inputPorts to the specified output port. @discussion This method returns an instance of AVCaptureConnection that may be subsequently added to an AVCaptureSession instance using AVCaptureSession's -addConnection: method. When using -addInput: or -addOutput:, connections are formed between all compatible inputs and outputs automatically. You do not need to manually create and add connections to the session unless you use the primitive -addInputWithNoConnections: or -addOutputWithNoConnections: methods.
     */
    static connectionWithInputPorts$output$(ports: _NSArray, output: _AVCaptureOutput): _AVCaptureConnection;
    /**
     * @method connectionWithInputPort:videoPreviewLayer: @abstract Returns an AVCaptureConnection instance describing a connection between the specified inputPort and the specified AVCaptureVideoPreviewLayer instance. @param port An AVCaptureInputPort object associated with an AVCaptureInput object. @param layer An AVCaptureVideoPreviewLayer object. @result An AVCaptureConnection instance joining the specified inputPort to the specified video preview layer. @discussion This method returns an instance of AVCaptureConnection that may be subsequently added to an AVCaptureSession instance using AVCaptureSession's -addConnection: method. When using AVCaptureVideoPreviewLayer's -initWithSession: or -setSession:, a connection is formed between the first compatible input port and the video preview layer automatically. You do not need to manually create and add connections to the session unless you use AVCaptureVideoPreviewLayer's primitive -initWithSessionWithNoConnection: or -setSessionWithNoConnection: methods.
     */
    static connectionWithInputPort$videoPreviewLayer$(port: _AVCaptureInputPort, layer: _AVCaptureVideoPreviewLayer): _AVCaptureConnection;
    /**
     * @method initWithInputPorts:output: @abstract Returns an AVCaptureConnection instance describing a connection between the specified inputPorts and the specified output. @param ports An array of AVCaptureInputPort objects associated with AVCaptureInput objects. @param output An AVCaptureOutput object. @result An AVCaptureConnection instance joining the specified inputPorts to the specified output port. @discussion This method returns an instance of AVCaptureConnection that may be subsequently added to an AVCaptureSession instance using AVCaptureSession's -addConnection: method. When using -addInput: or -addOutput:, connections are formed between all compatible inputs and outputs automatically. You do not need to manually create and add connections to the session unless you use the primitive -addInputWithNoConnections: or -addOutputWithNoConnections: methods.
     */
    initWithInputPorts$output$(ports: _NSArray, output: _AVCaptureOutput): _AVCaptureConnection;
    /**
     * @method initWithInputPort:videoPreviewLayer: @abstract Returns an AVCaptureConnection instance describing a connection between the specified inputPort and the specified AVCaptureVideoPreviewLayer instance. @param port An AVCaptureInputPort object associated with an AVCaptureInput object. @param layer An AVCaptureVideoPreviewLayer object. @result An AVCaptureConnection instance joining the specified inputPort to the specified video preview layer. @discussion This method returns an instance of AVCaptureConnection that may be subsequently added to an AVCaptureSession instance using AVCaptureSession's -addConnection: method. When using AVCaptureVideoPreviewLayer's -initWithSession: or -setSession:, a connection is formed between the first compatible input port and the video preview layer automatically. You do not need to manually create and add connections to the session unless you use AVCaptureVideoPreviewLayer's primitive -initWithSessionWithNoConnection: or -setSessionWithNoConnection: methods.
     */
    initWithInputPort$videoPreviewLayer$(port: _AVCaptureInputPort, layer: _AVCaptureVideoPreviewLayer): _AVCaptureConnection;
    /**
     * @method isVideoRotationAngleSupported: @abstract Returns whether the connection supports the given rotation angle in degrees. @param videoRotationAngle A video rotation angle to be checked. @result YES if the connection supports the given video rotation angle, NO otherwise. @discussion The connection's videoRotationAngle property can only be set to a certain angle if this method returns YES for that angle. Only rotation angles of 0, 90, 180 and 270 are supported.
     */
    isVideoRotationAngleSupported$(videoRotationAngle: number): boolean;
    /**
     * @property inputPorts @abstract An array of AVCaptureInputPort instances providing data through this connection. @discussion An AVCaptureConnection may involve one or more AVCaptureInputPorts producing data to the connection's AVCaptureOutput. This property is read-only. An AVCaptureConnection's inputPorts remain static for the life of the object.
     */
    inputPorts(): _NSArray;
    /**
     * @property output @abstract The AVCaptureOutput instance consuming data from this connection's inputPorts. @discussion An AVCaptureConnection may involve one or more AVCaptureInputPorts producing data to the connection's AVCaptureOutput. This property is read-only. An AVCaptureConnection's output remains static for the life of the object. Note that a connection can either be to an output or a video preview layer, but never to both.
     */
    output(): _AVCaptureOutput;
    /**
     * @property videoPreviewLayer @abstract The AVCaptureVideoPreviewLayer instance consuming data from this connection's inputPort. @discussion An AVCaptureConnection may involve one AVCaptureInputPort producing data to an AVCaptureVideoPreviewLayer object. This property is read-only. An AVCaptureConnection's videoPreviewLayer remains static for the life of the object. Note that a connection can either be to an output or a video preview layer, but never to both.
     */
    videoPreviewLayer(): _AVCaptureVideoPreviewLayer;
    /**
     * @property enabled @abstract Indicates whether the connection's output should consume data. @discussion The value of this property is a BOOL that determines whether the receiver's output should consume data from its connected inputPorts when a session is running. Clients can set this property to stop the flow of data to a given output during capture. The default value is YES.
     */
    enabled(): boolean;
    setEnabled$(value: boolean): void;
    /**
     * @property active @abstract Indicates whether the receiver's output is currently capable of consuming data through this connection. @discussion The value of this property is a BOOL that determines whether the receiver's output can consume data provided through this connection. This property is read-only. Clients may key-value observe this property to know when a session's configuration forces a connection to become inactive. The default value is YES. Prior to iOS 11, the audio connection feeding an AVCaptureAudioDataOutput is made inactive when using AVCaptureSessionPresetPhoto or the equivalent photo format using -[AVCaptureDevice activeFormat]. On iOS 11 and later, the audio connection feeding AVCaptureAudioDataOutput is active for all presets and device formats.
     */
    active(): boolean;
    /**
     * @property audioChannels @abstract An array of AVCaptureAudioChannel objects representing individual channels of audio data flowing through the connection. @discussion This property is only applicable to AVCaptureConnection instances involving audio. In such connections, the audioChannels array contains one AVCaptureAudioChannel object for each channel of audio data flowing through this connection.
     */
    audioChannels(): _NSArray;
    /**
     * @property supportsVideoMirroring @abstract Indicates whether the connection supports setting the videoMirrored property. @discussion This property is only applicable to AVCaptureConnection instances involving video. In such connections, the videoMirrored property may only be set if -isVideoMirroringSupported returns YES.
     */
    supportsVideoMirroring(): boolean;
    /**
     * @property videoMirrored @abstract Indicates whether the video flowing through the connection should be mirrored about its vertical axis. @discussion This property is only applicable to AVCaptureConnection instances involving video. if -isVideoMirroringSupported returns YES, videoMirrored may be set to flip the video about its vertical axis and produce a mirror-image effect. This property may not be set unless -isVideoMirroringSupported returns YES, otherwise a NSInvalidArgumentException is thrown. This property may not be set if -automaticallyAdjustsVideoMirroring returns YES, otherwise an NSInvalidArgumentException is thrown.
     */
    videoMirrored(): boolean;
    setVideoMirrored$(value: boolean): void;
    /**
     * @property automaticallyAdjustsVideoMirroring @abstract Specifies whether or not the value of @"videoMirrored" can change based on configuration of the session. @discussion For some session configurations, video data flowing through the connection will be mirrored by default. When the value of this property is YES, the value of @"videoMirrored" may change depending on the configuration of the session, for example after switching to a different AVCaptureDeviceInput. The default value is YES.
     */
    automaticallyAdjustsVideoMirroring(): boolean;
    setAutomaticallyAdjustsVideoMirroring$(value: boolean): void;
    /**
     * @property videoRotationAngle @abstract Indicates whether the video flowing through the connection should be rotated with a given angle in degrees. @discussion This property is only applicable to AVCaptureConnection instances involving video or depth. -setVideoRotationAngle: throws an NSInvalidArgumentException if set to an unsupported value (see -isVideoRotationAngleSupported:). Note that setting videoRotationAngle does not necessarily result in physical rotation of video buffers. For instance, a video connection to an AVCaptureMovieFileOutput handles orientation using a Quicktime track matrix. In the AVCapturePhotoOutput, orientation is handled using Exif tags. And the AVCaptureVideoPreviewLayer applies transforms to its contents to perform rotations. However, the AVCaptureVideoDataOutput and AVCaptureDepthDataOutput do output physically rotated video buffers. Setting a video rotation angle for an output that does physically rotate buffers requires a lengthy configuration of the capture render pipeline and should be done before calling -[AVCaptureSession startRunning]. Starting with the Spring 2024 iPad line, the default value of videoRotationAngle is 180 degrees for video data on Front Camera as compared to 0 degrees on previous devices. So clients using AVCaptureVideoDataOutput and AVCaptureDepthDataOutput should set videoRotationAngle to 0 to avoid the physical buffer rotation described above. And clients rotating video data by themselves must account for the default value of videoRotationAngle when applying angles (videoRotationAngleForHorizonLevelPreview, videoRotationAngleForHorizonLevelCapture) from AVCaptureDeviceRotationCoordinator. Note that this change in default value is currently limited to these iPads, however it is recommended that clients rotating video data themselves incorporate the default rotation value into their workflows for all devices. Clients using AVCaptureVideoDataOutput with ProRes Raw should set videoRotationAngle to 0 as rotation is not supported for RAW buffers. If clients want to rotate these buffers themselves they need to apply rotation angles (videoRotationAngleForHorizonLevelPreview, videoRotationAngleForHorizonLevelCapture) provided by AVCaptureDeviceRotationCoordinator.
     */
    videoRotationAngle(): number;
    setVideoRotationAngle$(value: number): void;
    /**
     * @property supportsVideoOrientation @abstract Indicates whether the connection supports setting the videoOrientation property. @discussion This property is deprecated. Use -isVideoRotationAngleSupported: instead.
     * @deprecated Use -isVideoRotationAngleSupported: instead
     */
    supportsVideoOrientation(): boolean;
    /**
     * @property videoOrientation @abstract Indicates whether the video flowing through the connection should be rotated to a given orientation. @discussion This property is deprecated. Use -videoRotationAngle instead. This property may only be set if -isVideoOrientationSupported returns YES, otherwise an NSInvalidArgumentException is thrown.
     * @deprecated Use -videoRotationAngle instead
     */
    videoOrientation(): AVCaptureVideoOrientation;
    setVideoOrientation$(value: AVCaptureVideoOrientation): void;
    /**
     * @property supportsVideoFieldMode @abstract Indicates whether the connection supports setting the videoFieldMode property. @discussion This property is only applicable to AVCaptureConnection instances involving video. In such connections, the videoFieldMode property may only be set if -isVideoFieldModeSupported returns YES.
     */
    supportsVideoFieldMode(): boolean;
    /**
     * @property videoFieldMode @abstract Indicates how interlaced video flowing through the connection should be treated. @discussion This property is only applicable to AVCaptureConnection instances involving video. If -isVideoFieldModeSupported returns YES, videoFieldMode may be set to affect interlaced video content flowing through the connection.
     */
    videoFieldMode(): AVVideoFieldMode;
    setVideoFieldMode$(value: AVVideoFieldMode): void;
    /**
     * @property supportsVideoMinFrameDuration @abstract Indicates whether the connection supports setting the videoMinFrameDuration property. @discussion This property is only applicable to AVCaptureConnection instances involving video. In such connections, the videoMinFrameDuration property may only be set if -isVideoMinFrameDurationSupported returns YES. This property is deprecated on iOS, where min and max frame rate adjustments are applied exclusively at the AVCaptureDevice using the activeVideoMinFrameDuration and activeVideoMaxFrameDuration properties. On macOS, frame rate adjustments are supported both at the AVCaptureDevice and at AVCaptureConnection, enabling connections to output different frame rates.
     * @deprecated Use AVCaptureDevice's activeFormat.videoSupportedFrameRateRanges instead.
     */
    supportsVideoMinFrameDuration(): boolean;
    /**
     * @property videoMinFrameDuration @abstract Indicates the minimum time interval at which the receiver should output consecutive video frames. @discussion The value of this property is a CMTime specifying the minimum duration of each video frame output by the receiver, placing a lower bound on the amount of time that should separate consecutive frames. This is equivalent to the reciprocal of the maximum frame rate. A value of kCMTimeZero or kCMTimeInvalid indicates an unlimited maximum frame rate. The default value is kCMTimeInvalid. This property is deprecated on iOS, where min and max frame rate adjustments are applied exclusively at the AVCaptureDevice using the activeVideoMinFrameDuration and activeVideoMaxFrameDuration properties. On macOS, frame rate adjustments are supported both at the AVCaptureDevice and at AVCaptureConnection, enabling connections to output different frame rates.
     * @deprecated Use AVCaptureDevice's activeVideoMinFrameDuration instead.
     */
    videoMinFrameDuration(): CMTime;
    setVideoMinFrameDuration$(value: CMTime): void;
    /**
     * @property supportsVideoMaxFrameDuration @abstract Indicates whether the connection supports setting the videoMaxFrameDuration property. @discussion This property is only applicable to AVCaptureConnection instances involving video. In such connections, the videoMaxFrameDuration property may only be set if -isVideoMaxFrameDurationSupported returns YES. This property is deprecated on iOS, where min and max frame rate adjustments are applied exclusively at the AVCaptureDevice using the activeVideoMinFrameDuration and activeVideoMaxFrameDuration properties. On macOS, frame rate adjustments are supported both at the AVCaptureDevice and at AVCaptureConnection, enabling connections to output different frame rates.
     * @deprecated Use AVCaptureDevice's activeFormat.videoSupportedFrameRateRanges instead.
     */
    supportsVideoMaxFrameDuration(): boolean;
    /**
     * @property videoMaxFrameDuration @abstract Indicates the maximum time interval at which the receiver should output consecutive video frames. @discussion The value of this property is a CMTime specifying the maximum duration of each video frame output by the receiver, placing an upper bound on the amount of time that should separate consecutive frames. This is equivalent to the reciprocal of the minimum frame rate. A value of kCMTimeZero or kCMTimeInvalid indicates an unlimited minimum frame rate. The default value is kCMTimeInvalid. This property is deprecated on iOS, where min and max frame rate adjustments are applied exclusively at the AVCaptureDevice using the activeVideoMinFrameDuration and activeVideoMaxFrameDuration properties. On macOS, frame rate adjustments are supported both at the AVCaptureDevice and at AVCaptureConnection, enabling connections to output different frame rates.
     * @deprecated Use AVCaptureDevice's activeVideoMaxFrameDuration instead.
     */
    videoMaxFrameDuration(): CMTime;
    setVideoMaxFrameDuration$(value: CMTime): void;
    /**
     * @property videoMaxScaleAndCropFactor @abstract Indicates the maximum video scale and crop factor supported by the receiver. @discussion This property is only applicable to AVCaptureConnection instances involving video. In such connections, the videoMaxScaleAndCropFactor property specifies the maximum CGFloat value that may be used when setting the videoScaleAndCropFactor property.
     */
    videoMaxScaleAndCropFactor(): number;
    /**
     * @property videoScaleAndCropFactor @abstract Indicates the current video scale and crop factor in use by the receiver. @discussion This property only applies to AVCaptureStillImageOutput connections. In such connections, the videoScaleAndCropFactor property may be set to a value in the range of 1.0 to videoMaxScaleAndCropFactor. At a factor of 1.0, the image is its original size. At a factor greater than 1.0, the image is scaled by the factor and center-cropped to its original dimensions. This factor is applied in addition to any magnification from AVCaptureDevice's videoZoomFactor property. @see -[AVCaptureDevice videoZoomFactor]
     */
    videoScaleAndCropFactor(): number;
    setVideoScaleAndCropFactor$(value: number): void;
    /**
     * @property preferredVideoStabilizationMode @abstract Indicates the stabilization mode to apply to video flowing through the receiver when it is supported. @discussion This property is only applicable to AVCaptureConnection instances involving video. On devices where the video stabilization feature is supported, only a subset of available source formats may be available for stabilization. By setting the preferredVideoStabilizationMode property to a value other than AVCaptureVideoStabilizationModeOff, video flowing through the receiver is stabilized when the mode is available. In the case of ProRes RAW, this property enables stabilization metadata to be generated, which an application supporting ProRes RAW can optionally apply at playback time using the ProRes RAW SDK. To learn more about the ProRes RAW SDK, refer to the Apple ProRes and ProRes RAW Authorized Products article on support.apple.com. See https://support.apple.com/en-us/118584. Enabling video stabilization introduces additional latency into the video capture pipeline and may consume more system memory depending on the stabilization mode and format. If the preferred stabilization mode isn't available, the activeVideoStabilizationMode will be set to AVCaptureVideoStabilizationModeOff. Clients may key-value observe the activeVideoStabilizationMode property to know which stabilization mode is in use or when it is off. The default value is AVCaptureVideoStabilizationModeOff. When setting this property to AVCaptureVideoStabilizationModeAuto, an appropriate stabilization mode will be chosen based on the format and frame rate. For apps linked before iOS 6.0, the default value is AVCaptureVideoStabilizationModeStandard for a video connection attached to an AVCaptureMovieFileOutput instance. For apps linked on or after iOS 6.0, the default value is always AVCaptureVideoStabilizationModeOff. Setting a video stabilization mode using this property may change the value of enablesVideoStabilizationWhenAvailable.
     */
    preferredVideoStabilizationMode(): AVCaptureVideoStabilizationMode;
    setPreferredVideoStabilizationMode$(value: AVCaptureVideoStabilizationMode): void;
    /**
     * @property activeVideoStabilizationMode @abstract Indicates the stabilization mode currently being applied to video flowing through the receiver. @discussion This property is only applicable to AVCaptureConnection instances involving video. On devices where the video stabilization feature is supported, only a subset of available source formats may be stabilized. The activeVideoStabilizationMode property returns a value other than AVCaptureVideoStabilizationModeOff if video stabilization is currently in use (or in the case of ProRes RAW, if stabilization metadata is being attached). This property never returns AVCaptureVideoStabilizationModeAuto. This property is key-value observable.
     */
    activeVideoStabilizationMode(): AVCaptureVideoStabilizationMode;
    /**
     * @property supportsVideoStabilization @abstract Indicates whether the connection supports video stabilization. @discussion This property is only applicable to AVCaptureConnection instances involving video. In such connections, the -enablesVideoStabilizationWhenAvailable property may only be set if -supportsVideoStabilization returns YES. This property returns YES if the connection's input device has one or more formats that support video stabilization and the connection's output supports video stabilization (or in the case of ProRes RAW, support stabilization metadata attachments). See [AVCaptureDeviceFormat isVideoStabilizationModeSupported:] to check which video stabilization modes are supported by the active device format.
     */
    supportsVideoStabilization(): boolean;
    /**
     * @property videoStabilizationEnabled @abstract Indicates whether stabilization is currently being applied to video flowing through the receiver. @discussion This property is only applicable to AVCaptureConnection instances involving video. On devices where the video stabilization feature is supported, only a subset of available source formats and resolutions may be available for stabilization. The videoStabilizationEnabled property returns YES if video stabilization is currently in use. This property is key-value observable. This property is deprecated. Use activeVideoStabilizationMode instead.
     * @deprecated Use activeVideoStabilizationMode instead.
     */
    videoStabilizationEnabled(): boolean;
    /**
     * @property enablesVideoStabilizationWhenAvailable @abstract Indicates whether stabilization should be applied to video flowing through the receiver when the feature is available. @discussion This property is only applicable to AVCaptureConnection instances involving video. On devices where the video stabilization feature is supported, only a subset of available source formats and resolutions may be available for stabilization. By setting the enablesVideoStabilizationWhenAvailable property to YES, video flowing through the receiver is stabilized when available. Enabling video stabilization may introduce additional latency into the video capture pipeline. Clients may key-value observe the videoStabilizationEnabled property to know when stabilization is in use or not. The default value is NO. For apps linked before iOS 6.0, the default value is YES for a video connection attached to an AVCaptureMovieFileOutput instance. For apps linked on or after iOS 6.0, the default value is always NO. This property is deprecated. Use preferredVideoStabilizationMode instead.
     * @deprecated Use preferredVideoStabilizationMode instead.
     */
    enablesVideoStabilizationWhenAvailable(): boolean;
    setEnablesVideoStabilizationWhenAvailable$(value: boolean): void;
    /**
     * @property cameraIntrinsicMatrixDeliverySupported @abstract Indicates whether the connection supports camera intrinsic matrix delivery. @discussion This property is only applicable to AVCaptureConnection instances involving video. For such connections, the cameraIntrinsicMatrixDeliveryEnabled property may only be set to YES if -isCameraIntrinsicMatrixDeliverySupported returns YES. This property returns YES if both the connection's input device format and the connection's output support camera intrinsic matrix delivery. Only the AVCaptureVideoDataOutput's connection supports this property. Note that if video stabilization is enabled (preferredVideoStabilizationMode is set to something other than AVCaptureVideoStabilizationModeOff), camera intrinsic matrix delivery is not supported. Starting in iOS 14.3, camera intrinsics are delivered with video buffers on which geometric distortion correction is applied.
     */
    cameraIntrinsicMatrixDeliverySupported(): boolean;
    /**
     * @property cameraIntrinsicMatrixDeliveryEnabled @abstract Indicates whether camera intrinsic matrix delivery should be enabled. @discussion This property is only applicable to AVCaptureConnection instances involving video. Refer to property cameraIntrinsicMatrixDeliverySupported before setting this property. When this property is set to YES, the receiver's output will add the kCMSampleBufferAttachmentKey_CameraIntrinsicMatrix sample buffer attachment to all vended sample buffers. This property must be set before the session starts running.
     */
    cameraIntrinsicMatrixDeliveryEnabled(): boolean;
    setCameraIntrinsicMatrixDeliveryEnabled$(value: boolean): void;
}
