Class Cea608Decoder
- java.lang.Object
-
- com.google.android.exoplayer2.text.cea.Cea608Decoder
-
- All Implemented Interfaces:
Decoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>,SubtitleDecoder
@Deprecated public final class Cea608Decoder extends Object
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.ASubtitleDecoderfor CEA-608 (also known as "line 21 captions" and "EIA-608").
-
-
Field Summary
Fields Modifier and Type Field Description static longMIN_DATA_CHANNEL_TIMEOUT_MSDeprecated.The minimum value for thevalidDataChannelTimeoutMsconstructor parameter permitted by ANSI/CTA-608-E R-2014 Annex C.9.
-
Constructor Summary
Constructors Constructor Description Cea608Decoder(String mimeType, int accessibilityChannel, long validDataChannelTimeoutMs)Deprecated.Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected SubtitlecreateSubtitle()Deprecated.Creates aSubtitlefrom the available data.protected voiddecode(SubtitleInputBuffer inputBuffer)Deprecated.Filters and processes the raw data, providingSubtitles viacreateSubtitle()when sufficient data has been processed.SubtitleInputBufferdequeueInputBuffer()Deprecated.Dequeues the next input buffer to be filled and queued to the decoder.SubtitleOutputBufferdequeueOutputBuffer()Deprecated.Dequeues the next output buffer from the decoder.voidflush()Deprecated.Flushes the decoder.protected SubtitleOutputBuffergetAvailableOutputBuffer()Deprecated.StringgetName()Deprecated.Returns the name of the decoder.protected longgetPositionUs()Deprecated.protected booleanisNewSubtitleDataAvailable()Deprecated.Returns whether there is data available to create a newSubtitle.voidqueueInputBuffer(SubtitleInputBuffer inputBuffer)Deprecated.Queues an input buffer to the decoder.voidrelease()Deprecated.Releases the decoder.protected voidreleaseOutputBuffer(SubtitleOutputBuffer outputBuffer)Deprecated.voidsetPositionUs(long positionUs)Deprecated.Informs the decoder of the current playback position.
-
-
-
Field Detail
-
MIN_DATA_CHANNEL_TIMEOUT_MS
public static final long MIN_DATA_CHANNEL_TIMEOUT_MS
Deprecated.The minimum value for thevalidDataChannelTimeoutMsconstructor parameter permitted by ANSI/CTA-608-E R-2014 Annex C.9.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Cea608Decoder
public Cea608Decoder(String mimeType, int accessibilityChannel, long validDataChannelTimeoutMs)
Deprecated.Constructs an instance.- Parameters:
mimeType- The MIME type of the CEA-608 data.accessibilityChannel- The Accessibility channel, orFormat.NO_VALUEif unknown.validDataChannelTimeoutMs- The timeout (in milliseconds) permitted by ANSI/CTA-608-E R-2014 Annex C.9 to clear "stuck" captions where no removal control code is received. The timeout should be at leastMIN_DATA_CHANNEL_TIMEOUT_MSorC.TIME_UNSETfor no timeout.
-
-
Method Detail
-
getName
public String getName()
Deprecated.Description copied from interface:DecoderReturns the name of the decoder.- Specified by:
getNamein interfaceDecoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>- Returns:
- The name of the decoder.
-
flush
public void flush()
Deprecated.Description copied from interface:DecoderFlushes the decoder. Ownership of dequeued input buffers is returned to the decoder. The caller is still responsible for releasing any dequeued output buffers.- Specified by:
flushin interfaceDecoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
-
release
public void release()
Deprecated.Description copied from interface:DecoderReleases the decoder. Must be called when the decoder is no longer needed.- Specified by:
releasein interfaceDecoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>
-
dequeueOutputBuffer
@Nullable public SubtitleOutputBuffer dequeueOutputBuffer() throws SubtitleDecoderException
Deprecated.Description copied from interface:DecoderDequeues the next output buffer from the decoder.- Specified by:
dequeueOutputBufferin interfaceDecoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>- Returns:
- The output buffer, or null if an output buffer isn't available.
- Throws:
SubtitleDecoderException
-
isNewSubtitleDataAvailable
protected boolean isNewSubtitleDataAvailable()
Deprecated.Returns whether there is data available to create a newSubtitle.
-
createSubtitle
protected Subtitle createSubtitle()
Deprecated.Creates aSubtitlefrom the available data.
-
decode
protected void decode(SubtitleInputBuffer inputBuffer)
Deprecated.Filters and processes the raw data, providingSubtitles viacreateSubtitle()when sufficient data has been processed.
-
setPositionUs
public void setPositionUs(long positionUs)
Deprecated.Description copied from interface:SubtitleDecoderInforms the decoder of the current playback position.Must be called prior to each attempt to dequeue output buffers from the decoder.
- Specified by:
setPositionUsin interfaceSubtitleDecoder- Parameters:
positionUs- The current playback position in microseconds.
-
dequeueInputBuffer
@Nullable public SubtitleInputBuffer dequeueInputBuffer() throws SubtitleDecoderException
Deprecated.Description copied from interface:DecoderDequeues the next input buffer to be filled and queued to the decoder.- Specified by:
dequeueInputBufferin interfaceDecoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>- Returns:
- The input buffer, which will have been cleared, or null if a buffer isn't available.
- Throws:
SubtitleDecoderException
-
queueInputBuffer
public void queueInputBuffer(SubtitleInputBuffer inputBuffer) throws SubtitleDecoderException
Deprecated.Description copied from interface:DecoderQueues an input buffer to the decoder.- Specified by:
queueInputBufferin interfaceDecoder<SubtitleInputBuffer,SubtitleOutputBuffer,SubtitleDecoderException>- Parameters:
inputBuffer- The input buffer.- Throws:
SubtitleDecoderException
-
releaseOutputBuffer
protected void releaseOutputBuffer(SubtitleOutputBuffer outputBuffer)
Deprecated.
-
getAvailableOutputBuffer
@Nullable protected final SubtitleOutputBuffer getAvailableOutputBuffer()
Deprecated.
-
getPositionUs
protected final long getPositionUs()
Deprecated.
-
-