# 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)

*** ** * ** ***


```
@RequiresApi(value = 30)
@UnstableApi
public final class OutputConsumerAdapterV30 implements MediaParser.OutputConsumer
```

<br />

*** ** * ** ***

`https://developer.android.com/reference/android/media/MediaParser.OutputConsumer.html` implementation that redirects output to an `https://developer.android.com/reference/androidx/media3/extractor/ExtractorOutput`.

## Summary

| ### Public fields |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/media/MediaParser.SeekMap.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#dummySeekMap()` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#OutputConsumerAdapterV30()()` Equivalent to `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#OutputConsumerAdapterV30(androidx.media3.common.Format,int,boolean)` |
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#OutputConsumerAdapterV30(androidx.media3.common.Format,int,boolean)( @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Format primaryTrackManifestFormat, @https://developer.android.com/reference/androidx/media3/common/C.TrackType int primaryTrackType, boolean expectDummySeekMap )` Creates a new instance. |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#disableSeeking()()` Overrides future received `https://developer.android.com/reference/androidx/media3/extractor/SeekMap` with non-seekable instances. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/extractor/ChunkIndex` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#getChunkIndex()()` Returns the most recently output `https://developer.android.com/reference/androidx/media3/extractor/ChunkIndex`, or null if none has been output. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/media/MediaParser.SeekMap.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#getDummySeekMap()()` Returns a dummy `https://developer.android.com/reference/android/media/MediaParser.SeekMap.html`, or null if not available. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable Format[]` | `https://developer.android.com/reference/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. |
| `https://developer.android.com/reference/android/util/Pair.html<https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html, https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html>` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#getSeekPoints(long)(long seekTimeUs)` Returns the `https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html` instances corresponding to the given timestamp. |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onSampleCompleted(int,long,int,int,int,android.media.MediaCodec.CryptoInfo)( int trackIndex, long timeUs, int flags, int size, int offset, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/media/MediaCodec.CryptoInfo.html cryptoInfo )` |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onSampleDataFound(int,android.media.MediaParser.InputReader)(int trackIndex, https://developer.android.com/reference/android/media/MediaParser.InputReader.html sampleData)` |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onSeekMapFound(android.media.MediaParser.SeekMap)(https://developer.android.com/reference/android/media/MediaParser.SeekMap.html seekMap)` |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onTrackCountFound(int)(int numberOfTracks)` |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#onTrackDataFound(int,android.media.MediaParser.TrackData)(int trackIndex, https://developer.android.com/reference/android/media/MediaParser.TrackData.html trackData)` |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setExtractorOutput(androidx.media3.extractor.ExtractorOutput)(https://developer.android.com/reference/androidx/media3/extractor/ExtractorOutput extractorOutput)` Sets the `https://developer.android.com/reference/androidx/media3/extractor/ExtractorOutput` to which `https://developer.android.com/reference/android/media/MediaParser.html` output is directed. |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setMuxedCaptionFormats(java.util.List<androidx.media3.common.Format>)(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/common/Format> muxedCaptionFormats)` Sets `https://developer.android.com/reference/androidx/media3/common/Format` information associated to the caption tracks multiplexed in the media. |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setSampleTimestampUpperLimitFilterUs(long)( long sampleTimestampUpperLimitFilterUs )` Sets an upper limit for sample timestamp filtering. |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setSelectedParserName(java.lang.String)(https://developer.android.com/reference/java/lang/String.html parserName)` Defines the container MIME type to propagate through `https://developer.android.com/reference/androidx/media3/extractor/TrackOutput#format(androidx.media3.common.Format)`. |
| `void` | `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#setTimestampAdjuster(androidx.media3.common.util.TimestampAdjuster)(https://developer.android.com/reference/androidx/media3/common/util/TimestampAdjuster timestampAdjuster)` Sets a `https://developer.android.com/reference/androidx/media3/common/util/TimestampAdjuster` for adjusting the timestamps of the output samples. |

## Public fields

### dummySeekMap

```
public @Nullable MediaParser.SeekMap dummySeekMap
```

## Public constructors

### OutputConsumerAdapterV30

```
public OutputConsumerAdapterV30()
```

Equivalent to `https://developer.android.com/reference/androidx/media3/exoplayer/source/mediaparser/OutputConsumerAdapterV30#OutputConsumerAdapterV30(androidx.media3.common.Format,int,boolean)`

### OutputConsumerAdapterV30

```
public OutputConsumerAdapterV30(
    @Nullable Format primaryTrackManifestFormat,
    @C.TrackType int primaryTrackType,
    boolean expectDummySeekMap
)
```

Creates a new instance.

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

## Public methods

### disableSeeking

```
public void disableSeeking()
```

Overrides future received `https://developer.android.com/reference/androidx/media3/extractor/SeekMap` with non-seekable instances.

### getChunkIndex

```
public @Nullable ChunkIndex getChunkIndex()
```

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

### getDummySeekMap

```
public @Nullable MediaParser.SeekMap getDummySeekMap()
```

Returns a dummy `https://developer.android.com/reference/android/media/MediaParser.SeekMap.html`, or null if not available.

the dummy `https://developer.android.com/reference/android/media/MediaParser.SeekMap.html` returns a single `https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html` whose `https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html#timeMicros` matches the requested timestamp, and `https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html#position` is 0.

### getSampleFormats

```
public @Nullable Format[] getSampleFormats()
```

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

### getSeekPoints

```
public Pair<MediaParser.SeekPoint, MediaParser.SeekPoint> getSeekPoints(long seekTimeUs)
```

Returns the `https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html` instances corresponding to the given timestamp.

| Parameters |
|---|---|
| `long seekTimeUs` | The timestamp in microseconds to retrieve `https://developer.android.com/reference/android/media/MediaParser.SeekPoint.html` instances for. |

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

### onSampleCompleted

```
public void onSampleCompleted(
    int trackIndex,
    long timeUs,
    int flags,
    int size,
    int offset,
    @Nullable MediaCodec.CryptoInfo cryptoInfo
)
```

### onSampleDataFound

```
public void onSampleDataFound(int trackIndex, MediaParser.InputReader sampleData)
```

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

### onSeekMapFound

```
public void onSeekMapFound(MediaParser.SeekMap seekMap)
```

### onTrackCountFound

```
public void onTrackCountFound(int numberOfTracks)
```

### onTrackDataFound

```
public void onTrackDataFound(int trackIndex, MediaParser.TrackData trackData)
```

### setExtractorOutput

```
public void setExtractorOutput(ExtractorOutput extractorOutput)
```

Sets the `https://developer.android.com/reference/androidx/media3/extractor/ExtractorOutput` to which `https://developer.android.com/reference/android/media/MediaParser.html` output is directed.

### setMuxedCaptionFormats

```
public void setMuxedCaptionFormats(List<Format> muxedCaptionFormats)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format` information associated to the caption tracks multiplexed in the media.

### setSampleTimestampUpperLimitFilterUs

```
public void setSampleTimestampUpperLimitFilterUs(
    long sampleTimestampUpperLimitFilterUs
)
```

Sets an upper limit for sample timestamp filtering.

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

| Parameters |
|---|---|
| `long sampleTimestampUpperLimitFilterUs` | The maximum allowed sample timestamp, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to remove filtering. |

### setSelectedParserName

```
public void setSelectedParserName(String parserName)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html parserName` | The name of the selected parser. |

### setTimestampAdjuster

```
public void setTimestampAdjuster(TimestampAdjuster timestampAdjuster)
```

Sets a `https://developer.android.com/reference/androidx/media3/common/util/TimestampAdjuster` for adjusting the timestamps of the output samples.