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

# MandatoryStreamCombination.MandatoryStreamInformation

*** ** * ** ***


`
public
static
final

class
MandatoryStreamCombination.MandatoryStreamInformation
`


`

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


`

`


`

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

<br />

*** ** * ** ***

Immutable class to store available mandatory stream information.

## Summary

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#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/MandatoryStreamCombination.MandatoryStreamInformation` is equal to another `https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation`. |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#get10BitFormat()() ` Retrieve the mandatory stream 10-bit `format` for 10-bit capable streams. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/util/Size>` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#getAvailableSizes()() ` Return the list of available sizes for this mandatory stream. |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#getFormat()() ` Retrieve the mandatory stream `format`. |
| ` long` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#getStreamUseCase()() ` Retrieve the mandatory stream use case. |
| ` int` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#is10BitCapable()() ` Indicates whether this stream is able to support 10-bit output. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#isInput()() ` Confirms whether or not this is an input stream. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#isMaximumSize()() ` Confirms whether or not this is a maximum size stream. |
| ` boolean` | ` https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#isUltraHighResolution()() ` Confirms whether or not this is an ultra high resolution stream. |

| ### 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 29](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/MandatoryStreamCombination.MandatoryStreamInformation` is equal to another
`https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation`.

Two vectors are only equal if and only if each of the respective elements is
equal.

<br />

<br />

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

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

### get10BitFormat

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

```
public int get10BitFormat ()
```

Retrieve the mandatory stream 10-bit `format` for 10-bit capable streams.

In case `https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#is10BitCapable()` returns `true`, then this method
will return the corresponding 10-bit output Surface pixel format. Depending on
the stream type it will be either `https://developer.android.com/reference/android/graphics/ImageFormat#PRIVATE` or
`https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P010`.

<br />

<br />

| Returns ||
|---|---|
| `int` | integer format. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/UnsupportedOperationException` | in case the stream is not capable of 10-bit output |

**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#is10BitCapable()`

### getAvailableSizes

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

```
public List<Size> getAvailableSizes ()
```

Return the list of available sizes for this mandatory stream.

Per documented `https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createCaptureSession(android.hardware.camera2.params.SessionConfiguration)` the largest
resolution in the result will be tested and guaranteed to work. If clients want to use
smaller sizes, then the resulting
`https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration` can
be tested either by calling `https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createCaptureSession(android.hardware.camera2.params.SessionConfiguration)` or
`https://developer.android.com/reference/android/hardware/camera2/CameraDevice.CameraDeviceSetup#isSessionConfigurationSupported(android.hardware.camera2.params.SessionConfiguration)`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/util/Size>` | non-modifiable ascending list of available sizes. This value cannot be `null`. <br /> |

### getFormat

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

```
public int getFormat ()
```

Retrieve the mandatory stream `format`.

<br />

| Returns ||
|---|---|
| `int` | integer format. <br /> |

### getStreamUseCase

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

```
public long getStreamUseCase ()
```

Retrieve the mandatory stream use case.

If this `https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation` is part of a mandatory stream
combination for stream use cases, the return value will be a non-DEFAULT value.
For `https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation` belonging to other mandatory stream
combinations, the return value will be DEFAULT.

<br />

<br />

| Returns ||
|---|---|
| `long` | the long integer stream use case. Value is one of the following: - `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT` - `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW` - `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE` - `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD` - `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL` - `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL` - `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW` |

### hashCode

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

### is10BitCapable

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

```
public boolean is10BitCapable ()
```

Indicates whether this stream is able to support 10-bit output.

10-bit capable streams can be configured to output 10-bit sample data via calls to
`https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration#setDynamicRangeProfile(long)` and
selecting the appropriate output Surface pixel format which can be queried via
`https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.MandatoryStreamInformation#get10BitFormat()` and will be either
`https://developer.android.com/reference/android/graphics/ImageFormat#PRIVATE` (the default for Surfaces initialized by
`https://developer.android.com/reference/android/view/SurfaceView`, `https://developer.android.com/reference/android/view/TextureView`,
`https://developer.android.com/reference/android/media/MediaRecorder`, `https://developer.android.com/reference/android/media/MediaCodec` etc.) or
`https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P010`.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if stream is able to output 10-bit pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT`
- `https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration#setDynamicRangeProfile(long)`

### isInput

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

```
public boolean isInput ()
```

Confirms whether or not this is an input stream.

<br />

| Returns ||
|---|---|
| `boolean` | true in case the stream is input, false otherwise. <br /> |

### isMaximumSize

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

```
public boolean isMaximumSize ()
```

Confirms whether or not this is a maximum size stream.

A stream with maximum size is one with the camera device's maximum resolution
for the stream's format as appears in `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP`. This
maximum size has the same meaning as the 'MAXIMUM' target size documented in the camera
capture session `https://developer.android.com/reference/android/hardware/camera2/CameraDevice#createCaptureSession(android.hardware.camera2.params.SessionConfiguration)`.

The application can use a
`https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader` for a maximum size
output stream if the camera device supports multi-resolution outputs for the stream's
format. See `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP`
for details.

This is different from the ultra high resolution flag, which applies only to
ultra high resolution sensor camera devices and refers to a stream in
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION`
instead.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the stream is a maximum size stream. <br /> |

### isUltraHighResolution

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

```
public boolean isUltraHighResolution ()
```

Confirms whether or not this is an ultra high resolution stream.

An 'ultra high resolution' stream is one which has a configuration which appears in
`https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION`,
Streams which are ultra high resolution must not be included with streams which are not
ultra high resolution in the same `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest`.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true in case the stream is ultra high resolution, false otherwise. <br /> |