SubtitleParser.OutputOptions
public class SubtitleParser.OutputOptions
Options to control the output behavior of SubtitleParser methods that emit their output incrementally using a Consumer provided by the caller.
Summary
Public fields |
|
|---|---|
final boolean |
Whether to eventually emit all cues, or only those after |
final long |
Cues after this time (inclusive) will be emitted first. |
Public methods |
|
|---|---|
static SubtitleParser.OutputOptions |
allCues()Output all |
static SubtitleParser.OutputOptions |
cuesAfterThenRemainingCuesBefore(long startTimeUs)Output |
static SubtitleParser.OutputOptions |
onlyCuesAfter(long startTimeUs)Only output |
Public fields
outputAllCues
public final boolean outputAllCues
Whether to eventually emit all cues, or only those after startTimeUs. Ignored if 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 outputAllCues. Can be TIME_UNSET to emit all cues.
Public methods
cuesAfterThenRemainingCuesBefore
public static SubtitleParser.OutputOptions cuesAfterThenRemainingCuesBefore(long startTimeUs)
Output CuesWithTiming where startTimeUs is at least
startTimeUs, followed by the remaining CuesWithTiming instances.
Beyond this, the order in which CuesWithTiming instances are emitted is not defined.
onlyCuesAfter
public static SubtitleParser.OutputOptions onlyCuesAfter(long startTimeUs)
Only output CuesWithTiming instances where startTimeUs is at least startTimeUs.
The order in which CuesWithTiming instances are emitted is not defined.