public final class

FakeSampleStream.FakeSampleStreamItem

extends java.lang.Object

 java.lang.Object

↳androidx.media3.test.utils.FakeSampleStream.FakeSampleStreamItem

Overview

Item to customize a return value of SampleStream.readData(FormatHolder, DecoderInputBuffer, int).

Summary

Fields
public static final FakeSampleStream.FakeSampleStreamItemEND_OF_STREAM_ITEM

Item that designates the end of stream has been reached.

Methods
public static FakeSampleStream.FakeSampleStreamItemformat(Format format)

Creates an item representing the provided format.

public static FakeSampleStream.FakeSampleStreamItemoneByteSample(long timeUs)

Creates an item representing a sample with the provided timestamp.

public static FakeSampleStream.FakeSampleStreamItemoneByteSample(long timeUs, int flags)

Creates an item representing a sample with the provided timestamp and flags.

public static FakeSampleStream.FakeSampleStreamItemsample(long timeUs, int flags, byte[] sampleData[])

Creates an item representing a sample with the provided timestamp, flags and data.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final FakeSampleStream.FakeSampleStreamItem END_OF_STREAM_ITEM

Item that designates the end of stream has been reached.

Methods

public static FakeSampleStream.FakeSampleStreamItem format(Format format)

Creates an item representing the provided format.

public static FakeSampleStream.FakeSampleStreamItem oneByteSample(long timeUs)

Creates an item representing a sample with the provided timestamp.

The sample will contain a single byte of data.

Parameters:

timeUs: The timestamp of the sample.

public static FakeSampleStream.FakeSampleStreamItem oneByteSample(long timeUs, int flags)

Creates an item representing a sample with the provided timestamp and flags.

The sample will contain a single byte of data.

Parameters:

timeUs: The timestamp of the sample.
flags: The sample .

public static FakeSampleStream.FakeSampleStreamItem sample(long timeUs, int flags, byte[] sampleData[])

Creates an item representing a sample with the provided timestamp, flags and data.

Parameters:

timeUs: The timestamp of the sample.
flags: The sample .
sampleData: The sample data.