Package com.google.android.exoplayer2.testutil
-
Interface Summary Interface Description ActionSchedule.Callback Callback to notify listener that the action schedule has finished.ActionSchedule.PlayerTarget.Callback Callback to be called when message arrives.DecodeOneFrameUtil.Listener Listener for decoding events.DummyMainThread.TestRunnable Runnable
variant which can throw a checked exception.Dumper.Dumpable Provides custom dump method.ExtractorAsserts.ExtractorFactory A factory forExtractor
instances.FakeMediaPeriod.TrackDataFactory A factory to create the test data for a particular track.FakeTrackOutput.Factory Factory forFakeTrackOutput
instances.HostActivity.HostedTest Interface for tests that run inside of aHostActivity
.MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T extends FilterableManifest<T>> Interface to create media periods for testing based on aFilterableManifest
.VideoFrameProcessorTestRunner.BitmapReader Reads aBitmap
fromVideoFrameProcessor
output.VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener -
Class Summary Class Description Action Base class for actions to perform during playback tests.Action.AddMediaItems Action.ClearMediaItems CallsPlayer.clearMediaItems()
}.Action.ClearVideoSurface CallsPlayer.clearVideoSurface()
.Action.ExecuteRunnable CallsRunnable.run()
.Action.MoveMediaItem Action.PlayUntilPosition Schedules a play action to be executed, waits until the player reaches the specified position, and pauses the player again.Action.Prepare CallsPlayer.prepare()
.Action.RemoveMediaItem CallsPlayer.removeMediaItem(int)
.Action.RemoveMediaItems Action.Seek CallsPlayer.seekTo(long)
orPlayer.seekTo(int, long)
.Action.SendMessages Action.SetAudioAttributes Action.SetMediaItems Action.SetMediaItemsResetPosition Action.SetPlaybackParameters Action.SetPlayWhenReady Action.SetRendererDisabled Updates theDefaultTrackSelector.Parameters
of aDefaultTrackSelector
to specify whether the renderer at a given index should be disabled.Action.SetRepeatMode CallsPlayer.setRepeatMode(int)
.Action.SetShuffleModeEnabled Action.SetShuffleOrder Action.SetVideoSurface Action.Stop CallsPlayer.stop()
.Action.ThrowPlaybackException Throws a playback exception on the playback thread.Action.WaitForIsLoading Waits for a specified loading state, returning either immediately or after a call toPlayer.Listener.onIsLoadingChanged(boolean)
.Action.WaitForMessage Waits for a player message to arrive.Action.WaitForPendingPlayerCommands Waits until the player acknowledged all pending player commands.Action.WaitForPlaybackState Waits for a specified playback state, returning either immediately or after a call toPlayer.Listener.onPlaybackStateChanged(int)
.Action.WaitForPlayWhenReady Waits for a specified playWhenReady value, returning either immediately or after a call toPlayer.Listener.onPlayWhenReadyChanged(boolean, int)
.Action.WaitForPositionDiscontinuity Action.WaitForTimelineChanged ActionSchedule Schedules a sequence ofAction
s for execution during a test.ActionSchedule.Builder A builder forActionSchedule
instances.ActionSchedule.PlayerRunnable Provides a wrapper for aRunnable
which has access to the player.ActionSchedule.PlayerTarget Provides a wrapper for aPlayerMessage.Target
which has access to the player when handling messages.AdditionalFailureInfo A JUnitRule
that attaches additional info to any errors/exceptions thrown by the test.AssetContentProvider AContentProvider
for reading asset data.BitmapPixelTestUtil Utilities for pixel tests.CacheAsserts Assertion methods forCache
.CacheAsserts.RequestSet Defines a set of data requests.CapturingAudioSink AForwardingAudioSink
that captures configuration, discontinuity and buffer events.CapturingRenderersFactory ARenderersFactory
that captures interactions with the audio and videoMediaCodecAdapter
instances.DataSourceContractTest A collection of contract tests forDataSource
implementations.DataSourceContractTest.FakeTransferListener ATransferListener
that only keeps track of the transferred bytes.DataSourceContractTest.TestResource Information about a resource that can be used to test theDataSource
instance.DataSourceContractTest.TestResource.Builder Builder forDataSourceContractTest.TestResource
instances.DecodeOneFrameUtil Utilities for decoding a video frame for tests.DecoderCountersUtil Assertions forDecoderCounters
.DefaultRenderersFactoryAsserts Assertions forDefaultRenderersFactory
.DownloadBuilder Builder forDownload
.DummyMainThread Helper class to simulate main/UI thread in tests.DumpableFormat Wraps aFormat
to allow dumping it.DumpableMp4Box Wraps an Mp4 box to allow dumping it.Dumper Helper utility to dump field values.DumpFileAsserts Helper class to enable assertions based on golden-data dump files.ExoHostedTest AHostActivity.HostedTest
forExoPlayer
playback tests.ExoPlayerTestRunner Helper class to run an ExoPlayer test.ExoPlayerTestRunner.Builder Builder to set-up anExoPlayerTestRunner
.ExtractorAsserts Assertion methods forExtractor
.ExtractorAsserts.AssertionConfig A config for the assertions made (e.g.ExtractorAsserts.AssertionConfig.Builder Builder forExtractorAsserts.AssertionConfig
instances.ExtractorAsserts.SimulationConfig A config of different environments to simulate and extractor behaviours to test.FailOnCloseDataSink ADataSink
that can simulate caching the bytes being written to it, and then failing to persist them whenFailOnCloseDataSink.close()
is called.FailOnCloseDataSink.Factory Factory to create aFailOnCloseDataSink
.FakeAdaptiveDataSet Fake data set emulating the data of an adaptive media source.FakeAdaptiveDataSet.Factory Factory forFakeAdaptiveDataSet
s.FakeAdaptiveDataSet.Iterator MediaChunkIterator
for the chunks defined by a fake adaptive data set.FakeAdaptiveMediaPeriod FakeMediaPeriod
that provides tracks from the givenTrackGroupArray
.FakeAdaptiveMediaSource FakeMediaSource
that provides a given timeline.FakeAudioRenderer AFakeRenderer
that supportsC.TRACK_TYPE_AUDIO
.FakeChunkSource FakeChunkSource
with adaptive media chunks of a given duration.FakeChunkSource.Factory Factory for aFakeChunkSource
.FakeClock FakeClock
implementation that allows toadvance the time
manually to trigger pending timed messages.FakeCryptoConfig FakeCryptoConfig
.FakeDataSet Collection ofFakeDataSet.FakeData
to be served by aFakeDataSource
.FakeDataSet.FakeData Container of fake data to be served by aFakeDataSource
.FakeDataSet.FakeData.Segment A segment ofFakeDataSet.FakeData
.FakeDataSource A fakeDataSource
capable of simulating various scenarios.FakeDataSource.Factory Factory to create aFakeDataSource
.FakeExoMediaDrm A fake implementation ofExoMediaDrm
for use in tests.FakeExoMediaDrm.Builder Builder forFakeExoMediaDrm
instances.FakeExoMediaDrm.LicenseServer An license server implementation to interact withFakeExoMediaDrm
.FakeExtractorInput A fakeExtractorInput
capable of simulating various scenarios.FakeExtractorInput.Builder Builder ofFakeExtractorInput
instances.FakeExtractorOutput A fakeExtractorOutput
.FakeMediaChunk FakeMediaChunk
.FakeMediaChunkIterator FakeMediaChunkIterator
.FakeMediaClockRenderer Fake abstractRenderer
which is also aMediaClock
.FakeMediaPeriod FakeMediaPeriod
that provides tracks from the givenTrackGroupArray
.FakeMediaSource FakeMediaSource
that provides a given timeline.FakeMediaSource.InitialTimeline A forwarding timeline to provide an initial timeline for fake multi window sources.FakeMediaSourceFactory FakeMediaSourceFactory
that creates aFakeMediaSource
.FakeMetadataEntry A fakeMetadata.Entry
.FakeMultiPeriodLiveTimeline A fakeTimeline
that produces a live window with periods according to the available time range.FakeRenderer FakeRenderer
that supports any format with the matching track type.FakeSampleStream FakeSampleStream.FakeSampleStreamItem FakeShuffleOrder FakeShuffleOrder
which returns a reverse order.FakeTimeline FakeTimeline
which can be setup to return customFakeTimeline.TimelineWindowDefinition
s.FakeTimeline.TimelineWindowDefinition Definition used to define aFakeTimeline
.FakeTrackOutput A fakeTrackOutput
.FakeTrackSelection A fakeExoTrackSelection
that only returns 1 fixed track, and allows querying the number of calls to its methods.FakeTrackSelector A fakeMappingTrackSelector
that returnsFakeTrackSelection
s.FakeVideoRenderer AFakeRenderer
that supportsC.TRACK_TYPE_VIDEO
.HostActivity A host activity for performing playback tests.HttpDataSourceTestEnv A JUnitRule
that creates test resources forHttpDataSource
contract tests.MediaPeriodAsserts Assertion methods forMediaPeriod
.MediaSourceTestRunner A runner forMediaSource
tests.OggFileAudioBufferSink A sink for audio buffers that writes output audio as .ogg files with a given path prefix.StubExoPlayer An abstractExoPlayer
implementation that throwsUnsupportedOperationException
from every method.StubPlayer An abstractPlayer
implementation that throwsUnsupportedOperationException
from every method.TestExoPlayerBuilder A builder ofExoPlayer
instances for testing.TestUtil Utility methods for tests.TimelineAsserts Assertion methods forTimeline
.VideoFrameProcessorTestRunner A test runner forVideoFrameProcessor
tests.VideoFrameProcessorTestRunner.Builder A builder forVideoFrameProcessorTestRunner
instances.VideoFrameProcessorTestRunner.SurfaceBitmapReader WebServerDispatcher ADispatcher
forMockWebServer
that allows per-path customisation of the static data served.WebServerDispatcher.Resource A resource served byWebServerDispatcher
.WebServerDispatcher.Resource.Builder Builder forWebServerDispatcher.Resource
. -
Exception Summary Exception Description FakeExtractorInput.SimulatedIOException Thrown when simulating anIOException
.