public abstract class SubtitleOutputBuffer extends OutputBuffer implements Subtitle
SubtitleDecoder output buffers.skippedOutputBufferCount, timeUs| Constructor and Description |
|---|
SubtitleOutputBuffer() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the buffer.
|
java.util.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).
|
abstract void |
release()
Releases the output buffer for reuse.
|
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, isDecodeOnly, isEndOfStream, isKeyFrame, setFlagspublic 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 java.util.List<Cue> getCues(long timeUs)
Subtitlepublic abstract void release()
OutputBufferrelease in class OutputBuffer