Class BaseMediaChunkOutput
- java.lang.Object
-
- com.google.android.exoplayer2.source.chunk.BaseMediaChunkOutput
-
- All Implemented Interfaces:
ChunkExtractor.TrackOutputProvider
public final class BaseMediaChunkOutput extends Object implements ChunkExtractor.TrackOutputProvider
AChunkExtractor.TrackOutputProviderthat providesTrackOutputsbased on a predefined mapping from track type to output.
-
-
Constructor Summary
Constructors Constructor Description BaseMediaChunkOutput(int[] trackTypes, SampleQueue[] sampleQueues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]getWriteIndices()Returns the current absolute write indices of the individual sample queues.voidsetSampleOffsetUs(long sampleOffsetUs)Sets an offset that will be added to the timestamps (and sub-sample timestamps) of samples subsequently written to the sample queues.TrackOutputtrack(int id, @com.google.android.exoplayer2.C.TrackType int type)Called to get theTrackOutputfor a specific track.
-
-
-
Constructor Detail
-
BaseMediaChunkOutput
public BaseMediaChunkOutput(int[] trackTypes, SampleQueue[] sampleQueues)- Parameters:
trackTypes- The track types of the individual track outputs.sampleQueues- The individual sample queues.
-
-
Method Detail
-
track
public TrackOutput track(int id, @com.google.android.exoplayer2.C.TrackType int type)
Description copied from interface:ChunkExtractor.TrackOutputProviderCalled to get theTrackOutputfor a specific track.The same
TrackOutputis returned if multiple calls are made with the sameid.- Specified by:
trackin interfaceChunkExtractor.TrackOutputProvider- Parameters:
id- A track identifier.type- Thetypeof the track.- Returns:
- The
TrackOutputfor the given track identifier.
-
getWriteIndices
public int[] getWriteIndices()
Returns the current absolute write indices of the individual sample queues.
-
setSampleOffsetUs
public void setSampleOffsetUs(long sampleOffsetUs)
Sets an offset that will be added to the timestamps (and sub-sample timestamps) of samples subsequently written to the sample queues.
-
-