docs/doc/reference/com/google/android/exoplayer2/testutil/FakeMediaPeriod.TrackDataFactory.html
Package com.google.android.exoplayer2.testutil
public static interfaceFakeMediaPeriod.TrackDataFactory
A factory to create the test data for a particular track.
All Methods Static Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| List<FakeSampleStream.FakeSampleStreamItem> | create(Format format, MediaSource.MediaPeriodId mediaPeriodId) |
Returns the list of FakeSampleStream.FakeSampleStreamItems that will be written the sample queue during playback.
|
| static FakeMediaPeriod.TrackDataFactory | singleSampleWithTimeUs(long sampleTimeUs) |
Returns a factory that always provides a single keyframe sample with time=sampleTimeUs and then end-of-stream.
|
-
[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[FakeSampleStream.FakeSampleStreamItem](FakeSampleStream.FakeSampleStreamItem.html "class in com.google.android.exoplayer2.testutil")> create([Format](../Format.html "class in com.google.android.exoplayer2")format,[MediaSource.MediaPeriodId](../source/MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")mediaPeriodId)
Returns the list of FakeSampleStream.FakeSampleStreamItems that will be written the sample queue during playback.
Parameters:format - The format of the track to provide data for.mediaPeriodId - The MediaSource.MediaPeriodId to provide data for.Returns:The track data in the form of FakeSampleStream.FakeSampleStreamItems.
-
static[FakeMediaPeriod.TrackDataFactory](FakeMediaPeriod.TrackDataFactory.html "interface in com.google.android.exoplayer2.testutil")singleSampleWithTimeUs(long sampleTimeUs)
Returns a factory that always provides a single keyframe sample with time=sampleTimeUs and then end-of-stream.