# CeaUtil

# CeaUtil

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

*** ** * ** ***

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


```
@UnstableApi
class CeaUtil
```

<br />

*** ** * ** ***

Utility methods for handling CEA-608/708 messages. Defined in A/53 Part 4:2009.

## Summary

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [USER_DATA_IDENTIFIER_GA94](https://developer.android.com/reference/kotlin/androidx/media3/extractor/CeaUtil#USER_DATA_IDENTIFIER_GA94())` = 1195456820` |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [USER_DATA_TYPE_CODE_MPEG_CC](https://developer.android.com/reference/kotlin/androidx/media3/extractor/CeaUtil#USER_DATA_TYPE_CODE_MPEG_CC())` = 3`      |

|                                    ### Public functions                                     |
|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [consume](https://developer.android.com/reference/kotlin/androidx/media3/extractor/CeaUtil#consume(long,androidx.media3.common.util.ParsableByteArray,androidx.media3.extractor.TrackOutput[]))`(` ` presentationTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` seiBuffer: `[ParsableByteArray](https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray)`!,` ` outputs: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[TrackOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput)`!>!` `)` Consumes the unescaped content of an SEI NAL unit, writing the content of any CEA-608/708 messages as samples to all of the provided outputs. |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [consumeCcData](https://developer.android.com/reference/kotlin/androidx/media3/extractor/CeaUtil#consumeCcData(long,androidx.media3.common.util.ParsableByteArray,androidx.media3.extractor.TrackOutput[]))`(` ` presentationTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` ccDataBuffer: `[ParsableByteArray](https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray)`!,` ` outputs: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[TrackOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput)`!>!` `)` Consumes caption data (cc_data), writing the content as samples to all of the provided outputs.                                |

## Constants

### USER_DATA_IDENTIFIER_GA94

```
const val USER_DATA_IDENTIFIER_GA94 = 1195456820: Int
```  

### USER_DATA_TYPE_CODE_MPEG_CC

```
const val USER_DATA_TYPE_CODE_MPEG_CC = 3: Int
```  

## Public functions

### consume

```
java-static fun consume(
    presentationTimeUs: Long,
    seiBuffer: ParsableByteArray!,
    outputs: Array<TrackOutput!>!
): Unit
```

Consumes the unescaped content of an SEI NAL unit, writing the content of any CEA-608/708 messages as samples to all of the provided outputs.  

|                                                                                              Parameters                                                                                               |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|
| `presentationTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                                                                   | The presentation time in microseconds for any samples.                       |
| `seiBuffer: `[ParsableByteArray](https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray)`!`                                                                     | The unescaped SEI NAL unit data, excluding the NAL unit start code and type. |
| `outputs: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[TrackOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput)`!>!` | The outputs to which any samples should be written.                          |

### consumeCcData

```
java-static fun consumeCcData(
    presentationTimeUs: Long,
    ccDataBuffer: ParsableByteArray!,
    outputs: Array<TrackOutput!>!
): Unit
```

Consumes caption data (cc_data), writing the content as samples to all of the provided outputs.  

|                                                                                              Parameters                                                                                               |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| `presentationTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                                                                   | The presentation time in microseconds for any samples. |
| `ccDataBuffer: `[ParsableByteArray](https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray)`!`                                                                  | The buffer containing the caption data.                |
| `outputs: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[TrackOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput)`!>!` | The outputs to which any samples should be written.    |