Constraint

sealed interface Constraint

Constraints are session configuration options that are negotiated by the CameraSession to find a closest-matching working Camera configuration.

In other words, Constraints describe intent. They are ranked by priority in the order they are passed, descending: the first item has the highest priority.

val constraints = listOf(
ResolutionBiasConstraint(photoOutput),
PhotoHDRConstraint(true),
ResolutionBiasConstraint(videoOutput),
)

See also

Inheritors