AudioProcessor.StreamMetadata


public final class AudioProcessor.StreamMetadata


Record class that holds information about the underlying stream being processed by an AudioProcessor

Summary

Nested types

A builder for StreamMetadata.

Constants

static final AudioProcessor.StreamMetadata

A StreamMetadata instance populated with default values.

Public fields

final @Nullable Object

The period UID of the current playback this audio processor is used for, or null if undefined.

final long

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

final Timeline

The Timeline of the current playback this audio processor is used for, or EMPTY if undefined.

Public constructors

StreamMetadata(long positionOffsetUs)

This method is deprecated.

Use Builder instead.

Public methods

AudioProcessor.StreamMetadata.Builder

Creates a Builder populated with the values from this object.

Constants

DEFAULT

public static final AudioProcessor.StreamMetadata DEFAULT

A StreamMetadata instance populated with default values.

Public fields

periodUid

public final @Nullable Object periodUid

The period UID of the current playback this audio processor is used for, or null if undefined.

The 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 value will not be updated until the next call to flush.

positionOffsetUs

public final long positionOffsetUs

The position of the underlying stream 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 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 value will not be updated until the next call to flush.

timeline

public final Timeline timeline

The Timeline of the current playback this audio processor is used for, or EMPTY if undefined.

The 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 value will not be updated until the next call to flush.

Public constructors

StreamMetadata

public StreamMetadata(long positionOffsetUs)

Public methods

buildUpon

public AudioProcessor.StreamMetadata.Builder buildUpon()

Creates a Builder populated with the values from this object.