Package com.google.android.exoplayer2.text

## Interface SubtitleDecoderFactory

-     public interface SubtitleDecoderFactory

  A factory for `SubtitleDecoder` instances.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static SubtitleDecoderFactory` | `DEFAULT` | Default `SubtitleDecoderFactory` implementation.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SubtitleDecoder` | `createDecoder​(Format format)` | Creates a `SubtitleDecoder` for the given `Format`.
    `boolean` | `supportsFormat​(Format format)` | Returns whether the factory is able to instantiate a `SubtitleDecoder` for the given `Format`.

- - ### Field Detail

    - #### DEFAULT

          static final SubtitleDecoderFactory DEFAULT

      Default `SubtitleDecoderFactory` implementation.

      The formats supported by this factory are:

      - WebVTT (`WebvttDecoder`)
      - WebVTT (MP4) (`Mp4WebvttDecoder`)
      - TTML (`TtmlDecoder`)
      - SubRip (`SubripDecoder`)
      - SSA/ASS (`SsaDecoder`)
      - TX3G (`Tx3gDecoder`)
      - Cea608 (`Cea608Decoder`)
      - Cea708 (`Cea708Decoder`)
      - DVB (`DvbDecoder`)
      - PGS (`PgsDecoder`)

  - ### Method Detail

    - #### supportsFormat

          boolean supportsFormat​(Format format)

      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 createDecoder​(Format format)

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