SubtitleInputBuffer


@UnstableApi
class SubtitleInputBuffer : DecoderInputBuffer


A DecoderInputBuffer for a SubtitleDecoder.

Summary

Public constructors

Public properties

Long

An offset that must be added to the subtitle's event times after it's been decoded, or OFFSET_SAMPLE_RELATIVE if timeUs should be added.

Inherited Constants

From androidx.media3.decoder.DecoderInputBuffer
const Int

Allows buffer replacement using allocateDirect.

const Int

Disallows buffer replacement.

const Int

Allows buffer replacement using allocate.

Inherited functions

From androidx.media3.decoder.Buffer
Unit

Adds the flag to this buffer's flags.

Unit

Removes the flag from this buffer's flags, if it is set.

Boolean

Returns whether the specified flag has been set on this buffer.

Boolean

Returns whether the BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA flag is set.

Boolean

This function is deprecated.

Check instead whether the buffer time is greater or equal to the desired start time.

Boolean

Returns whether the BUFFER_FLAG_END_OF_STREAM flag is set.

Boolean

Returns whether the BUFFER_FLAG_FIRST_SAMPLE flag is set.

Boolean

Returns whether the BUFFER_FLAG_KEY_FRAME flag is set.

Boolean

Returns whether the BUFFER_FLAG_LAST_SAMPLE flag is set.

Unit

Replaces this buffer's flags with flags.

From androidx.media3.decoder.DecoderInputBuffer
Unit

Clears the buffer.

Unit
@EnsuresNonNull(value = "data")
ensureSpaceForWrite(length: Int)

Ensures that data is large enough to accommodate a write of a given length at its current position.

Unit

Flips data and supplementalData in preparation for being queued to a decoder.

Boolean

Returns whether the BUFFER_FLAG_ENCRYPTED flag is set.

java-static DecoderInputBuffer!

Returns a new instance that's not able to hold any data.

Unit
@EnsuresNonNull(value = "supplementalData")
resetSupplementalData(length: Int)

Clears supplementalData and ensures that it's large enough to accommodate length bytes.

Inherited properties

From androidx.media3.decoder.DecoderInputBuffer
CryptoInfo!

CryptoInfo for encrypted data.

ByteBuffer?

The buffer's data, or null if no data has been set.

Format?

The Format.

ByteBuffer?

Supplemental data related to the buffer, if hasSupplementalData returns true.

Long

The time at which the sample should be presented.

Boolean

Whether the last attempt to read a sample into this buffer failed due to not yet having the DRM keys associated with the next sample.

Public constructors

SubtitleInputBuffer

SubtitleInputBuffer()

Public properties

subsampleOffsetUs

val subsampleOffsetUsLong

An offset that must be added to the subtitle's event times after it's been decoded, or OFFSET_SAMPLE_RELATIVE if timeUs should be added.