Class Tx3gDecoder
- java.lang.Object
-
- com.google.android.exoplayer2.decoder.SimpleDecoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
-
- com.google.android.exoplayer2.text.SimpleSubtitleDecoder
-
- com.google.android.exoplayer2.text.tx3g.Tx3gDecoder
-
- All Implemented Interfaces:
Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
,SubtitleDecoder
public final class Tx3gDecoder extends SimpleSubtitleDecoder
ASimpleSubtitleDecoder
for tx3g.Currently supports parsing of a single text track with embedded styles.
-
-
Constructor Summary
Constructors Constructor Description Tx3gDecoder(List<byte[]> initializationData)
Sets up a newTx3gDecoder
with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Subtitle
decode(byte[] bytes, int length, boolean reset)
Decodes data into aSubtitle
.-
Methods inherited from class com.google.android.exoplayer2.text.SimpleSubtitleDecoder
createInputBuffer, createOutputBuffer, createUnexpectedDecodeException, decode, getName, setPositionUs
-
Methods inherited from class com.google.android.exoplayer2.decoder.SimpleDecoder
dequeueInputBuffer, dequeueOutputBuffer, flush, queueInputBuffer, release, releaseOutputBuffer, setInitialInputBufferSize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.android.exoplayer2.decoder.Decoder
dequeueInputBuffer, dequeueOutputBuffer, flush, queueInputBuffer, release
-
-
-
-
Constructor Detail
-
Tx3gDecoder
public Tx3gDecoder(List<byte[]> initializationData)
Sets up a newTx3gDecoder
with default values.- Parameters:
initializationData
- Sample description atom ('stsd') data with default subtitle styles.
-
-
Method Detail
-
decode
protected Subtitle decode(byte[] bytes, int length, boolean reset) throws SubtitleDecoderException
Description copied from class:SimpleSubtitleDecoder
Decodes data into aSubtitle
.- Specified by:
decode
in classSimpleSubtitleDecoder
- Parameters:
bytes
- An array holding the data to be decoded, starting at position 0.length
- The size of the data to be decoded.reset
- Whether the decoder must be reset before decoding.- Returns:
- The decoded
Subtitle
. - Throws:
SubtitleDecoderException
- If a decoding error occurs.
-
-