Subtitlepublic abstract class SubtitleOutputBuffer extends OutputBuffer implements Subtitle
SubtitleDecoder output buffers.OutputBuffer.Owner<S extends OutputBuffer>skippedOutputBufferCount, timeUs| Constructor | Description |
|---|---|
SubtitleOutputBuffer() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
Clears the buffer.
|
List<Cue> |
getCues(long timeUs) |
Retrieve the cues that should be displayed at a given time.
|
long |
getEventTime(int index) |
Returns the event time at a specified index.
|
int |
getEventTimeCount() |
Returns the number of event times, where events are defined as points in time at which the cues
returned by
Subtitle.getCues(long) changes. |
int |
getNextEventTimeIndex(long timeUs) |
Returns the index of the first event that occurs after a given time (exclusive).
|
void |
setContent(long timeUs,
Subtitle subtitle,
long subsampleOffsetUs) |
Sets the content of the output buffer, consisting of a
Subtitle and associated
metadata. |
addFlag, clearFlag, getFlag, hasSupplementalData, isDecodeOnly, isEndOfStream, isKeyFrame, setFlagsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleasepublic void setContent(long timeUs,
Subtitle subtitle,
long subsampleOffsetUs)
Subtitle and associated
metadata.timeUs - The time of the start of the subtitle in microseconds.subtitle - The subtitle.subsampleOffsetUs - An offset that must be added to the subtitle's event times, or
Format.OFFSET_SAMPLE_RELATIVE if timeUs should be added.public int getEventTimeCount()
SubtitleSubtitle.getCues(long) changes.getEventTimeCount in interface Subtitlepublic long getEventTime(int index)
SubtitlegetEventTime in interface Subtitleindex - The index of the event time to obtain.public int getNextEventTimeIndex(long timeUs)
SubtitlegetNextEventTimeIndex in interface SubtitletimeUs - The time in microseconds.C.INDEX_UNSET if there are no events after the
specified time.public List<Cue> getCues(long timeUs)
Subtitle