Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#inhmethods)

# MultiResolutionStreamConfigurationMap

*** ** * ** ***

` public final class MultiResolutionStreamConfigurationMap `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.hardware.camera2.params.MultiResolutionStreamConfigurationMap |

<br />

*** ** * ** ***

Immutable class to store the information of the multi-resolution streams supported by the camera device.

For a `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_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 `https://developer.android.com/reference/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 `https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration` used for creating reprocessable session can be initialized using the group of input stream configurations returned by `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getInputInfo(int)`.

<br />

## Summary

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Check if this `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap` is equal to another `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap`. |
| ` int[]` | ` https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getInputFormats()() ` Get the input formats in this multi-resolution stream configuration. |
| ` https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamInfo>` | ` https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getInputInfo(int)(int format) ` Get a group of `MultiResolutionStreamInfo` with the requested input image `format` The `format` should be a supported format (one of the formats returned by `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getInputFormats()`). |
| ` int[]` | ` https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getOutputFormats()() ` Get the output formats in this multi-resolution stream configuration. |
| ` https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamInfo>` | ` https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getOutputInfo(int)(int format) ` Get a group of `MultiResolutionStreamInfo` with the requested output image `format` The `format` should be a supported format (one of the formats returned by `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getOutputFormats()`). |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#isConcurrentReadersSupported(int)(int format) ` Check whether concurrent readers are supported for a particular format. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#toString()() ` Return this `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap` as a string representation. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public methods

### equals

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object obj)
```

Check if this `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap` is equal to another `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap`.

<br />

| Parameters ||
|---|---|
| `obj` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the objects were equal, `false` otherwise <br /> |

### getInputFormats

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getInputFormats ()
```

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 `https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap#getValidOutputFormatsForInput(int)`.

All image formats returned by this function will be defined in either `https://developer.android.com/reference/android/graphics/ImageFormat` or in `https://developer.android.com/reference/android/graphics/PixelFormat` (and there is no possibility of collision).

<br />

<br />

| Returns ||
|---|---|
| `int[]` | an array of integer format, or empty array if no multi-resolution reprocessing is supported. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/ImageFormat`
- `https://developer.android.com/reference/android/graphics/PixelFormat`

### getInputInfo

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Collection<MultiResolutionStreamInfo> getInputInfo (int format)
```

Get a group of `MultiResolutionStreamInfo` with the requested input image `format`

The `format` should be a supported format (one of the formats returned by `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getInputFormats()`).

<br />

<br />

| Parameters ||
|---|---|
| `format` | `int`: an image format from `https://developer.android.com/reference/android/graphics/ImageFormat` or `https://developer.android.com/reference/android/graphics/PixelFormat` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamInfo>` | a group of supported `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamInfo`. If the `format` is not a supported multi-resolution input, an empty group is returned. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/ImageFormat`
- `https://developer.android.com/reference/android/graphics/PixelFormat`
- `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getInputFormats()`

### getOutputFormats

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getOutputFormats ()
```

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

A logical multi-camera or an ultra high resolution sensor camera may support `https://developer.android.com/reference/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 `https://developer.android.com/reference/android/graphics/ImageFormat` or in `https://developer.android.com/reference/android/graphics/PixelFormat` (and there is no possibility of collision).

<br />

<br />

| Returns ||
|---|---|
| `int[]` | an array of integer format, or empty array if multi-resolution output is not supported. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/ImageFormat`
- `https://developer.android.com/reference/android/graphics/PixelFormat`
- `https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader`

### getOutputInfo

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Collection<MultiResolutionStreamInfo> getOutputInfo (int format)
```

Get a group of `MultiResolutionStreamInfo` with the requested output image `format`

The `format` should be a supported format (one of the formats returned by `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getOutputFormats()`).

<br />

<br />

| Parameters ||
|---|---|
| `format` | `int`: an image format from `https://developer.android.com/reference/android/graphics/ImageFormat` or `https://developer.android.com/reference/android/graphics/PixelFormat` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamInfo>` | a group of supported `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamInfo`. If the `format` is not a supported multi-resolution output, an empty group is returned. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/ImageFormat`
- `https://developer.android.com/reference/android/graphics/PixelFormat`
- `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap#getOutputFormats()`

### hashCode

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by `https://developer.android.com/reference/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 `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` 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 `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` 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.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isConcurrentReadersSupported

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isConcurrentReadersSupported (int format)
```

Check whether concurrent readers are supported for a particular format.

This function returns true if the camera device supports outputting on multiple readers within the `https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader` with the specified `format`.

<br />

<br />

| Parameters ||
|---|---|
| `format` | `int`: an image format from `https://developer.android.com/reference/android/graphics/ImageFormat` or `https://developer.android.com/reference/android/graphics/PixelFormat` <br /> |

| Returns ||
|---|---|
| `boolean` | whether concurrent readers are supported. <br /> |

### toString

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Return this `https://developer.android.com/reference/android/hardware/camera2/params/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], ...)))"`.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | string representation of `https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap` <br /> |