# FakeAdaptiveDataSet.Factory

# FakeAdaptiveDataSet.Factory

Artifact:[androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/FakeAdaptiveDataSet.java+class:androidx.media3.test.utils.FakeAdaptiveDataSet.Factory)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/test/utils/FakeAdaptiveDataSet.Factory "View this page in Java")

<br />

```
class FakeAdaptiveDataSet.Factory
```

<br />

*** ** * ** ***

Factory for[FakeAdaptiveDataSet](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakeAdaptiveDataSet)s.

## Summary

|                                                                                                                                                                                                                                                                                                                              ### Public constructors                                                                                                                                                                                                                                                                                                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Factory](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakeAdaptiveDataSet.Factory#Factory(long,double,java.util.Random))`(` ` chunkDurationUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` bitratePercentStdDev: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)`,` ` random: `[Random](https://developer.android.com/reference/java/util/Random.html)`!` `)` Set up factory for[FakeAdaptiveDataSet](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakeAdaptiveDataSet)s with a chunk duration and the standard deviation of the chunk size. |

|                                                  ### Public functions                                                   |
|-------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [FakeAdaptiveDataSet](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakeAdaptiveDataSet)`!` | [createDataSet](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakeAdaptiveDataSet.Factory#createDataSet(androidx.media3.common.TrackGroup,long))`(trackGroup: `[TrackGroup](https://developer.android.com/reference/kotlin/androidx/media3/common/TrackGroup)`!, mediaDurationUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Returns a new[FakeAdaptiveDataSet](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakeAdaptiveDataSet)for the given[TrackGroup](https://developer.android.com/reference/kotlin/androidx/media3/common/TrackGroup). |

## Public constructors

### Factory

```
Factory(
    chunkDurationUs: Long,
    bitratePercentStdDev: Double,
    random: Random!
)
```

Set up factory for[FakeAdaptiveDataSet](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakeAdaptiveDataSet)s with a chunk duration and the standard deviation of the chunk size.  

|                                                Parameters                                                 |
|-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `chunkDurationUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)          | The chunk duration to use in microseconds.                                                                                                                                                                                                                   |
| `bitratePercentStdDev: `[Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) | The standard deviation used to generate the chunk sizes centered around the average bitrate of the[Format](https://developer.android.com/reference/kotlin/androidx/media3/common/Format)s. The standard deviation is given in percent (of the average size). |
| `random: `[Random](https://developer.android.com/reference/java/util/Random.html)`!`                      | The random number generator used to generate the chunk size variation.                                                                                                                                                                                       |

## Public functions

### createDataSet

```
fun createDataSet(trackGroup: TrackGroup!, mediaDurationUs: Long): FakeAdaptiveDataSet!
```

Returns a new[FakeAdaptiveDataSet](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakeAdaptiveDataSet)for the given[TrackGroup](https://developer.android.com/reference/kotlin/androidx/media3/common/TrackGroup).  

|                                                   Parameters                                                    |
|-----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `trackGroup: `[TrackGroup](https://developer.android.com/reference/kotlin/androidx/media3/common/TrackGroup)`!` | The[TrackGroup](https://developer.android.com/reference/kotlin/androidx/media3/common/TrackGroup)for which the data set is to be created. |
| `mediaDurationUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                | The total duration of the fake data set in microseconds.                                                                                  |