AudioProcessor.StreamMetadata.Builder


class AudioProcessor.StreamMetadata.Builder


A builder for StreamMetadata.

Summary

Public constructors

Creates a new builder.

Public functions

AudioProcessor.StreamMetadata!

Builds a StreamMetadata instance.

AudioProcessor.StreamMetadata.Builder!

Sets the period UID of the current playback this audio processor is used for.

AudioProcessor.StreamMetadata.Builder!

Sets the stream position in microseconds from which the processor will start receiving input buffers after a call to flush.

AudioProcessor.StreamMetadata.Builder!

Sets the Timeline of the current playback this audio processor is used for.

Public constructors

Builder

Builder()

Creates a new builder.

Public functions

build

fun build(): AudioProcessor.StreamMetadata!

Builds a StreamMetadata instance.

setPeriodUid

@CanIgnoreReturnValue
fun setPeriodUid(periodUid: Any?): AudioProcessor.StreamMetadata.Builder!

Sets the period UID of the current playback this audio processor is used for.

If the period UID is non-null and the provided Timeline non-empty, this UID must be present in the provided Timeline.

Parameters
periodUid: Any?

The period UID or null to leave it undefined.

Returns
AudioProcessor.StreamMetadata.Builder!

This builder.

setPositionOffsetUs

@CanIgnoreReturnValue
fun setPositionOffsetUs(positionOffsetUs: Long): AudioProcessor.StreamMetadata.Builder!

Sets the stream position in microseconds from which the processor will start receiving input buffers after a call to flush.

The position offset is aligned to the Window start position.

The offset value is up-to-date at the time of the flush call, but might change due to updates to the media structure. In that case, the offset value will not be updated until the next call to flush.

Parameters
positionOffsetUs: Long

The stream position offset in microseconds.

Returns
AudioProcessor.StreamMetadata.Builder!

This builder.

setTimeline

@CanIgnoreReturnValue
fun setTimeline(timeline: Timeline!): AudioProcessor.StreamMetadata.Builder!

Sets the Timeline of the current playback this audio processor is used for.

Parameters
timeline: Timeline!

The Timeline.

Returns
AudioProcessor.StreamMetadata.Builder!

This builder.