AeFpsRangeLegacyQuirk

public class AeFpsRangeLegacyQuirk implements Quirk


Quirk required to maintain good exposure on legacy devices by specifying a proper CONTROL_AE_TARGET_FPS_RANGE.

Legacy devices set the AE target FPS range to [30, 30]. This can potentially cause underexposure issues. androidx.camera.camera2.internal.compat.workaround.AeFpsRange contains a workaround that is used on legacy devices to set a AE FPS range whose upper bound is 30, which guarantees a smooth frame rate, and whose lower bound is as small as possible to properly expose frames in low light conditions. The default behavior on non legacy devices does not add the AE FPS range option.

See also
AeFpsRange

Summary

Public constructors

AeFpsRangeLegacyQuirk(
    @NonNull CameraCharacteristicsCompat cameraCharacteristicsCompat
)

Public methods

@Nullable Range<@NonNull Integer>

Returns the fps range whose upper is 30 and whose lower is the smallest, or null if no range has an upper equal to 30.

Public constructors

AeFpsRangeLegacyQuirk

public AeFpsRangeLegacyQuirk(
    @NonNull CameraCharacteristicsCompat cameraCharacteristicsCompat
)

Public methods

getRange

@Nullable
@NonNull
public Range<@NonNull IntegergetRange()

Returns the fps range whose upper is 30 and whose lower is the smallest, or null if no range has an upper equal to 30. The rational is: (1) Range upper is always 30 so that a smooth frame rate is guaranteed. (2) Range lower contains the smallest supported value so that it can adapt as much as possible to low light conditions.