# HdrCapabilitiesUtil

Artifact: [androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/HdrCapabilitiesUtil.java+class:androidx.media3.test.utils.HdrCapabilitiesUtil)

*** ** * ** ***


```
@UnstableApi
public final class HdrCapabilitiesUtil
```

<br />

*** ** * ** ***

Utility class for checking HDR capabilities.

## Summary

| ### Public methods |
|---|---|
| `static void` | `https://developer.android.com/reference/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceDoesNotSupportHdrColorTransfer(java.lang.String,androidx.media3.common.Format)( https://developer.android.com/reference/java/lang/String.html testId, https://developer.android.com/reference/androidx/media3/common/Format format )` Assumes that the device does not support HDR editing for the given `colorInfo`. |
| `static void` | `https://developer.android.com/reference/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceDoesNotSupportHdrEditing(java.lang.String,androidx.media3.common.Format)(https://developer.android.com/reference/java/lang/String.html testId, https://developer.android.com/reference/androidx/media3/common/Format format)` Assumes that the device does not support HDR editing for the given `colorInfo`. |
| `static void` | `https://developer.android.com/reference/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceSupportsHdrColorTransfer(java.lang.String,androidx.media3.common.Format)(https://developer.android.com/reference/java/lang/String.html testId, https://developer.android.com/reference/androidx/media3/common/Format format)` Assumes that the device supports HDR editing for the given `colorInfo`. |
| `static void` | `https://developer.android.com/reference/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceSupportsHdrEditing(java.lang.String,androidx.media3.common.Format)(https://developer.android.com/reference/java/lang/String.html testId, https://developer.android.com/reference/androidx/media3/common/Format format)` Assumes that the device supports HDR editing for the given `colorInfo`. |
| `static void` | `https://developer.android.com/reference/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceSupportsOpenGlToneMapping(java.lang.String,androidx.media3.common.Format)( https://developer.android.com/reference/java/lang/String.html testId, https://developer.android.com/reference/androidx/media3/common/Format inputFormat )` Assumes that the device supports OpenGL tone-mapping for the `inputFormat`. |

## Public methods

### assumeDeviceDoesNotSupportHdrColorTransfer

```
public static void assumeDeviceDoesNotSupportHdrColorTransfer(
    String testId,
    Format format
)
```

Assumes that the device does not support HDR editing for the given `colorInfo`.

| Throws |
|---|---|
| `https://junit.org/junit4/javadoc/latest/org/junit/AssumptionViolatedException.html` | if the device does support HDR editing. |
| `https://developer.android.com/reference/org/json/JSONException.html` |   |
| `https://developer.android.com/reference/java/io/IOException.html` |   |
| `https://developer.android.com/reference/androidx/media3/common/util/GlUtil.GlException` |   |

### assumeDeviceDoesNotSupportHdrEditing

```
public static void assumeDeviceDoesNotSupportHdrEditing(String testId, Format format)
```

Assumes that the device does not support HDR editing for the given `colorInfo`.

| Throws |
|---|---|
| `https://junit.org/junit4/javadoc/latest/org/junit/AssumptionViolatedException.html` | if the device does support HDR editing. |
| `https://developer.android.com/reference/org/json/JSONException.html` |   |
| `https://developer.android.com/reference/java/io/IOException.html` |   |

### assumeDeviceSupportsHdrColorTransfer

```
public static void assumeDeviceSupportsHdrColorTransfer(String testId, Format format)
```

Assumes that the device supports HDR editing for the given `colorInfo`.

| Throws |
|---|---|
| `https://junit.org/junit4/javadoc/latest/org/junit/AssumptionViolatedException.html` | if the device does not support HDR editing. |
| `https://developer.android.com/reference/org/json/JSONException.html` |   |
| `https://developer.android.com/reference/java/io/IOException.html` |   |
| `https://developer.android.com/reference/androidx/media3/common/util/GlUtil.GlException` |   |

### assumeDeviceSupportsHdrEditing

```
public static void assumeDeviceSupportsHdrEditing(String testId, Format format)
```

Assumes that the device supports HDR editing for the given `colorInfo`.

| Throws |
|---|---|
| `https://junit.org/junit4/javadoc/latest/org/junit/AssumptionViolatedException.html` | if the device does not support HDR editing. |
| `https://developer.android.com/reference/org/json/JSONException.html` |   |
| `https://developer.android.com/reference/java/io/IOException.html` |   |

### assumeDeviceSupportsOpenGlToneMapping

```
public static void assumeDeviceSupportsOpenGlToneMapping(
    String testId,
    Format inputFormat
)
```

Assumes that the device supports OpenGL tone-mapping for the `inputFormat`.

| Throws |
|---|---|
| `https://junit.org/junit4/javadoc/latest/org/junit/AssumptionViolatedException.html` | if the device does not support OpenGL tone-mapping. |
| `https://developer.android.com/reference/org/json/JSONException.html` |   |
| `https://developer.android.com/reference/java/io/IOException.html` |   |
| `https://developer.android.com/reference/androidx/media3/exoplayer/mediacodec/MediaCodecUtil.DecoderQueryException` |   |