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.TrackOutputProvider
that providesTrackOutputs
based 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.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.TrackOutput
track(int id, @com.google.android.exoplayer2.C.TrackType int type)
Called to get theTrackOutput
for 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.TrackOutputProvider
Called to get theTrackOutput
for a specific track.The same
TrackOutput
is returned if multiple calls are made with the sameid
.- Specified by:
track
in interfaceChunkExtractor.TrackOutputProvider
- Parameters:
id
- A track identifier.type
- Thetype
of the track.- Returns:
- The
TrackOutput
for 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.
-
-