FilteringManifestParser


@UnstableApi
public final class FilteringManifestParser<T extends FilterableManifest<T>> implements ParsingLoadable.Parser


A manifest parser that includes only the streams identified by the given stream keys.

Parameters
<T extends FilterableManifest<T>>

The FilterableManifest type.

Summary

Public constructors

FilteringManifestParser(
    ParsingLoadable.Parser<T> parser,
    @Nullable List<StreamKey> streamKeys
)

Public methods

T
parse(Uri uri, InputStream inputStream)

Parses an object from a response.

Public constructors

FilteringManifestParser

public FilteringManifestParser(
    ParsingLoadable.Parser<T> parser,
    @Nullable List<StreamKey> streamKeys
)
Parameters
ParsingLoadable.Parser<T> parser

A parser for the manifest that will be filtered.

@Nullable List<StreamKey> streamKeys

The stream keys. If null or empty then filtering will not occur.

Public methods

parse

public T parse(Uri uri, InputStream inputStream)

Parses an object from a response.

Parameters
Uri uri

The source Uri of the response, after any redirection.

InputStream inputStream

An InputStream from which the response data can be read.

Returns
T

The parsed object.

Throws
androidx.media3.common.ParserException

If an error occurs parsing the data.

java.io.IOException

If an error occurs reading data from the stream.