ExtractorsFactory


@UnstableApi
interface ExtractorsFactory

Known direct subclasses
DefaultExtractorsFactory

An ExtractorsFactory that provides an array of extractors for the following formats:


Factory for arrays of Extractor instances.

Summary

Constants

const ExtractorsFactory!

Extractor factory that returns an empty list of extractors.

Public functions

Array<Extractor!>!

Returns an array of new Extractor instances.

Array<Extractor!>!
createExtractors(
    uri: Uri!,
    responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!
)

Returns an array of new Extractor instances.

ExtractorsFactory!

This function is deprecated.

This method (and all support for 'legacy' subtitle decoding during rendering) will be removed in a future release.

ExtractorsFactory!

Sets a SubtitleParser.Factory to use when transcoding text tracks.

Constants

EMPTY

const val EMPTYExtractorsFactory!

Extractor factory that returns an empty list of extractors. Can be used whenever Extractors are not required.

Public functions

createExtractors

fun createExtractors(): Array<Extractor!>!

Returns an array of new Extractor instances.

createExtractors

fun createExtractors(
    uri: Uri!,
    responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!
): Array<Extractor!>!

Returns an array of new Extractor instances.

Parameters
uri: Uri!

The Uri of the media to extract.

responseHeaders: (Mutable)Map<String!, (Mutable)List<String!>!>!

The response headers of the media to extract, or an empty map if there are none. The map lookup should be case-insensitive.

Returns
Array<Extractor!>!

The Extractor instances.

experimentalSetTextTrackTranscodingEnabled

@CanIgnoreReturnValue
fun experimentalSetTextTrackTranscodingEnabled(
    textTrackTranscodingEnabled: Boolean
): ExtractorsFactory!

Enables transcoding of text track samples to APPLICATION_MEDIA3_CUES before the data is emitted to TrackOutput.

Transcoding is enabled by default.

This method is experimental and will be renamed or removed in a future release.

Parameters
textTrackTranscodingEnabled: Boolean

Whether to enable transcoding.

Returns
ExtractorsFactory!

The factory, for convenience.

setSubtitleParserFactory

fun setSubtitleParserFactory(subtitleParserFactory: SubtitleParser.Factory!): ExtractorsFactory!

Sets a SubtitleParser.Factory to use when transcoding text tracks.

This is only works if experimentalSetTextTrackTranscodingEnabled is enabled.

Parameters
subtitleParserFactory: SubtitleParser.Factory!

The factory for SubtitleParser instances.

Returns
ExtractorsFactory!

The factory, for convenience.