public class AVCaptureDeviceFormat extends NSObject
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.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
AVCaptureDeviceFormat(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static AVCaptureDeviceFormat |
alloc() |
static AVCaptureDeviceFormat |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
long |
autoFocusSystem()
[@property] autoFocusSystem
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
CMFormatDescriptionRef |
formatDescription()
[@property] formatDescription
|
float |
geometricDistortionCorrectedVideoFieldOfView()
[@property] geometricDistortionCorrectedVideoFieldOfView
|
static long |
hash_static() |
CMVideoDimensions |
highResolutionStillImageDimensions()
[@property] highResolutionStillImageDimensions
|
AVCaptureDeviceFormat |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isCenterStageSupported()
[@property] centerStageSupported
|
boolean |
isGlobalToneMappingSupported()
[@property] globalToneMappingSupported
|
boolean |
isHighestPhotoQualitySupported()
[@property] highestPhotoQualitySupported
|
boolean |
isHighPhotoQualitySupported()
[@property] highPhotoQualitySupported
|
boolean |
isMultiCamSupported()
[@property] multiCamSupported
|
boolean |
isPortraitEffectsMatteStillImageDeliverySupported()
[@property] portraitEffectsMatteStillImageDeliverySupported
|
boolean |
isPortraitEffectSupported()
[@property] portraitEffectSupported
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
boolean |
isVideoBinned()
[@property] videoBinned
|
boolean |
isVideoHDRSupported()
[@property] videoHDRSupported
|
boolean |
isVideoStabilizationModeSupported(long videoStabilizationMode)
isVideoStabilizationModeSupported
|
boolean |
isVideoStabilizationSupported()
Deprecated.
|
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
CMTime |
maxExposureDuration()
[@property] maxExposureDuration
|
float |
maxISO()
[@property] maxISO
|
java.lang.String |
mediaType()
[@property] mediaType
|
CMTime |
minExposureDuration()
[@property] minExposureDuration
|
float |
minISO()
[@property] minISO
|
static AVCaptureDeviceFormat |
new_objc() |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
NSArray<? extends NSNumber> |
supportedColorSpaces()
[@property] supportedColorSpaces
|
NSArray<? extends AVCaptureDeviceFormat> |
supportedDepthDataFormats()
[@property] supportedDepthDataFormats
|
NSArray<? extends org.moe.natj.objc.Class> |
unsupportedCaptureOutputClasses()
[@property] unsupportedCaptureOutputClasses
|
static long |
version_static() |
float |
videoFieldOfView()
[@property] videoFieldOfView
|
AVFrameRateRange |
videoFrameRateRangeForCenterStage()
[@property] videoFrameRateRangeForCenterStage
|
AVFrameRateRange |
videoFrameRateRangeForPortraitEffect()
[@property] videoFrameRateRangeForPortraitEffect
|
double |
videoMaxZoomFactor()
[@property] videoMaxZoomFactor
|
double |
videoMaxZoomFactorForCenterStage()
[@property] videoMaxZoomFactorForCenterStage
|
double |
videoMaxZoomFactorForDepthDataDelivery()
[@property] videoMaxZoomFactorForDepthDataDelivery
|
double |
videoMinZoomFactorForCenterStage()
[@property] videoMinZoomFactorForCenterStage
|
double |
videoMinZoomFactorForDepthDataDelivery()
[@property] videoMinZoomFactorForDepthDataDelivery
|
NSArray<? extends AVFrameRateRange> |
videoSupportedFrameRateRanges()
[@property] videoSupportedFrameRateRanges
|
double |
videoZoomFactorUpscaleThreshold()
[@property] videoZoomFactorUpscaleThreshold
|
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeyprotected AVCaptureDeviceFormat(org.moe.natj.general.Pointer peer)
public static boolean accessInstanceVariablesDirectly()
public static AVCaptureDeviceFormat alloc()
public static AVCaptureDeviceFormat allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static AVCaptureDeviceFormat new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public long autoFocusSystem()
A property indicating the autofocus system.
This read-only property indicates the autofocus system.
public CMFormatDescriptionRef 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.
public CMVideoDimensions 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.
public AVCaptureDeviceFormat init()
public boolean isVideoBinned()
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.
public boolean isVideoHDRSupported()
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.
public boolean isVideoStabilizationModeSupported(long videoStabilizationMode)
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:].
videoStabilizationMode - An AVCaptureVideoStabilizationMode to be checked.@Deprecated public boolean isVideoStabilizationSupported()
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.
public CMTime maxExposureDuration()
A CMTime indicating the maximum supported exposure duration.
This read-only property indicates the maximum supported exposure duration.
public float maxISO()
An float indicating the maximum supported exposure ISO value.
This read-only property indicates the maximum supported exposure ISO value.
public java.lang.String 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.
public CMTime minExposureDuration()
A CMTime indicating the minimum supported exposure duration.
This read-only property indicates the minimum supported exposure duration.
public float minISO()
A float indicating the minimum supported exposure ISO value.
This read-only property indicates the minimum supported exposure ISO value.
public NSArray<? extends NSNumber> 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.
public float 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.
public double 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.
public NSArray<? extends AVFrameRateRange> 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.
public double 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.
public NSArray<? extends AVCaptureDeviceFormat> 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.
public NSArray<? extends org.moe.natj.objc.Class> 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.
public double videoMaxZoomFactorForDepthDataDelivery()
Indicates the maximum zoom factor available for the AVCaptureDevice's videoZoomFactor property when delivering depth data to one or more outputs.
Virtual devices support a limited zoom range when delivering depth data to any output. If this device format has no -supportedDepthDataFormats, this property returns videoMaxZoomFactor.
public double videoMinZoomFactorForDepthDataDelivery()
Indicates the minimum zoom factor available for the AVCaptureDevice's videoZoomFactor property when delivering depth data to one or more outputs.
Virtual devices support a limited zoom range when delivering depth data to any output. If this device format has no -supportedDepthDataFormats, this property returns 1.0.
public float 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.
public boolean isGlobalToneMappingSupported()
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.
public boolean isHighestPhotoQualitySupported()
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.
public boolean isMultiCamSupported()
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.
public boolean isPortraitEffectsMatteStillImageDeliverySupported()
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.
public boolean isCenterStageSupported()
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.
public boolean isHighPhotoQualitySupported()
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.
public boolean isPortraitEffectSupported()
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.
public AVFrameRateRange 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.
public AVFrameRateRange 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.
public double 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.
public double 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.