UseCaseGroup.Builder
public final class UseCaseGroup.Builder
A builder for generating UseCaseGroup.
Summary
Public constructors |
|---|
Builder() |
Public methods |
|
|---|---|
@NonNull UseCaseGroup.Builder |
addEffect(@NonNull CameraEffect cameraEffect)Adds a |
@NonNull UseCaseGroup.Builder |
addUseCase(@NonNull UseCase useCase)Adds |
@NonNull UseCaseGroup |
build()Builds a |
@NonNull UseCaseGroup.Builder |
setViewPort(@NonNull ViewPort viewPort) |
Public methods
addEffect
public @NonNull UseCaseGroup.Builder addEffect(@NonNull CameraEffect cameraEffect)
Adds a CameraEffect to the collection.
The value of getTargets must be one of the supported values below:
The targets must be mutually exclusive of each other, otherwise, the build method will throw IllegalArgumentException. For example, it's invalid to have one CameraEffect with target PREVIEW and another CameraEffect with target PREVIEW | VIDEO_CAPTURE, since they both target Preview.
Once added, CameraX will use the CameraEffects to process the outputs of the UseCases.
addUseCase
public @NonNull UseCaseGroup.Builder addUseCase(@NonNull UseCase useCase)
Adds UseCase to the collection.
build
public @NonNull UseCaseGroup build()
Builds a UseCaseGroup from the current state.
setViewPort
public @NonNull UseCaseGroup.Builder setViewPort(@NonNull ViewPort viewPort)