Added in API level 31

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
equals(other: Any?)

Check if this MultiResolutionStreamConfigurationMap is equal to another MultiResolutionStreamConfigurationMap.

IntArray

Get the input formats in this multi-resolution stream configuration.

MutableCollection<MultiResolutionStreamInfo!>
getInputInfo(format: Int)

Get a group of MultiResolutionStreamInfo with the requested input image format

IntArray

Get the output formats in this multi-resolution stream configuration.

MutableCollection<MultiResolutionStreamInfo!>
getOutputInfo(format: Int)

Get a group of MultiResolutionStreamInfo with the requested output image format

Int

Returns a hash code value for the object.

String

Return this MultiResolutionStreamConfigurationMap as a string representation.

Public methods

equals

Added in API level 31
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

Added in API level 31
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).

Return
IntArray an array of integer format, or empty array if no multi-resolution reprocessing is supported This value cannot be null. Value is android.graphics.ImageFormat#UNKNOWN, android.graphics.PixelFormat#RGBA_8888, android.graphics.PixelFormat#RGBX_8888, android.graphics.PixelFormat#RGB_888, android.graphics.ImageFormat#RGB_565, android.graphics.ImageFormat#YV12, android.graphics.ImageFormat#Y8, android.graphics.ImageFormat.Y16, android.graphics.ImageFormat#YCBCR_P010, android.graphics.ImageFormat#YCBCR_P210, android.graphics.ImageFormat#NV16, android.graphics.ImageFormat#NV21, android.graphics.ImageFormat#YUY2, android.graphics.ImageFormat#JPEG, android.graphics.ImageFormat#DEPTH_JPEG, android.graphics.ImageFormat#YUV_420_888, android.graphics.ImageFormat#YUV_422_888, android.graphics.ImageFormat#YUV_444_888, android.graphics.ImageFormat#FLEX_RGB_888, android.graphics.ImageFormat#FLEX_RGBA_8888, android.graphics.ImageFormat#RAW_SENSOR, android.graphics.ImageFormat#RAW_PRIVATE, android.graphics.ImageFormat#RAW10, android.graphics.ImageFormat#RAW12, android.graphics.ImageFormat#DEPTH16, android.graphics.ImageFormat#DEPTH_POINT_CLOUD, android.graphics.ImageFormat.RAW_DEPTH, android.graphics.ImageFormat.RAW_DEPTH10, android.graphics.ImageFormat#PRIVATE, android.graphics.ImageFormat#HEIC, android.graphics.ImageFormat.HEIC_ULTRAHDR, or android.graphics.ImageFormat#JPEG_R

getInputInfo

Added in API level 31
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).

Parameters
format Int: an image format from ImageFormat or PixelFormat Value is android.graphics.ImageFormat#UNKNOWN, android.graphics.PixelFormat#RGBA_8888, android.graphics.PixelFormat#RGBX_8888, android.graphics.PixelFormat#RGB_888, android.graphics.ImageFormat#RGB_565, android.graphics.ImageFormat#YV12, android.graphics.ImageFormat#Y8, android.graphics.ImageFormat.Y16, android.graphics.ImageFormat#YCBCR_P010, android.graphics.ImageFormat#YCBCR_P210, android.graphics.ImageFormat#NV16, android.graphics.ImageFormat#NV21, android.graphics.ImageFormat#YUY2, android.graphics.ImageFormat#JPEG, android.graphics.ImageFormat#DEPTH_JPEG, android.graphics.ImageFormat#YUV_420_888, android.graphics.ImageFormat#YUV_422_888, android.graphics.ImageFormat#YUV_444_888, android.graphics.ImageFormat#FLEX_RGB_888, android.graphics.ImageFormat#FLEX_RGBA_8888, android.graphics.ImageFormat#RAW_SENSOR, android.graphics.ImageFormat#RAW_PRIVATE, android.graphics.ImageFormat#RAW10, android.graphics.ImageFormat#RAW12, android.graphics.ImageFormat#DEPTH16, android.graphics.ImageFormat#DEPTH_POINT_CLOUD, android.graphics.ImageFormat.RAW_DEPTH, android.graphics.ImageFormat.RAW_DEPTH10, android.graphics.ImageFormat#PRIVATE, android.graphics.ImageFormat#HEIC, android.graphics.ImageFormat.HEIC_ULTRAHDR, or android.graphics.ImageFormat#JPEG_R
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

Added in API level 31
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).

Return
IntArray an array of integer format, or empty array if multi-resolution output is not supported This value cannot be null. Value is android.graphics.ImageFormat#UNKNOWN, android.graphics.PixelFormat#RGBA_8888, android.graphics.PixelFormat#RGBX_8888, android.graphics.PixelFormat#RGB_888, android.graphics.ImageFormat#RGB_565, android.graphics.ImageFormat#YV12, android.graphics.ImageFormat#Y8, android.graphics.ImageFormat.Y16, android.graphics.ImageFormat#YCBCR_P010, android.graphics.ImageFormat#YCBCR_P210, android.graphics.ImageFormat#NV16, android.graphics.ImageFormat#NV21, android.graphics.ImageFormat#YUY2, android.graphics.ImageFormat#JPEG, android.graphics.ImageFormat#DEPTH_JPEG, android.graphics.ImageFormat#YUV_420_888, android.graphics.ImageFormat#YUV_422_888, android.graphics.ImageFormat#YUV_444_888, android.graphics.ImageFormat#FLEX_RGB_888, android.graphics.ImageFormat#FLEX_RGBA_8888, android.graphics.ImageFormat#RAW_SENSOR, android.graphics.ImageFormat#RAW_PRIVATE, android.graphics.ImageFormat#RAW10, android.graphics.ImageFormat#RAW12, android.graphics.ImageFormat#DEPTH16, android.graphics.ImageFormat#DEPTH_POINT_CLOUD, android.graphics.ImageFormat.RAW_DEPTH, android.graphics.ImageFormat.RAW_DEPTH10, android.graphics.ImageFormat#PRIVATE, android.graphics.ImageFormat#HEIC, android.graphics.ImageFormat.HEIC_ULTRAHDR, or android.graphics.ImageFormat#JPEG_R

getOutputInfo

Added in API level 31
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).

Parameters
format Int: an image format from ImageFormat or PixelFormat Value is android.graphics.ImageFormat#UNKNOWN, android.graphics.PixelFormat#RGBA_8888, android.graphics.PixelFormat#RGBX_8888, android.graphics.PixelFormat#RGB_888, android.graphics.ImageFormat#RGB_565, android.graphics.ImageFormat#YV12, android.graphics.ImageFormat#Y8, android.graphics.ImageFormat.Y16, android.graphics.ImageFormat#YCBCR_P010, android.graphics.ImageFormat#YCBCR_P210, android.graphics.ImageFormat#NV16, android.graphics.ImageFormat#NV21, android.graphics.ImageFormat#YUY2, android.graphics.ImageFormat#JPEG, android.graphics.ImageFormat#DEPTH_JPEG, android.graphics.ImageFormat#YUV_420_888, android.graphics.ImageFormat#YUV_422_888, android.graphics.ImageFormat#YUV_444_888, android.graphics.ImageFormat#FLEX_RGB_888, android.graphics.ImageFormat#FLEX_RGBA_8888, android.graphics.ImageFormat#RAW_SENSOR, android.graphics.ImageFormat#RAW_PRIVATE, android.graphics.ImageFormat#RAW10, android.graphics.ImageFormat#RAW12, android.graphics.ImageFormat#DEPTH16, android.graphics.ImageFormat#DEPTH_POINT_CLOUD, android.graphics.ImageFormat.RAW_DEPTH, android.graphics.ImageFormat.RAW_DEPTH10, android.graphics.ImageFormat#PRIVATE, android.graphics.ImageFormat#HEIC, android.graphics.ImageFormat.HEIC_ULTRAHDR, or android.graphics.ImageFormat#JPEG_R
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

Added in API level 31
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 in equals 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 the hashCode 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 the hashCode 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.