@UnstableApi
public interface Subtitle

Known direct subclasses
CuesWithTimingSubtitle

A Subtitle backed by a list of CuesWithTiming instances.

SubtitleOutputBuffer

Base class for SubtitleDecoder output buffers.


A subtitle consisting of timed Cues.

Summary

Public methods

abstract List<Cue>
getCues(long timeUs)

Retrieve the cues that should be displayed at a given time.

abstract long
getEventTime(int index)

Returns the event time at a specified index.

abstract int

Returns the number of event times, where events are defined as points in time at which the cues returned by getCues changes.

abstract int
getNextEventTimeIndex(long timeUs)

Returns the index of the first event that occurs after a given time (exclusive).

Public methods

getCues

abstract List<CuegetCues(long timeUs)

Retrieve the cues that should be displayed at a given time.

Parameters
long timeUs

The time in microseconds.

Returns
List<Cue>

A list of cues that should be displayed, possibly empty.

getEventTime

abstract long getEventTime(int index)

Returns the event time at a specified index.

Parameters
int index

The index of the event time to obtain.

Returns
long

The event time in microseconds.

getEventTimeCount

abstract int getEventTimeCount()

Returns the number of event times, where events are defined as points in time at which the cues returned by getCues changes.

Returns
int

The number of event times.

getNextEventTimeIndex

abstract int getNextEventTimeIndex(long timeUs)

Returns the index of the first event that occurs after a given time (exclusive).

Parameters
long timeUs

The time in microseconds.

Returns
int

The index of the next event, or INDEX_UNSET if there are no events after the specified time.