The Android Developer Challenge is back! Submit your idea before December 2.

PreviewOutput

abstract class PreviewOutput
kotlin.Any
   ↳ androidx.camera.core.Preview.PreviewOutput

A bundle containing a SurfaceTexture and properties needed to display a Preview.

Summary

Public methods

abstract Int

Returns the rotation required, in degrees, to transform the PreviewOutput to match the orientation given by ImageOutputConfig#getTargetRotation(int).

abstract SurfaceTexture

Returns the PreviewOutput that receives image data.

abstract Size

Returns the dimensions of the PreviewOutput.

Public methods

getRotationDegrees

abstract fun getRotationDegrees(): Int

Returns the rotation required, in degrees, to transform the PreviewOutput to match the orientation given by ImageOutputConfig#getTargetRotation(int).

This number is independent of any rotation value that can be derived from the PreviewOutput's SurfaceTexture#getTransformMatrix(float[]).

getSurfaceTexture

@NonNull abstract fun getSurfaceTexture(): SurfaceTexture

Returns the PreviewOutput that receives image data.

getTextureSize

@NonNull abstract fun getTextureSize(): Size

Returns the dimensions of the PreviewOutput.