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.
|
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, setFlags
public 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()
Subtitle
Subtitle.getCues(long)
changes.getEventTimeCount
in interface Subtitle
public long getEventTime(int index)
Subtitle
getEventTime
in interface Subtitle
index
- The index of the event time to obtain.public int getNextEventTimeIndex(long timeUs)
Subtitle
getNextEventTimeIndex
in interface Subtitle
timeUs
- The time in microseconds.C.INDEX_UNSET
if there are no events after the
specified time.public List<Cue> getCues(long timeUs)
Subtitle
public abstract void release()
OutputBuffer
release
in class OutputBuffer