Builder


class Builder
kotlin.Any
   ↳ android.hardware.camera2.MultiResolutionImageReader.Builder

Builder class for MultiResolutionImageReader objects.

Summary

Public constructors
Builder(streams: MutableCollection<MultiResolutionStreamInfo!>, format: Int, maxImages: Int)

Constructs a new builder for MultiResolutionImageReader.

Public methods
MultiResolutionImageReader

Build a new MultiResolutionImageReader object.

MultiResolutionImageReader.Builder

Turn on/off concurrent outputs for the internal ImageReaders.

MultiResolutionImageReader.Builder
setUsage(usage: Long)

Set the intended android.

Public constructors

Builder

Builder(
    streams: MutableCollection<MultiResolutionStreamInfo!>,
    format: Int,
    maxImages: Int)

Constructs a new builder for MultiResolutionImageReader.

See MultiResolutionImageReader(Collection,int,int,long) for detailed explanations of the constructor parameters.

Parameters
streams MutableCollection<MultiResolutionStreamInfo!>: The group of multi-resolution stream info returned from android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputFormats.
This value cannot be null.
format Int: The format of the Image that this multi-resolution reader will produce.
Value is one of the following:
maxImages Int: The maximum number of images the user will want to access simultaneously.
Value is 1 or greater

Public methods

build

fun build(): MultiResolutionImageReader

Build a new MultiResolutionImageReader object.

Return
MultiResolutionImageReader The new MultiResolutionImageReader object.
This value cannot be null.

setConcurrentOutputsEnabled

fun setConcurrentOutputsEnabled(enable: Boolean): MultiResolutionImageReader.Builder

Turn on/off concurrent outputs for the internal ImageReaders.

If MultiResolutionStreamConfigurationMap#isConcurrentReadersSupported returns true, the camera device supports concurrent outputs from multiple internal ImageReaders (for example, in scenarios where multiple sensors run at the same time). By default, concurrent outputs are disabled. The application can enable such mode by calling this function with true.

Parameters
enable Boolean: Whether to allow the camera device to output concurrent readers for this MultiResolutionImageReader. If set to true for a device that doesn't support MultiResolutionImageReader concurrency, android.hardware.camera2.CameraDevice#createCaptureSession will fail.
Return
MultiResolutionImageReader.Builder the Builder instance with concurrency enabled.
This value cannot be null.