Class AVCaptureDeviceFormat

  • All Implemented Interfaces:
    NSObject

    public class AVCaptureDeviceFormat
    extends NSObject
    AVCaptureDeviceFormat An AVCaptureDeviceFormat wraps a CMFormatDescription and other format-related information, such as min and max framerate. An AVCaptureDevice exposes an array of formats, and its current activeFormat may be queried. The payload for the formats property is an array of AVCaptureDeviceFormat objects and the activeFormat property payload is an AVCaptureDeviceFormat. AVCaptureDeviceFormat is a thin wrapper around a CMFormatDescription, and can carry associated device format information that doesn't go in a CMFormatDescription, such as min and max frame rate. An AVCaptureDeviceFormat object is immutable. Its values do not change for the life of the object. API-Since: 7.0
    • Constructor Detail

      • AVCaptureDeviceFormat

        protected AVCaptureDeviceFormat​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static AVCaptureDeviceFormat allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • autoFocusSystem

        public long autoFocusSystem()
        [@property] autoFocusSystem A property indicating the autofocus system. This read-only property indicates the autofocus system. API-Since: 8.0
      • formatDescription

        @NotNull
        public @NotNull CMFormatDescriptionRef formatDescription()
        [@property] formatDescription A CMFormatDescription describing an AVCaptureDevice active or supported format. A CMFormatDescription describing an AVCaptureDevice active or supported format. This is a read-only property. The caller assumes no ownership of the returned value and should not CFRelease it.
      • highResolutionStillImageDimensions

        @Deprecated
        public CMVideoDimensions highResolutionStillImageDimensions()
        Deprecated.
        [@property] highResolutionStillImageDimensions CMVideoDimensions indicating the highest resolution still image that can be produced by this format. By default, AVCapturePhotoOutput and AVCaptureStillImageOutput emit images with the same dimensions as their source AVCaptureDevice's activeFormat.formatDescription property. Some device formats support high resolution photo output. That is, they can stream video to an AVCaptureVideoDataOutput or AVCaptureMovieFileOutput at one resolution while outputting photos to AVCapturePhotoOutput at a higher resolution. You may query this property to discover a video format's supported high resolution still image dimensions. See -[AVCapturePhotoOutput highResolutionPhotoEnabled], -[AVCapturePhotoSettings highResolutionPhotoEnabled], and -[AVCaptureStillImageOutput highResolutionStillImageOutputEnabled]. AVCaptureDeviceFormats of type AVMediaTypeDepthData may also support the delivery of a higher resolution depth data map to an AVCapturePhotoOutput. Chief differences are: - Depth data accompanying still images is not supported by AVCaptureStillImageOutput. You must use AVCapturePhotoOutput. - By opting in for depth data ( -[AVCapturePhotoSettings setDepthDataDeliveryEnabled:YES] ), you implicitly opt in for high resolution depth data if it's available. You may query the -[AVCaptureDevice activeDepthDataFormat]'s highResolutionStillImageDimensions to discover the depth data resolution that will be delivered with captured photos. API-Since: 8.0 Deprecated-Since: 16.0 Deprecated-Message: Use supportedMaxPhotoDimensions instead.
      • isVideoBinned

        public boolean isVideoBinned()
        [@property] videoBinned A property indicating whether the format is binned. videoBinned is a BOOL indicating whether the format is a binned format. Binning is a pixel-combining process which can result in greater low light sensitivity at the cost of reduced resolution.
      • isVideoHDRSupported

        public boolean isVideoHDRSupported()
        [@property] videoHDRSupported A property indicating whether the format supports high dynamic range streaming. videoHDRSupported is a BOOL indicating whether the format supports high dynamic range streaming, also known as Extended Dynamic Range (EDR). When enabled, the device streams at twice the published frame rate, capturing an under-exposed frame and correctly exposed frame for each frame time at the published rate. Portions of the under-exposed frame are combined with the correctly exposed frame to recover detail in darker areas of the scene. EDR is a separate and distinct feature from 10-bit HDR video (first seen in 2020 iPhones). 10-bit formats with HLG BT2020 color space have greater dynamic range by virtue of their expanded bit depth and HLG transfer function, and when captured in movies, contain Dolby Vision metadata. They are, in effect, "always on" HDR. And thus the videoHDRSupported property is always NO for 10-bit formats only supporting HLG BT2020 colorspace, since HDR cannot be enabled or disabled. To enable videoHDR (EDR), set the AVCaptureDevice.videoHDREnabled property. API-Since: 8.0
      • isVideoStabilizationModeSupported

        public boolean isVideoStabilizationModeSupported​(long videoStabilizationMode)
        isVideoStabilizationModeSupported Returns whether the format supports the given video stabilization mode. isVideoStabilizationModeSupported: returns a boolean value indicating whether the format can be stabilized using the given mode with -[AVCaptureConnection setPreferredVideoStabilizationMode:]. API-Since: 8.0
        Parameters:
        videoStabilizationMode - An AVCaptureVideoStabilizationMode to be checked.
      • isVideoStabilizationSupported

        @Deprecated
        public boolean isVideoStabilizationSupported()
        Deprecated.
        [@property] videoStabilizationSupported A property indicating whether the format supports video stabilization. videoStabilizationSupported is a BOOL indicating whether the format can be stabilized using AVCaptureConnection -setEnablesVideoStabilizationWhenAvailable. This property is deprecated. Use isVideoStabilizationModeSupported: instead. API-Since: 7.0 Deprecated-Since: 8.0 Deprecated-Message: Use isVideoStabilizationModeSupported: instead.
      • maxExposureDuration

        public CMTime maxExposureDuration()
        [@property] maxExposureDuration A CMTime indicating the maximum supported exposure duration. This read-only property indicates the maximum supported exposure duration. API-Since: 8.0
      • maxISO

        public float maxISO()
        [@property] maxISO An float indicating the maximum supported exposure ISO value. This read-only property indicates the maximum supported exposure ISO value. API-Since: 8.0
      • mediaType

        @NotNull
        public @NotNull java.lang.String mediaType()
        [@property] mediaType An NSString describing the media type of an AVCaptureDevice active or supported format. Supported mediaTypes are listed in AVMediaFormat.h. This is a read-only property. The caller assumes no ownership of the returned value and should not CFRelease it.
      • minExposureDuration

        public CMTime minExposureDuration()
        [@property] minExposureDuration A CMTime indicating the minimum supported exposure duration. This read-only property indicates the minimum supported exposure duration. API-Since: 8.0
      • minISO

        public float minISO()
        [@property] minISO A float indicating the minimum supported exposure ISO value. This read-only property indicates the minimum supported exposure ISO value. API-Since: 8.0
      • supportedColorSpaces

        @NotNull
        public @NotNull NSArray<? extends NSNumber> supportedColorSpaces()
        [@property] supportedColorSpaces A property indicating the receiver's supported color spaces. This read-only property indicates the receiver's supported color spaces as an array of AVCaptureColorSpace constants sorted from narrow to wide color. API-Since: 10.0
      • videoFieldOfView

        public float videoFieldOfView()
        [@property] videoFieldOfView A property indicating the format's horizontal field of view. videoFieldOfView is a float value indicating the receiver's field of view in degrees. If field of view is unknown, a value of 0 is returned.
      • videoMaxZoomFactor

        public double videoMaxZoomFactor()
        [@property] videoMaxZoomFactor Indicates the maximum zoom factor available for the AVCaptureDevice's videoZoomFactor property. If the device's videoZoomFactor property is assigned a larger value, an NSRangeException will be thrown. A maximum zoom factor of 1 indicates no zoom is available.
      • videoSupportedFrameRateRanges

        @NotNull
        public @NotNull NSArray<? extends AVFrameRateRange> videoSupportedFrameRateRanges()
        [@property] videoSupportedFrameRateRanges A property indicating the format's supported frame rate ranges. videoSupportedFrameRateRanges is an array of AVFrameRateRange objects, one for each of the format's supported video frame rate ranges.
      • videoZoomFactorUpscaleThreshold

        public double videoZoomFactorUpscaleThreshold()
        [@property] videoZoomFactorUpscaleThreshold Indicates the value of AVCaptureDevice's videoZoomFactor property at which the image output begins to require upscaling. In some cases the image sensor's dimensions are larger than the dimensions reported by the video AVCaptureDeviceFormat. As long as the sensor crop is larger than the reported dimensions of the AVCaptureDeviceFormat, the image will be downscaled. Setting videoZoomFactor to the value of videoZoomFactorUpscalingThreshold will provide a center crop of the sensor image data without any scaling. If a greater zoom factor is used, then the sensor data will be upscaled to the device format's dimensions.
      • supportedDepthDataFormats

        @NotNull
        public @NotNull NSArray<? extends AVCaptureDeviceFormat> supportedDepthDataFormats()
        [@property] supportedDepthDataFormats Indicates this format's companion depth data formats. If no depth data formats are supported by the receiver, an empty array is returned. On virtual devices, the supportedDepthDataFormats list items always match the aspect ratio of their paired video format. When the receiver is set as the device's activeFormat, you may set the device's activeDepthDataFormat to one of these supported depth data formats. API-Since: 11.0
      • unsupportedCaptureOutputClasses

        @NotNull
        public @NotNull NSArray<? extends org.moe.natj.objc.Class> unsupportedCaptureOutputClasses()
        [@property] unsupportedCaptureOutputClasses A property indicating AVCaptureOutput subclasses the receiver does not support. As a rule, AVCaptureDeviceFormats of a given mediaType are available for use with all AVCaptureOutputs that accept that media type, but there are exceptions. For instance, on apps linked against iOS versions earlier than 12.0, the photo resolution video formats may not be used as sources for AVCaptureMovieFileOutput due to bandwidth limitations. On DualCamera devices, AVCaptureDepthDataOutput is not supported when outputting full resolution (i.e. 12 MP) video due to bandwidth limitations. In order to stream depth data plus video data from a photo format, ensure that your AVCaptureVideoDataOutput's deliversPreviewSizedOutputBuffers property is set to YES. Likewise, to stream depth data while capturing video to a movie file using AVCaptureMovieFileOutput, call -[AVCaptureSession setSessionPreset:AVCaptureSessionPresetPhoto]. When using the photo preset, video is captured at preview resolution rather than the full sensor resolution. API-Since: 11.0
      • videoMaxZoomFactorForDepthDataDelivery

        @Deprecated
        public double videoMaxZoomFactorForDepthDataDelivery()
        Deprecated.
        [@property] videoMaxZoomFactorForDepthDataDelivery A deprecated property. Please use supportedVideoZoomFactorsForDepthDataDelivery instead API-Since: 11.0 Deprecated-Since: 16.0
      • videoMinZoomFactorForDepthDataDelivery

        @Deprecated
        public double videoMinZoomFactorForDepthDataDelivery()
        Deprecated.
        [@property] videoMinZoomFactorForDepthDataDelivery A deprecated property. Please use supportedVideoZoomFactorsForDepthDataDelivery instead API-Since: 11.0 Deprecated-Since: 16.0
      • geometricDistortionCorrectedVideoFieldOfView

        public float geometricDistortionCorrectedVideoFieldOfView()
        [@property] geometricDistortionCorrectedVideoFieldOfView A property indicating the format's horizontal field of view post geometric distortion correction. If the receiver's AVCaptureDevice does not support GDC, geometricDistortionCorrectedVideoFieldOfView matches the videoFieldOfView property. API-Since: 13.0
      • isGlobalToneMappingSupported

        public boolean isGlobalToneMappingSupported()
        [@property] globalToneMappingSupported A property indicating whether the format supports global tone mapping. globalToneMappingSupported is a BOOL indicating whether the format supports global tone mapping. See AVCaptureDevice's globalToneMappingEnabled property. API-Since: 13.0
      • isHighestPhotoQualitySupported

        public boolean isHighestPhotoQualitySupported()
        [@property] highestPhotoQualitySupported A boolean value specifying whether this format supports the highest possible photo quality that can be delivered on the current platform. Of the many formats supported by an AVCaptureDevice, only a few of them are designated as "photo" formats which can produce the highest possible quality, such as still image stabilization and Live Photos. If you intend to connect an AVCaptureDeviceInput to an AVCapturePhotoOutput and receive the best possible images, you should ensure that you are either using the AVCaptureSessionPresetPhoto as your preset, or if using the parallel AVCaptureDevice activeFormat API, select as your activeFormat one for which this property is YES. API-Since: 13.0
      • isMultiCamSupported

        public boolean isMultiCamSupported()
        [@property] multiCamSupported A property indicating whether this format is supported in an AVCaptureMultiCamSession. When using an AVCaptureSession (single camera capture), any of the formats in the device's -formats array may be set as the -activeFormat. However, when used with an AVCaptureMultiCamSession, the device's -activeFormat may only be set to one of the formats for which multiCamSupported answers YES. This limited subset of capture formats are known to run sustainably in a multi camera capture scenario. API-Since: 13.0
      • isPortraitEffectsMatteStillImageDeliverySupported

        public boolean isPortraitEffectsMatteStillImageDeliverySupported()
        [@property] portraitEffectsMatteStillImageDeliverySupported Indicates whether this depth format supports the delivery of a portrait effects matte. Some depth formats are capable of producing an auxiliary matting image (similar to an auxiliary depth image) tuned for high quality portrait effects rendering (see AVPortraitEffectsMatte.h). If this property's value is YES, you may request portrait effects matte delivery in your photos using the AVCapturePhotoOutput, provided this format is selected as the activeDepthDataFormat. API-Since: 12.0
      • isCenterStageSupported

        public boolean isCenterStageSupported()
        [@property] centerStageSupported Indicates whether the format supports the Center Stage feature. This property returns YES if the format supports "Center Stage", which automatically adjusts the camera to keep people optimally framed within the field of view. See +AVCaptureDevice.centerStageEnabled for a detailed discussion. API-Since: 14.5
      • isHighPhotoQualitySupported

        public boolean isHighPhotoQualitySupported()
        [@property] highPhotoQualitySupported A boolean value specifying whether this format supports high photo quality when selecting an AVCapturePhotoQualityPrioritization of .balanced or .quality. If an AVCaptureDeviceFormat's highPhotoQualitySupported property is YES, the format produces higher image quality when selecting .balanced or .quality AVCapturePhotoQualityPrioritization compared to .speed. Such formats adhere to the following rules: - Photo requests with a prioritization of .speed produce the fastest image result (suitable for burst captures). - Photo requests with a prioritization of .balanced produce higher image quality without dropping frames if a video recording is underway. - Photo requests with a prioritization of .quality produce high image quality and may cause frame drops if a video recording is underway. For maximum backward compatibility, photo requests on high photo quality formats set to .quality only cause video frame drops if your app is linked on or after iOS 15. Formats that don't support high photo quality produce the same image quality whether you select .speed, .balanced, or .quality. Note that high photo quality is only attainable when using the AVCapturePhotoOutput with these supported formats. API-Since: 15.0
      • isPortraitEffectSupported

        public boolean isPortraitEffectSupported()
        [@property] portraitEffectSupported Indicates whether the format supports the Portrait Effect feature. This property returns YES if the format supports Portrait Effect, the application of a shallow depth of field effect to objects in the background. See +AVCaptureDevice.portraitEffectEnabled for a detailed discussion. API-Since: 15.0
      • videoFrameRateRangeForCenterStage

        @Nullable
        public @Nullable AVFrameRateRange videoFrameRateRangeForCenterStage()
        [@property] videoFrameRateRangeForCenterStage Indicates the minimum / maximum frame rates available when centerStageActive is YES. Devices may support a limited frame rate range when Center Stage is active. If this device format does not support Center Stage, this property returns nil. API-Since: 14.5
      • videoFrameRateRangeForPortraitEffect

        @Nullable
        public @Nullable AVFrameRateRange videoFrameRateRangeForPortraitEffect()
        [@property] videoFrameRateRangeForPortraitEffect Indicates the minimum / maximum frame rates available when portraitEffectActive is YES. Devices may support a limited frame rate range when Portrait Effect is active. If this device format does not support Portrait Effect, this property returns nil. API-Since: 15.0
      • videoMaxZoomFactorForCenterStage

        public double videoMaxZoomFactorForCenterStage()
        [@property] videoMaxZoomFactorForCenterStage Indicates the maximum zoom factor available for the AVCaptureDevice's videoZoomFactor property when centerStageActive is YES. Devices support a limited zoom range when Center Stage is active. If this device format does not support Center Stage, this property returns videoMaxZoomFactor. API-Since: 14.5
      • videoMinZoomFactorForCenterStage

        public double videoMinZoomFactorForCenterStage()
        [@property] videoMinZoomFactorForCenterStage Indicates the minimum zoom factor available for the AVCaptureDevice's videoZoomFactor property when centerStageActive is YES. Devices support a limited zoom range when Center Stage is active. If this device format does not support Center Stage, this property returns 1.0. API-Since: 14.5
      • isStudioLightSupported

        public boolean isStudioLightSupported()
        [@property] studioLightSupported Indicates whether the format supports the Studio Light feature. This property returns YES if the format supports Studio Light (artificial re-lighting of the subject's face). See +AVCaptureDevice.studioLightEnabled. API-Since: 16.0
      • secondaryNativeResolutionZoomFactors

        @NotNull
        public @NotNull NSArray<? extends NSNumber> secondaryNativeResolutionZoomFactors()
        [@property] secondaryNativeResolutionZoomFactors Indicates zoom factors at which this device transitions to secondary native resolution modes. Devices with this property have the means to switch their pixel sampling mode on the fly to produce a high-fidelity, non-upsampled images at a fixed zoom factor beyond 1.0x. API-Since: 16.0
      • supportedMaxPhotoDimensions

        @NotNull
        public @NotNull NSArray<? extends NSValue> supportedMaxPhotoDimensions()
        [@property] supportedMaxPhotoDimensions This property lists all of the supported maximum photo dimensions for this format. The array contains CMVideoDimensions structs encoded as NSValues. Enumerate all supported resolution settings for which this format may be configured to capture photos. Use these values to set AVCapturePhotoOutput.maxPhotoDimensions and AVCapturePhotoSettings.maxPhotoDimensions. API-Since: 16.0
      • supportedVideoZoomFactorsForDepthDataDelivery

        @Deprecated
        @NotNull
        public @NotNull NSArray<? extends NSNumber> supportedVideoZoomFactorsForDepthDataDelivery()
        Deprecated.
        [@property] supportedVideoZoomFactorsForDepthDataDelivery A deprecated property. Please use supportedVideoZoomRangesForDepthDataDelivery API-Since: 16.0 Deprecated-Since: 17.2
      • videoFrameRateRangeForStudioLight

        @Nullable
        public @Nullable AVFrameRateRange videoFrameRateRangeForStudioLight()
        [@property] videoFrameRateRangeForStudioLight Indicates the minimum / maximum frame rates available when studioLight is YES. Devices may support a limited frame rate range when Studio Light is active. If this device format does not support Studio Light, this property returns nil. API-Since: 16.0
      • reactionEffectsSupported

        public boolean reactionEffectsSupported()
        [@property] reactionEffectsSupported Indicates whether the format supports the Reaction Effects feature. This property returns YES if the format supports Reaction Effects. See +AVCaptureDevice.reactionEffectsEnabled. API-Since: 17.0
      • supportedVideoZoomRangesForDepthDataDelivery

        @NotNull
        public @NotNull NSArray<? extends AVZoomRange> supportedVideoZoomRangesForDepthDataDelivery()
        [@property] supportedVideoZoomRangesForDepthDataDelivery This property returns the zoom ranges within which depth data can be delivered. Virtual devices support limited zoom ranges when delivering depth data to any output. If this device format has no -supportedDepthDataFormats, this property returns an empty array. The presence of one or more ranges where the min and max zoom factors are not equal means that "continuous zoom" with depth is supported. For example: a) ranges: @[ [2..2], [4..4] ] only zoom factors 2 and 4 are allowed to be set when depthDataDelivery is enabled. Any other zoom factor results in an exception. b) ranges: @[ [2..5] ] depthDataDelivery is supported with zoom factors [2..5]. Zoom factors outside of this range may be set, but will result in loss of depthDataDeliery. Whenever zoom is set back to a value within the range of [2..5], depthDataDelivery will resume. When depth data delivery is enabled, the effective videoZoomFactorUpscaleThreshold will be 1.0, meaning that all zoom factors that are not native zoom factors (see AVCaptureDevice.virtualDeviceSwitchOverVideoZoomFactors and AVCaptureDevice.secondaryNativeResolutionZoomFactors) result in digital upscaling. API-Since: 17.2
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.
      • videoFrameRateRangeForReactionEffectsInProgress

        @Nullable
        public @Nullable AVFrameRateRange videoFrameRateRangeForReactionEffectsInProgress()
        [@property] videoFrameRateRangeForReactionEffectsInProgress Indicates the minimum / maximum frame rates available when a reaction effect is running. Unlike the other video effects, enabling reaction effects does not limit the stream's frame rate because most of the time no rendering is being performed. The frame rate will only ramp down when a reaction is actually being rendered on the stream (see AVCaptureDevice.reactionEffectsInProgress) API-Since: 17.0
      • zoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported

        public boolean zoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported()
        [@property] zoomFactorsOutsideOfVideoZoomRangesForDepthDeliverySupported This property returns whether the format supports zoom factors outside of the supportedVideoZoomFactorRangesForDepthDataDelivery. When a zoom factor outside of the supportedVideoZoomFactorRangesForDepthDataDelivery is set, depth data delivery will be suspended until a zoom factor within the supportedVideoZoomFactorRangesForDepthDataDelivery is set. API-Since: 17.2