public final class Cea608Decoder
extends java.lang.Object
SubtitleDecoder for CEA-608 (also known as "line 21 captions" and "EIA-608").| Constructor and Description |
|---|
Cea608Decoder(java.lang.String mimeType,
int accessibilityChannel) |
| 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
Subtitles 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 Cea608Decoder(java.lang.String mimeType,
int accessibilityChannel)
public java.lang.String getName()
DecodergetName in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>public void flush()
Decoderflush in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>public void release()
Decoderrelease in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>protected boolean isNewSubtitleDataAvailable()
Subtitle.protected void decode(SubtitleInputBuffer inputBuffer)
Subtitles via createSubtitle()
when sufficient data has been processed.public void setPositionUs(long positionUs)
SubtitleDecoderMust be called prior to each attempt to dequeue output buffers from the decoder.
setPositionUs in interface SubtitleDecoderpositionUs - The current playback position in microseconds.public SubtitleInputBuffer dequeueInputBuffer() throws SubtitleDecoderException
DecoderdequeueInputBuffer in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>SubtitleDecoderExceptionpublic void queueInputBuffer(SubtitleInputBuffer inputBuffer) throws SubtitleDecoderException
DecoderqueueInputBuffer in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>inputBuffer - The input buffer.SubtitleDecoderExceptionpublic SubtitleOutputBuffer dequeueOutputBuffer() throws SubtitleDecoderException
DecoderdequeueOutputBuffer in interface Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>SubtitleDecoderExceptionprotected void releaseOutputBuffer(SubtitleOutputBuffer outputBuffer)