FakeMediaPeriod.TrackDataFactory


interface FakeMediaPeriod.TrackDataFactory


A factory to create the test data for a particular track.

Summary

Public functions

(Mutable)List<FakeSampleStream.FakeSampleStreamItem!>!
create(format: Format!, mediaPeriodId: MediaSource.MediaPeriodId!)

Returns the list of FakeSampleStream.FakeSampleStreamItems that will be written the sample queue during playback.

java-static FakeMediaPeriod.TrackDataFactory!

Returns a factory that always provides a single keyframe sample with time=sampleTimeUs and then end-of-stream.

Public functions

create

fun create(format: Format!, mediaPeriodId: MediaSource.MediaPeriodId!): (Mutable)List<FakeSampleStream.FakeSampleStreamItem!>!

Returns the list of FakeSampleStream.FakeSampleStreamItems that will be written the sample queue during playback.

Parameters
format: Format!

The format of the track to provide data for.

mediaPeriodId: MediaSource.MediaPeriodId!

The MediaPeriodId to provide data for.

singleSampleWithTimeUs

java-static fun singleSampleWithTimeUs(sampleTimeUs: Long): FakeMediaPeriod.TrackDataFactory!

Returns a factory that always provides a single keyframe sample with time=sampleTimeUs and then end-of-stream.