CameraController.OutputSize
public
static
class
CameraController.OutputSize
extends Object
| java.lang.Object | |
| ↳ | androidx.camera.view.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.
See also:
Summary
Constants | |
|---|---|
int |
UNASSIGNED_ASPECT_RATIO
A value that represents the aspect ratio is not assigned. |
Public constructors | |
|---|---|
OutputSize(int aspectRatio)
Creates a |
|
OutputSize(Size resolution)
Creates a |
|
Public methods | |
|---|---|
int
|
getAspectRatio()
Gets the value of aspect ratio. |
Size
|
getResolution()
Gets the value of resolution. |
Inherited methods | |
|---|---|
Constants
UNASSIGNED_ASPECT_RATIO
public static final int UNASSIGNED_ASPECT_RATIO
A value that represents the aspect ratio is not assigned.
Constant Value: -1 (0xffffffff)
Public constructors
OutputSize
public OutputSize (int aspectRatio)
Creates a CameraController.OutputSize that is based on aspect ratio.
| Parameters | |
|---|---|
aspectRatio |
int |
OutputSize
public OutputSize (Size resolution)
Creates a CameraController.OutputSize that is based on resolution.
| Parameters | |
|---|---|
resolution |
Size |
Public methods
getAspectRatio
public int getAspectRatio ()
Gets the value of aspect ratio.
| Returns | |
|---|---|
int |
UNASSIGNED_ASPECT_RATIO if the size is not based on aspect ratio.
|