ConcurrentCamera.SingleCameraConfig


public final class ConcurrentCamera.SingleCameraConfig


Configuration for a single camera in concurrent camera mode, including CameraSelector, LifecycleOwner and UseCaseGroup.

The configuration is used to bring up a lifecycle-aware camera with UseCase bound. This class can used to bind concurrent cameras to LifecycleOwner, each SingleCameraConfig represents a single camera.

Summary

Public constructors

SingleCameraConfig(
    @NonNull CameraSelector cameraSelector,
    @NonNull UseCaseGroup useCaseGroup,
    @NonNull LifecycleOwner lifecycleOwner
)

Constructor of a SingleCameraConfig for concurrent cameras.

SingleCameraConfig(
    @NonNull CameraSelector cameraSelector,
    @NonNull UseCaseGroup useCaseGroup,
    @NonNull CompositionSettings compositionSettings,
    @NonNull LifecycleOwner lifecycleOwner
)

Constructor of a SingleCameraConfig for concurrent cameras.

Public constructors

SingleCameraConfig

Added in 1.3.0
public SingleCameraConfig(
    @NonNull CameraSelector cameraSelector,
    @NonNull UseCaseGroup useCaseGroup,
    @NonNull LifecycleOwner lifecycleOwner
)

Constructor of a SingleCameraConfig for concurrent cameras.

Parameters
@NonNull CameraSelector cameraSelector

CameraSelector.

@NonNull UseCaseGroup useCaseGroup

UseCaseGroup.

@NonNull LifecycleOwner lifecycleOwner

LifecycleOwner.

SingleCameraConfig

Added in 1.5.0-alpha03
public SingleCameraConfig(
    @NonNull CameraSelector cameraSelector,
    @NonNull UseCaseGroup useCaseGroup,
    @NonNull CompositionSettings compositionSettings,
    @NonNull LifecycleOwner lifecycleOwner
)

Constructor of a SingleCameraConfig for concurrent cameras.

Parameters
@NonNull CameraSelector cameraSelector

CameraSelector.

@NonNull UseCaseGroup useCaseGroup

UseCaseGroup.

@NonNull CompositionSettings compositionSettings

CompositionSettings.

@NonNull LifecycleOwner lifecycleOwner

LifecycleOwner.

Public methods

getCameraSelector

Added in 1.3.0
public @NonNull CameraSelector getCameraSelector()

Returns CameraSelector.

getLifecycleOwner

Added in 1.3.0
public @NonNull LifecycleOwner getLifecycleOwner()

Returns LifecycleOwner.

getUseCaseGroup

Added in 1.3.0
public @NonNull UseCaseGroup getUseCaseGroup()

Returns UseCaseGroup.

Returns
@NonNull UseCaseGroup

UseCaseGroup instance.