Back to Exoplayer

SubtitleDecoderFactory (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/text/SubtitleDecoderFactory.html

latest4.7 KB
Original Source

Package com.google.android.exoplayer2.text

Interface SubtitleDecoderFactory


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceSubtitleDecoderFactory

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.

A factory for SubtitleDecoder instances.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static SubtitleDecoderFactory | DEFAULT | Deprecated.

Default SubtitleDecoderFactory implementation. |

Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | SubtitleDecoder | createDecoder​(Format format) | Deprecated.

Creates a SubtitleDecoder for the given Format. | | boolean | supportsFormat​(Format format) | Deprecated.

Returns whether the factory is able to instantiate a SubtitleDecoder for the given Format. |

Field Detail

- 

DEFAULT

static final[SubtitleDecoderFactory](SubtitleDecoderFactory.html "interface in com.google.android.exoplayer2.text")DEFAULT

Deprecated.

Default SubtitleDecoderFactory implementation.

The formats supported by this factory are:

  - WebVTT ([`WebvttDecoder`](webvtt/WebvttDecoder.html "class in com.google.android.exoplayer2.text.webvtt")) 
  - WebVTT (MP4) ([`Mp4WebvttDecoder`](webvtt/Mp4WebvttDecoder.html "class in com.google.android.exoplayer2.text.webvtt")) 
  - TTML ([`TtmlDecoder`](ttml/TtmlDecoder.html "class in com.google.android.exoplayer2.text.ttml")) 
  - SubRip ([`SubripDecoder`](subrip/SubripDecoder.html "class in com.google.android.exoplayer2.text.subrip")) 
  - SSA/ASS ([`SsaDecoder`](ssa/SsaDecoder.html "class in com.google.android.exoplayer2.text.ssa")) 
  - TX3G ([`Tx3gDecoder`](tx3g/Tx3gDecoder.html "class in com.google.android.exoplayer2.text.tx3g")) 
  - Cea608 ([`Cea608Decoder`](cea/Cea608Decoder.html "class in com.google.android.exoplayer2.text.cea")) 
  - Cea708 ([`Cea708Decoder`](cea/Cea708Decoder.html "class in com.google.android.exoplayer2.text.cea")) 
  - DVB ([`DvbDecoder`](dvb/DvbDecoder.html "class in com.google.android.exoplayer2.text.dvb")) 
  - PGS ([`PgsDecoder`](pgs/PgsDecoder.html "class in com.google.android.exoplayer2.text.pgs")) 
  - Exoplayer Cues ([`ExoplayerCuesDecoder`](ExoplayerCuesDecoder.html "class in com.google.android.exoplayer2.text")) 

-

Method Detail

- 

supportsFormat

boolean supportsFormat​([Format](../Format.html "class in com.google.android.exoplayer2")format)

Deprecated.

Returns whether the factory is able to instantiate a SubtitleDecoder for the given Format. Parameters:format - The Format.Returns:Whether the factory can instantiate a suitable SubtitleDecoder.

- 

createDecoder

[SubtitleDecoder](SubtitleDecoder.html "interface in com.google.android.exoplayer2.text")createDecoder​([Format](../Format.html "class in com.google.android.exoplayer2")format)

Deprecated.

Creates a SubtitleDecoder for the given Format. Parameters:format - The Format.Returns:A new SubtitleDecoder.Throws:IllegalArgumentException - If the Format is not supported.