@UnstableApi
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 functions

(Mutable)List<Cue!>!
getCues(timeUs: Long)

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

Long
getEventTime(index: Int)

Returns the event time at a specified index.

Int

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

Int

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

Public functions

getCues

fun getCues(timeUs: Long): (Mutable)List<Cue!>!

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

Parameters
timeUs: Long

The time in microseconds.

Returns
(Mutable)List<Cue!>!

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

getEventTime

fun getEventTime(index: Int): Long

Returns the event time at a specified index.

Parameters
index: Int

The index of the event time to obtain.

Returns
Long

The event time in microseconds.

getEventTimeCount

fun getEventTimeCount(): Int

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

fun getNextEventTimeIndex(timeUs: Long): Int

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

Parameters
timeUs: Long

The time in microseconds.

Returns
Int

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