UseCaseGroup.Builder
class UseCaseGroup.Builder
A builder for generating UseCaseGroup.
Summary
Public constructors |
|---|
Builder() |
Public functions |
|
|---|---|
UseCaseGroup.Builder |
addEffect(cameraEffect: CameraEffect)Adds a |
UseCaseGroup.Builder |
addUseCase(useCase: UseCase)Adds |
UseCaseGroup |
build()Builds a |
UseCaseGroup.Builder |
setViewPort(viewPort: ViewPort) |
Public functions
addEffect
fun addEffect(cameraEffect: CameraEffect): UseCaseGroup.Builder
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
fun addUseCase(useCase: UseCase): UseCaseGroup.Builder
Adds UseCase to the collection.