# OutputConsumerAdapterV30

# OutputConsumerAdapterV30

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/mediaparser/OutputConsumerAdapterV30.java+class:androidx.media3.exoplayer.source.mediaparser.OutputConsumerAdapterV30)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30 "View this page in Java")

<br />

```
@RequiresApi(value = 30)
@UnstableApi
class OutputConsumerAdapterV30 : MediaParser.OutputConsumer
```

<br />

*** ** * ** ***

[MediaParser.OutputConsumer](https://developer.android.com/reference/android/media/MediaParser.OutputConsumer.html)implementation that redirects output to an[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput).

## Summary

|                                                                                                                                                                                                                                                                                                                                     ### Public constructors                                                                                                                                                                                                                                                                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [OutputConsumerAdapterV30](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#OutputConsumerAdapterV30())`()` Equivalent to[OutputConsumerAdapterV30(primaryTrackManifestFormat= null, primaryTrackType= C.TRACK_TYPE_NONE, expectDummySeekMap= false)](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#OutputConsumerAdapterV30(androidx.media3.common.Format,int,boolean))                                                                                                                                                                              |
| [OutputConsumerAdapterV30](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#OutputConsumerAdapterV30(androidx.media3.common.Format,int,boolean))`(` ` primaryTrackManifestFormat: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`?,` ` @`[C.TrackType](https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType)` primaryTrackType: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` expectDummySeekMap: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) `)` Creates a new instance. |

|                                                                                                                                         ### Public functions                                                                                                                                          |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [disableSeeking](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#disableSeeking())`()` Overrides future received[SeekMaps](https://developer.android.com/reference/kotlin/androidx/media3/extractor/SeekMap)with non-seekable instances.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [ChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndex)`?`                                                                                                                                                                                                  | [getChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#getChunkIndex())`()` Returns the most recently output[ChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndex), or null if none has been output.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!>?`                                                                                                                         | [getSampleFormats](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#getSampleFormats())`()` Returns the last output format for each track, or null if not all the tracks have been identified.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| [Pair](https://developer.android.com/reference/android/util/Pair.html)`<`[MediaParser.SeekPoint](https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html)`!, `[MediaParser.SeekPoint](https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html)`!>!` | [getSeekPoints](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#getSeekPoints(long))`(seekTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Returns the[MediaParser.SeekPoint](https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html)instances corresponding to the given timestamp.                                                                                                                                                                                                                                                                                                                                                                                                  |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [onSampleCompleted](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onSampleCompleted(int,long,int,int,int,android.media.MediaCodec.CryptoInfo))`(` ` trackIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` timeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` flags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` size: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` offset: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` cryptoInfo: `[MediaCodec.CryptoInfo](https://developer.android.com/reference/android/media/MediaCodec.CryptoInfo.html)`?` `)` |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [onSampleDataFound](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onSampleDataFound(int,android.media.MediaParser.InputReader))`(trackIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, sampleData: `[MediaParser.InputReader](https://developer.android.com/reference/android/media/MediaParser.InputReader.html)`!)`                                                                                                                                                                                                                                                                                                                                                                                             |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [onSeekMapFound](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onSeekMapFound(android.media.MediaParser.SeekMap))`(seekMap: `[MediaParser.SeekMap](https://developer.android.com/reference/android/media/MediaParser.SeekMap.html)`!)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [onTrackCountFound](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onTrackCountFound(int))`(numberOfTracks: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [onTrackDataFound](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onTrackDataFound(int,android.media.MediaParser.TrackData))`(trackIndex: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, trackData: `[MediaParser.TrackData](https://developer.android.com/reference/android/media/MediaParser.TrackData.html)`!)`                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [setExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setExtractorOutput(androidx.media3.extractor.ExtractorOutput))`(extractorOutput: `[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput)`!)` Sets the[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput)to which[MediaParser's](https://developer.android.com/reference/android/media/MediaParser.html)output is directed.                                                                                                                                                                                                                                             |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [setMuxedCaptionFormats](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setMuxedCaptionFormats(java.util.List<androidx.media3.common.Format>))`(muxedCaptionFormats: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`!>!)` Sets[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)information associated to the caption tracks multiplexed in the media.                                                                                                                 |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [setSampleTimestampUpperLimitFilterUs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setSampleTimestampUpperLimitFilterUs(long))`(` ` sampleTimestampUpperLimitFilterUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) `)` Sets an upper limit for sample timestamp filtering.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [setSelectedParserName](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setSelectedParserName(java.lang.String))`(parserName: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!)` Defines the container MIME type to propagate through[format](https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#format(androidx.media3.common.Format)).                                                                                                                                                                                                                                                                                                                                           |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                         | [setTimestampAdjuster](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setTimestampAdjuster(androidx.media3.common.util.TimestampAdjuster))`(timestampAdjuster: `[TimestampAdjuster](https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster)`!)` Sets a[TimestampAdjuster](https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster)for adjusting the timestamps of the output samples.                                                                                                                                                                                                                                                                                        |

|                                          ### Public properties                                           |
|----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| [MediaParser.SeekMap](https://developer.android.com/reference/android/media/MediaParser.SeekMap.html)`?` | [dummySeekMap](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#dummySeekMap()) |

## Public constructors

### OutputConsumerAdapterV30

```
OutputConsumerAdapterV30()
```

Equivalent to[OutputConsumerAdapterV30(primaryTrackManifestFormat= null, primaryTrackType= C.TRACK_TYPE_NONE, expectDummySeekMap= false)](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#OutputConsumerAdapterV30(androidx.media3.common.Format,int,boolean))  

### OutputConsumerAdapterV30

```
OutputConsumerAdapterV30(
    primaryTrackManifestFormat: Format?,
    @C.TrackType primaryTrackType: Int,
    expectDummySeekMap: Boolean
)
```

Creates a new instance.  

|                                                                                             Parameters                                                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `primaryTrackManifestFormat: `[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)`?`                                                                             | The manifest-obtained format of the primary track, or null if not applicable.                                                                                                                                                                                 |
| `@`[C.TrackType](https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType)` primaryTrackType: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The[type](https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType)of the primary track.[TRACK_TYPE_NONE](https://developer.android.com/reference/kotlin/androidx/media3/common/C#TRACK_TYPE_NONE())if there is no primary track.    |
| `expectDummySeekMap: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                           | Whether the output consumer should expect an initial dummy seek map which should be exposed through[getDummySeekMap](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#getDummySeekMap()). |

## Public functions

### disableSeeking

```
fun disableSeeking(): Unit
```

Overrides future received[SeekMaps](https://developer.android.com/reference/kotlin/androidx/media3/extractor/SeekMap)with non-seekable instances.  

### getChunkIndex

```
fun getChunkIndex(): ChunkIndex?
```

Returns the most recently output[ChunkIndex](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ChunkIndex), or null if none has been output.  

### getSampleFormats

```
fun getSampleFormats(): Array<Format!>?
```

Returns the last output format for each track, or null if not all the tracks have been identified.  

### getSeekPoints

```
fun getSeekPoints(seekTimeUs: Long): Pair<MediaParser.SeekPoint!, MediaParser.SeekPoint!>!
```

Returns the[MediaParser.SeekPoint](https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html)instances corresponding to the given timestamp.  

|                                         Parameters                                          |
|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `seekTimeUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | The timestamp in microseconds to retrieve[MediaParser.SeekPoint](https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html)instances for. |

|                                                                                                                                                Returns                                                                                                                                                |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Pair](https://developer.android.com/reference/android/util/Pair.html)`<`[MediaParser.SeekPoint](https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html)`!, `[MediaParser.SeekPoint](https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html)`!>!` | The[MediaParser.SeekPoint](https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html)instances corresponding to the given timestamp. |

### onSampleCompleted

```
fun onSampleCompleted(
    trackIndex: Int,
    timeUs: Long,
    flags: Int,
    size: Int,
    offset: Int,
    cryptoInfo: MediaCodec.CryptoInfo?
): Unit
```  

### onSampleDataFound

```
fun onSampleDataFound(trackIndex: Int, sampleData: MediaParser.InputReader!): Unit
```  

|                                         Throws                                          |
|-----------------------------------------------------------------------------------------|---|
| [java.io.IOException](https://developer.android.com/reference/java/io/IOException.html) |   |

### onSeekMapFound

```
fun onSeekMapFound(seekMap: MediaParser.SeekMap!): Unit
```  

### onTrackCountFound

```
fun onTrackCountFound(numberOfTracks: Int): Unit
```  

### onTrackDataFound

```
fun onTrackDataFound(trackIndex: Int, trackData: MediaParser.TrackData!): Unit
```  

### setExtractorOutput

```
fun setExtractorOutput(extractorOutput: ExtractorOutput!): Unit
```

Sets the[ExtractorOutput](https://developer.android.com/reference/kotlin/androidx/media3/extractor/ExtractorOutput)to which[MediaParser's](https://developer.android.com/reference/android/media/MediaParser.html)output is directed.  

### setMuxedCaptionFormats

```
fun setMuxedCaptionFormats(muxedCaptionFormats: (Mutable)List<Format!>!): Unit
```

Sets[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)information associated to the caption tracks multiplexed in the media.  

### setSampleTimestampUpperLimitFilterUs

```
fun setSampleTimestampUpperLimitFilterUs(
    sampleTimestampUpperLimitFilterUs: Long
): Unit
```

Sets an upper limit for sample timestamp filtering.

When set, samples with timestamps greater than`sampleTimestampUpperLimitFilterUs`will be discarded.  

|                                                     Parameters                                                     |
|--------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `sampleTimestampUpperLimitFilterUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | The maximum allowed sample timestamp, or[TIME_UNSET](https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET())to remove filtering. |

### setSelectedParserName

```
fun setSelectedParserName(parserName: String!): Unit
```

Defines the container MIME type to propagate through[format](https://developer.android.com/reference/kotlin/androidx/media3/extractor/TrackOutput#format(androidx.media3.common.Format)).  

|                                             Parameters                                             |
|----------------------------------------------------------------------------------------------------|----------------------------------|
| `parserName: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | The name of the selected parser. |

### setTimestampAdjuster

```
fun setTimestampAdjuster(timestampAdjuster: TimestampAdjuster!): Unit
```

Sets a[TimestampAdjuster](https://developer.android.com/reference/kotlin/androidx/media3/common/util/TimestampAdjuster)for adjusting the timestamps of the output samples.  

## Public properties

### dummySeekMap

```
val dummySeekMap: MediaParser.SeekMap?
```