Back to Exoplayer

FakeExtractorOutput (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/FakeExtractorOutput.html

latest6.0 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class FakeExtractorOutput

  • java.lang.Object

    • com.google.android.exoplayer2.testutil.FakeExtractorOutput
  • All Implemented Interfaces:ExtractorOutput, Dumper.Dumpable


public final classFakeExtractorOutputextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[ExtractorOutput](../extractor/ExtractorOutput.html "interface in com.google.android.exoplayer2.extractor"),[Dumper.Dumpable](Dumper.Dumpable.html "interface in com.google.android.exoplayer2.testutil")

A fake ExtractorOutput.

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 the dumper. | | void | endTracks() | Called when all tracks have been identified, meaning no new trackId values will be passed to ExtractorOutput.track(int, int). | | 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. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

trackOutputs

public final[SparseArray](https://developer.android.com/reference/android/util/SparseArray.html "class or interface in android.util")<[FakeTrackOutput](FakeTrackOutput.html "class in com.google.android.exoplayer2.testutil")> trackOutputs
- 

numberOfTracks

public int numberOfTracks
- 

tracksEnded

public boolean tracksEnded
- 

seekMap

public @MonotonicNonNull[SeekMap](../extractor/SeekMap.html "interface in com.google.android.exoplayer2.extractor")seekMap

Constructor Detail

- 

FakeExtractorOutput

public FakeExtractorOutput()
- 

FakeExtractorOutput

public FakeExtractorOutput​([FakeTrackOutput.Factory](FakeTrackOutput.Factory.html "interface in com.google.android.exoplayer2.testutil")trackOutputFactory)

Method Detail

- 

track

public[FakeTrackOutput](FakeTrackOutput.html "class in com.google.android.exoplayer2.testutil")track​(int id,
                             int type)

Description copied from interface: ExtractorOutput

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.

Specified by:track in interface ExtractorOutputParameters:id - A track identifier.type - The track 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 new trackId values will be passed to ExtractorOutput.track(int, int). Specified by:endTracks in interface ExtractorOutput

- 

seekMap

public void seekMap​([SeekMap](../extractor/SeekMap.html "interface in com.google.android.exoplayer2.extractor")seekMap)

Description copied from interface: ExtractorOutput

Called when a SeekMap has been extracted from the stream. Specified by:seekMap in interface ExtractorOutputParameters:seekMap - The extracted SeekMap.

- 

clearTrackOutputs

public void clearTrackOutputs()
- 

dump

public void dump​([Dumper](Dumper.html "class in com.google.android.exoplayer2.testutil")dumper)

Description copied from interface: Dumper.Dumpable

Dumps the fields of the object using the dumper. Specified by:dump in interface Dumper.DumpableParameters:dumper - The Dumper to be used to dump fields.