FakeAdaptiveDataSet


@UnstableApi
class FakeAdaptiveDataSet : FakeDataSet


Fake data set emulating the data of an adaptive media source. It provides chunk data for all Formats in the given TrackGroup.

Summary

Nested types

Factory for FakeAdaptiveDataSets.

MediaChunkIterator for the chunks defined by a fake adaptive data set.

Public functions

Long
getChunkDuration(chunkIndex: Int)
Int
Long
getStartTime(chunkIndex: Int)
String!
getUri(trackIndex: Int)

Public properties

Int

Inherited functions

From androidx.media3.test.utils.FakeDataSet
ArrayList<FakeDataSet.FakeData!>!

Returns a list of all data including defaultData.

FakeDataSet.FakeData?
getData(uri: String!)

Returns the data for the given uri, or defaultData if no data is set.

FakeDataSet.FakeData?
getData(uri: Uri!)

Returns the data for the given uri, or defaultData if no data is set.

FakeDataSet.FakeData!
newData(uri: String!)

Returns a new FakeData with the given uri.

FakeDataSet.FakeData!
newData(uri: Uri!)

Returns a new FakeData with the given uri.

FakeDataSet.FakeData!

Sets the default data, overwrites if there is one already.

FakeDataSet!
setData(uri: String!, data: ByteArray!)

Sets the given data for the given uri.

FakeDataSet!
setData(uri: Uri!, data: ByteArray!)

Sets the given data for the given uri.

FakeDataSet!
setRandomData(uri: String!, length: Int)

Sets random data with the given length for the given uri.

FakeDataSet!
setRandomData(uri: Uri!, length: Int)

Sets random data with the given length for the given uri.

Public functions

getChunkDuration

fun getChunkDuration(chunkIndex: Int): Long

getChunkIndexByPosition

fun getChunkIndexByPosition(positionUs: Long): Int

getStartTime

fun getStartTime(chunkIndex: Int): Long

getUri

fun getUri(trackIndex: Int): String!

Public properties

chunkCount

val chunkCountInt