BaseMediaChunkOutput


@UnstableApi
class BaseMediaChunkOutput : ChunkExtractor.TrackOutputProvider


A TrackOutputProvider that provides TrackOutputs based on a predefined mapping from track type to output.

Summary

Public constructors

BaseMediaChunkOutput(
    trackTypes: IntArray!,
    sampleQueues: Array<SampleQueue!>!
)

Public functions

IntArray<Int>!

Returns the current absolute write indices of the individual sample queues.

Unit
setSampleOffsetUs(sampleOffsetUs: Long)

Sets an offset that will be added to the timestamps (and sub-sample timestamps) of samples subsequently written to the sample queues.

TrackOutput!
track(id: Int, @C.TrackType type: Int)

Called to get the TrackOutput for a specific track.

Public constructors

BaseMediaChunkOutput

BaseMediaChunkOutput(
    trackTypes: IntArray!,
    sampleQueues: Array<SampleQueue!>!
)
Parameters
trackTypes: IntArray!

The track types of the individual track outputs.

sampleQueues: Array<SampleQueue!>!

The individual sample queues.

Public functions

getWriteIndices

fun getWriteIndices(): IntArray<Int>!

Returns the current absolute write indices of the individual sample queues.

setSampleOffsetUs

fun setSampleOffsetUs(sampleOffsetUs: Long): Unit

Sets an offset that will be added to the timestamps (and sub-sample timestamps) of samples subsequently written to the sample queues.

track

fun track(id: Int, @C.TrackType type: Int): TrackOutput!

Called to get the TrackOutput for a specific track.

The same TrackOutput is returned if multiple calls are made with the same id.

Parameters
id: Int

A track identifier.

@C.TrackType type: Int

The type of the track.

Returns
TrackOutput!

The TrackOutput for the given track identifier.