Back to Exoplayer

FakeAdaptiveDataSet.Factory (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/FakeAdaptiveDataSet.Factory.html

latest3.4 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class FakeAdaptiveDataSet.Factory


public static final classFakeAdaptiveDataSet.Factoryextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Factory for FakeAdaptiveDataSets.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Factory​(long chunkDurationUs, double bitratePercentStdDev, Random random) | Set up factory for FakeAdaptiveDataSets with a chunk duration and the standard deviation of the chunk size. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | FakeAdaptiveDataSet | createDataSet​(TrackGroup trackGroup, long mediaDurationUs) | Returns a new FakeAdaptiveDataSet for the given TrackGroup. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Factory

public Factory​(long chunkDurationUs,
               double bitratePercentStdDev,[Random](https://developer.android.com/reference/java/util/Random.html "class or interface in java.util")random)

Set up factory for FakeAdaptiveDataSets with a chunk duration and the standard deviation of the chunk size. Parameters:chunkDurationUs - The chunk duration to use in microseconds.bitratePercentStdDev - The standard deviation used to generate the chunk sizes centered around the average bitrate of the Formats. The standard deviation is given in percent (of the average size).random - The random number generator used to generate the chunk size variation.

Method Detail

- 

createDataSet

public[FakeAdaptiveDataSet](FakeAdaptiveDataSet.html "class in com.google.android.exoplayer2.testutil")createDataSet​([TrackGroup](../source/TrackGroup.html "class in com.google.android.exoplayer2.source")trackGroup,
                                         long mediaDurationUs)

Returns a new FakeAdaptiveDataSet for the given TrackGroup. Parameters:trackGroup - The TrackGroup for which the data set is to be created.mediaDurationUs - The total duration of the fake data set in microseconds.