SubtitleOutputBuffer
@UnstableApi
abstract class SubtitleOutputBuffer : DecoderOutputBuffer, Subtitle
| kotlin.Any | |||
| ↳ | androidx.media3.decoder.Buffer | ||
| ↳ | androidx.media3.decoder.DecoderOutputBuffer | ||
| ↳ | androidx.media3.extractor.text.SubtitleOutputBuffer |
Base class for SubtitleDecoder output buffers.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
Unit |
clear()Clears the buffer. |
(Mutable)List<Cue!>! |
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 |
Int |
getNextEventTimeIndex(timeUs: Long)Returns the index of the first event that occurs after a given time (exclusive). |
Unit |
setContent(timeUs: Long, subtitle: Subtitle!, subsampleOffsetUs: Long)Sets the content of the output buffer, consisting of a |
Inherited functions |
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
Inherited properties |
|---|
Public constructors
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. |
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 |
setContent
fun setContent(timeUs: Long, subtitle: Subtitle!, subsampleOffsetUs: Long): Unit
Sets the content of the output buffer, consisting of a Subtitle and associated metadata.
| Parameters | |
|---|---|
timeUs: Long |
The time of the start of the subtitle in microseconds. |
subtitle: Subtitle! |
The subtitle. |
subsampleOffsetUs: Long |
An offset that must be added to the subtitle's event times, or |