object TransformationMode


The transformation mode of the source.

This indicates how the source has been transformed before reaching the viewfinder.

Summary

Constants

const Int

Indicates that the transformation (such as rotation and scaling) is deferred to the consumer (e.g., the Viewfinder).

const Int

Indicates that the transformation has already been applied by the producer or an upstream pipeline before reaching the consumer.

Constants

DEFERRED

Added in 1.7.0-alpha02
const val DEFERRED = 0: Int

Indicates that the transformation (such as rotation and scaling) is deferred to the consumer (e.g., the Viewfinder).

The consumer is responsible for applying the transformation matrix associated with the buffers to make the frames appear correctly relative to the display.

For example, when receiving buffers directly from a camera source via a SurfaceTexture, the viewfinder must apply the texture's transform matrix (which typically encodes sensor-to-display rotation).

Note: Different ImplementationModes (such as ImplementationMode.EXTERNAL vs. ImplementationMode.EMBEDDED) may apply this matrix differently due to their underlying implementation.

PRE_APPLIED

Added in 1.7.0-alpha02
const val PRE_APPLIED = 1: Int

Indicates that the transformation has already been applied by the producer or an upstream pipeline before reaching the consumer.

The consumer should ignore the transformation matrix associated with the buffers (or assume it is identity) and display the frames as-is relative to the display.

For example, if an OpenGL pipeline has already rotated the images to an upright orientation, the viewfinder should not apply further rotation.