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 intnumberOfTracks@MonotonicNonNull SeekMapseekMapSparseArray<FakeTrackOutput>trackOutputsbooleantracksEnded-
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 voidclearTrackOutputs()voiddump(Dumper dumper)Dumps the fields of the object using thedumper.voidendTracks()Called when all tracks have been identified, meaning no newtrackIdvalues will be passed toExtractorOutput.track(int, int).voidseekMap(SeekMap seekMap)Called when aSeekMaphas been extracted from the stream.FakeTrackOutputtrack(int id, int type)Called by theExtractorto get theTrackOutputfor 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:ExtractorOutputCalled by theExtractorto get theTrackOutputfor a specific track.The same
TrackOutputis returned if multiple calls are made with the sameid.- Specified by:
trackin interfaceExtractorOutput- Parameters:
id- A track identifier.type- Thetrack type.- Returns:
- The
TrackOutputfor the given track identifier.
-
endTracks
public void endTracks()
Description copied from interface:ExtractorOutputCalled when all tracks have been identified, meaning no newtrackIdvalues will be passed toExtractorOutput.track(int, int).- Specified by:
endTracksin interfaceExtractorOutput
-
seekMap
public void seekMap(SeekMap seekMap)
Description copied from interface:ExtractorOutputCalled when aSeekMaphas been extracted from the stream.- Specified by:
seekMapin interfaceExtractorOutput- Parameters:
seekMap- The extractedSeekMap.
-
clearTrackOutputs
public void clearTrackOutputs()
-
dump
public void dump(Dumper dumper)
Description copied from interface:Dumper.DumpableDumps the fields of the object using thedumper.- Specified by:
dumpin interfaceDumper.Dumpable- Parameters:
dumper- TheDumperto be used to dump fields.
-
-