Class FakeSampleStream.FakeSampleStreamItem
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.FakeSampleStream.FakeSampleStreamItem
-
- Enclosing class:
- FakeSampleStream
public static final class FakeSampleStream.FakeSampleStreamItem extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static FakeSampleStream.FakeSampleStreamItem
END_OF_STREAM_ITEM
Item that designates the end of stream has been reached.
-
Method Summary
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.
-
-
-
Field Detail
-
END_OF_STREAM_ITEM
public static final FakeSampleStream.FakeSampleStreamItem END_OF_STREAM_ITEM
Item that designates the end of stream has been reached.
-
-
Method Detail
-
format
public static FakeSampleStream.FakeSampleStreamItem format(Format format)
Creates an item representing the provided format.
-
oneByteSample
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.
-
oneByteSample
public 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.The sample will contain a single byte of data.
- Parameters:
timeUs
- The timestamp of the sample.flags
- The sampleC.BufferFlags
.
-
sample
public 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.- Parameters:
timeUs
- The timestamp of the sample.flags
- The sampleC.BufferFlags
.sampleData
- The sample data.
-
-