Class FakeExtractorOutput
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.FakeExtractorOutput
-
- All Implemented Interfaces:
ExtractorOutput
,Dumper.Dumpable
public final class FakeExtractorOutput extends Object implements ExtractorOutput, Dumper.Dumpable
A fakeExtractorOutput
.
-
-
Field Summary
Fields Modifier and Type Field Description int
numberOfTracks
@MonotonicNonNull SeekMap
seekMap
SparseArray<FakeTrackOutput>
trackOutputs
boolean
tracksEnded
-
Fields inherited from interface com.google.android.exoplayer2.extractor.ExtractorOutput
PLACEHOLDER
-
-
Constructor Summary
Constructors Constructor Description FakeExtractorOutput()
FakeExtractorOutput(FakeTrackOutput.Factory trackOutputFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearTrackOutputs()
void
dump(Dumper dumper)
Dumps the fields of the object using thedumper
.void
endTracks()
Called when all tracks have been identified, meaning no newtrackId
values will be passed toExtractorOutput.track(int, int)
.void
seekMap(SeekMap seekMap)
Called when aSeekMap
has been extracted from the stream.FakeTrackOutput
track(int id, int type)
Called by theExtractor
to get theTrackOutput
for a specific track.
-
-
-
Field Detail
-
trackOutputs
public final SparseArray<FakeTrackOutput> trackOutputs
-
numberOfTracks
public int numberOfTracks
-
tracksEnded
public boolean tracksEnded
-
seekMap
public @MonotonicNonNull SeekMap seekMap
-
-
Constructor Detail
-
FakeExtractorOutput
public FakeExtractorOutput()
-
FakeExtractorOutput
public FakeExtractorOutput(FakeTrackOutput.Factory trackOutputFactory)
-
-
Method Detail
-
track
public FakeTrackOutput track(int id, int type)
Description copied from interface:ExtractorOutput
Called by theExtractor
to get theTrackOutput
for a specific track.The same
TrackOutput
is returned if multiple calls are made with the sameid
.- Specified by:
track
in interfaceExtractorOutput
- Parameters:
id
- A track identifier.type
- Thetrack type
.- Returns:
- The
TrackOutput
for the given track identifier.
-
endTracks
public void endTracks()
Description copied from interface:ExtractorOutput
Called when all tracks have been identified, meaning no newtrackId
values will be passed toExtractorOutput.track(int, int)
.- Specified by:
endTracks
in interfaceExtractorOutput
-
seekMap
public void seekMap(SeekMap seekMap)
Description copied from interface:ExtractorOutput
Called when aSeekMap
has been extracted from the stream.- Specified by:
seekMap
in interfaceExtractorOutput
- Parameters:
seekMap
- The extractedSeekMap
.
-
clearTrackOutputs
public void clearTrackOutputs()
-
dump
public void dump(Dumper dumper)
Description copied from interface:Dumper.Dumpable
Dumps the fields of the object using thedumper
.- Specified by:
dump
in interfaceDumper.Dumpable
- Parameters:
dumper
- TheDumper
to be used to dump fields.
-
-