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

# InputConfiguration

*** ** * ** ***


`
public

final

class
InputConfiguration
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

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

<br />

*** ** * ** ***

Immutable class to store an input configuration that is used to create a reprocessable capture
session.
**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createReprocessableCaptureSession(android.hardware.camera2.params.InputConfiguration,%20java.util.List<android.view.Surface>,%20android.hardware.camera2.CameraCaptureSession.StateCallback,%20android.os.Handler)`
- `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP`

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#InputConfiguration(int,%20int,%20int)(int width, int height, int format) ` Create an input configuration with the width, height, and user-defined format. |
| ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#InputConfiguration(java.util.Collection<android.hardware.camera2.params.MultiResolutionStreamInfo>,%20int)(https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamInfo> multiResolutionInputs, int format) ` Create an input configuration with the format and a list of multi-resolution input stream info. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Check if this InputConfiguration is equal to another InputConfiguration. |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#getFormat()() ` Get the format of this input configuration. |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#getHeight()() ` Get the height of this input configuration. |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#getWidth()() ` Get the width of this input configuration. |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#isMultiResolution()() ` Whether this input configuration is of multi-resolution. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration#toString()() ` Return this `https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration` 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 constructors

### InputConfiguration

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

```
public InputConfiguration (int width, 
                int height, 
                int format)
```

Create an input configuration with the width, height, and user-defined format.

Images of a user-defined format are accessible by applications. Use
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP`
to query supported input formats

<br />

<br />

| Parameters ||
|---|---|
| `width` | `int`: Width of the input buffers. <br /> |
| `height` | `int`: Height of the input buffers. <br /> |
| `format` | `int`: Format of the input buffers. One of ImageFormat or PixelFormat constants. <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/CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP`

### InputConfiguration

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

```
public InputConfiguration (Collection<MultiResolutionStreamInfo> multiResolutionInputs, 
                int format)
```

Create an input configuration with the format and a list of multi-resolution input stream
info.

Use `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP`
to query supported multi-resolution input formats.

To do reprocessing with variable resolution input, the application calls
`https://developer.android.com/reference/android/media/ImageWriter#queueInputImage(android.media.Image)`
using an image from an `https://developer.android.com/reference/android/media/ImageReader` or `https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader`. See
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createReprocessCaptureRequest(android.hardware.camera2.TotalCaptureResult)` for more
details on camera reprocessing.

<br />

<br />

| Parameters ||
|---|---|
| `multiResolutionInputs` | `Collection`: A group of multi-resolution input info for the specified format. This value cannot be `null`. <br /> |
| `format` | `int`: Format of the input buffers. One of ImageFormat or PixelFormat constants. <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/CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP`

## Public methods

### equals

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

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

Check if this InputConfiguration is equal to another InputConfiguration.

Two input configurations are equal if and only if they have the same widths, heights, and
formats.

<br />

<br />

| Parameters ||
|---|---|
| `obj` | `Object`: the object to compare this instance with. This value may be `null`. <br /> |

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

### getFormat

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

```
public int getFormat ()
```

Get the format of this input configuration.

<br />

| Returns ||
|---|---|
| `int` | format of this input configuration. <br /> |

### getHeight

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

```
public int getHeight ()
```

Get the height of this input configuration.

<br />

| Returns ||
|---|---|
| `int` | height of this input configuration. <br /> |

### getWidth

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

```
public int getWidth ()
```

Get the width of this input configuration.

<br />

| Returns ||
|---|---|
| `int` | width of this input configuration. <br /> |

### hashCode

Added in [API level 23](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 /> |

### isMultiResolution

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

```
public boolean isMultiResolution ()
```

Whether this input configuration is of multi-resolution.

An multi-resolution InputConfiguration means that the reprocessing session created from it
allows input images of different sizes.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | this input configuration is multi-resolution or not. <br /> |

### toString

Added in [API level 23](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/InputConfiguration` as a string representation.

`"InputConfiguration(w:%d, h:%d, format:%d, isMultiResolution:%d)"`,
where `%d` represents the width, height, format, and multi-resolution flag
respectively.

<br />

<br />

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