SubtitleParser.Factory


interface SubtitleParser.Factory

Known direct subclasses
DefaultSubtitleParserFactory

A factory for SubtitleParser instances.


Factory for SubtitleParser instances.

Summary

Constants

const SubtitleParser.Factory!

A subtitle parser factory that supports no formats.

Public functions

SubtitleParser!
create(format: Format!)

Creates a SubtitleParser for the given Format.

Int

Returns the CueReplacementBehavior of the SubtitleParser implementation that handles format.

Boolean

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

Constants

UNSUPPORTED

const val UNSUPPORTEDSubtitleParser.Factory!

A subtitle parser factory that supports no formats.

Public functions

create

fun create(format: Format!): SubtitleParser!

Creates a SubtitleParser for the given Format.

Returns
SubtitleParser!

The SubtitleParser instance.

Throws
java.lang.IllegalArgumentException

if format is not supported by this factory.

getCueReplacementBehavior

@Format.CueReplacementBehavior
fun getCueReplacementBehavior(format: Format!): Int

Returns the CueReplacementBehavior of the SubtitleParser implementation that handles format.

Returns
Int

The replacement behavior.

Throws
java.lang.IllegalArgumentException

if format is not supported by this factory.

supportsFormat

fun supportsFormat(format: Format!): Boolean

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

Parameters
format: Format!

The Format.

Returns
Boolean

Whether the factory can instantiate a suitable SubtitleParser.