public final class Cea708Decoder
extends java.lang.Object
SubtitleDecoder
for CEA-708 (also known as "EIA-708").Constructor and Description |
---|
Cea708Decoder(int accessibilityChannel,
java.util.List<byte[]> initializationData) |
Modifier and Type | Method and Description |
---|---|
protected Subtitle |
createSubtitle()
Creates a
Subtitle from the available data. |
protected void |
decode(SubtitleInputBuffer inputBuffer)
Filters and processes the raw data, providing
Subtitle s via createSubtitle()
when sufficient data has been processed. |
SubtitleInputBuffer |
dequeueInputBuffer()
Dequeues the next input buffer to be filled and queued to the decoder.
|
SubtitleOutputBuffer |
dequeueOutputBuffer()
Dequeues the next output buffer from the decoder.
|
void |
flush()
Flushes the decoder.
|
java.lang.String |
getName()
Returns the name of the decoder.
|
protected boolean |
isNewSubtitleDataAvailable()
Returns whether there is data available to create a new
Subtitle . |
void |
queueInputBuffer(SubtitleInputBuffer inputBuffer)
Queues an input buffer to the decoder.
|
void |
release()
Releases the decoder.
|
protected void |
releaseOutputBuffer(SubtitleOutputBuffer outputBuffer) |
void |
setPositionUs(long positionUs)
Informs the decoder of the current playback position.
|
public Cea708Decoder(int accessibilityChannel, java.util.List<byte[]> initializationData)
public java.lang.String getName()
Decoder
getName
in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
public void flush()
Decoder
flush
in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
protected boolean isNewSubtitleDataAvailable()
Subtitle
.protected void decode(SubtitleInputBuffer inputBuffer)
Subtitle
s via createSubtitle()
when sufficient data has been processed.public void setPositionUs(long positionUs)
SubtitleDecoder
Must be called prior to each attempt to dequeue output buffers from the decoder.
setPositionUs
in interface SubtitleDecoder
positionUs
- The current playback position in microseconds.public SubtitleInputBuffer dequeueInputBuffer() throws SubtitleDecoderException
Decoder
dequeueInputBuffer
in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
SubtitleDecoderException
public void queueInputBuffer(SubtitleInputBuffer inputBuffer) throws SubtitleDecoderException
Decoder
queueInputBuffer
in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
inputBuffer
- The input buffer.SubtitleDecoderException
public SubtitleOutputBuffer dequeueOutputBuffer() throws SubtitleDecoderException
Decoder
dequeueOutputBuffer
in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
SubtitleDecoderException
protected void releaseOutputBuffer(SubtitleOutputBuffer outputBuffer)
public void release()
Decoder
release
in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>