MultiResolutionStreamConfigurationMap
class MultiResolutionStreamConfigurationMap
kotlin.Any | |
↳ | android.hardware.camera2.params.MultiResolutionStreamConfigurationMap |
Immutable class to store the information of the multi-resolution streams supported by the camera device.
For a logical multi-camera
or an ultra high resolution sensor camera, the maximum resolution of images produced by the camera device may be variable. For example, for a logical multi-camera, depending on factors such as current zoom ratio, the camera device may be backed by different physical cameras. If the physical cameras are of different resolutions, the application may intend to consume the variable full resolution images from the physical cameras. For an ultra high resolution sensor camera, the same use case exists where depending on lighting conditions, the camera device may deem it better to run in default mode and maximum resolution mode.
For the use cases described above, multi-resolution output streams can be used by android.hardware.camera2.MultiResolutionImageReader
to allow the camera device to output variable size maximum-resolution images.
Similarly, multi-resolution input streams can be used for reprocessing of variable size images. In order to reprocess input images of different sizes, the InputConfiguration
used for creating reprocessable session can be initialized using the group of input stream configurations returned by getInputInfo
.
Summary
Public methods | |
---|---|
Boolean |
Check if this |
IntArray |
Get the input formats in this multi-resolution stream configuration. |
MutableCollection<MultiResolutionStreamInfo!> |
getInputInfo(format: Int) Get a group of |
IntArray |
Get the output formats in this multi-resolution stream configuration. |
MutableCollection<MultiResolutionStreamInfo!> |
getOutputInfo(format: Int) Get a group of |
Int |
hashCode() Returns a hash code value for the object. |
String |
toString() Return this |
Public methods
equals
fun equals(other: Any?): Boolean
Check if this MultiResolutionStreamConfigurationMap
is equal to another MultiResolutionStreamConfigurationMap
.
Parameters | |
---|---|
obj |
the reference object with which to compare. |
Return | |
---|---|
Boolean |
true if the objects were equal, false otherwise |
getInputFormats
fun getInputFormats(): IntArray
Get the input formats in this multi-resolution stream configuration.
A logical multi-camera or ultra high resolution sensor camera may support reprocessing images of different resolutions when switching between physical cameras, or between different modes of the ultra high resolution sensor camera. This function returns the formats supported for such case.
The supported output format for an input format can be queried by calling the camera device's StreamConfigurationMap.getValidOutputFormatsForInput
.
All image formats returned by this function will be defined in either ImageFormat
or in PixelFormat
(and there is no possibility of collision).
getInputInfo
fun getInputInfo(format: Int): MutableCollection<MultiResolutionStreamInfo!>
Get a group of MultiResolutionStreamInfo
with the requested input image format
The format
should be a supported format (one of the formats returned by getInputFormats
).
Return | |
---|---|
MutableCollection<MultiResolutionStreamInfo!> |
a group of supported MultiResolutionStreamInfo . If the format is not a supported multi-resolution input, an empty group is returned. This value cannot be null . |
getOutputFormats
fun getOutputFormats(): IntArray
Get the output formats in this multi-resolution stream configuration.
A logical multi-camera or an ultra high resolution sensor camera may support android.hardware.camera2.MultiResolutionImageReader
to dynamically output maximum resolutions of different sizes (when switching between physical cameras, or between different modes of an ultra high resolution sensor camera). This function returns the formats supported for such case.
All image formats returned by this function will be defined in either ImageFormat
or in PixelFormat
(and there is no possibility of collision).
getOutputInfo
fun getOutputInfo(format: Int): MutableCollection<MultiResolutionStreamInfo!>
Get a group of MultiResolutionStreamInfo
with the requested output image format
The format
should be a supported format (one of the formats returned by getOutputFormats
).
Return | |
---|---|
MutableCollection<MultiResolutionStreamInfo!> |
a group of supported MultiResolutionStreamInfo . If the format is not a supported multi-resolution output, an empty group is returned. This value cannot be null . |
hashCode
fun hashCode(): Int
Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap
.
The general contract of hashCode
is:
- Whenever it is invoked on the same object more than once during an execution of a Java application, the
hashCode
method must consistently return the same integer, provided no information used inequals
comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. - If two objects are equal according to the
equals
method, then calling thehashCode
method on each of the two objects must produce the same integer result. - It is not required that if two objects are unequal according to the
equals
method, then calling thehashCode
method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Return | |
---|---|
Int |
a hash code value for this object. |
toString
fun toString(): String
Return this MultiResolutionStreamConfigurationMap
as a string representation.
"MultiResolutionStreamConfigurationMap(Outputs([format1: [w:%d, h:%d, id:%s], ... ... [w:%d, h:%d, id:%s]), [format2: [w:%d, h:%d, id:%s], ... [w:%d, h:%d, id:%s]], ...), Inputs([format1: [w:%d, h:%d, id:%s], ... [w:%d, h:%d, id:%s], ...).</p> string representation of { MultiResolutionStreamConfigurationMap} 31
Return | |
---|---|
String |
a string representation of the object. |