CameraController.OutputSize

Added in 1.1.0
Deprecated in 1.4.0

public final class CameraController.OutputSize


Represents the output size of a UseCase.

This class is a preferred output size to be used with CameraController. The preferred output size can be based on either resolution or aspect ratio, but not both.

Summary

Constants

static final int

This field is deprecated. Deprecated in Java

Public constructors

OutputSize(int aspectRatio)

This method is deprecated. Deprecated in Java

OutputSize(@NonNull Size resolution)

This method is deprecated. Deprecated in Java

Public methods

int

This method is deprecated. Deprecated in Java

@Nullable Size

This method is deprecated. Deprecated in Java

@NonNull String

This method is deprecated. Deprecated in Java

Constants

UNASSIGNED_ASPECT_RATIO

Added in 1.1.0
Deprecated in 1.4.0
public static final int UNASSIGNED_ASPECT_RATIO = -1

A value that represents the aspect ratio is not assigned.

Public constructors

OutputSize

Added in 1.1.0
Deprecated in 1.4.0
public OutputSize(int aspectRatio)

Creates a OutputSize that is based on aspect ratio.

OutputSize

Added in 1.1.0
Deprecated in 1.4.0
public OutputSize(@NonNull Size resolution)

Creates a OutputSize that is based on resolution.

Public methods

getAspectRatio

Added in 1.1.0
Deprecated in 1.4.0
public int getAspectRatio()

Gets the value of aspect ratio.

Value is one of the following:

  • AspectRatio.RATIO_4_3
  • AspectRatio.RATIO_16_9

Returns
int

UNASSIGNED_ASPECT_RATIO if the size is not based on aspect ratio.

getResolution

Added in 1.1.0
Deprecated in 1.4.0
public @Nullable Size getResolution()

Gets the value of resolution.

Returns
@Nullable Size

null if the size is not based on resolution.

toString

public @NonNull String toString()