public class

SubtitleParser.OutputOptions

extends java.lang.Object

 java.lang.Object

↳androidx.media3.extractor.text.SubtitleParser.OutputOptions

Overview

Options to control the output behavior of SubtitleParser methods that emit their output incrementally using a Consumer provided by the caller.

Summary

Fields
public final booleanoutputAllCues

Whether to eventually emit all cues, or only those after SubtitleParser.OutputOptions.startTimeUs.

public final longstartTimeUs

Cues after this time (inclusive) will be emitted first.

Methods
public static SubtitleParser.OutputOptionsallCues()

Output all CuesWithTiming instances.

public static SubtitleParser.OutputOptionscuesAfterThenRemainingCuesBefore(long startTimeUs)

Output CuesWithTiming where CuesWithTiming.startTimeUs is at least startTimeUs, followed by the remaining CuesWithTiming instances.

public static SubtitleParser.OutputOptionsonlyCuesAfter(long startTimeUs)

Only output CuesWithTiming instances where CuesWithTiming.startTimeUs is at least startTimeUs.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public final long startTimeUs

Cues after this time (inclusive) will be emitted first. Cues before this time might be emitted later, depending on SubtitleParser.OutputOptions.outputAllCues. Can be C.TIME_UNSET to emit all cues.

public final boolean outputAllCues

Whether to eventually emit all cues, or only those after SubtitleParser.OutputOptions.startTimeUs. Ignored if SubtitleParser.OutputOptions.startTimeUs is not set.

Methods

public static SubtitleParser.OutputOptions allCues()

Output all CuesWithTiming instances.

public static SubtitleParser.OutputOptions onlyCuesAfter(long startTimeUs)

Only output CuesWithTiming instances where CuesWithTiming.startTimeUs is at least startTimeUs.

The order in which CuesWithTiming instances are emitted is not defined.

public static SubtitleParser.OutputOptions cuesAfterThenRemainingCuesBefore(long startTimeUs)

Output CuesWithTiming where CuesWithTiming.startTimeUs is at least startTimeUs, followed by the remaining CuesWithTiming instances.

Beyond this, the order in which CuesWithTiming instances are emitted is not defined.