# SubtitleParser.OutputOptions

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

*** ** * ** ***


```
public class SubtitleParser.OutputOptions
```

<br />

*** ** * ** ***

Options to control the output behavior of `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser` methods that emit their output incrementally using a `https://developer.android.com/reference/java/util/function/Consumer.html` provided by the caller.

## Summary

| ### Public fields |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#outputAllCues()` Whether to eventually emit all cues, or only those after `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#startTimeUs()`. |
| `final long` | `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#startTimeUs()` Cues after this time (inclusive) will be emitted first. |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions` | `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#allCues()()` Output all `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` instances. |
| `static https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions` | `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#cuesAfterThenRemainingCuesBefore(long)(long startTimeUs)` Output `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` where `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming#startTimeUs()` is at least ` startTimeUs`, followed by the remaining `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` instances. |
| `static https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions` | `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#onlyCuesAfter(long)(long startTimeUs)` Only output `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` instances where `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming#startTimeUs()` is at least `startTimeUs`. |

## Public fields

### outputAllCues

```
public final boolean outputAllCues
```

Whether to eventually emit all cues, or only those after `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#startTimeUs()`. Ignored if `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#startTimeUs()` is not set.

### startTimeUs

```
public final long startTimeUs
```

Cues after this time (inclusive) will be emitted first. Cues before this time might be emitted later, depending on `https://developer.android.com/reference/androidx/media3/extractor/text/SubtitleParser.OutputOptions#outputAllCues()`. Can be `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to emit all cues.

## Public methods

### allCues

```
public static SubtitleParser.OutputOptions allCues()
```

Output all `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` instances.

### cuesAfterThenRemainingCuesBefore

```
public static SubtitleParser.OutputOptions cuesAfterThenRemainingCuesBefore(long startTimeUs)
```

Output `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` where `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming#startTimeUs()` is at least `
startTimeUs`, followed by the remaining `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` instances.

Beyond this, the order in which `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` instances are emitted is not defined.

### onlyCuesAfter

```
public static SubtitleParser.OutputOptions onlyCuesAfter(long startTimeUs)
```

Only output `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` instances where `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming#startTimeUs()` is at least `startTimeUs`.

The order in which `https://developer.android.com/reference/androidx/media3/extractor/text/CuesWithTiming` instances are emitted is not defined.