Class FakeAdaptiveDataSet.Factory
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.FakeAdaptiveDataSet.Factory
-
- Enclosing class:
- FakeAdaptiveDataSet
public static final class FakeAdaptiveDataSet.Factory extends Object
Factory forFakeAdaptiveDataSet
s.
-
-
Constructor Summary
Constructors Constructor Description Factory(long chunkDurationUs, double bitratePercentStdDev, Random random)
Set up factory forFakeAdaptiveDataSet
s 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 newFakeAdaptiveDataSet
for the givenTrackGroup
.
-
-
-
Constructor Detail
-
Factory
public Factory(long chunkDurationUs, double bitratePercentStdDev, Random random)
Set up factory forFakeAdaptiveDataSet
s 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 theFormat
s. 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 createDataSet(TrackGroup trackGroup, long mediaDurationUs)
Returns a newFakeAdaptiveDataSet
for the givenTrackGroup
.- Parameters:
trackGroup
- TheTrackGroup
for which the data set is to be created.mediaDurationUs
- The total duration of the fake data set in microseconds.
-
-