Interface FakeMediaPeriod.TrackDataFactory
-
- Enclosing class:
- FakeMediaPeriod
public static interface FakeMediaPeriod.TrackDataFactory
A factory to create the test data for a particular track.
-
-
Method Summary
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 ofFakeSampleStream.FakeSampleStreamItem
s 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 withtime=sampleTimeUs
and then end-of-stream.
-
-
-
Method Detail
-
create
List<FakeSampleStream.FakeSampleStreamItem> create(Format format, MediaSource.MediaPeriodId mediaPeriodId)
Returns the list ofFakeSampleStream.FakeSampleStreamItem
s that will be written the sample queue during playback.- Parameters:
format
- The format of the track to provide data for.mediaPeriodId
- TheMediaSource.MediaPeriodId
to provide data for.- Returns:
- The track data in the form of
FakeSampleStream.FakeSampleStreamItem
s.
-
singleSampleWithTimeUs
static FakeMediaPeriod.TrackDataFactory singleSampleWithTimeUs(long sampleTimeUs)
Returns a factory that always provides a single keyframe sample withtime=sampleTimeUs
and then end-of-stream.
-
-