docs/doc/reference/com/google/android/exoplayer2/testutil/FakeSampleStream.FakeSampleStreamItem.html
Package com.google.android.exoplayer2.testutil
Enclosing class:FakeSampleStream
public static final classFakeSampleStream.FakeSampleStreamItemextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Item to customize a return value of SampleStream.readData(com.google.android.exoplayer2.FormatHolder, com.google.android.exoplayer2.decoder.DecoderInputBuffer, @com.google.android.exoplayer2.source.SampleStream.ReadFlags int).
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static FakeSampleStream.FakeSampleStreamItem | END_OF_STREAM_ITEM |
Item that designates the end of stream has been reached.
|
All Methods Static Methods Concrete Methods | 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, @com.google.android.exoplayer2.C.BufferFlags int flags) |
Creates an item representing a sample with the provided timestamp and flags.
|
| static FakeSampleStream.FakeSampleStreamItem | sample(long timeUs, @com.google.android.exoplayer2.C.BufferFlags int flags, byte[] sampleData) |
Creates an item representing a sample with the provided timestamp, flags and data.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final[FakeSampleStream.FakeSampleStreamItem](FakeSampleStream.FakeSampleStreamItem.html "class in com.google.android.exoplayer2.testutil")END_OF_STREAM_ITEM
Item that designates the end of stream has been reached.
-
public static[FakeSampleStream.FakeSampleStreamItem](FakeSampleStream.FakeSampleStreamItem.html "class in com.google.android.exoplayer2.testutil")format([Format](../Format.html "class in com.google.android.exoplayer2")format)
Creates an item representing the provided format.
-
public static[FakeSampleStream.FakeSampleStreamItem](FakeSampleStream.FakeSampleStreamItem.html "class in com.google.android.exoplayer2.testutil")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](FakeSampleStream.FakeSampleStreamItem.html "class in com.google.android.exoplayer2.testutil")oneByteSample(long timeUs,
@com.google.android.exoplayer2.C.BufferFlags 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 C.BufferFlags.
-
public static[FakeSampleStream.FakeSampleStreamItem](FakeSampleStream.FakeSampleStreamItem.html "class in com.google.android.exoplayer2.testutil")sample(long timeUs,
@com.google.android.exoplayer2.C.BufferFlags 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 C.BufferFlags.sampleData - The sample data.