FakeMediaPeriod.TrackDataFactory


public interface FakeMediaPeriod.TrackDataFactory


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

Summary

Public methods

abstract List<FakeSampleStream.FakeSampleStreamItem>
create(Format format, MediaSource.MediaPeriodId mediaPeriodId)

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

default static FakeMediaPeriod.TrackDataFactory
singleSampleWithTimeUs(long sampleTimeUs)

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

Public methods

create

abstract List<FakeSampleStream.FakeSampleStreamItemcreate(Format format, MediaSource.MediaPeriodId mediaPeriodId)

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.

MediaSource.MediaPeriodId mediaPeriodId

The MediaPeriodId to provide data for.

singleSampleWithTimeUs

default static FakeMediaPeriod.TrackDataFactory singleSampleWithTimeUs(long sampleTimeUs)

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