OutputConsumerAdapterV30


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


MediaParser.OutputConsumer implementation that redirects output to an .

Summary

Public constructors

Equivalent to OutputConsumerAdapterV30(primaryTrackManifestFormat= null, primaryTrackType= C.TRACK_TYPE_NONE, expectDummySeekMap= false)

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

Creates a new instance.

Public functions

Unit

Overrides future received SeekMaps with non-seekable instances.

ChunkIndex?

Returns the most recently output ChunkIndex, or null if none has been output.

Array<Format!>?

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

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

Returns the MediaParser.SeekPoint instances corresponding to the given timestamp.

Unit
onSampleCompleted(
    trackIndex: Int,
    timeUs: Long,
    flags: Int,
    size: Int,
    offset: Int,
    cryptoInfo: MediaCodec.CryptoInfo?
)
Unit
onSampleDataFound(trackIndex: Int, sampleData: MediaParser.InputReader!)
Unit
Unit
onTrackCountFound(numberOfTracks: Int)
Unit
onTrackDataFound(trackIndex: Int, trackData: MediaParser.TrackData!)
Unit

Sets the ExtractorOutput to which MediaParser's output is directed.

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

Sets Format information associated to the caption tracks multiplexed in the media.

Unit
setSampleTimestampUpperLimitFilterUs(
    sampleTimestampUpperLimitFilterUs: Long
)

Sets an upper limit for sample timestamp filtering.

Unit

Defines the container MIME type to propagate through format.

Unit

Sets a TimestampAdjuster for adjusting the timestamps of the output samples.

Public properties

MediaParser.SeekMap?

Public constructors

OutputConsumerAdapterV30

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

Creates a new instance.

Parameters
primaryTrackManifestFormat: Format?

The manifest-obtained format of the primary track, or null if not applicable.

@C.TrackType primaryTrackType: Int

The type of the primary track. TRACK_TYPE_NONE if there is no primary track.

expectDummySeekMap: Boolean

Whether the output consumer should expect an initial dummy seek map which should be exposed through getDummySeekMap.

Public functions

disableSeeking

fun disableSeeking(): Unit

Overrides future received SeekMaps with non-seekable instances.

getChunkIndex

fun getChunkIndex(): ChunkIndex?

Returns the most recently output 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 instances corresponding to the given timestamp.

Parameters
seekTimeUs: Long

The timestamp in microseconds to retrieve MediaParser.SeekPoint instances for.

Returns
Pair<MediaParser.SeekPoint!, MediaParser.SeekPoint!>!

The MediaParser.SeekPoint 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

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 to which MediaParser's output is directed.

setMuxedCaptionFormats

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

Sets 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

The maximum allowed sample timestamp, or TIME_UNSET to remove filtering.

setSelectedParserName

fun setSelectedParserName(parserName: String!): Unit

Defines the container MIME type to propagate through format.

Parameters
parserName: String!

The name of the selected parser.

setTimestampAdjuster

fun setTimestampAdjuster(timestampAdjuster: TimestampAdjuster!): Unit

Sets a TimestampAdjuster for adjusting the timestamps of the output samples.

Public properties

dummySeekMap

val dummySeekMapMediaParser.SeekMap?