# HdrCapabilitiesUtil

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/test/utils/HdrCapabilitiesUtil "View this page in Java")

<br />

```
@UnstableApi
class HdrCapabilitiesUtil
```

<br />

*** ** * ** ***

Utility class for checking HDR capabilities.

## Summary

|                                    ### Public functions                                     |
|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [assumeDeviceDoesNotSupportHdrColorTransfer](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceDoesNotSupportHdrColorTransfer(java.lang.String,androidx.media3.common.Format))`(` ` testId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!,` ` format: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!` `)` Assumes that the device does not support HDR editing for the given`colorInfo`. |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [assumeDeviceDoesNotSupportHdrEditing](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceDoesNotSupportHdrEditing(java.lang.String,androidx.media3.common.Format))`(testId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, format: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!)` Assumes that the device does not support HDR editing for the given`colorInfo`.                       |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [assumeDeviceSupportsHdrColorTransfer](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceSupportsHdrColorTransfer(java.lang.String,androidx.media3.common.Format))`(testId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, format: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!)` Assumes that the device supports HDR editing for the given`colorInfo`.                               |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [assumeDeviceSupportsHdrEditing](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceSupportsHdrEditing(java.lang.String,androidx.media3.common.Format))`(testId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, format: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!)` Assumes that the device supports HDR editing for the given`colorInfo`.                                           |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [assumeDeviceSupportsOpenGlToneMapping](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/HdrCapabilitiesUtil#assumeDeviceSupportsOpenGlToneMapping(java.lang.String,androidx.media3.common.Format))`(` ` testId: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!,` ` inputFormat: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!` `)` Assumes that the device supports OpenGL tone-mapping for the`inputFormat`.          |

## Public functions

### assumeDeviceDoesNotSupportHdrColorTransfer

```
java-static fun assumeDeviceDoesNotSupportHdrColorTransfer(
    testId: String!,
    format: Format!
): Unit
```

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

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

### assumeDeviceDoesNotSupportHdrEditing

```
java-static fun assumeDeviceDoesNotSupportHdrEditing(testId: String!, format: Format!): Unit
```

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

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

### assumeDeviceSupportsHdrColorTransfer

```
java-static fun assumeDeviceSupportsHdrColorTransfer(testId: String!, format: Format!): Unit
```

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

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

### assumeDeviceSupportsHdrEditing

```
java-static fun assumeDeviceSupportsHdrEditing(testId: String!, format: Format!): Unit
```

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

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

### assumeDeviceSupportsOpenGlToneMapping

```
java-static fun assumeDeviceSupportsOpenGlToneMapping(
    testId: String!,
    inputFormat: Format!
): Unit
```

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

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