# CueDecoder

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/text/CueDecoder.java+class:androidx.media3.extractor.text.CueDecoder)

*** ** * ** ***

<br />

```
@UnstableApi
class CueDecoder
```

<br />

*** ** * ** ***

Decodes data encoded by `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CueEncoder`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CueDecoder#CueDecoder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CuesWithTiming!` | `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CueDecoder#decode(long,byte[],int,int)(startTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!, offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Decodes a byte array into a `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CuesWithTiming` instance. |

## Public constructors

### CueDecoder

```
CueDecoder()
```

## Public functions

### decode

```
fun decode(startTimeUs: Long, bytes: ByteArray<Byte>!, offset: Int, length: Int): CuesWithTiming!
```

Decodes a byte array into a `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CuesWithTiming` instance.

| Parameters |
|---|---|
| `startTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The value for `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CuesWithTiming#startTimeUs()` (this is not encoded in `bytes`). |
| `bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | Byte array containing data produced by `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CueEncoder#encode(java.util.List<androidx.media3.common.text.Cue>,long)` |
| `offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The start index of cue data in `bytes`. |
| `length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The length of cue data in `bytes`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CuesWithTiming!` | Decoded `https://developer.android.com/reference/kotlin/androidx/media3/extractor/text/CuesWithTiming` instance. |