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 |
|
| Public methods | |
|---|---|
| MultiResolutionImageReader |
build()Build a new MultiResolutionImageReader object. |
| MultiResolutionImageReader.Builder |
setConcurrentOutputsEnabled(enable: Boolean)Turn on/off concurrent outputs for the internal ImageReaders. |
| MultiResolutionImageReader.Builder |
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.
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. |
setUsage
fun setUsage(usage: Long): MultiResolutionImageReader.Builder
Set the intended android.hardware.HardwareBuffer.Usage of the images produced by the internal ImageReaders.
The default usage is HardwareBuffer.USAGE_CPU_READ_OFTEN, unless the format is ImageFormat.PRIVATE, in which case the default usage is 0.
| Parameters | |
|---|---|
usage |
Long: The intended android.hardware.HardwareBuffer.Usage of the images produced by the internal ImageReaders. Value is either 0 or a combination of the following:
|
| Return | |
|---|---|
MultiResolutionImageReader.Builder |
the Builder instance with customized usage value. This value cannot be null. |