public static final class FakeSampleStream.FakeSampleStreamItem extends Object
FakeSampleStream.readData(com.google.android.exoplayer2.FormatHolder, com.google.android.exoplayer2.decoder.DecoderInputBuffer, boolean)
.Modifier and Type | Field | Description |
---|---|---|
static FakeSampleStream.FakeSampleStreamItem |
END_OF_STREAM_ITEM |
Item that designates the end of stream has been reached.
|
Modifier and Type | Method | Description |
---|---|---|
static FakeSampleStream.FakeSampleStreamItem |
format(Format format) |
Creates an item representing the provided format.
|
static FakeSampleStream.FakeSampleStreamItem |
oneByteSample(long timeUs) |
Creates an item representing a sample with the provided timestamp.
|
static FakeSampleStream.FakeSampleStreamItem |
oneByteSample(long timeUs,
int flags) |
Creates an item representing a sample with the provided timestamp and flags.
|
static FakeSampleStream.FakeSampleStreamItem |
sample(long timeUs,
int flags,
byte[] sampleData) |
Creates an item representing a sample with the provided timestamp, flags and data.
|
public static final FakeSampleStream.FakeSampleStreamItem END_OF_STREAM_ITEM
When this item is read, readData will repeatedly return end of stream.
public static FakeSampleStream.FakeSampleStreamItem format(Format format)
public static FakeSampleStream.FakeSampleStreamItem oneByteSample(long timeUs)
The sample will contain a single byte of data.
timeUs
- The timestamp of the sample.public static FakeSampleStream.FakeSampleStreamItem oneByteSample(long timeUs, @BufferFlags int flags)
The sample will contain a single byte of data.
timeUs
- The timestamp of the sample.flags
- The buffer flags that will be set when reading this sample through FakeSampleStream.readData(FormatHolder, DecoderInputBuffer, boolean)
.public static FakeSampleStream.FakeSampleStreamItem sample(long timeUs, @BufferFlags int flags, byte[] sampleData)
timeUs
- The timestamp of the sample.flags
- The buffer flags that will be set when reading this sample through FakeSampleStream.readData(FormatHolder, DecoderInputBuffer, boolean)
.sampleData
- The sample data.