FakeSampleStream.FakeSampleStreamItem


class FakeSampleStream.FakeSampleStreamItem


Item to customize a return value of readData.

Summary

Constants

const FakeSampleStream.FakeSampleStreamItem!

Item that designates the end of stream has been reached.

Public functions

java-static FakeSampleStream.FakeSampleStreamItem!
format(format: Format!)

Creates an item representing the provided format.

java-static FakeSampleStream.FakeSampleStreamItem!

Creates an item representing a sample with the provided timestamp.

java-static FakeSampleStream.FakeSampleStreamItem!
oneByteSample(timeUs: Long, @C.BufferFlags flags: Int)

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

java-static FakeSampleStream.FakeSampleStreamItem!
sample(timeUs: Long, @C.BufferFlags flags: Int, sampleData: ByteArray!)

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

Constants

END_OF_STREAM_ITEM

const val END_OF_STREAM_ITEMFakeSampleStream.FakeSampleStreamItem!

Item that designates the end of stream has been reached.

Public functions

format

java-static fun format(format: Format!): FakeSampleStream.FakeSampleStreamItem!

Creates an item representing the provided format.

oneByteSample

java-static fun oneByteSample(timeUs: Long): FakeSampleStream.FakeSampleStreamItem!

Creates an item representing a sample with the provided timestamp.

The sample will contain a single byte of data.

Parameters
timeUs: Long

The timestamp of the sample.

oneByteSample

java-static fun oneByteSample(timeUs: Long, @C.BufferFlags flags: Int): FakeSampleStream.FakeSampleStreamItem!

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

The sample will contain a single byte of data.

Parameters
timeUs: Long

The timestamp of the sample.

@C.BufferFlags flags: Int

The sample C.BufferFlags.

sample

java-static fun sample(timeUs: Long, @C.BufferFlags flags: Int, sampleData: ByteArray!): FakeSampleStream.FakeSampleStreamItem!

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

Parameters
timeUs: Long

The timestamp of the sample.

@C.BufferFlags flags: Int

The sample C.BufferFlags.

sampleData: ByteArray!

The sample data.