# SampleQueue

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/source/SampleQueue.java+class:androidx.media3.exoplayer.source.SampleQueue)

*** ** * ** ***


```
@UnstableApi
class SampleQueue : TrackOutput
```

<br />

*** ** * ** ***

A queue of media samples.

## Summary

| ### Nested types |
|---|
| `interface https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue.UpstreamFormatChangedListener` A listener for changes to the upstream format. |

| ### Protected constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#SampleQueue(androidx.media3.exoplayer.upstream.Allocator,androidx.media3.exoplayer.drm.DrmSessionManager,androidx.media3.exoplayer.drm.DrmSessionEventListener.EventDispatcher)( allocator: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/Allocator!, drmSessionManager: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionManager?, drmEventDispatcher: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionEventListener.EventDispatcher? )` |

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#createWithDrm(androidx.media3.exoplayer.upstream.Allocator,androidx.media3.exoplayer.drm.DrmSessionManager,androidx.media3.exoplayer.drm.DrmSessionEventListener.EventDispatcher)( allocator: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/Allocator!, drmSessionManager: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionManager!, drmEventDispatcher: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionEventListener.EventDispatcher! )` Creates a sample queue with DRM resource management. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue!` | `[createWithDrm](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#createWithDrm(androidx.media3.exoplayer.upstream.Allocator,android.os.Looper,androidx.media3.exoplayer.drm.DrmSessionManager,androidx.media3.exoplayer.drm.DrmSessionEventListener.EventDispatcher))( allocator: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/Allocator!, playbackLooper: https://developer.android.com/reference/android/os/Looper.html!, drmSessionManager: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionManager!, drmEventDispatcher: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionEventListener.EventDispatcher! )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#createWithDrm(androidx.media3.exoplayer.upstream.Allocator,androidx.media3.exoplayer.drm.DrmSessionManager,androidx.media3.exoplayer.drm.DrmSessionEventListener.EventDispatcher)` instead. <br /> |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#createWithoutDrm(androidx.media3.exoplayer.upstream.Allocator)(allocator: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/Allocator!)` Creates a sample queue without DRM resource management. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#discardSampleMetadataToRead()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#discardTo(long,boolean,boolean)(timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, toKeyframe: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, stopAtReadPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Discards up to but not including the sample immediately before or at the specified time. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#discardToEnd()()` Discards all samples in the queue and advances the read position. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#discardToRead()()` Discards up to but not including the read position. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#discardUpstreamFrom(long)(timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Discards samples from the write side of the queue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#discardUpstreamSamples(int)(discardFromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Discards samples from the write side of the queue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#expectResume()()` Prepares the queue to resume receiving samples from an earlier timestamp, matching duplicate overlap samples at the existing queue tail before appending new samples. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#format(androidx.media3.common.Format)(format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!)` Called when the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` of the track has been extracted from the stream. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getFirstIndex()()` Returns the current absolute start index. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getFirstTimestampUs()()` Returns the timestamp of the first sample, or `https://developer.android.com/reference/java/lang/Long.html#MIN_VALUE` if the queue is empty. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getLargestReadTimestampUs()()` Returns the largest sample timestamp that has been read since the last `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#reset()`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getReadIndex()()` Returns the current absolute read index. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getSkipCount(long,boolean)(timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, allowEndOfQueue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns the number of samples that need to be `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#skip(int)` to advance the read position to the keyframe before or at the specified time. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getWriteIndex()()` Returns the current absolute write index. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#hasQueuedTimestampsUpToReadEndTimeUs()()` Returns whether all required samples to read up to the configured `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setReadEndTimeUs(long)` have been queued. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#isDiscardingAllSamplesToStartTime(androidx.media3.common.Format)(format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!)` Returns whether samples earlier than `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setStartTimeUs(long)` will be discarded for the given format. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#isReady(boolean)(loadingFinished: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns whether there is data available for reading. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#maybeThrowError()()` Throws an error that's preventing data from being read. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#peekSourceId()()` Peeks the source id of the next sample to be read, or the current upstream source id if the queue is empty or if the read position is at the end of the queue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#preRelease()()` Calls `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#discardToEnd()` and releases any resources owned by the queue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#read(androidx.media3.exoplayer.FormatHolder,androidx.media3.decoder.DecoderInputBuffer,int,boolean)( formatHolder: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/FormatHolder!, buffer: https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer!, @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleStream.ReadFlags readFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, loadingFinished: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Attempts to read from the queue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#release()()` Calls `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#reset(boolean)` and releases any resources owned by the queue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#reset()()` Convenience method for `reset(false)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#reset(boolean)(resetUpstreamFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Clears all samples from the queue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#sampleData(androidx.media3.common.util.ParsableByteArray,int,int)( data: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.SampleDataPart sampleDataPart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Called to write sample data to the output. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#sampleData(androidx.media3.common.DataReader,int,boolean,int)( input: https://developer.android.com/reference/kotlin/androidx/media3/common/DataReader!, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, allowEndOfInput: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.SampleDataPart sampleDataPart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Called to write sample data to the output. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#sampleMetadata(long,int,int,int,androidx.media3.extractor.TrackOutput.CryptoData)( timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/common/C.BufferFlags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, cryptoData: https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData? )` Called when metadata associated with a sample has been extracted from the stream. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#seekTo(int)(sampleIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Attempts to seek the read position to the specified sample index. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#seekTo(long,boolean)(timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, allowTimeBeyondBuffer: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Attempts to seek the read position to the keyframe before or at the specified time. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setReadEndTimeUs(long)(readEndTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the time at which reading the stream should stop. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setSampleOffsetUs(long)(sampleOffsetUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets an offset that will be added to the timestamps (and sub-sample timestamps) of samples that are subsequently queued. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setStartTimeUs(long)(startTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the start time for the queue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setUpstreamFormatChangeListener(androidx.media3.exoplayer.source.SampleQueue.UpstreamFormatChangedListener)( listener: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue.UpstreamFormatChangedListener? )` Sets a listener to be notified of changes to the upstream format. |
| `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#skip(int)(count: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Advances the read position by the specified number of samples. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#sourceId(long)(sourceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets a source identifier for subsequent samples. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#splice()()` Indicates samples that are subsequently queued should be spliced into those already queued. |

| ### Protected functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getAdjustedUpstreamFormat(androidx.media3.common.Format)(format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!)` Adjusts the upstream `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` (i.e., the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` that was most recently passed to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#format(androidx.media3.common.Format)`). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#invalidateUpstreamFormatAdjustment()()` Invalidates the last upstream format adjustment. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#isLastSampleQueued()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#largestQueuedTimestampUs()` |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Format?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#upstreamFormat()` |

### Inherited Constants

From [androidx.media3.extractor.TrackOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#SAMPLE_DATA_PART_ENCRYPTION() = 1`

Sample encryption data.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#SAMPLE_DATA_PART_MAIN() = 0`

Main media sample data.
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#SAMPLE_DATA_PART_SUPPLEMENTAL() = 2`

Sample supplemental data.

### Inherited functions

From [androidx.media3.extractor.TrackOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#durationUs(long)(durationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Called to set the duration of the track in microseconds.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#sampleData(androidx.media3.common.util.ParsableByteArray,int)(data: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Equivalent to `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#sampleData(androidx.media3.common.util.ParsableByteArray,int,int)` sampleData(data, length, SAMPLE_DATA_PART_MAIN)}.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#sampleData(androidx.media3.common.DataReader,int,boolean)(input: https://developer.android.com/reference/kotlin/androidx/media3/common/DataReader!, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, allowEndOfInput: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Equivalent to `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#sampleData(androidx.media3.common.DataReader,int,boolean,int)`.

## Protected constructors

### SampleQueue

```
protected SampleQueue(
    allocator: Allocator!,
    drmSessionManager: DrmSessionManager?,
    drmEventDispatcher: DrmSessionEventListener.EventDispatcher?
)
```

## Public functions

### createWithDrm

```
java-static fun createWithDrm(
    allocator: Allocator!,
    drmSessionManager: DrmSessionManager!,
    drmEventDispatcher: DrmSessionEventListener.EventDispatcher!
): SampleQueue!
```

Creates a sample queue with DRM resource management.

For each sample added to the queue, a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSession` will be attached containing the keys needed to decrypt it.

| Parameters |
|---|---|
| `allocator: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/Allocator!` | An `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/Allocator` from which allocations for sample data can be obtained. |
| `drmSessionManager: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionManager!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionManager` to obtain `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSession` from. The created instance does not take ownership of this `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionManager`. |
| `drmEventDispatcher: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionEventListener.EventDispatcher!` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionEventListener.EventDispatcher` to notify of events related to this SampleQueue. |

### createWithDrm

```
java-static fun [createWithDrm](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#createWithDrm(androidx.media3.exoplayer.upstream.Allocator,android.os.Looper,androidx.media3.exoplayer.drm.DrmSessionManager,androidx.media3.exoplayer.drm.DrmSessionEventListener.EventDispatcher))(
    allocator: Allocator!,
    playbackLooper: Looper!,
    drmSessionManager: DrmSessionManager!,
    drmEventDispatcher: DrmSessionEventListener.EventDispatcher!
): SampleQueue!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#createWithDrm(androidx.media3.exoplayer.upstream.Allocator,androidx.media3.exoplayer.drm.DrmSessionManager,androidx.media3.exoplayer.drm.DrmSessionEventListener.EventDispatcher)` instead. The `playbackLooper` should be configured on the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionManager` with `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSessionManager#setPlayer(android.os.Looper,androidx.media3.exoplayer.analytics.PlayerId)`.

### createWithoutDrm

```
java-static fun createWithoutDrm(allocator: Allocator!): SampleQueue!
```

Creates a sample queue without DRM resource management.

| Parameters |
|---|---|
| `allocator: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/Allocator!` | An `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/Allocator` from which allocations for sample data can be obtained. |

### discardSampleMetadataToRead

```
synchronized fun discardSampleMetadataToRead(): Long
```

### discardTo

```
fun discardTo(timeUs: Long, toKeyframe: Boolean, stopAtReadPosition: Boolean): Unit
```

Discards up to but not including the sample immediately before or at the specified time.

| Parameters |
|---|---|
| `timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time to discard up to. |
| `toKeyframe: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true then discards samples up to the keyframe before or at the specified time, rather than any sample before or at that time. |
| `stopAtReadPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true then samples are only discarded if they're before the read position. If false then samples at and beyond the read position may be discarded, in which case the read position is advanced to the first remaining sample. |

### discardToEnd

```
fun discardToEnd(): Unit
```

Discards all samples in the queue and advances the read position.

### discardToRead

```
fun discardToRead(): Unit
```

Discards up to but not including the read position.

### discardUpstreamFrom

```
fun discardUpstreamFrom(timeUs: Long): Unit
```

Discards samples from the write side of the queue.

| Parameters |
|---|---|
| `timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | Samples will be discarded from the write end of the queue until a sample with a timestamp smaller than timeUs is encountered (this sample is not discarded). Must be larger than `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getLargestReadTimestampUs()`. |

### discardUpstreamSamples

```
fun discardUpstreamSamples(discardFromIndex: Int): Unit
```

Discards samples from the write side of the queue.

| Parameters |
|---|---|
| `discardFromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The absolute index of the first sample to be discarded. Must be in the range \[`https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getReadIndex()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getWriteIndex()`\]. |

### expectResume

```
fun expectResume(): Unit
```

Prepares the queue to resume receiving samples from an earlier timestamp, matching duplicate overlap samples at the existing queue tail before appending new samples.

### format

```
fun format(format: Format!): Unit
```

Called when the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` of the track has been extracted from the stream.

| Parameters |
|---|---|
| `format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | The extracted `https://developer.android.com/reference/kotlin/androidx/media3/common/Format`. |

### getFirstIndex

```
fun getFirstIndex(): Int
```

Returns the current absolute start index.

### getFirstTimestampUs

```
synchronized fun getFirstTimestampUs(): Long
```

Returns the timestamp of the first sample, or `https://developer.android.com/reference/java/lang/Long.html#MIN_VALUE` if the queue is empty.

### getLargestReadTimestampUs

```
synchronized fun getLargestReadTimestampUs(): Long
```

Returns the largest sample timestamp that has been read since the last `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#reset()`.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The largest sample timestamp that has been read, or `https://developer.android.com/reference/java/lang/Long.html#MIN_VALUE` if no samples have been read. |

### getReadIndex

```
fun getReadIndex(): Int
```

Returns the current absolute read index.

### getSkipCount

```
synchronized fun getSkipCount(timeUs: Long, allowEndOfQueue: Boolean): Int
```

Returns the number of samples that need to be `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#skip(int)` to advance the read position to the keyframe before or at the specified time.

| Parameters |
|---|---|
| `timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time to advance to. |
| `allowEndOfQueue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the end of the queue is considered a keyframe when ` timeUs` is larger than the largest queued timestamp. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of samples that need to be skipped, which may be equal to 0. |

### getWriteIndex

```
fun getWriteIndex(): Int
```

Returns the current absolute write index.

### hasQueuedTimestampsUpToReadEndTimeUs

```
synchronized fun hasQueuedTimestampsUpToReadEndTimeUs(): Boolean
```

Returns whether all required samples to read up to the configured `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setReadEndTimeUs(long)` have been queued.

### isDiscardingAllSamplesToStartTime

```
java-static fun isDiscardingAllSamplesToStartTime(format: Format!): Boolean
```

Returns whether samples earlier than `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setStartTimeUs(long)` will be discarded for the given format.

This returns `true` for audio formats where `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes#allSamplesAreSyncSamples(java.lang.String,java.lang.String)`.

| Parameters |
|---|---|
| `format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` to check. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether all samples earlier than the start time will be discarded for the given format. |

### isReady

```
@CallSuper
synchronized fun isReady(loadingFinished: Boolean): Boolean
```

Returns whether there is data available for reading.

Note: If the stream has ended then a buffer with the end of stream flag can always be read from `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#read(androidx.media3.exoplayer.FormatHolder,androidx.media3.decoder.DecoderInputBuffer,int,boolean)`. Hence an ended stream is always ready.

| Parameters |
|---|---|
| `loadingFinished: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether no more samples will be written to the sample queue. When true, this method returns true if the sample queue is empty, because an empty sample queue means the end of stream has been reached. When false, this method returns false if the sample queue is empty. |

### maybeThrowError

```
@CallSuper
fun maybeThrowError(): Unit
```

Throws an error that's preventing data from being read. Does nothing if no such error exists.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | The underlying error. |

### peekSourceId

```
synchronized fun peekSourceId(): Long
```

Peeks the source id of the next sample to be read, or the current upstream source id if the queue is empty or if the read position is at the end of the queue.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The source id. |

### preRelease

```
@CallSuper
fun preRelease(): Unit
```

Calls `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#discardToEnd()` and releases any resources owned by the queue.

### read

```
@CallSuper
fun read(
    formatHolder: FormatHolder!,
    buffer: DecoderInputBuffer!,
    @SampleStream.ReadFlags readFlags: Int,
    loadingFinished: Boolean
): Int
```

Attempts to read from the queue.

`https://developer.android.com/reference/kotlin/androidx/media3/common/Format` read from this method may be associated to a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/drm/DrmSession` through `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/FormatHolder#drmSession()`.

| Parameters |
|---|---|
| `formatHolder: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/FormatHolder!` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/FormatHolder` to populate in the case of reading a format. |
| `buffer: https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer!` | A `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer` to populate in the case of reading a sample or the end of the stream. If the end of the stream has been reached, the `https://developer.android.com/reference/kotlin/androidx/media3/common/C#BUFFER_FLAG_END_OF_STREAM()` flag will be set on the buffer. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleStream.ReadFlags readFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Flags controlling the behavior of this read operation. |
| `loadingFinished: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if an empty queue should be considered the end of the stream. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The result, which can be `https://developer.android.com/reference/kotlin/androidx/media3/common/C#RESULT_NOTHING_READ()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/C#RESULT_FORMAT_READ()` or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#RESULT_BUFFER_READ()`. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer.InsufficientCapacityException` | If the `buffer` has insufficient capacity to hold the data of a sample being read. The buffer `https://developer.android.com/reference/kotlin/androidx/media3/decoder/DecoderInputBuffer#timeUs()` and flags are populated if this exception is thrown, but the read position is not advanced. |

### release

```
@CallSuper
fun release(): Unit
```

Calls `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#reset(boolean)` and releases any resources owned by the queue.

### reset

```
fun reset(): Unit
```

Convenience method for `reset(false)`.

### reset

```
@CallSuper
fun reset(resetUpstreamFormat: Boolean): Unit
```

Clears all samples from the queue.

| Parameters |
|---|---|
| `resetUpstreamFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the upstream format should be cleared. If set to false, samples queued after the reset (and before a subsequent call to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#format(androidx.media3.common.Format)`) are assumed to have the current upstream format. If set to true, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#format(androidx.media3.common.Format)` must be called after the reset before any more samples can be queued. |

### sampleData

```
fun sampleData(
    data: ParsableByteArray!,
    length: Int,
    @TrackOutput.SampleDataPart sampleDataPart: Int
): Unit
```

Called to write sample data to the output.

| Parameters |
|---|---|
| `data: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!` | A `https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray` from which to read the sample data. |
| `length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of bytes to read, starting from `data.getPosition()`. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.SampleDataPart sampleDataPart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The part of the sample data to which this call corresponds. |

### sampleData

```
fun sampleData(
    input: DataReader!,
    length: Int,
    allowEndOfInput: Boolean,
    @TrackOutput.SampleDataPart sampleDataPart: Int
): Int
```

Called to write sample data to the output.

| Parameters |
|---|---|
| `input: https://developer.android.com/reference/kotlin/androidx/media3/common/DataReader!` | A `https://developer.android.com/reference/kotlin/androidx/media3/common/DataReader` from which to read the sample data. |
| `length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The maximum length to read from the input. |
| `allowEndOfInput: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if encountering the end of the input having read no data is allowed, and should result in `https://developer.android.com/reference/kotlin/androidx/media3/common/C#RESULT_END_OF_INPUT()` being returned. False if it should be considered an error, causing an `https://developer.android.com/reference/java/io/EOFException.html` to be thrown. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.SampleDataPart sampleDataPart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The part of the sample data to which this call corresponds. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of bytes appended. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | If an error occurred reading from the input. |

### sampleMetadata

```
fun sampleMetadata(
    timeUs: Long,
    @C.BufferFlags flags: Int,
    size: Int,
    offset: Int,
    cryptoData: TrackOutput.CryptoData?
): Unit
```

Called when metadata associated with a sample has been extracted from the stream.

The corresponding sample data will have already been passed to the output via calls to `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#sampleData(androidx.media3.common.DataReader,int,boolean)` or `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#sampleData(androidx.media3.common.util.ParsableByteArray,int)`.

| Parameters |
|---|---|
| `timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The media timestamp associated with the sample, in microseconds. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.BufferFlags flags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Flags associated with the sample. See `C.BUFFER_FLAG_*`. |
| `size: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The size of the sample data, in bytes. |
| `offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of bytes that have been passed to `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#sampleData(androidx.media3.common.DataReader,int,boolean)` or `https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#sampleData(androidx.media3.common.util.ParsableByteArray,int)` since the last byte belonging to the sample whose metadata is being passed. |
| `cryptoData: https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput.CryptoData?` | The encryption data required to decrypt the sample. May be null. |

### seekTo

```
synchronized fun seekTo(sampleIndex: Int): Boolean
```

Attempts to seek the read position to the specified sample index.

| Parameters |
|---|---|
| `sampleIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The sample index. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the seek was successful. |

### seekTo

```
synchronized fun seekTo(timeUs: Long, allowTimeBeyondBuffer: Boolean): Boolean
```

Attempts to seek the read position to the keyframe before or at the specified time.

For formats where `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#isDiscardingAllSamplesToStartTime(androidx.media3.common.Format)`, it seeks the read position to the first sample at or after the specified time.

| Parameters |
|---|---|
| `timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time to seek to. |
| `allowTimeBeyondBuffer: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the operation can succeed if `timeUs` is beyond the end of the queue, by seeking to the last sample (or keyframe). |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the seek was successful. |

### setReadEndTimeUs

```
synchronized fun setReadEndTimeUs(readEndTimeUs: Long): Unit
```

Sets the time at which reading the stream should stop.

The queue may offer samples beyond this time if they are out of order and required for decoding.

This setting does not influence the upstream write side of the queue.

| Parameters |
|---|---|
| `readEndTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The desired read end time in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_END_OF_SOURCE()` to not specify a read limit. |

### setSampleOffsetUs

```
fun setSampleOffsetUs(sampleOffsetUs: Long): Unit
```

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

| Parameters |
|---|---|
| `sampleOffsetUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The timestamp offset in microseconds. |

### setStartTimeUs

```
fun setStartTimeUs(startTimeUs: Long): Unit
```

Sets the start time for the queue. Samples with earlier timestamps will be discarded if `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#isDiscardingAllSamplesToStartTime(androidx.media3.common.Format)` for the input format.

| Parameters |
|---|---|
| `startTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The start time, in microseconds. |

### setUpstreamFormatChangeListener

```
fun setUpstreamFormatChangeListener(
    listener: SampleQueue.UpstreamFormatChangedListener?
): Unit
```

Sets a listener to be notified of changes to the upstream format.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue.UpstreamFormatChangedListener?` | The listener. |

### skip

```
synchronized fun skip(count: Int): Unit
```

Advances the read position by the specified number of samples.

| Parameters |
|---|---|
| `count: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of samples to advance the read position by. Must be at least 0 and at most `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getWriteIndex()` - `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getReadIndex()`. |

### sourceId

```
fun sourceId(sourceId: Long): Unit
```

Sets a source identifier for subsequent samples.

| Parameters |
|---|---|
| `sourceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The source identifier. |

### splice

```
fun splice(): Unit
```

Indicates samples that are subsequently queued should be spliced into those already queued.

## Protected functions

### getAdjustedUpstreamFormat

```
@CallSuper
protected fun getAdjustedUpstreamFormat(format: Format!): Format!
```

Adjusts the upstream `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` (i.e., the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` that was most recently passed to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#format(androidx.media3.common.Format)`).

The default implementation incorporates the sample offset passed to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#setSampleOffsetUs(long)` into `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#subsampleOffsetUs()`.

| Parameters |
|---|---|
| `format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` to adjust. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | The adjusted `https://developer.android.com/reference/kotlin/androidx/media3/common/Format`. |

### invalidateUpstreamFormatAdjustment

```
protected fun invalidateUpstreamFormatAdjustment(): Unit
```

Invalidates the last upstream format adjustment. `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/SampleQueue#getAdjustedUpstreamFormat(androidx.media3.common.Format)` will be called to adjust the upstream `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` again before the next sample is queued.

## Public properties

### isLastSampleQueued

```
val isLastSampleQueued: Boolean
```

### largestQueuedTimestampUs

```
val largestQueuedTimestampUs: Long
```

### upstreamFormat

```
val upstreamFormat: Format?
```