Instance Method

setExposureModeCustomWithDuration:ISO:completionHandler:

Locks the exposure duration and ISO at the specified values.

Declaration

- (void)setExposureModeCustomWithDuration:(CMTime)duration ISO:(float)ISO completionHandler:(void (^)(CMTime syncTime))handler;

Parameters

duration

The exposure duration.

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 or activeVideoMaxFrameDuration.

ISO

The exposure ISO value.

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 AVCaptureExposureModeCustom.

The block receives a timestamp matching that of the first buffer to which all settings have been applied. The timestamp is synchronized to the device clock, and thus must be converted to the master clock before comparison with the timestamps of buffers delivered via an AVCaptureVideoDataOutput instance.

Pass nil for the handler parameter if knowledge of the operation's completion is not required.

Discussion

This method is the only way to set exposureDuration and ISO.

This method throws an NSInvalidArgumentException exception if either exposureDuration or ISO is set to an unsupported level. A NSGenericException exception is thrown if this method is invoked without first obtaining exclusive access to the receiver using lockForConfiguration:.

See Also

Managing Image Exposure

exposureDuration

The length of time over which exposure takes place.

exposureTargetOffset

The metered exposure level's offset from the target exposure value, in EV units.

exposureTargetBias

Bias applied to the target exposure value, in EV units.

minExposureTargetBias

The minimum supported exposure bias, in EV units.

maxExposureTargetBias

The maximum supported exposure bias, in EV units.

activeMaxExposureDuration

The maximum exposure duration, in seconds, defined in the auto-exposure algorithm.

- setExposureTargetBias:completionHandler:

Sets the bias to be applied to the target exposure value.

AVCaptureExposureTargetBiasCurrent

A special constant representing the current exposure bias value.

AVCaptureExposureDurationCurrent

A special constant representing the current exposure duration setting.