Class SubtitleOutputBuffer
- java.lang.Object
-
- com.google.android.exoplayer2.decoder.Buffer
-
- com.google.android.exoplayer2.decoder.DecoderOutputBuffer
-
- com.google.android.exoplayer2.text.SubtitleOutputBuffer
-
- All Implemented Interfaces:
Subtitle
@Deprecated public abstract class SubtitleOutputBuffer extends DecoderOutputBuffer implements Subtitle
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Base class forSubtitleDecoderoutput buffers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.android.exoplayer2.decoder.DecoderOutputBuffer
DecoderOutputBuffer.Owner<S extends DecoderOutputBuffer>
-
-
Field Summary
-
Fields inherited from class com.google.android.exoplayer2.decoder.DecoderOutputBuffer
skippedOutputBufferCount, timeUs
-
-
Constructor Summary
Constructors Constructor Description SubtitleOutputBuffer()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Deprecated.Clears the buffer.List<Cue>getCues(long timeUs)Deprecated.Retrieve the cues that should be displayed at a given time.longgetEventTime(int index)Deprecated.Returns the event time at a specified index.intgetEventTimeCount()Deprecated.Returns the number of event times, where events are defined as points in time at which the cues returned bySubtitle.getCues(long)changes.intgetNextEventTimeIndex(long timeUs)Deprecated.Returns the index of the first event that occurs after a given time (exclusive).voidsetContent(long timeUs, Subtitle subtitle, long subsampleOffsetUs)Deprecated.Sets the content of the output buffer, consisting of aSubtitleand associated metadata.-
Methods inherited from class com.google.android.exoplayer2.decoder.DecoderOutputBuffer
release
-
Methods inherited from class com.google.android.exoplayer2.decoder.Buffer
addFlag, clearFlag, getFlag, hasSupplementalData, isDecodeOnly, isEndOfStream, isFirstSample, isKeyFrame, isLastSample, setFlags
-
-
-
-
Method Detail
-
setContent
public void setContent(long timeUs, Subtitle subtitle, long subsampleOffsetUs)Deprecated.Sets the content of the output buffer, consisting of aSubtitleand associated metadata.- Parameters:
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, orFormat.OFFSET_SAMPLE_RELATIVEiftimeUsshould be added.
-
getEventTimeCount
public int getEventTimeCount()
Deprecated.Description copied from interface:SubtitleReturns the number of event times, where events are defined as points in time at which the cues returned bySubtitle.getCues(long)changes.- Specified by:
getEventTimeCountin interfaceSubtitle- Returns:
- The number of event times.
-
getEventTime
public long getEventTime(int index)
Deprecated.Description copied from interface:SubtitleReturns the event time at a specified index.- Specified by:
getEventTimein interfaceSubtitle- Parameters:
index- The index of the event time to obtain.- Returns:
- The event time in microseconds.
-
getNextEventTimeIndex
public int getNextEventTimeIndex(long timeUs)
Deprecated.Description copied from interface:SubtitleReturns the index of the first event that occurs after a given time (exclusive).- Specified by:
getNextEventTimeIndexin interfaceSubtitle- Parameters:
timeUs- The time in microseconds.- Returns:
- The index of the next event, or
C.INDEX_UNSETif there are no events after the specified time.
-
getCues
public List<Cue> getCues(long timeUs)
Deprecated.Description copied from interface:SubtitleRetrieve the cues that should be displayed at a given time.
-
-