Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

Preview.PreviewOutput

public static abstract class Preview.PreviewOutput
extends Object

java.lang.Object
   ↳ androidx.camera.core.Preview.PreviewOutput


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

Summary

Public methods

abstract int getRotationDegrees()

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

abstract SurfaceTexture getSurfaceTexture()

Returns the PreviewOutput that receives image data.

abstract Size getTextureSize()

Returns the dimensions of the PreviewOutput.

Inherited methods

Public methods

getRotationDegrees

public abstract int getRotationDegrees ()

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[]).

Returns
int

getSurfaceTexture

public abstract SurfaceTexture getSurfaceTexture ()

Returns the PreviewOutput that receives image data.

Returns
SurfaceTexture

getTextureSize

public abstract Size getTextureSize ()

Returns the dimensions of the PreviewOutput.

Returns
Size