FakeExtractorOutput


@UnstableApi
public final class FakeExtractorOutput implements ExtractorOutput, Dumper.Dumpable


A fake ExtractorOutput.

Summary

Public constructors

Public methods

void
void
dump(Dumper dumper)

Dumps the fields of the object using the dumper.

void

Called when all tracks have been identified, meaning no new trackId values will be passed to track.

void
seekMap(SeekMap seekMap)

Called when a SeekMap has been extracted from the stream.

FakeTrackOutput
track(int id, int type)

Called by the Extractor to get the TrackOutput for a specific track.

Inherited Constants

From androidx.media3.extractor.ExtractorOutput
static final ExtractorOutput

Placeholder ExtractorOutput implementation throwing an in each method.

Public fields

numberOfTracks

public int numberOfTracks

trackOutputs

public final SparseArray<FakeTrackOutputtrackOutputs

tracksEnded

public boolean tracksEnded

Public constructors

FakeExtractorOutput

public FakeExtractorOutput()

FakeExtractorOutput

public FakeExtractorOutput(FakeTrackOutput.Factory trackOutputFactory)

Public methods

clearTrackOutputs

public void clearTrackOutputs()

dump

public void dump(Dumper dumper)

Dumps the fields of the object using the dumper.

Parameters
Dumper dumper

The Dumper to be used to dump fields.

endTracks

public void endTracks()

Called when all tracks have been identified, meaning no new trackId values will be passed to track.

seekMap

public void seekMap(SeekMap seekMap)

Called when a SeekMap has been extracted from the stream.

Parameters
SeekMap seekMap

The extracted SeekMap.

track

public FakeTrackOutput track(int id, int type)

Called by the Extractor to get the TrackOutput for a specific track.

The same TrackOutput is returned if multiple calls are made with the same id.

Parameters
int id

A track identifier.

int type

The track type.

Returns
FakeTrackOutput

The TrackOutput for the given track identifier.