StartOffsetExtractorOutput


@UnstableApi
class StartOffsetExtractorOutput : ExtractorOutput


An extractor output that wraps another extractor output and applies a give start byte offset to seek positions.

This is useful for extracting from a container that's concatenated after some prefix data but where the container's extractor doesn't handle a non-zero start offset (for example, because it seeks to absolute positions read from the container data).

Summary

Public constructors

StartOffsetExtractorOutput(
    startOffset: Long,
    extractorOutput: ExtractorOutput!
)

Creates a new wrapper reading from the given start byte offset.

Public functions

Unit

Called when all tracks have been identified, meaning no new trackId values will be passed to track.

Unit
seekMap(seekMap: SeekMap!)

Called when a SeekMap has been extracted from the stream.

TrackOutput!
track(id: Int, type: Int)

Called by the Extractor to get the TrackOutput for a specific track.

Inherited Constants

From androidx.media3.extractor.ExtractorOutput
const ExtractorOutput!

Placeholder ExtractorOutput implementation throwing an in each method.

Public constructors

StartOffsetExtractorOutput

StartOffsetExtractorOutput(
    startOffset: Long,
    extractorOutput: ExtractorOutput!
)

Creates a new wrapper reading from the given start byte offset.

Public functions

endTracks

fun endTracks(): Unit

Called when all tracks have been identified, meaning no new trackId values will be passed to track.

seekMap

fun seekMap(seekMap: SeekMap!): Unit

Called when a SeekMap has been extracted from the stream.

Parameters
seekMap: SeekMap!

The extracted SeekMap.

track

fun track(id: Int, type: Int): TrackOutput!

Called by the Extractor 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.

type: Int

The track type.

Returns
TrackOutput!

The TrackOutput for the given track identifier.