Package apple.avfoundation
Class AVCaptureDevice
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.avfoundation.AVCaptureDevice
-
- All Implemented Interfaces:
NSObject
public class AVCaptureDevice extends NSObject
AVCaptureDevice An AVCaptureDevice represents a physical device that provides realtime input media data, such as video and audio. Each instance of AVCaptureDevice corresponds to a device, such as a camera or microphone. Instances of AVCaptureDevice cannot be created directly. An array of all currently available devices can also be obtained using the AVCaptureDeviceDiscoverySession. Devices can provide one or more streams of a given media type. Applications can search for devices matching desired criteria by using AVCaptureDeviceDiscoverySession, or may obtain a reference to the default device matching desired criteria by using +[AVCaptureDevice defaultDeviceWithDeviceType:mediaType:position:]. Instances of AVCaptureDevice can be used to provide media data to an AVCaptureSession by creating an AVCaptureDeviceInput with the device and adding that to the capture session.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAVCaptureDevice.Block_requestAccessForMediaTypeCompletionHandlerstatic interfaceAVCaptureDevice.Block_setExposureModeCustomWithDurationISOCompletionHandlerstatic interfaceAVCaptureDevice.Block_setExposureTargetBiasCompletionHandlerstatic interfaceAVCaptureDevice.Block_setFocusModeLockedWithLensPositionCompletionHandlerstatic interfaceAVCaptureDevice.Block_setWhiteBalanceModeLockedWithDeviceWhiteBalanceGainsCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAVCaptureDevice(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()longactiveColorSpace()[@property] activeColorSpace Indicates the receiver's current active color space.AVCaptureDeviceFormatactiveDepthDataFormat()[@property] activeDepthDataFormat The currently active depth data format of the receiver.CMTimeactiveDepthDataMinFrameDuration()[@property] activeDepthDataMinFrameDuration A property indicating the receiver's current active minimum depth data frame duration (the reciprocal of its maximum depth data frame rate).AVCaptureDeviceFormatactiveFormat()[@property] activeFormat The currently active format of the receiver.CMTimeactiveMaxExposureDuration()[@constant] activeMaxExposureDuration The maximum exposure (integration) time that may be used by the auto exposure algorithm.CMTimeactiveVideoMaxFrameDuration()[@property] activeVideoMaxFrameDuration A property indicating the receiver's current active maximum frame duration (the reciprocal of its min frame rate).CMTimeactiveVideoMinFrameDuration()[@property] activeVideoMinFrameDuration A property indicating the receiver's current active minimum frame duration (the reciprocal of its max frame rate).static AVCaptureDevicealloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static longauthorizationStatusForMediaType(java.lang.String mediaType)authorizationStatusForMediaType: Returns the client's authorization status for accessing the underlying hardware that supports a given media type.longautoFocusRangeRestriction()[@property] autoFocusRangeRestriction Indicates current restriction of the receiver's autofocus system to a particular range of focus scan, if it supports range restrictions.booleanautomaticallyAdjustsVideoHDREnabled()[@property] automaticallyAdjustsVideoHDREnabled Indicates whether the receiver is allowed to turn high dynamic range streaming on or off.booleanautomaticallyEnablesLowLightBoostWhenAvailable()[@property] automaticallyEnablesLowLightBoostWhenAvailable Indicates whether the receiver should automatically switch to low light boost mode when necessary.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)voidcancelVideoZoomRamp()cancelVideoZoomRamp Eases out of any video zoom transitions initiated by rampToVideoZoomFactor:withRate: This method is equivalent to calling rampToVideoZoomFactor:withRate: using the current zoom factor target and a rate of 0.AVCaptureWhiteBalanceChromaticityValueschromaticityValuesForDeviceWhiteBalanceGains(AVCaptureWhiteBalanceGains whiteBalanceGains)chromaticityValuesForDeviceWhiteBalanceGains: Converts device-specific white balance RGB gain values to device-independent chromaticity values.static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()NSArray<? extends AVCaptureDevice>constituentDevices()[@property] constituentDevices An array of constituent physical devices comprising a virtual device.static java.lang.StringdebugDescription_static()static AVCaptureDevicedefaultDeviceWithDeviceTypeMediaTypePosition(java.lang.String deviceType, java.lang.String mediaType, long position)defaultDeviceWithDeviceType:mediaType:position: Returns an AVCaptureDevice instance for the default device of the given device type, media type, and position.static AVCaptureDevicedefaultDeviceWithMediaType(java.lang.String mediaType)defaultDeviceWithMediaType: Returns an AVCaptureDevice instance for the default device of the given media type.static java.lang.Stringdescription_static()static NSArray<? extends AVCaptureDevice>devices()devices Returns an array of devices currently available for use as media input sources.static NSArray<? extends AVCaptureDevice>devicesWithMediaType(java.lang.String mediaType)devicesWithMediaType: Returns an array of devices currently available for use as sources of media with the given media type.java.lang.StringdeviceType()[@property] deviceType The type of the capture device.AVCaptureWhiteBalanceGainsdeviceWhiteBalanceGains()[@property] deviceWhiteBalanceGains Indicates the current device-specific RGB white balance gain values in use.AVCaptureWhiteBalanceGainsdeviceWhiteBalanceGainsForChromaticityValues(AVCaptureWhiteBalanceChromaticityValues chromaticityValues)deviceWhiteBalanceGainsForChromaticityValues: Converts device-independent chromaticity values to device-specific white balance RGB gain values.AVCaptureWhiteBalanceGainsdeviceWhiteBalanceGainsForTemperatureAndTintValues(AVCaptureWhiteBalanceTemperatureAndTintValues tempAndTintValues)deviceWhiteBalanceGainsForTemperatureAndTintValues: Converts device-independent temperature and tint values to device-specific white balance RGB gain values.static AVCaptureDevicedeviceWithUniqueID(java.lang.String deviceUniqueID)deviceWithUniqueID: Returns an AVCaptureDevice instance with the given unique ID.doubledualCameraSwitchOverVideoZoomFactor()[@property] dualCameraSwitchOverVideoZoomFactor The video zoom factor at or above which a DualCamera can select between its wide angle camera and its telephoto camera.CMTimeexposureDuration()[@property] exposureDuration The length of time over which exposure takes place.longexposureMode()[@property] exposureMode Indicates current exposure mode of the receiver, if it has adjustable exposure.CGPointexposurePointOfInterest()[@property] exposurePointOfInterest Indicates current exposure point of interest of the receiver, if it has one.floatexposureTargetBias()[@property] exposureTargetBias Bias applied to the target exposure value, in EV units.floatexposureTargetOffset()[@property] exposureTargetOffset Indicates the metered exposure level's offset from the target exposure value, in EV units.static NSDataextrinsicMatrixFromDeviceToDevice(AVCaptureDevice fromDevice, AVCaptureDevice toDevice)extrinsicMatrixFromDevice:toDevice: An NSData containing the relative extrinsic matrix from one AVCaptureDevice to another.longflashMode()[@property] flashMode Indicates current mode of the receiver's flash, if it has one.longfocusMode()[@property] focusMode Indicates current focus mode of the receiver, if it has one.CGPointfocusPointOfInterest()[@property] focusPointOfInterest Indicates current focus point of interest of the receiver, if it has one.NSArray<? extends AVCaptureDeviceFormat>formats()[@property] formats An array of AVCaptureDeviceFormat objects supported by the receiver.AVCaptureWhiteBalanceGainsgrayWorldDeviceWhiteBalanceGains()[@property] grayWorldDeviceWhiteBalanceGains Indicates the current device-specific Gray World RGB white balance gain values in use.booleanhasFlash()[@property] hasFlash Indicates whether the receiver has a flash.static longhash_static()booleanhasMediaType(java.lang.String mediaType)hasMediaType: Returns whether the receiver provides media with the given media type.booleanhasTorch()[@property] hasTorch Indicates whether the receiver has a torch.AVCaptureDeviceinit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisAdjustingExposure()[@property] adjustingExposure Indicates whether the receiver is currently adjusting camera exposure.booleanisAdjustingFocus()[@property] adjustingFocus Indicates whether the receiver is currently performing a focus scan to adjust focus.booleanisAdjustingWhiteBalance()[@property] adjustingWhiteBalance Indicates whether the receiver is currently adjusting camera white balance.booleanisAutoFocusRangeRestrictionSupported()[@property] autoFocusRangeRestrictionSupported Indicates whether the receiver supports autofocus range restrictions.booleanisConnected()[@property] connected Indicates whether the device is connected and available to the system.booleanisExposureModeSupported(long exposureMode)isExposureModeSupported: Returns whether the receiver supports the given exposure mode.booleanisExposurePointOfInterestSupported()[@property] exposurePointOfInterestSupported: Indicates whether the receiver supports exposure points of interest.booleanisFlashActive()[@property] flashActive Indicates whether the receiver's flash is currently active.booleanisFlashAvailable()[@property] flashAvailable Indicates whether the receiver's flash is currently available for use.booleanisFlashModeSupported(long flashMode)isFlashModeSupported: Returns whether the receiver supports the given flash mode.booleanisFocusModeSupported(long focusMode)isFocusModeSupported: Returns whether the receiver supports the given focus mode.booleanisFocusPointOfInterestSupported()[@property] focusPointOfInterestSupported Indicates whether the receiver supports focus points of interest.booleanisGeometricDistortionCorrectionEnabled()[@property] geometricDistortionCorrectionEnabled Indicates whether geometric distortion correction is enabled by the receiver.booleanisGeometricDistortionCorrectionSupported()[@property] geometricDistortionCorrectionSupported Indicates that geometric distortion correction is supported by the receiver.booleanisGlobalToneMappingEnabled()[@property] globalToneMappingEnabled Indicates whether the receiver should use global tone mapping.booleanisLockingFocusWithCustomLensPositionSupported()[@property] lockingFocusWithCustomLensPositionSupported Indicates whether the receiver supports a lens position other than AVCaptureLensPositionCurrent.booleanisLockingWhiteBalanceWithCustomDeviceGainsSupported()[@property] lockingWhiteBalanceWithCustomDeviceGainsSupported Indicates whether the receiver supports white balance gains other than AVCaptureWhiteBalanceGainsCurrent.booleanisLowLightBoostEnabled()[@property] lowLightBoostEnabled Indicates whether the receiver's low light boost feature is enabled.booleanisLowLightBoostSupported()[@property] lowLightBoostSupported Indicates whether the receiver supports boosting images in low light conditions.floatISO()[@property] ISO The current exposure ISO value.booleanisRampingVideoZoom()[@property] rampingVideoZoom Indicates if the zoom factor is transitioning to a value set by rampToVideoZoomFactor:withRate: Clients can observe this value to determine when a ramp begins or completes.booleanisSmoothAutoFocusEnabled()[@property] smoothAutoFocusEnabled Indicates whether the receiver should use smooth autofocus.booleanisSmoothAutoFocusSupported()[@property] smoothAutoFocusSupported Indicates whether the receiver supports smooth autofocus.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)booleanisSubjectAreaChangeMonitoringEnabled()[@property] subjectAreaChangeMonitoringEnabled Indicates whether the receiver should monitor the subject area for changes.booleanisSuspended()[@property] suspended Indicates whether the device is suspended.booleanisTorchActive()[@property] torchActive Indicates whether the receiver's torch is currently active.booleanisTorchAvailable()[@property] torchAvailable Indicates whether the receiver's torch is currently available for use.booleanisTorchModeSupported(long torchMode)isTorchModeSupported: Returns whether the receiver supports the given torch mode.booleanisVideoHDREnabled()[@property] videoHDREnabled Indicates whether the receiver's streaming high dynamic range feature is enabled.booleanisVirtualDevice()[@property] virtualDevice A property indicating whether the receiver is a virtual device consisting of constituent physical devices.booleanisWhiteBalanceModeSupported(long whiteBalanceMode)isWhiteBalanceModeSupported: Returns whether the receiver supports the given white balance mode.static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)floatlensAperture()[@property] lensAperture The size of the lens diaphragm.floatlensPosition()[@property] lensPosition Indicates the focus position of the lens.java.lang.StringlocalizedName()[@property] localizedName A localized human-readable name for the receiver.booleanlockForConfiguration(org.moe.natj.general.ptr.Ptr<NSError> outError)lockForConfiguration: Requests exclusive access to configure device hardware properties.java.lang.Stringmanufacturer()[@property] manufacturer The human-readable manufacturer name for the receiver.doublemaxAvailableVideoZoomFactor()[@property] maxAvailableVideoZoomFactor Indicates the maximum zoom factor available for the AVCaptureDevice's videoZoomFactor property.floatmaxExposureTargetBias()[@property] maxExposureTargetBias A float indicating the maximum supported exposure bias, in EV units.floatmaxWhiteBalanceGain()[@property] maxWhiteBalanceGain Indicates the maximum supported value to which a channel in the AVCaptureWhiteBalanceGains may be set.doubleminAvailableVideoZoomFactor()[@property] minAvailableVideoZoomFactor Indicates the minimum zoom factor available for the AVCaptureDevice's videoZoomFactor property.floatminExposureTargetBias()[@property] minExposureTargetBias A float indicating the minimum supported exposure bias, in EV units.java.lang.StringmodelID()[@property] modelID The model ID of the receiver.static java.lang.Objectnew_objc()longposition()[@property] position Indicates the physical position of an AVCaptureDevice's hardware on the system.voidrampToVideoZoomFactorWithRate(double factor, float rate)rampToVideoZoomFactor:withRate: Provides smooth changes in zoom factor.static voidrequestAccessForMediaTypeCompletionHandler(java.lang.String mediaType, AVCaptureDevice.Block_requestAccessForMediaTypeCompletionHandler handler)requestAccessForMediaType:completionHandler: Requests access to the underlying hardware for the media type, showing a dialog to the user if necessary.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetActiveColorSpace(long value)[@property] activeColorSpace Indicates the receiver's current active color space.voidsetActiveDepthDataFormat(AVCaptureDeviceFormat value)[@property] activeDepthDataFormat The currently active depth data format of the receiver.voidsetActiveDepthDataMinFrameDuration(CMTime value)[@property] activeDepthDataMinFrameDuration A property indicating the receiver's current active minimum depth data frame duration (the reciprocal of its maximum depth data frame rate).voidsetActiveFormat(AVCaptureDeviceFormat value)[@property] activeFormat The currently active format of the receiver.voidsetActiveMaxExposureDuration(CMTime value)[@constant] activeMaxExposureDuration The maximum exposure (integration) time that may be used by the auto exposure algorithm.voidsetActiveVideoMaxFrameDuration(CMTime value)[@property] activeVideoMaxFrameDuration A property indicating the receiver's current active maximum frame duration (the reciprocal of its min frame rate).voidsetActiveVideoMinFrameDuration(CMTime value)[@property] activeVideoMinFrameDuration A property indicating the receiver's current active minimum frame duration (the reciprocal of its max frame rate).voidsetAutoFocusRangeRestriction(long value)[@property] autoFocusRangeRestriction Indicates current restriction of the receiver's autofocus system to a particular range of focus scan, if it supports range restrictions.voidsetAutomaticallyAdjustsVideoHDREnabled(boolean value)[@property] automaticallyAdjustsVideoHDREnabled Indicates whether the receiver is allowed to turn high dynamic range streaming on or off.voidsetAutomaticallyEnablesLowLightBoostWhenAvailable(boolean value)[@property] automaticallyEnablesLowLightBoostWhenAvailable Indicates whether the receiver should automatically switch to low light boost mode when necessary.voidsetExposureMode(long value)[@property] exposureMode Indicates current exposure mode of the receiver, if it has adjustable exposure.voidsetExposureModeCustomWithDurationISOCompletionHandler(CMTime duration, float ISO, AVCaptureDevice.Block_setExposureModeCustomWithDurationISOCompletionHandler handler)setExposureModeCustomWithDuration:ISO:completionHandler: Sets exposureMode to AVCaptureExposureModeCustom and locks exposureDuration and ISO at explicit values.voidsetExposurePointOfInterest(CGPoint value)[@property] exposurePointOfInterest Indicates current exposure point of interest of the receiver, if it has one.voidsetExposureTargetBiasCompletionHandler(float bias, AVCaptureDevice.Block_setExposureTargetBiasCompletionHandler handler)setExposureTargetBias:completionHandler: Sets the bias to be applied to the target exposure value.voidsetFlashMode(long value)[@property] flashMode Indicates current mode of the receiver's flash, if it has one.voidsetFocusMode(long value)[@property] focusMode Indicates current focus mode of the receiver, if it has one.voidsetFocusModeLockedWithLensPositionCompletionHandler(float lensPosition, AVCaptureDevice.Block_setFocusModeLockedWithLensPositionCompletionHandler handler)setFocusModeLockedWithLensPosition:completionHandler: Sets focusMode to AVCaptureFocusModeLocked and locks lensPosition at an explicit value.voidsetFocusPointOfInterest(CGPoint value)[@property] focusPointOfInterest Indicates current focus point of interest of the receiver, if it has one.voidsetGeometricDistortionCorrectionEnabled(boolean value)[@property] geometricDistortionCorrectionEnabled Indicates whether geometric distortion correction is enabled by the receiver.voidsetGlobalToneMappingEnabled(boolean value)[@property] globalToneMappingEnabled Indicates whether the receiver should use global tone mapping.voidsetSmoothAutoFocusEnabled(boolean value)[@property] smoothAutoFocusEnabled Indicates whether the receiver should use smooth autofocus.voidsetSubjectAreaChangeMonitoringEnabled(boolean value)[@property] subjectAreaChangeMonitoringEnabled Indicates whether the receiver should monitor the subject area for changes.voidsetTorchMode(long value)[@property] torchMode Indicates current mode of the receiver's torch, if it has one.booleansetTorchModeOnWithLevelError(float torchLevel, org.moe.natj.general.ptr.Ptr<NSError> outError)setTorchModeOnWithLevel:error: Sets the current mode of the receiver's torch to AVCaptureTorchModeOn at the specified level.static voidsetVersion_static(long aVersion)voidsetVideoHDREnabled(boolean value)[@property] videoHDREnabled Indicates whether the receiver's streaming high dynamic range feature is enabled.voidsetVideoZoomFactor(double value)[@property] videoZoomFactor Controls zoom level of image outputs Applies a centered crop for all image outputs, scaling as necessary to maintain output dimensions.voidsetWhiteBalanceMode(long value)[@property] whiteBalanceMode Indicates current white balance mode of the receiver, if it has adjustable white balance.voidsetWhiteBalanceModeLockedWithDeviceWhiteBalanceGainsCompletionHandler(AVCaptureWhiteBalanceGains whiteBalanceGains, AVCaptureDevice.Block_setWhiteBalanceModeLockedWithDeviceWhiteBalanceGainsCompletionHandler handler)setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler: Sets white balance to locked mode with explicit deviceWhiteBalanceGains values.static org.moe.natj.objc.Classsuperclass_static()booleansupportsAVCaptureSessionPreset(java.lang.String preset)supportsAVCaptureSessionPreset: Returns whether the receiver can be used in an AVCaptureSession configured with the given preset.AVCaptureSystemPressureStatesystemPressureState()[@property] systemPressureState A key-value observable property indicating the capture device's current system pressure state.AVCaptureWhiteBalanceTemperatureAndTintValuestemperatureAndTintValuesForDeviceWhiteBalanceGains(AVCaptureWhiteBalanceGains whiteBalanceGains)temperatureAndTintValuesForDeviceWhiteBalanceGains: Converts device-specific white balance RGB gain values to device-independent temperature and tint values.floattorchLevel()[@property] torchLevel Indicates the receiver's current torch brightness level as a floating point value.longtorchMode()[@property] torchMode Indicates current mode of the receiver's torch, if it has one.java.lang.StringuniqueID()[@property] uniqueID An ID unique to the model of device corresponding to the receiver.voidunlockForConfiguration()unlockForConfiguration Release exclusive control over device hardware properties.static longversion_static()doublevideoZoomFactor()[@property] videoZoomFactor Controls zoom level of image outputs Applies a centered crop for all image outputs, scaling as necessary to maintain output dimensions.NSArray<? extends NSNumber>virtualDeviceSwitchOverVideoZoomFactors()[@property] virtualDeviceSwitchOverVideoZoomFactors An array of video zoom factors at or above which a virtual device (such as the Dual Camera) may switch to its next constituent device.longwhiteBalanceMode()[@property] whiteBalanceMode Indicates current white balance mode of the receiver, if it has adjustable white balance.-
Methods inherited from class apple.NSObject
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, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static AVCaptureDevice alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
authorizationStatusForMediaType
public static long authorizationStatusForMediaType(java.lang.String mediaType)
authorizationStatusForMediaType: Returns the client's authorization status for accessing the underlying hardware that supports a given media type. This method returns the AVAuthorizationStatus of the client for accessing the underlying hardware supporting the media type. Media type constants are defined in AVMediaFormat.h. If any media type other than AVMediaTypeVideo or AVMediaTypeAudio is supplied, an NSInvalidArgumentException will be thrown. If the status is AVAuthorizationStatusNotDetermined, you may use the +requestAccessForMediaType:completionHandler: method to request access by prompting the user.- Parameters:
mediaType- The media type, either AVMediaTypeVideo or AVMediaTypeAudio- Returns:
- The authorization status of the client
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
defaultDeviceWithDeviceTypeMediaTypePosition
public static AVCaptureDevice defaultDeviceWithDeviceTypeMediaTypePosition(java.lang.String deviceType, java.lang.String mediaType, long position)
defaultDeviceWithDeviceType:mediaType:position: Returns an AVCaptureDevice instance for the default device of the given device type, media type, and position. This method returns the default device of the given combination of device type, media type, and position currently available on the system.- Parameters:
deviceType- The device type supported by the returned device. It must be a valid AVCaptureDeviceType.mediaType- The media type, such as AVMediaTypeVideo, AVMediaTypeAudio, or AVMediaTypeMuxed, supported by the returned device. Pass nil to consider devices with any media type.position- The position supported by the returned device. Pass AVCaptureDevicePositionUnspecified to consider devices with any position.- Returns:
- The default device with the given device type, media type and position or nil if no device with that media type exists and nil otherwise.
-
defaultDeviceWithMediaType
public static AVCaptureDevice defaultDeviceWithMediaType(java.lang.String mediaType)
defaultDeviceWithMediaType: Returns an AVCaptureDevice instance for the default device of the given media type. This method returns the default device of the given media type currently available on the system. For example, for AVMediaTypeVideo, this method will return the built in camera that is primarily used for capture and recording. Media type constants are defined in AVMediaFormat.h.- Parameters:
mediaType- The media type, such as AVMediaTypeVideo, AVMediaTypeAudio, or AVMediaTypeMuxed, supported by the returned device.- Returns:
- The default device with the given media type, or nil if no device with that media type exists.
-
description_static
public static java.lang.String description_static()
-
deviceWithUniqueID
public static AVCaptureDevice deviceWithUniqueID(java.lang.String deviceUniqueID)
deviceWithUniqueID: Returns an AVCaptureDevice instance with the given unique ID. Every available capture device has a unique ID that persists on one system across device connections and disconnections, application restarts, and reboots of the system itself. This method can be used to recall or track the status of a specific device whose unique ID has previously been saved.- Parameters:
deviceUniqueID- The unique ID of the device instance to be returned.- Returns:
- An AVCaptureDevice instance with the given unique ID, or nil if no device with that unique ID is available.
-
devices
public static NSArray<? extends AVCaptureDevice> devices()
devices Returns an array of devices currently available for use as media input sources. This method returns an array of AVCaptureDevice instances for input devices currently connected and available for capture. The returned array contains all devices that are available at the time the method is called. Applications should observe AVCaptureDeviceWasConnectedNotification and AVCaptureDeviceWasDisconnectedNotification to be notified when the list of available devices has changed.- Returns:
- An NSArray of AVCaptureDevice instances for each available device.
-
devicesWithMediaType
public static NSArray<? extends AVCaptureDevice> devicesWithMediaType(java.lang.String mediaType)
devicesWithMediaType: Returns an array of devices currently available for use as sources of media with the given media type. This method returns an array of AVCaptureDevice instances for input devices currently connected and available for capture that provide media of the given type. Media type constants are defined in AVMediaFormat.h. The returned array contains all devices that are available at the time the method is called. Applications should observe AVCaptureDeviceWasConnectedNotification and AVCaptureDeviceWasDisconnectedNotification to be notified when the list of available devices has changed.- Parameters:
mediaType- The media type, such as AVMediaTypeVideo, AVMediaTypeAudio, or AVMediaTypeMuxed, supported by each returned device.- Returns:
- An NSArray of AVCaptureDevice instances for each available device.
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
requestAccessForMediaTypeCompletionHandler
public static void requestAccessForMediaTypeCompletionHandler(java.lang.String mediaType, AVCaptureDevice.Block_requestAccessForMediaTypeCompletionHandler handler)requestAccessForMediaType:completionHandler: Requests access to the underlying hardware for the media type, showing a dialog to the user if necessary. Use this function to request access to the hardware for a given media type. Media type constants are defined in AVMediaFormat.h. If any media type other than AVMediaTypeVideo or AVMediaTypeAudio is supplied, an NSInvalidArgumentException will be thrown. This call will not block while the user is being asked for access, allowing the client to continue running. Until access has been granted, any AVCaptureDevices for the media type will vend silent audio samples or black video frames. The user is only asked for permission the first time the client requests access. Later calls use the permission granted by the user. Note that the authorization dialog will automatically be shown if the status is AVAuthorizationStatusNotDetermined when creating an AVCaptureDeviceInput. Invoking this method with AVMediaTypeAudio is equivalent to calling -[AVAudioSession requestRecordPermission:]. The completion handler is called on an arbitrary dispatch queue. Is it the client's responsibility to ensure that any UIKit-related updates are called on the main queue or main thread as a result.- Parameters:
mediaType- The media type, either AVMediaTypeVideo or AVMediaTypeAudiohandler- A block called with the result of requesting access
-
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()
-
ISO
public float ISO()
[@property] ISO The current exposure ISO value. This property controls the sensor's sensitivity to light by means of a gain value applied to the signal. Only ISO values between activeFormat.minISO and activeFormat.maxISO are supported. Higher values will result in noisier images. This property is key-value observable. It can be read at any time, regardless of exposure mode, but can only be set via setExposureModeCustomWithDuration:ISO:completionHandler:.
-
activeColorSpace
public long activeColorSpace()
[@property] activeColorSpace Indicates the receiver's current active color space. By default, an AVCaptureDevice attached to an AVCaptureSession is automatically configured for wide color by the AVCaptureSession (see AVCaptureSession automaticallyConfiguresCaptureDeviceForWideColor). You may also set the activeColorSpace manually. To prevent the AVCaptureSession from undoing your work, remember to set AVCaptureSession's automaticallyConfiguresCaptureDeviceForWideColor property to NO. Changing the receiver's activeColorSpace while the session is running requires a disruptive reconfiguration of the capture render pipeline. Movie captures in progress will be ended immediately; unfulfilled photo requests will be aborted; video preview will temporarily freeze. -setActiveColorSpace: throws an NSGenericException if called without first obtaining exclusive access to the receiver using -lockForConfiguration:.
-
activeFormat
public AVCaptureDeviceFormat activeFormat()
[@property] activeFormat The currently active format of the receiver. This property can be used to get or set the currently active device format. -setActiveFormat: throws an NSInvalidArgumentException if set to a format not present in the formats array. -setActiveFormat: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's activeFormat by key value observing this property. On iOS, use of AVCaptureDevice's setActiveFormat: and AVCaptureSession's setSessionPreset: are mutually exclusive. If you set a capture device's active format, the session to which it is attached changes its preset to AVCaptureSessionPresetInputPriority. Likewise if you set the AVCaptureSession's sessionPreset property, the session assumes control of its input devices, and configures their activeFormat appropriately. Note that audio devices do not expose any user-configurable formats on iOS. To configure audio input on iOS, you should use the AVAudioSession APIs instead (see AVAudioSession.h). The activeFormat, activeVideoMinFrameDuration, and activeVideoMaxFrameDuration properties may be set simultaneously by using AVCaptureSession's begin/commitConfiguration methods: [session beginConfiguration]; // the session to which the receiver's AVCaptureDeviceInput is added. if ( [device lockForConfiguration:&error] ) { [device setActiveFormat:newFormat]; [device setActiveVideoMinFrameDuration:newMinDuration]; [device setActiveVideoMaxFrameDuration:newMaxDuration]; [device unlockForConfiguration]; } [session commitConfiguration]; // The new format and frame rates are applied together in commitConfiguration Note that when configuring a session to use an active format intended for high resolution still photography and applying one or more of the following operations to an AVCaptureVideoDataOutput, the system may not meet the target framerate: zoom, orientation changes, format conversion.
-
activeVideoMaxFrameDuration
public CMTime activeVideoMaxFrameDuration()
[@property] activeVideoMaxFrameDuration A property indicating the receiver's current active maximum frame duration (the reciprocal of its min frame rate). An AVCaptureDevice's activeVideoMaxFrameDuration property is the reciprocal of its active minimum frame rate. To limit the min frame rate of the capture device, clients may set this property to a value supported by the receiver's activeFormat (see AVCaptureDeviceFormat's videoSupportedFrameRateRanges property). Clients may set this property's value to kCMTimeInvalid to return activeVideoMaxFrameDuration to its default value for the given activeFormat. -setActiveVideoMaxFrameDuration: throws an NSInvalidArgumentException if set to an unsupported value. -setActiveVideoMaxFrameDuration: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's activeVideoMaxFrameDuration by key value observing this property. On iOS, the receiver's activeVideoMaxFrameDuration resets to its default value under the following conditions: - The receiver's activeFormat changes - The receiver's AVCaptureDeviceInput's session's sessionPreset changes - The receiver's AVCaptureDeviceInput is added to a session When exposureMode is AVCaptureExposureModeCustom, frame rate and exposure duration are interrelated. If you call setExposureModeCustomWithDuration:ISO:completionHandler: with an exposureDuration longer than the current activeVideoMaxFrameDuration, the activeVideoMaxFrameDuration will be lengthened to accommodate the longer exposure time. Setting a shorter exposure duration does not automatically change the activeVideoMinFrameDuration or activeVideoMaxFrameDuration. To explicitly increase the frame rate in custom exposure mode, you must set the activeVideoMaxFrameDuration to a shorter value. If your new max frame duration is shorter than the current exposureDuration, the exposureDuration will shorten as well to accommodate the new frame rate.
-
activeVideoMinFrameDuration
public CMTime activeVideoMinFrameDuration()
[@property] activeVideoMinFrameDuration A property indicating the receiver's current active minimum frame duration (the reciprocal of its max frame rate). An AVCaptureDevice's activeVideoMinFrameDuration property is the reciprocal of its active maximum frame rate. To limit the max frame rate of the capture device, clients may set this property to a value supported by the receiver's activeFormat (see AVCaptureDeviceFormat's videoSupportedFrameRateRanges property). Clients may set this property's value to kCMTimeInvalid to return activeVideoMinFrameDuration to its default value for the given activeFormat. -setActiveVideoMinFrameDuration: throws an NSInvalidArgumentException if set to an unsupported value. -setActiveVideoMinFrameDuration: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's activeVideoMinFrameDuration by key value observing this property. On iOS, the receiver's activeVideoMinFrameDuration resets to its default value under the following conditions: - The receiver's activeFormat changes - The receiver's AVCaptureDeviceInput's session's sessionPreset changes - The receiver's AVCaptureDeviceInput is added to a session When exposureMode is AVCaptureExposureModeCustom, setting the activeVideoMinFrameDuration affects max frame rate, but not exposureDuration. You may use setExposureModeCustomWithDuration:ISO:completionHandler: to set a shorter exposureDuration than your activeVideoMinFrameDuration, if desired.
-
autoFocusRangeRestriction
public long autoFocusRangeRestriction()
[@property] autoFocusRangeRestriction Indicates current restriction of the receiver's autofocus system to a particular range of focus scan, if it supports range restrictions. The value of this property is an AVCaptureAutoFocusRangeRestriction indicating how the autofocus system should limit its focus scan. The default value is AVCaptureAutoFocusRangeRestrictionNone. -setAutoFocusRangeRestriction: throws an NSInvalidArgumentException if isAutoFocusRangeRestrictionSupported returns NO. -setAutoFocusRangeRestriction: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. This property only has an effect when the focusMode property is set to AVCaptureFocusModeAutoFocus or AVCaptureFocusModeContinuousAutoFocus. Note that setting autoFocusRangeRestriction alone does not initiate a focus operation. After setting autoFocusRangeRestriction, call -setFocusMode: to apply the new restriction.
-
automaticallyAdjustsVideoHDREnabled
public boolean automaticallyAdjustsVideoHDREnabled()
[@property] automaticallyAdjustsVideoHDREnabled Indicates whether the receiver is allowed to turn high dynamic range streaming on or off. The value of this property is a BOOL indicating whether the receiver is free to turn high dynamic range streaming on or off. This property defaults to YES. By default, AVCaptureDevice always turns off videoHDREnabled when a client uses the -setActiveFormat: API to set a new format. When the client uses AVCaptureSession's setSessionPreset: API instead, AVCaptureDevice turns videoHDR on automatically if it's a good fit for the preset. -setAutomaticallyAdjustsVideoHDREnabled: throws an NSGenericException if called without first obtaining exclusive access to the receiver using -lockForConfiguration:. Clients can key-value observe videoHDREnabled to know when the receiver has automatically changed the value.
-
automaticallyEnablesLowLightBoostWhenAvailable
public boolean automaticallyEnablesLowLightBoostWhenAvailable()
[@property] automaticallyEnablesLowLightBoostWhenAvailable Indicates whether the receiver should automatically switch to low light boost mode when necessary. On a receiver where -isLowLightBoostSupported returns YES, a special low light boost mode may be engaged to improve image quality. When the automaticallyEnablesLowLightBoostWhenAvailable property is set to YES, the receiver switches at its discretion to a special boost mode under low light, and back to normal operation when the scene becomes sufficiently lit. An AVCaptureDevice that supports this feature may only engage boost mode for certain source formats or resolutions. Clients may observe changes to the lowLightBoostEnabled property to know when the mode has engaged. The switch between normal operation and low light boost mode may drop one or more video frames. The default value is NO. Setting this property throws an NSInvalidArgumentException if -isLowLightBoostSupported returns NO. The receiver must be locked for configuration using lockForConfiguration: before clients can set this method, otherwise an NSGenericException is thrown.
-
cancelVideoZoomRamp
public void cancelVideoZoomRamp()
cancelVideoZoomRamp Eases out of any video zoom transitions initiated by rampToVideoZoomFactor:withRate: This method is equivalent to calling rampToVideoZoomFactor:withRate: using the current zoom factor target and a rate of 0. This allows a smooth stop to any changes in zoom which were in progress. -cancelVideoZoomRamp: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.
-
chromaticityValuesForDeviceWhiteBalanceGains
public AVCaptureWhiteBalanceChromaticityValues chromaticityValuesForDeviceWhiteBalanceGains(AVCaptureWhiteBalanceGains whiteBalanceGains)
chromaticityValuesForDeviceWhiteBalanceGains: Converts device-specific white balance RGB gain values to device-independent chromaticity values. This method may be called on the receiver to convert device-specific white balance RGB gain values to device-independent chromaticity (little x, little y) values. For each channel in the whiteBalanceGains struct, only values between 1.0 and -maxWhiteBalanceGain are supported. This method throws an NSRangeException if any of the whiteBalanceGains are set to unsupported values.- Parameters:
whiteBalanceGains- White balance gain values, as described in the documentation for the deviceWhiteBalanceGains property. A value of AVCaptureWhiteBalanceGainsCurrent may not be used in this function.- Returns:
- A fully populated AVCaptureWhiteBalanceChromaticityValues structure containing device-independent values.
-
deviceType
public java.lang.String deviceType()
[@property] deviceType The type of the capture device. A capture device's type never changes.
-
deviceWhiteBalanceGains
public AVCaptureWhiteBalanceGains deviceWhiteBalanceGains()
[@property] deviceWhiteBalanceGains Indicates the current device-specific RGB white balance gain values in use. This property specifies the current red, green, and blue gain values used for white balance. The values can be used to adjust color casts for a given scene. For each channel, only values between 1.0 and -maxWhiteBalanceGain are supported. This property is key-value observable. It can be read at any time, regardless of white balance mode, but can only be set via setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler:.
-
deviceWhiteBalanceGainsForChromaticityValues
public AVCaptureWhiteBalanceGains deviceWhiteBalanceGainsForChromaticityValues(AVCaptureWhiteBalanceChromaticityValues chromaticityValues)
deviceWhiteBalanceGainsForChromaticityValues: Converts device-independent chromaticity values to device-specific white balance RGB gain values. This method may be called on the receiver to convert device-independent chromaticity values to device-specific RGB white balance gain values. This method throws an NSRangeException if any of the chromaticityValues are set outside the range [0,1]. Note that some x,y combinations yield out-of-range device RGB values that will cause an exception to be thrown if passed directly to -setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler:. Be sure to check that red, green, and blue gain values are within the range of [1.0 - maxWhiteBalanceGain].- Parameters:
chromaticityValues- Little x, little y chromaticity values as described in the documentation for AVCaptureWhiteBalanceChromaticityValues.- Returns:
- A fully populated AVCaptureWhiteBalanceGains structure containing device-specific RGB gain values.
-
deviceWhiteBalanceGainsForTemperatureAndTintValues
public AVCaptureWhiteBalanceGains deviceWhiteBalanceGainsForTemperatureAndTintValues(AVCaptureWhiteBalanceTemperatureAndTintValues tempAndTintValues)
deviceWhiteBalanceGainsForTemperatureAndTintValues: Converts device-independent temperature and tint values to device-specific white balance RGB gain values. This method may be called on the receiver to convert device-independent temperature and tint values to device-specific RGB white balance gain values. You may pass any temperature and tint values and corresponding white balance gains will be produced. Note though that some temperature and tint combinations yield out-of-range device RGB values that will cause an exception to be thrown if passed directly to -setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler:. Be sure to check that red, green, and blue gain values are within the range of [1.0 - maxWhiteBalanceGain].- Parameters:
tempAndTintValues- Temperature and tint values as described in the documentation for AVCaptureWhiteBalanceTemperatureAndTintValues.- Returns:
- A fully populated AVCaptureWhiteBalanceGains structure containing device-specific RGB gain values.
-
exposureDuration
public CMTime exposureDuration()
[@property] exposureDuration The length of time over which exposure takes place. Only exposure duration values between activeFormat.minExposureDuration and activeFormat.maxExposureDuration are supported. This property is key-value observable. It can be read at any time, regardless of exposure mode, but can only be set via setExposureModeCustomWithDuration:ISO:completionHandler:.
-
exposureMode
public long exposureMode()
[@property] exposureMode Indicates current exposure mode of the receiver, if it has adjustable exposure. The value of this property is an AVCaptureExposureMode that determines the receiver's exposure mode, if it has adjustable exposure. -setExposureMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isExposureModeSupported:). -setExposureMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. When using AVCapturePhotoOutput and capturing photos with AVCapturePhotoSettings' photoQualityPrioritization property set to AVCapturePhotoQualityPrioritizationBalanced or higher, the receiver's ISO and exposureDuration values may be overridden when exposing the photo if the scene is dark enough to warrant some form of multi-image fusion to improve quality. To ensure that the receiver's ISO and exposureDuration values are honored while in AVCaptureExposureModeCustom or AVCaptureExposureModeLocked, you must set your AVCapturePhotoSettings.photoQualityPrioritization property to AVCapturePhotoQualityPrioritizationSpeed. The same rule applies if you are using the deprecated AVCapturePhotoSettings.autoStillImageStabilizationEnabled property; you must set it to NO to preserve your custom exposure values in the photo capture. Likewise if you're using AVCaptureStillImageOutput, automaticallyEnablesStillImageStabilizationWhenAvailable must be set to NO to preserve your custom exposure values in a still image capture. Clients can observe automatic changes to the receiver's exposureMode by key value observing this property.
-
exposurePointOfInterest
public CGPoint exposurePointOfInterest()
[@property] exposurePointOfInterest Indicates current exposure point of interest of the receiver, if it has one. The value of this property is a CGPoint that determines the receiver's exposure point of interest, if it has adjustable exposure. A value of (0,0) indicates that the camera should adjust exposure based on the top left corner of the image, while a value of (1,1) indicates that it should adjust exposure based on the bottom right corner. The default value is (0.5,0.5). -setExposurePointOfInterest: throws an NSInvalidArgumentException if isExposurePointOfInterestSupported returns NO. -setExposurePointOfInterest: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Note that setting exposurePointOfInterest alone does not initiate an exposure operation. After setting exposurePointOfInterest, call -setExposureMode: to apply the new point of interest.
-
exposureTargetBias
public float exposureTargetBias()
[@property] exposureTargetBias Bias applied to the target exposure value, in EV units. When exposureMode is AVCaptureExposureModeContinuousAutoExposure or AVCaptureExposureModeLocked, the bias will affect both metering (exposureTargetOffset), and the actual exposure level (exposureDuration and ISO). When the exposure mode is AVCaptureExposureModeCustom, it will only affect metering. This property is key-value observable. It can be read at any time, but can only be set via setExposureTargetBias:completionHandler:.
-
exposureTargetOffset
public float exposureTargetOffset()
[@property] exposureTargetOffset Indicates the metered exposure level's offset from the target exposure value, in EV units. The value of this read-only property indicates the difference between the metered exposure level of the current scene and the target exposure value. This property is key-value observable.
-
flashMode
public long flashMode()
[@property] flashMode Indicates current mode of the receiver's flash, if it has one. The value of this property is an AVCaptureFlashMode that determines the mode of the receiver's flash, if it has one. -setFlashMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isFlashModeSupported:). -setFlashMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's flashMode by key value observing this property. When using AVCapturePhotoOutput, AVCaptureDevice's flashMode property is ignored. You specify flashMode on a per photo basis by setting the AVCapturePhotoSettings.flashMode property.
-
focusMode
public long focusMode()
[@property] focusMode Indicates current focus mode of the receiver, if it has one. The value of this property is an AVCaptureFocusMode that determines the receiver's focus mode, if it has one. -setFocusMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isFocusModeSupported:). -setFocusMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's focusMode by key value observing this property.
-
focusPointOfInterest
public CGPoint focusPointOfInterest()
[@property] focusPointOfInterest Indicates current focus point of interest of the receiver, if it has one. The value of this property is a CGPoint that determines the receiver's focus point of interest, if it has one. A value of (0,0) indicates that the camera should focus on the top left corner of the image, while a value of (1,1) indicates that it should focus on the bottom right. The default value is (0.5,0.5). -setFocusPointOfInterest: throws an NSInvalidArgumentException if isFocusPointOfInterestSupported returns NO. -setFocusPointOfInterest: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's focusPointOfInterest by key value observing this property. Note that setting focusPointOfInterest alone does not initiate a focus operation. After setting focusPointOfInterest, call -setFocusMode: to apply the new point of interest.
-
formats
public NSArray<? extends AVCaptureDeviceFormat> formats()
[@property] formats An array of AVCaptureDeviceFormat objects supported by the receiver. This property can be used to enumerate the formats natively supported by the receiver. The capture device's activeFormat property may be set to one of the formats in this array. Clients can observe automatic changes to the receiver's formats by key value observing this property.
-
grayWorldDeviceWhiteBalanceGains
public AVCaptureWhiteBalanceGains grayWorldDeviceWhiteBalanceGains()
[@property] grayWorldDeviceWhiteBalanceGains Indicates the current device-specific Gray World RGB white balance gain values in use. This property specifies the current red, green, and blue gain values derived from the current scene to deliver a neutral (or "Gray World") white point for white balance. Gray World values assume a neutral subject (e.g. a gray card) has been placed in the middle of the subject area and fills the center 50% of the frame. Clients can read these values and apply them to the device using setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler:. For each channel, only values between 1.0 and -maxWhiteBalanceGain are supported. This property is key-value observable. It can be read at any time, regardless of white balance mode.
-
hasFlash
public boolean hasFlash()
[@property] hasFlash Indicates whether the receiver has a flash. The value of this property is a BOOL indicating whether the receiver has a flash. The receiver's flashMode property can only be set when this property returns YES.
-
hasMediaType
public boolean hasMediaType(java.lang.String mediaType)
hasMediaType: Returns whether the receiver provides media with the given media type. Media type constants are defined in AVMediaFormat.h.- Parameters:
mediaType- A media type, such as AVMediaTypeVideo, AVMediaTypeAudio, or AVMediaTypeMuxed.- Returns:
- YES if the device outputs the given media type, NO otherwise.
-
hasTorch
public boolean hasTorch()
[@property] hasTorch Indicates whether the receiver has a torch. The value of this property is a BOOL indicating whether the receiver has a torch. The receiver's torchMode property can only be set when this property returns YES.
-
init
public AVCaptureDevice init()
-
isAdjustingExposure
public boolean isAdjustingExposure()
[@property] adjustingExposure Indicates whether the receiver is currently adjusting camera exposure. The value of this property is a BOOL indicating whether the receiver's camera exposure is being automatically adjusted because its exposure mode is AVCaptureExposureModeAutoExpose or AVCaptureExposureModeContinuousAutoExposure. Clients can observe the value of this property to determine whether the camera exposure is stable or is being automatically adjusted.
-
isAdjustingFocus
public boolean isAdjustingFocus()
[@property] adjustingFocus Indicates whether the receiver is currently performing a focus scan to adjust focus. The value of this property is a BOOL indicating whether the receiver's camera focus is being automatically adjusted by means of a focus scan, because its focus mode is AVCaptureFocusModeAutoFocus or AVCaptureFocusModeContinuousAutoFocus. Clients can observe the value of this property to determine whether the camera's focus is stable.- See Also:
lensPosition(),AVCaptureAutoFocusSystem
-
isAdjustingWhiteBalance
public boolean isAdjustingWhiteBalance()
[@property] adjustingWhiteBalance Indicates whether the receiver is currently adjusting camera white balance. The value of this property is a BOOL indicating whether the receiver's camera white balance is being automatically adjusted because its white balance mode is AVCaptureWhiteBalanceModeAutoWhiteBalance or AVCaptureWhiteBalanceModeContinuousAutoWhiteBalance. Clients can observe the value of this property to determine whether the camera white balance is stable or is being automatically adjusted.
-
isAutoFocusRangeRestrictionSupported
public boolean isAutoFocusRangeRestrictionSupported()
[@property] autoFocusRangeRestrictionSupported Indicates whether the receiver supports autofocus range restrictions. The receiver's autoFocusRangeRestriction property can only be set if this property returns YES.
-
isConnected
public boolean isConnected()
[@property] connected Indicates whether the device is connected and available to the system. The value of this property is a BOOL indicating whether the device represented by the receiver is connected and available for use as a capture device. Clients can key value observe the value of this property to be notified when a device is no longer available. When the value of this property becomes NO for a given instance, it will not become YES again. If the same physical device again becomes available to the system, it will be represented using a new instance of AVCaptureDevice.
-
isExposureModeSupported
public boolean isExposureModeSupported(long exposureMode)
isExposureModeSupported: Returns whether the receiver supports the given exposure mode. The receiver's exposureMode property can only be set to a certain mode if this method returns YES for that mode.- Parameters:
exposureMode- An AVCaptureExposureMode to be checked.- Returns:
- YES if the receiver supports the given exposure mode, NO otherwise.
-
isExposurePointOfInterestSupported
public boolean isExposurePointOfInterestSupported()
[@property] exposurePointOfInterestSupported: Indicates whether the receiver supports exposure points of interest. The receiver's exposurePointOfInterest property can only be set if this property returns YES.
-
isFlashActive
public boolean isFlashActive()
[@property] flashActive Indicates whether the receiver's flash is currently active. The value of this property is a BOOL indicating whether the receiver's flash is currently active. When the flash is active, it will flash if a still image is captured. When a still image is captured with the flash active, exposure and white balance settings are overridden for the still. This is true even when using AVCaptureExposureModeCustom and/or AVCaptureWhiteBalanceModeLocked. This property is key-value observable.
-
isFlashAvailable
public boolean isFlashAvailable()
[@property] flashAvailable Indicates whether the receiver's flash is currently available for use. The value of this property is a BOOL indicating whether the receiver's flash is currently available. The flash may become unavailable if, for example, the device overheats and needs to cool off. This property is key-value observable.
-
isFlashModeSupported
public boolean isFlashModeSupported(long flashMode)
isFlashModeSupported: Returns whether the receiver supports the given flash mode. The receiver's flashMode property can only be set to a certain mode if this method returns YES for that mode.- Parameters:
flashMode- An AVCaptureFlashMode to be checked.- Returns:
- YES if the receiver supports the given flash mode, NO otherwise.
-
isFocusModeSupported
public boolean isFocusModeSupported(long focusMode)
isFocusModeSupported: Returns whether the receiver supports the given focus mode. The receiver's focusMode property can only be set to a certain mode if this method returns YES for that mode.- Parameters:
focusMode- An AVCaptureFocusMode to be checked.- Returns:
- YES if the receiver supports the given focus mode, NO otherwise.
-
isFocusPointOfInterestSupported
public boolean isFocusPointOfInterestSupported()
[@property] focusPointOfInterestSupported Indicates whether the receiver supports focus points of interest. The receiver's focusPointOfInterest property can only be set if this property returns YES.
-
isLockingFocusWithCustomLensPositionSupported
public boolean isLockingFocusWithCustomLensPositionSupported()
[@property] lockingFocusWithCustomLensPositionSupported Indicates whether the receiver supports a lens position other than AVCaptureLensPositionCurrent. If lockingFocusWithCustomLensPositionSupported returns NO, setFocusModeLockedWithLensPosition: may only be called with AVCaptureLensPositionCurrent. Passing any other lens position will result in an exception.
-
isLockingWhiteBalanceWithCustomDeviceGainsSupported
public boolean isLockingWhiteBalanceWithCustomDeviceGainsSupported()
[@property] lockingWhiteBalanceWithCustomDeviceGainsSupported Indicates whether the receiver supports white balance gains other than AVCaptureWhiteBalanceGainsCurrent. If lockingWhiteBalanceWithCustomDeviceGainsSupported returns NO, setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains: may only be called with AVCaptureWhiteBalanceGainsCurrent. Passing any other white balance gains will result in an exception.
-
isLowLightBoostEnabled
public boolean isLowLightBoostEnabled()
[@property] lowLightBoostEnabled Indicates whether the receiver's low light boost feature is enabled. The value of this property is a BOOL indicating whether the receiver is currently enhancing images to improve quality due to low light conditions. When -isLowLightBoostEnabled returns YES, the receiver has switched into a special mode in which more light can be perceived in images. This property is key-value observable.
-
isLowLightBoostSupported
public boolean isLowLightBoostSupported()
[@property] lowLightBoostSupported Indicates whether the receiver supports boosting images in low light conditions. The receiver's automaticallyEnablesLowLightBoostWhenAvailable property can only be set if this property returns YES.
-
isRampingVideoZoom
public boolean isRampingVideoZoom()
[@property] rampingVideoZoom Indicates if the zoom factor is transitioning to a value set by rampToVideoZoomFactor:withRate: Clients can observe this value to determine when a ramp begins or completes.
-
isSmoothAutoFocusEnabled
public boolean isSmoothAutoFocusEnabled()
[@property] smoothAutoFocusEnabled Indicates whether the receiver should use smooth autofocus. On a receiver where -isSmoothAutoFocusSupported returns YES and smoothAutoFocusEnabled is set to YES, a smooth autofocus will be engaged when the focus mode is set to AVCaptureFocusModeAutoFocus or AVCaptureFocusModeContinuousAutoFocus. Enabling smooth autofocus is appropriate for movie recording. Smooth autofocus is slower and less visually invasive. Disabling smooth autofocus is more appropriate for video processing where a fast autofocus is necessary. The default value is NO. Setting this property throws an NSInvalidArgumentException if -isSmoothAutoFocusSupported returns NO. The receiver must be locked for configuration using lockForConfiguration: before clients can set this method, otherwise an NSGenericException is thrown. Note that setting smoothAutoFocusEnabled alone does not initiate a focus operation. After setting smoothAutoFocusEnabled, call -setFocusMode: to apply the new smooth autofocus mode.
-
setSmoothAutoFocusEnabled
public void setSmoothAutoFocusEnabled(boolean value)
[@property] smoothAutoFocusEnabled Indicates whether the receiver should use smooth autofocus. On a receiver where -isSmoothAutoFocusSupported returns YES and smoothAutoFocusEnabled is set to YES, a smooth autofocus will be engaged when the focus mode is set to AVCaptureFocusModeAutoFocus or AVCaptureFocusModeContinuousAutoFocus. Enabling smooth autofocus is appropriate for movie recording. Smooth autofocus is slower and less visually invasive. Disabling smooth autofocus is more appropriate for video processing where a fast autofocus is necessary. The default value is NO. Setting this property throws an NSInvalidArgumentException if -isSmoothAutoFocusSupported returns NO. The receiver must be locked for configuration using lockForConfiguration: before clients can set this method, otherwise an NSGenericException is thrown. Note that setting smoothAutoFocusEnabled alone does not initiate a focus operation. After setting smoothAutoFocusEnabled, call -setFocusMode: to apply the new smooth autofocus mode.
-
isSmoothAutoFocusSupported
public boolean isSmoothAutoFocusSupported()
[@property] smoothAutoFocusSupported Indicates whether the receiver supports smooth autofocus. The receiver's smoothAutoFocusEnabled property can only be set if this property returns YES.
-
isSubjectAreaChangeMonitoringEnabled
public boolean isSubjectAreaChangeMonitoringEnabled()
[@property] subjectAreaChangeMonitoringEnabled Indicates whether the receiver should monitor the subject area for changes. The value of this property is a BOOL indicating whether the receiver should monitor the video subject area for changes, such as lighting changes, substantial movement, etc. If subject area change monitoring is enabled, the receiver sends an AVCaptureDeviceSubjectAreaDidChangeNotification whenever it detects a change to the subject area, at which time an interested client may wish to re-focus, adjust exposure, white balance, etc. The receiver must be locked for configuration using lockForConfiguration: before clients can set the value of this property.
-
setSubjectAreaChangeMonitoringEnabled
public void setSubjectAreaChangeMonitoringEnabled(boolean value)
[@property] subjectAreaChangeMonitoringEnabled Indicates whether the receiver should monitor the subject area for changes. The value of this property is a BOOL indicating whether the receiver should monitor the video subject area for changes, such as lighting changes, substantial movement, etc. If subject area change monitoring is enabled, the receiver sends an AVCaptureDeviceSubjectAreaDidChangeNotification whenever it detects a change to the subject area, at which time an interested client may wish to re-focus, adjust exposure, white balance, etc. The receiver must be locked for configuration using lockForConfiguration: before clients can set the value of this property.
-
isTorchActive
public boolean isTorchActive()
[@property] torchActive Indicates whether the receiver's torch is currently active. The value of this property is a BOOL indicating whether the receiver's torch is currently active. If the current torchMode is AVCaptureTorchModeAuto and isTorchActive is YES, the torch will illuminate once a recording starts (see AVCaptureOutput.h -startRecordingToOutputFileURL:recordingDelegate:). This property is key-value observable.
-
isTorchAvailable
public boolean isTorchAvailable()
[@property] torchAvailable Indicates whether the receiver's torch is currently available for use. The value of this property is a BOOL indicating whether the receiver's torch is currently available. The torch may become unavailable if, for example, the device overheats and needs to cool off. This property is key-value observable.
-
isTorchModeSupported
public boolean isTorchModeSupported(long torchMode)
isTorchModeSupported: Returns whether the receiver supports the given torch mode. The receiver's torchMode property can only be set to a certain mode if this method returns YES for that mode.- Parameters:
torchMode- An AVCaptureTorchMode to be checked.- Returns:
- YES if the receiver supports the given torch mode, NO otherwise.
-
isVideoHDREnabled
public boolean isVideoHDREnabled()
[@property] videoHDREnabled Indicates whether the receiver's streaming high dynamic range feature is enabled. See AVCaptureDeviceFormat.isVideoHDRSupported. The value of this property is a BOOL indicating whether the receiver is currently streaming high dynamic range video buffers. The property may only be set if you first set automaticallyAdjustsVideoHDREnabled to NO, otherwise an NSGenericException is thrown. videoHDREnabled may only be set to YES if the receiver's activeFormat.isVideoHDRSupported property returns YES, otherwise an NSGenericException is thrown. This property may be key-value observed. Note that setting this property may cause a lengthy reconfiguration of the receiver, similar to setting a new active format or AVCaptureSession sessionPreset. If you are setting either the active format or the AVCaptureSession's sessionPreset AND this property, you should bracket these operations with [session beginConfiguration] and [session commitConfiguration] to minimize reconfiguration time.
-
setVideoHDREnabled
public void setVideoHDREnabled(boolean value)
[@property] videoHDREnabled Indicates whether the receiver's streaming high dynamic range feature is enabled. See AVCaptureDeviceFormat.isVideoHDRSupported. The value of this property is a BOOL indicating whether the receiver is currently streaming high dynamic range video buffers. The property may only be set if you first set automaticallyAdjustsVideoHDREnabled to NO, otherwise an NSGenericException is thrown. videoHDREnabled may only be set to YES if the receiver's activeFormat.isVideoHDRSupported property returns YES, otherwise an NSGenericException is thrown. This property may be key-value observed. Note that setting this property may cause a lengthy reconfiguration of the receiver, similar to setting a new active format or AVCaptureSession sessionPreset. If you are setting either the active format or the AVCaptureSession's sessionPreset AND this property, you should bracket these operations with [session beginConfiguration] and [session commitConfiguration] to minimize reconfiguration time.
-
isWhiteBalanceModeSupported
public boolean isWhiteBalanceModeSupported(long whiteBalanceMode)
isWhiteBalanceModeSupported: Returns whether the receiver supports the given white balance mode. The receiver's whiteBalanceMode property can only be set to a certain mode if this method returns YES for that mode.- Parameters:
whiteBalanceMode- An AVCaptureWhiteBalanceMode to be checked.- Returns:
- YES if the receiver supports the given white balance mode, NO otherwise.
-
lensAperture
public float lensAperture()
[@property] lensAperture The size of the lens diaphragm. The value of this property is a float indicating the size (f number) of the lens diaphragm. This property does not change.
-
lensPosition
public float lensPosition()
[@property] lensPosition Indicates the focus position of the lens. The range of possible positions is 0.0 to 1.0, with 0.0 being the shortest distance at which the lens can focus and 1.0 the furthest. Note that 1.0 does not represent focus at infinity. The default value is 1.0. Note that a given lens position value does not correspond to an exact physical distance, nor does it represent a consistent focus distance from device to device. This property is key-value observable. It can be read at any time, regardless of focus mode, but can only be set via setFocusModeLockedWithLensPosition:completionHandler:.
-
localizedName
public java.lang.String localizedName()
[@property] localizedName A localized human-readable name for the receiver. This property can be used for displaying the name of a capture device in a user interface.
-
lockForConfiguration
public boolean lockForConfiguration(org.moe.natj.general.ptr.Ptr<NSError> outError)
lockForConfiguration: Requests exclusive access to configure device hardware properties. In order to set hardware properties on an AVCaptureDevice, such as focusMode and exposureMode, clients must first acquire a lock on the device. Clients should only hold the device lock if they require settable device properties to remain unchanged. Holding the device lock unnecessarily may degrade capture quality in other applications sharing the device.- Parameters:
outError- On return, if the device could not be locked, points to an NSError describing why the failure occurred.- Returns:
- A BOOL indicating whether the device was successfully locked for configuration.
-
maxExposureTargetBias
public float maxExposureTargetBias()
[@property] maxExposureTargetBias A float indicating the maximum supported exposure bias, in EV units. This read-only property indicates the maximum supported exposure bias.
-
maxWhiteBalanceGain
public float maxWhiteBalanceGain()
[@property] maxWhiteBalanceGain Indicates the maximum supported value to which a channel in the AVCaptureWhiteBalanceGains may be set. This property does not change for the life of the receiver.
-
minExposureTargetBias
public float minExposureTargetBias()
[@property] minExposureTargetBias A float indicating the minimum supported exposure bias, in EV units. This read-only property indicates the minimum supported exposure bias.
-
modelID
public java.lang.String modelID()
[@property] modelID The model ID of the receiver. The value of this property is an identifier unique to all devices of the same model. The value is persistent across device connections and disconnections, and across different systems. For example, the model ID of the camera built in to two identical iPhone models will be the same even though they are different physical devices.
-
position
public long position()
[@property] position Indicates the physical position of an AVCaptureDevice's hardware on the system. The value of this property is an AVCaptureDevicePosition indicating where the receiver's device is physically located on the system hardware.
-
rampToVideoZoomFactorWithRate
public void rampToVideoZoomFactorWithRate(double factor, float rate)rampToVideoZoomFactor:withRate: Provides smooth changes in zoom factor. This method provides a change in zoom by compounding magnification at the specified rate over time. Although the zoom factor will grow exponentially, this yields a visually linear zoom in the image over time. The zoom transition will stop at the specified factor, which must be in the valid range for videoZoomFactor. Assignments to videoZoomFactor while a ramp is in progress will cancel the ramp and snap to the assigned value. The zoom factor is continuously scaled by pow(2,rate * time). A rate of 0 causes no change in zoom factor, equivalent to calling cancelVideoZoomRamp. A rate of 1 will cause the magnification to double every second (or halve every second if zooming out), and similarly larger or smaller values will zoom faster or slower respectively. Only the absolute value of the rate is significant--sign is corrected for the direction of the target. Changes in rate will be smoothed by an internal acceleration limit. -rampToVideoZoomFactor:withRate: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.
-
setActiveColorSpace
public void setActiveColorSpace(long value)
[@property] activeColorSpace Indicates the receiver's current active color space. By default, an AVCaptureDevice attached to an AVCaptureSession is automatically configured for wide color by the AVCaptureSession (see AVCaptureSession automaticallyConfiguresCaptureDeviceForWideColor). You may also set the activeColorSpace manually. To prevent the AVCaptureSession from undoing your work, remember to set AVCaptureSession's automaticallyConfiguresCaptureDeviceForWideColor property to NO. Changing the receiver's activeColorSpace while the session is running requires a disruptive reconfiguration of the capture render pipeline. Movie captures in progress will be ended immediately; unfulfilled photo requests will be aborted; video preview will temporarily freeze. -setActiveColorSpace: throws an NSGenericException if called without first obtaining exclusive access to the receiver using -lockForConfiguration:.
-
setActiveFormat
public void setActiveFormat(AVCaptureDeviceFormat value)
[@property] activeFormat The currently active format of the receiver. This property can be used to get or set the currently active device format. -setActiveFormat: throws an NSInvalidArgumentException if set to a format not present in the formats array. -setActiveFormat: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's activeFormat by key value observing this property. On iOS, use of AVCaptureDevice's setActiveFormat: and AVCaptureSession's setSessionPreset: are mutually exclusive. If you set a capture device's active format, the session to which it is attached changes its preset to AVCaptureSessionPresetInputPriority. Likewise if you set the AVCaptureSession's sessionPreset property, the session assumes control of its input devices, and configures their activeFormat appropriately. Note that audio devices do not expose any user-configurable formats on iOS. To configure audio input on iOS, you should use the AVAudioSession APIs instead (see AVAudioSession.h). The activeFormat, activeVideoMinFrameDuration, and activeVideoMaxFrameDuration properties may be set simultaneously by using AVCaptureSession's begin/commitConfiguration methods: [session beginConfiguration]; // the session to which the receiver's AVCaptureDeviceInput is added. if ( [device lockForConfiguration:&error] ) { [device setActiveFormat:newFormat]; [device setActiveVideoMinFrameDuration:newMinDuration]; [device setActiveVideoMaxFrameDuration:newMaxDuration]; [device unlockForConfiguration]; } [session commitConfiguration]; // The new format and frame rates are applied together in commitConfiguration Note that when configuring a session to use an active format intended for high resolution still photography and applying one or more of the following operations to an AVCaptureVideoDataOutput, the system may not meet the target framerate: zoom, orientation changes, format conversion.
-
setActiveVideoMaxFrameDuration
public void setActiveVideoMaxFrameDuration(CMTime value)
[@property] activeVideoMaxFrameDuration A property indicating the receiver's current active maximum frame duration (the reciprocal of its min frame rate). An AVCaptureDevice's activeVideoMaxFrameDuration property is the reciprocal of its active minimum frame rate. To limit the min frame rate of the capture device, clients may set this property to a value supported by the receiver's activeFormat (see AVCaptureDeviceFormat's videoSupportedFrameRateRanges property). Clients may set this property's value to kCMTimeInvalid to return activeVideoMaxFrameDuration to its default value for the given activeFormat. -setActiveVideoMaxFrameDuration: throws an NSInvalidArgumentException if set to an unsupported value. -setActiveVideoMaxFrameDuration: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's activeVideoMaxFrameDuration by key value observing this property. On iOS, the receiver's activeVideoMaxFrameDuration resets to its default value under the following conditions: - The receiver's activeFormat changes - The receiver's AVCaptureDeviceInput's session's sessionPreset changes - The receiver's AVCaptureDeviceInput is added to a session When exposureMode is AVCaptureExposureModeCustom, frame rate and exposure duration are interrelated. If you call setExposureModeCustomWithDuration:ISO:completionHandler: with an exposureDuration longer than the current activeVideoMaxFrameDuration, the activeVideoMaxFrameDuration will be lengthened to accommodate the longer exposure time. Setting a shorter exposure duration does not automatically change the activeVideoMinFrameDuration or activeVideoMaxFrameDuration. To explicitly increase the frame rate in custom exposure mode, you must set the activeVideoMaxFrameDuration to a shorter value. If your new max frame duration is shorter than the current exposureDuration, the exposureDuration will shorten as well to accommodate the new frame rate.
-
setActiveVideoMinFrameDuration
public void setActiveVideoMinFrameDuration(CMTime value)
[@property] activeVideoMinFrameDuration A property indicating the receiver's current active minimum frame duration (the reciprocal of its max frame rate). An AVCaptureDevice's activeVideoMinFrameDuration property is the reciprocal of its active maximum frame rate. To limit the max frame rate of the capture device, clients may set this property to a value supported by the receiver's activeFormat (see AVCaptureDeviceFormat's videoSupportedFrameRateRanges property). Clients may set this property's value to kCMTimeInvalid to return activeVideoMinFrameDuration to its default value for the given activeFormat. -setActiveVideoMinFrameDuration: throws an NSInvalidArgumentException if set to an unsupported value. -setActiveVideoMinFrameDuration: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's activeVideoMinFrameDuration by key value observing this property. On iOS, the receiver's activeVideoMinFrameDuration resets to its default value under the following conditions: - The receiver's activeFormat changes - The receiver's AVCaptureDeviceInput's session's sessionPreset changes - The receiver's AVCaptureDeviceInput is added to a session When exposureMode is AVCaptureExposureModeCustom, setting the activeVideoMinFrameDuration affects max frame rate, but not exposureDuration. You may use setExposureModeCustomWithDuration:ISO:completionHandler: to set a shorter exposureDuration than your activeVideoMinFrameDuration, if desired.
-
setAutoFocusRangeRestriction
public void setAutoFocusRangeRestriction(long value)
[@property] autoFocusRangeRestriction Indicates current restriction of the receiver's autofocus system to a particular range of focus scan, if it supports range restrictions. The value of this property is an AVCaptureAutoFocusRangeRestriction indicating how the autofocus system should limit its focus scan. The default value is AVCaptureAutoFocusRangeRestrictionNone. -setAutoFocusRangeRestriction: throws an NSInvalidArgumentException if isAutoFocusRangeRestrictionSupported returns NO. -setAutoFocusRangeRestriction: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. This property only has an effect when the focusMode property is set to AVCaptureFocusModeAutoFocus or AVCaptureFocusModeContinuousAutoFocus. Note that setting autoFocusRangeRestriction alone does not initiate a focus operation. After setting autoFocusRangeRestriction, call -setFocusMode: to apply the new restriction.
-
setAutomaticallyAdjustsVideoHDREnabled
public void setAutomaticallyAdjustsVideoHDREnabled(boolean value)
[@property] automaticallyAdjustsVideoHDREnabled Indicates whether the receiver is allowed to turn high dynamic range streaming on or off. The value of this property is a BOOL indicating whether the receiver is free to turn high dynamic range streaming on or off. This property defaults to YES. By default, AVCaptureDevice always turns off videoHDREnabled when a client uses the -setActiveFormat: API to set a new format. When the client uses AVCaptureSession's setSessionPreset: API instead, AVCaptureDevice turns videoHDR on automatically if it's a good fit for the preset. -setAutomaticallyAdjustsVideoHDREnabled: throws an NSGenericException if called without first obtaining exclusive access to the receiver using -lockForConfiguration:. Clients can key-value observe videoHDREnabled to know when the receiver has automatically changed the value.
-
setAutomaticallyEnablesLowLightBoostWhenAvailable
public void setAutomaticallyEnablesLowLightBoostWhenAvailable(boolean value)
[@property] automaticallyEnablesLowLightBoostWhenAvailable Indicates whether the receiver should automatically switch to low light boost mode when necessary. On a receiver where -isLowLightBoostSupported returns YES, a special low light boost mode may be engaged to improve image quality. When the automaticallyEnablesLowLightBoostWhenAvailable property is set to YES, the receiver switches at its discretion to a special boost mode under low light, and back to normal operation when the scene becomes sufficiently lit. An AVCaptureDevice that supports this feature may only engage boost mode for certain source formats or resolutions. Clients may observe changes to the lowLightBoostEnabled property to know when the mode has engaged. The switch between normal operation and low light boost mode may drop one or more video frames. The default value is NO. Setting this property throws an NSInvalidArgumentException if -isLowLightBoostSupported returns NO. The receiver must be locked for configuration using lockForConfiguration: before clients can set this method, otherwise an NSGenericException is thrown.
-
setExposureMode
public void setExposureMode(long value)
[@property] exposureMode Indicates current exposure mode of the receiver, if it has adjustable exposure. The value of this property is an AVCaptureExposureMode that determines the receiver's exposure mode, if it has adjustable exposure. -setExposureMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isExposureModeSupported:). -setExposureMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. When using AVCapturePhotoOutput and capturing photos with AVCapturePhotoSettings' photoQualityPrioritization property set to AVCapturePhotoQualityPrioritizationBalanced or higher, the receiver's ISO and exposureDuration values may be overridden when exposing the photo if the scene is dark enough to warrant some form of multi-image fusion to improve quality. To ensure that the receiver's ISO and exposureDuration values are honored while in AVCaptureExposureModeCustom or AVCaptureExposureModeLocked, you must set your AVCapturePhotoSettings.photoQualityPrioritization property to AVCapturePhotoQualityPrioritizationSpeed. The same rule applies if you are using the deprecated AVCapturePhotoSettings.autoStillImageStabilizationEnabled property; you must set it to NO to preserve your custom exposure values in the photo capture. Likewise if you're using AVCaptureStillImageOutput, automaticallyEnablesStillImageStabilizationWhenAvailable must be set to NO to preserve your custom exposure values in a still image capture. Clients can observe automatic changes to the receiver's exposureMode by key value observing this property.
-
setExposureModeCustomWithDurationISOCompletionHandler
public void setExposureModeCustomWithDurationISOCompletionHandler(CMTime duration, float ISO, AVCaptureDevice.Block_setExposureModeCustomWithDurationISOCompletionHandler handler)
setExposureModeCustomWithDuration:ISO:completionHandler: Sets exposureMode to AVCaptureExposureModeCustom and locks exposureDuration and ISO at explicit values. This is the only way of setting exposureDuration and ISO. This method throws an NSRangeException if either exposureDuration or ISO is set to an unsupported level. This method throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. When using AVCapturePhotoOutput to capture photos, note that the photoQualityPrioritization property of AVCapturePhotoSettings defaults to AVCapturePhotoQualityPrioritizationBalanced, which allows photo capture to temporarily override the capture device's ISO and exposureDuration values if the scene is dark enough to warrant some form of multi-image fusion to improve quality. To ensure that the receiver's ISO and exposureDuration values are honored while in AVCaptureExposureModeCustom or AVCaptureExposureModeLocked, you must set your AVCapturePhotoSettings.photoQualityPrioritization property to AVCapturePhotoQualityPrioritizationSpeed. The same rule applies if you use the deprecated AVCapturePhotoSettings.autoStillImageStabilizationEnabled property or AVCaptureStillImageOutput.automaticallyEnablesStillImageStabilizationWhenAvailable property. You must set them to NO to preserve your custom or locked exposure settings.- Parameters:
duration- The exposure duration, as described in the documentation for the exposureDuration property. A value of AVCaptureExposureDurationCurrent can be used to indicate that the caller does not wish to specify a value for exposureDuration. Note that changes to this property may result in changes to activeVideoMinFrameDuration and/or activeVideoMaxFrameDuration.ISO- The exposure ISO value, as described in the documentation for the ISO property. A value of AVCaptureISOCurrent can be used to indicate that the caller does not wish to specify a value for ISO.handler- A block to be called when both exposureDuration and ISO have been set to the values specified and exposureMode is set to AVCaptureExposureModeCustom. If setExposureModeCustomWithDuration:ISO:completionHandler: is called multiple times, the completion handlers will be called in FIFO order. The block receives a timestamp which matches that of the first buffer to which all settings have been applied. Note that the timestamp is synchronized to the device clock, and thus must be converted to the master clock prior to comparison with the timestamps of buffers delivered via an AVCaptureVideoDataOutput. The client may pass nil for the handler parameter if knowledge of the operation's completion is not required.
-
setExposurePointOfInterest
public void setExposurePointOfInterest(CGPoint value)
[@property] exposurePointOfInterest Indicates current exposure point of interest of the receiver, if it has one. The value of this property is a CGPoint that determines the receiver's exposure point of interest, if it has adjustable exposure. A value of (0,0) indicates that the camera should adjust exposure based on the top left corner of the image, while a value of (1,1) indicates that it should adjust exposure based on the bottom right corner. The default value is (0.5,0.5). -setExposurePointOfInterest: throws an NSInvalidArgumentException if isExposurePointOfInterestSupported returns NO. -setExposurePointOfInterest: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Note that setting exposurePointOfInterest alone does not initiate an exposure operation. After setting exposurePointOfInterest, call -setExposureMode: to apply the new point of interest.
-
setExposureTargetBiasCompletionHandler
public void setExposureTargetBiasCompletionHandler(float bias, AVCaptureDevice.Block_setExposureTargetBiasCompletionHandler handler)setExposureTargetBias:completionHandler: Sets the bias to be applied to the target exposure value. This is the only way of setting exposureTargetBias. This method throws an NSRangeException if exposureTargetBias is set to an unsupported level. This method throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.- Parameters:
bias- The bias to be applied to the exposure target value, as described in the documentation for the exposureTargetBias property.handler- A block to be called when exposureTargetBias has been set to the value specified. If setExposureTargetBias:completionHandler: is called multiple times, the completion handlers will be called in FIFO order. The block receives a timestamp which matches that of the first buffer to which the setting has been applied. Note that the timestamp is synchronized to the device clock, and thus must be converted to the master clock prior to comparison with the timestamps of buffers delivered via an AVCaptureVideoDataOutput. The client may pass nil for the handler parameter if knowledge of the operation's completion is not required.
-
setFlashMode
public void setFlashMode(long value)
[@property] flashMode Indicates current mode of the receiver's flash, if it has one. The value of this property is an AVCaptureFlashMode that determines the mode of the receiver's flash, if it has one. -setFlashMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isFlashModeSupported:). -setFlashMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's flashMode by key value observing this property. When using AVCapturePhotoOutput, AVCaptureDevice's flashMode property is ignored. You specify flashMode on a per photo basis by setting the AVCapturePhotoSettings.flashMode property.
-
setFocusMode
public void setFocusMode(long value)
[@property] focusMode Indicates current focus mode of the receiver, if it has one. The value of this property is an AVCaptureFocusMode that determines the receiver's focus mode, if it has one. -setFocusMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isFocusModeSupported:). -setFocusMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's focusMode by key value observing this property.
-
setFocusModeLockedWithLensPositionCompletionHandler
public void setFocusModeLockedWithLensPositionCompletionHandler(float lensPosition, AVCaptureDevice.Block_setFocusModeLockedWithLensPositionCompletionHandler handler)setFocusModeLockedWithLensPosition:completionHandler: Sets focusMode to AVCaptureFocusModeLocked and locks lensPosition at an explicit value. This is the only way of setting lensPosition. This method throws an NSRangeException if lensPosition is set to an unsupported level. This method throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.- Parameters:
lensPosition- The lens position, as described in the documentation for the lensPosition property. A value of AVCaptureLensPositionCurrent can be used to indicate that the caller does not wish to specify a value for lensPosition.handler- A block to be called when lensPosition has been set to the value specified and focusMode is set to AVCaptureFocusModeLocked. If setFocusModeLockedWithLensPosition:completionHandler: is called multiple times, the completion handlers will be called in FIFO order. The block receives a timestamp which matches that of the first buffer to which all settings have been applied. Note that the timestamp is synchronized to the device clock, and thus must be converted to the master clock prior to comparison with the timestamps of buffers delivered via an AVCaptureVideoDataOutput. The client may pass nil for the handler parameter if knowledge of the operation's completion is not required.
-
setFocusPointOfInterest
public void setFocusPointOfInterest(CGPoint value)
[@property] focusPointOfInterest Indicates current focus point of interest of the receiver, if it has one. The value of this property is a CGPoint that determines the receiver's focus point of interest, if it has one. A value of (0,0) indicates that the camera should focus on the top left corner of the image, while a value of (1,1) indicates that it should focus on the bottom right. The default value is (0.5,0.5). -setFocusPointOfInterest: throws an NSInvalidArgumentException if isFocusPointOfInterestSupported returns NO. -setFocusPointOfInterest: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's focusPointOfInterest by key value observing this property. Note that setting focusPointOfInterest alone does not initiate a focus operation. After setting focusPointOfInterest, call -setFocusMode: to apply the new point of interest.
-
setTorchMode
public void setTorchMode(long value)
[@property] torchMode Indicates current mode of the receiver's torch, if it has one. The value of this property is an AVCaptureTorchMode that determines the mode of the receiver's torch, if it has one. -setTorchMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isTorchModeSupported:). -setTorchMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's torchMode by key value observing this property.
-
setTorchModeOnWithLevelError
public boolean setTorchModeOnWithLevelError(float torchLevel, org.moe.natj.general.ptr.Ptr<NSError> outError)setTorchModeOnWithLevel:error: Sets the current mode of the receiver's torch to AVCaptureTorchModeOn at the specified level. This method sets the torch mode to AVCaptureTorchModeOn at a specified level. torchLevel must be a value between 0 and 1, or the special value AVCaptureMaxAvailableTorchLevel. The specified value may not be available if the iOS device is too hot. This method throws an NSInvalidArgumentException if set to an unsupported level. If the specified level is valid, but unavailable, the method returns NO with AVErrorTorchLevelUnavailable. -setTorchModeOnWithLevel:error: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's torchMode by key value observing the torchMode property.
-
setVideoZoomFactor
public void setVideoZoomFactor(double value)
[@property] videoZoomFactor Controls zoom level of image outputs Applies a centered crop for all image outputs, scaling as necessary to maintain output dimensions. Minimum value of 1.0 yields full field of view, increasing values will increase magnification, up to a maximum value specified in the activeFormat's videoMaxZoomFactor property. Modifying the zoom factor will cancel any active rampToVideoZoomFactor:withRate:, and snap directly to the assigned value. Assigning values outside the acceptable range will generate an NSRangeException. Clients can key value observe the value of this property. -setVideoZoomFactor: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.
-
setWhiteBalanceMode
public void setWhiteBalanceMode(long value)
[@property] whiteBalanceMode Indicates current white balance mode of the receiver, if it has adjustable white balance. The value of this property is an AVCaptureWhiteBalanceMode that determines the receiver's white balance mode, if it has adjustable white balance. -setWhiteBalanceMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isWhiteBalanceModeSupported:). -setWhiteBalanceMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's whiteBalanceMode by key value observing this property.
-
setWhiteBalanceModeLockedWithDeviceWhiteBalanceGainsCompletionHandler
public void setWhiteBalanceModeLockedWithDeviceWhiteBalanceGainsCompletionHandler(AVCaptureWhiteBalanceGains whiteBalanceGains, AVCaptureDevice.Block_setWhiteBalanceModeLockedWithDeviceWhiteBalanceGainsCompletionHandler handler)
setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler: Sets white balance to locked mode with explicit deviceWhiteBalanceGains values. For each channel in the whiteBalanceGains struct, only values between 1.0 and -maxWhiteBalanceGain are supported. Gain values are normalized to the minimum channel value to avoid brightness changes (e.g. R:2 G:2 B:4 will be normalized to R:1 G:1 B:2). This method throws an NSRangeException if any of the whiteBalanceGains are set to an unsupported level. This method throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.- Parameters:
whiteBalanceGains- The white balance gain values, as described in the documentation for the deviceWhiteBalanceGains property. A value of AVCaptureWhiteBalanceGainsCurrent can be used to indicate that the caller does not wish to specify a value for deviceWhiteBalanceGains.handler- A block to be called when white balance gains have been set to the values specified and whiteBalanceMode is set to AVCaptureWhiteBalanceModeLocked. If setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler: is called multiple times, the completion handlers will be called in FIFO order. The block receives a timestamp which matches that of the first buffer to which all settings have been applied. Note that the timestamp is synchronized to the device clock, and thus must be converted to the master clock prior to comparison with the timestamps of buffers delivered via an AVCaptureVideoDataOutput. This parameter may be nil if synchronization is not required.
-
supportsAVCaptureSessionPreset
public boolean supportsAVCaptureSessionPreset(java.lang.String preset)
supportsAVCaptureSessionPreset: Returns whether the receiver can be used in an AVCaptureSession configured with the given preset. An AVCaptureSession instance can be associated with a preset that configures its inputs and outputs to fulfill common use cases. This method can be used to determine if the receiver can be used in a capture session with the given preset. Presets are defined in AVCaptureSession.h.- Parameters:
preset- An AVCaptureSession preset.- Returns:
- YES if the receiver can be used with the given preset, NO otherwise.
-
temperatureAndTintValuesForDeviceWhiteBalanceGains
public AVCaptureWhiteBalanceTemperatureAndTintValues temperatureAndTintValuesForDeviceWhiteBalanceGains(AVCaptureWhiteBalanceGains whiteBalanceGains)
temperatureAndTintValuesForDeviceWhiteBalanceGains: Converts device-specific white balance RGB gain values to device-independent temperature and tint values. This method may be called on the receiver to convert device-specific white balance RGB gain values to device-independent temperature (in kelvin) and tint values. For each channel in the whiteBalanceGains struct, only values between 1.0 and -maxWhiteBalanceGain are supported. This method throws an NSRangeException if any of the whiteBalanceGains are set to unsupported values.- Parameters:
whiteBalanceGains- White balance gain values, as described in the documentation for the deviceWhiteBalanceGains property. A value of AVCaptureWhiteBalanceGainsCurrent may not be used in this function.- Returns:
- A fully populated AVCaptureWhiteBalanceTemperatureAndTintValues structure containing device-independent values.
-
torchLevel
public float torchLevel()
[@property] torchLevel Indicates the receiver's current torch brightness level as a floating point value. The value of this property is a float indicating the receiver's torch level from 0.0 (off) -> 1.0 (full). This property is key-value observable.
-
torchMode
public long torchMode()
[@property] torchMode Indicates current mode of the receiver's torch, if it has one. The value of this property is an AVCaptureTorchMode that determines the mode of the receiver's torch, if it has one. -setTorchMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isTorchModeSupported:). -setTorchMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's torchMode by key value observing this property.
-
uniqueID
public java.lang.String uniqueID()
[@property] uniqueID An ID unique to the model of device corresponding to the receiver. Every available capture device has a unique ID that persists on one system across device connections and disconnections, application restarts, and reboots of the system itself. Applications can store the value returned by this property to recall or track the status of a specific device in the future.
-
unlockForConfiguration
public void unlockForConfiguration()
unlockForConfiguration Release exclusive control over device hardware properties. This method should be called to match an invocation of lockForConfiguration: when an application no longer needs to keep device hardware properties from changing automatically.
-
videoZoomFactor
public double videoZoomFactor()
[@property] videoZoomFactor Controls zoom level of image outputs Applies a centered crop for all image outputs, scaling as necessary to maintain output dimensions. Minimum value of 1.0 yields full field of view, increasing values will increase magnification, up to a maximum value specified in the activeFormat's videoMaxZoomFactor property. Modifying the zoom factor will cancel any active rampToVideoZoomFactor:withRate:, and snap directly to the assigned value. Assigning values outside the acceptable range will generate an NSRangeException. Clients can key value observe the value of this property. -setVideoZoomFactor: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.
-
whiteBalanceMode
public long whiteBalanceMode()
[@property] whiteBalanceMode Indicates current white balance mode of the receiver, if it has adjustable white balance. The value of this property is an AVCaptureWhiteBalanceMode that determines the receiver's white balance mode, if it has adjustable white balance. -setWhiteBalanceMode: throws an NSInvalidArgumentException if set to an unsupported value (see -isWhiteBalanceModeSupported:). -setWhiteBalanceMode: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's whiteBalanceMode by key value observing this property.
-
activeDepthDataFormat
public AVCaptureDeviceFormat activeDepthDataFormat()
[@property] activeDepthDataFormat The currently active depth data format of the receiver. This property can be used to get or set the device's currently active depth data format. -setActiveDepthDataFormat: throws an NSInvalidArgumentException if set to a format not present in the activeFormat's -supportedDepthDataFormats array. -setActiveDepthDataFormat: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's activeDepthDataFormat by key value observing this property. On devices where depth data is not supported, this property returns nil. The frame rate of depth data may not be set directly. Depth data frame rate is synchronized to the device's activeMin/MaxFrameDurations. It may match the device's current frame rate, or lower, if depth data cannot be produced fast enough for the active video frame rate. Delivery of depth data to a AVCaptureDepthDataOutput may increase the system load, resulting in a reduced video frame rate for thermal sustainability.
-
dualCameraSwitchOverVideoZoomFactor
public double dualCameraSwitchOverVideoZoomFactor()
[@property] dualCameraSwitchOverVideoZoomFactor The video zoom factor at or above which a DualCamera can select between its wide angle camera and its telephoto camera. This is the zoom factor at which the wide angle camera's field of view matches telephoto camera's full field of view. On non-DualCamera devices this will return 1.0. As of iOS 13.0, this API has been deprecated in favor of virtualDeviceSwitchOverVideoZoomFactors.
-
maxAvailableVideoZoomFactor
public double maxAvailableVideoZoomFactor()
[@property] maxAvailableVideoZoomFactor Indicates the maximum zoom factor available for the AVCaptureDevice's videoZoomFactor property. On non-virtual devices the maxAvailableVideoZoomFactor is always equal to the activeFormat.videoMaxZoomFactor. On a virtual device the maxAvailableVideoZoomFactor can change when the device is delivering depth data to one or more outputs (see -[AVCaptureDeviceFormat videoMaxZoomFactorForDepthDataDelivery]). If the device's videoZoomFactor property is assigned a value greater than activeFormat.videoMaxZoomFactor, an NSRangeException is thrown. Setting the videoZoomFactor to a value less than or equal to activeFormat.videoMaxZoomFactor, but greater than maxAvailableVideoZoomFactor results in the value being clamped to the maxAvailableVideoZoomFactor. Clients can key value observe the value of this property.
-
minAvailableVideoZoomFactor
public double minAvailableVideoZoomFactor()
[@property] minAvailableVideoZoomFactor Indicates the minimum zoom factor available for the AVCaptureDevice's videoZoomFactor property. On non-virtual devices the minAvailableVideoZoomFactor is always 1.0. On a virtual device the minAvailableVideoZoomFactor can change when the device is delivering depth data to one or more outputs (see -[AVCaptureDeviceFormat videoMinZoomFactorForDepthDataDelivery]). If the device's videoZoomFactor property is assigned a value smaller than 1.0, an NSRangeException is thrown. Setting the videoZoomFactor to a value greater than or equal to 1.0, but lower than minAvailableVideoZoomFactor results in the value being clamped to the minAvailableVideoZoomFactor. Clients can key value observe the value of this property.
-
setActiveDepthDataFormat
public void setActiveDepthDataFormat(AVCaptureDeviceFormat value)
[@property] activeDepthDataFormat The currently active depth data format of the receiver. This property can be used to get or set the device's currently active depth data format. -setActiveDepthDataFormat: throws an NSInvalidArgumentException if set to a format not present in the activeFormat's -supportedDepthDataFormats array. -setActiveDepthDataFormat: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. Clients can observe automatic changes to the receiver's activeDepthDataFormat by key value observing this property. On devices where depth data is not supported, this property returns nil. The frame rate of depth data may not be set directly. Depth data frame rate is synchronized to the device's activeMin/MaxFrameDurations. It may match the device's current frame rate, or lower, if depth data cannot be produced fast enough for the active video frame rate. Delivery of depth data to a AVCaptureDepthDataOutput may increase the system load, resulting in a reduced video frame rate for thermal sustainability.
-
activeDepthDataMinFrameDuration
public CMTime activeDepthDataMinFrameDuration()
[@property] activeDepthDataMinFrameDuration A property indicating the receiver's current active minimum depth data frame duration (the reciprocal of its maximum depth data frame rate). This property may be used to set an upper limit to the frame rate at which depth data is produced. Lowering the depth data frame rate typically lowers power consumption which will increase the time the camera can run before an elevated system pressure state is reached. Setting this property to kCMTimeInvalid resets it to the active depth data format's default min frame duration. Setting this property to kCMTimePositiveInfinity results in a depth data frame rate of 0. The activeDepthDataMinFrameDuration gets reset whenever either the active video format or the active depth data format changes. -setActiveDepthDataMinFrameDuration: throws an NSRangeException if set to a value that is outside of the active depth data format's supported frame rate range. -setActiveDepthDataMinFrameDuration: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.
-
activeMaxExposureDuration
public CMTime activeMaxExposureDuration()
[@constant] activeMaxExposureDuration The maximum exposure (integration) time that may be used by the auto exposure algorithm. When an AVCaptureDevice's exposureMode is set to AVCaptureExposureModeAutoExpose or AVCaptureExposureModeContinuousAutoExposure, the auto exposure algorithm picks a default max exposure duration that is tuned for the current configuration, balancing low light image quality with motion preservation. By querying or key-value observing this property, you may find out the current max exposure duration in use. You may also override the default value by setting this property to a value between activeFormat.maxExposureDuration and activeFormat.minExposureDuration. An NSRangeException is thrown if you pass an out-of-bounds exposure duration. Setting the property to the special value of kCMTimeInvalid resets the auto exposure max duration to the device's default for your current configuration. When the device's activeFormat or the AVCaptureSession's sessionPreset changes, this property resets to the default max exposure duration for the new format or session preset. On some devices, the auto exposure algorithm picks a different max exposure duration for a given format depending whether you used the -[AVCaptureSession setSessionPreset:] API or the -[AVCaptureDevice setActiveFormat:] API to set the format. To ensure uniform default handling of max exposure duration, you can set your AVCaptureDeviceInput's unifiedAutoExposureDefaultsEnabled property to YES.
-
constituentDevices
public NSArray<? extends AVCaptureDevice> constituentDevices()
[@property] constituentDevices An array of constituent physical devices comprising a virtual device. When called on a device for which virtualDevice == NO, an empty array is returned.
-
extrinsicMatrixFromDeviceToDevice
public static NSData extrinsicMatrixFromDeviceToDevice(AVCaptureDevice fromDevice, AVCaptureDevice toDevice)
extrinsicMatrixFromDevice:toDevice: An NSData containing the relative extrinsic matrix from one AVCaptureDevice to another. The extrinsic matrix consists of a unitless 3x3 rotation matrix (R) on the left and a translation (t) 3x1 column vector on the right. The translation vector's units are millimeters. The extrinsics of the "toDevice" camera are expressed with respect to a reference camera "fromDevice". If X_from is a 3D point in "fromCamera"'s coordinate system, then it can be projected into "toCamera"'s coordinate system with X_to = [R | t] * X_from. Note that a matrix_float4x3 matrix is column major with 3 rows and 4 columns. The extrinsicMatrix is only provided for physical cameras for which factory calibrations exist. Virtual device cameras return nil. / \ / \ | r1,1 r1,2 r1,3 | t1 | |R|t| = | r2,1 r2,2 r2,3 | t2 | \ / | r3,1 r3,2 r3,3 | t3 | \ / Note that if you enable video stabilization (see AVCaptureConnection.preferredVideoStabilizationMode), the pixels in stabilized video frames no longer match the relative extrinsicMatrix from one device to another due to warping. The extrinsicMatrix and camera intrinsics should only be used when video stabilization is disabled.- Parameters:
fromDevice- The AVCaptureDevice to use as the source. Must be non nil or an NSInvalidArgumentException is thrown.toDevice- The AVCaptureDevice to use as the destination. Must be non nil or an NSInvalidArgumentException is thrown.
-
isGeometricDistortionCorrectionEnabled
public boolean isGeometricDistortionCorrectionEnabled()
[@property] geometricDistortionCorrectionEnabled Indicates whether geometric distortion correction is enabled by the receiver. Where supported, the default value is YES. The receiver must be locked for configuration using lockForConfiguration: before clients can set this method, otherwise an NSGenericException is thrown.
-
isGeometricDistortionCorrectionSupported
public boolean isGeometricDistortionCorrectionSupported()
[@property] geometricDistortionCorrectionSupported Indicates that geometric distortion correction is supported by the receiver. Some AVCaptureDevices benefit from geometric distortion correction (GDC), such as devices with a very wide field of view. GDC lessens the fisheye effect at the outer edge of the frame at the cost of losing a small amount of vertical and horizontal field of view. When GDC is enabled on the AVCaptureDevice (see geometricDistortionEnabled), the corrected image is upscaled to the original image size when needed. With respect to the AVCaptureDevice.videoZoomFactor API, the full viewable field of view is always represented with a videoZoomFactor of 1.0. Thus, when GDC is enabled, the AVCaptureDevice.activeFormat's field of view at videoZoomFactor = 1.0 will be different than when GDC is disabled. The smaller field of view is reported through the activeFormat's geometricDistortionCorrectedVideoFieldOfView property. Beware though that RAW photo captures never have GDC applied, regardless of the value of AVCaptureDevice.geometricDistortionCorrectionEnabled.
-
isGlobalToneMappingEnabled
public boolean isGlobalToneMappingEnabled()
[@property] globalToneMappingEnabled Indicates whether the receiver should use global tone mapping. Tone mapping is a technique used by the device to map the pixel levels in high dynamic range images to a more limited dynamic range (such as 16 bit to 8 bit), while still retaining as close an appearance as possible. Normally the device employs adaptive, local tone curves to preserve highest image quality and adapt quickly to changing lighting conditions. This property indicates to the receiver to use a global tone map. If set to YES, the tone map is adjusted dynamically depending on the current scene and the same tone map is applied to all pixels in an image. If set to its default value of NO, different tone maps may be applied to different pixels in an image. globalToneMappingEnabled may only be set to YES if the receiver's activeFormat.isGlobalToneMappingSupported property returns YES, otherwise an NSGenericException is thrown. Setting globalToneMappingEnabled throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. When global tone mapping is enabled, an AVCapturePhotoOutput connected to the AVCaptureDeviceInput’s session disables all forms of still image fusion, resulting in still images with no automatic stabilization applied. The receiver’s globalToneMappingEnabled resets to its default value of NO under the following conditions: - The receiver’s activeFormat changes - The receiver’s AVCaptureDeviceInput’s session’s sessionPreset changes - The receiver’s AVCaptureDeviceInput is added to a session Clients can observe automatic changes to the receiver's globalToneMappingEnabled by key value observing this property.
-
isVirtualDevice
public boolean isVirtualDevice()
[@property] virtualDevice A property indicating whether the receiver is a virtual device consisting of constituent physical devices. Two examples of virtual devices are: The Dual Camera, which supports seamlessly switching between a wide and telephoto camera while zooming and generating depth data from the disparities between the different points of view of the physical cameras. The TrueDepth Camera, which generates depth data from disparities between a YUV camera and an Infrared camera pointed in the same direction.
-
setActiveDepthDataMinFrameDuration
public void setActiveDepthDataMinFrameDuration(CMTime value)
[@property] activeDepthDataMinFrameDuration A property indicating the receiver's current active minimum depth data frame duration (the reciprocal of its maximum depth data frame rate). This property may be used to set an upper limit to the frame rate at which depth data is produced. Lowering the depth data frame rate typically lowers power consumption which will increase the time the camera can run before an elevated system pressure state is reached. Setting this property to kCMTimeInvalid resets it to the active depth data format's default min frame duration. Setting this property to kCMTimePositiveInfinity results in a depth data frame rate of 0. The activeDepthDataMinFrameDuration gets reset whenever either the active video format or the active depth data format changes. -setActiveDepthDataMinFrameDuration: throws an NSRangeException if set to a value that is outside of the active depth data format's supported frame rate range. -setActiveDepthDataMinFrameDuration: throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:.
-
setActiveMaxExposureDuration
public void setActiveMaxExposureDuration(CMTime value)
[@constant] activeMaxExposureDuration The maximum exposure (integration) time that may be used by the auto exposure algorithm. When an AVCaptureDevice's exposureMode is set to AVCaptureExposureModeAutoExpose or AVCaptureExposureModeContinuousAutoExposure, the auto exposure algorithm picks a default max exposure duration that is tuned for the current configuration, balancing low light image quality with motion preservation. By querying or key-value observing this property, you may find out the current max exposure duration in use. You may also override the default value by setting this property to a value between activeFormat.maxExposureDuration and activeFormat.minExposureDuration. An NSRangeException is thrown if you pass an out-of-bounds exposure duration. Setting the property to the special value of kCMTimeInvalid resets the auto exposure max duration to the device's default for your current configuration. When the device's activeFormat or the AVCaptureSession's sessionPreset changes, this property resets to the default max exposure duration for the new format or session preset. On some devices, the auto exposure algorithm picks a different max exposure duration for a given format depending whether you used the -[AVCaptureSession setSessionPreset:] API or the -[AVCaptureDevice setActiveFormat:] API to set the format. To ensure uniform default handling of max exposure duration, you can set your AVCaptureDeviceInput's unifiedAutoExposureDefaultsEnabled property to YES.
-
setGeometricDistortionCorrectionEnabled
public void setGeometricDistortionCorrectionEnabled(boolean value)
[@property] geometricDistortionCorrectionEnabled Indicates whether geometric distortion correction is enabled by the receiver. Where supported, the default value is YES. The receiver must be locked for configuration using lockForConfiguration: before clients can set this method, otherwise an NSGenericException is thrown.
-
setGlobalToneMappingEnabled
public void setGlobalToneMappingEnabled(boolean value)
[@property] globalToneMappingEnabled Indicates whether the receiver should use global tone mapping. Tone mapping is a technique used by the device to map the pixel levels in high dynamic range images to a more limited dynamic range (such as 16 bit to 8 bit), while still retaining as close an appearance as possible. Normally the device employs adaptive, local tone curves to preserve highest image quality and adapt quickly to changing lighting conditions. This property indicates to the receiver to use a global tone map. If set to YES, the tone map is adjusted dynamically depending on the current scene and the same tone map is applied to all pixels in an image. If set to its default value of NO, different tone maps may be applied to different pixels in an image. globalToneMappingEnabled may only be set to YES if the receiver's activeFormat.isGlobalToneMappingSupported property returns YES, otherwise an NSGenericException is thrown. Setting globalToneMappingEnabled throws an NSGenericException if called without first obtaining exclusive access to the receiver using lockForConfiguration:. When global tone mapping is enabled, an AVCapturePhotoOutput connected to the AVCaptureDeviceInput’s session disables all forms of still image fusion, resulting in still images with no automatic stabilization applied. The receiver’s globalToneMappingEnabled resets to its default value of NO under the following conditions: - The receiver’s activeFormat changes - The receiver’s AVCaptureDeviceInput’s session’s sessionPreset changes - The receiver’s AVCaptureDeviceInput is added to a session Clients can observe automatic changes to the receiver's globalToneMappingEnabled by key value observing this property.
-
systemPressureState
public AVCaptureSystemPressureState systemPressureState()
[@property] systemPressureState A key-value observable property indicating the capture device's current system pressure state. This property indicates whether the capture device is currently subject to an elevated system pressure condition. When system pressure reaches AVCaptureSystemPressureLevelShutdown, the capture device cannot continue to provide input, so the AVCaptureSession becomes interrupted until the pressured state abates. System pressure can be effectively mitigated by lowering the device's activeVideoMinFrameDuration in response to changes in the systemPressureState. Clients are encouraged to implement frame rate throttling to bring system pressure down if their capture use case can tolerate a reduced frame rate.
-
virtualDeviceSwitchOverVideoZoomFactors
public NSArray<? extends NSNumber> virtualDeviceSwitchOverVideoZoomFactors()
[@property] virtualDeviceSwitchOverVideoZoomFactors An array of video zoom factors at or above which a virtual device (such as the Dual Camera) may switch to its next constituent device. This array contains zoom factors at which one of the constituent device's field of view matches the next constituent device's full field of view. The number of switch over video zoom factors is always one less than the count of the constituentDevices property, and the factors progress in the same order as the devices listed in that property. On non-virtual devices this property returns an empty array.
-
isSuspended
public boolean isSuspended()
[@property] suspended Indicates whether the device is suspended. The value of this property is a BOOL indicating whether the device represented by the receiver is currently suspended. Some devices disallow data capture due to a feature on the device. For example, isSuspended returns YES for the external iSight when its privacy iris is closed, or for the internal iSight on a notebook when the notebook's display is closed. Clients can key value observe the value of this property to be notified when the device becomes suspended or unsuspended.
-
manufacturer
public java.lang.String manufacturer()
[@property] manufacturer The human-readable manufacturer name for the receiver. This property can be used to identify capture devices from a particular manufacturer. All Apple devices return "Apple Inc.". Devices from third party manufacturers may return an empty string.
-
-