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.DummyMainThread.TestRunnable Runnablevariant which can throw a checked exception.Dumper.Dumpable Provides custom dump method.ExtractorAsserts.ExtractorFactory A factory forExtractorinstances.FakeMediaPeriod.TrackDataFactory A factory to create the test data for a particular track.FakeTrackOutput.Factory Factory forFakeTrackOutputinstances.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. -
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.Parametersof aDefaultTrackSelectorto 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()orPlayer.stop(boolean).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 ofActions for execution during a test.ActionSchedule.Builder A builder forActionScheduleinstances.ActionSchedule.PlayerRunnable Provides a wrapper for aRunnablewhich has access to the player.ActionSchedule.PlayerTarget Provides a wrapper for aPlayerMessage.Targetwhich has access to the player when handling messages.AdditionalFailureInfo A JUnitRulethat attaches additional info to any errors/exceptions thrown by the test.AssetContentProvider AContentProviderfor reading asset data.CacheAsserts Assertion methods forCache.CacheAsserts.RequestSet Defines a set of data requests.CapturingAudioSink AForwardingAudioSinkthat captures configuration, discontinuity and buffer events.CapturingRenderersFactory ARenderersFactorythat captures interactions with the audio and videoMediaCodecAdapterinstances.DataSourceContractTest A collection of contract tests forDataSourceimplementations.DataSourceContractTest.FakeTransferListener ATransferListenerthat only keeps track of the transferred bytes.DataSourceContractTest.TestResource Information about a resource that can be used to test theDataSourceinstance.DataSourceContractTest.TestResource.Builder Builder forDataSourceContractTest.TestResourceinstances.DecoderCountersUtil Assertions forDecoderCounters.DefaultRenderersFactoryAsserts Assertions forDefaultRenderersFactory.DownloadBuilder Builder forDownload.DummyMainThread Helper class to simulate main/UI thread in tests.DumpableFormat Wraps aFormatto allow dumping it.Dumper Helper utility to dump field values.DumpFileAsserts Helper class to enable assertions based on golden-data dump files.ExoHostedTest AHostActivity.HostedTestforExoPlayerplayback 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.AssertionConfiginstances.ExtractorAsserts.SimulationConfig A config of different environments to simulate and extractor behaviours to test.FailOnCloseDataSink ADataSinkthat 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 forFakeAdaptiveDataSets.FakeAdaptiveDataSet.Iterator MediaChunkIteratorfor the chunks defined by a fake adaptive data set.FakeAdaptiveMediaPeriod FakeMediaPeriodthat provides tracks from the givenTrackGroupArray.FakeAdaptiveMediaSource FakeMediaSourcethat provides a given timeline.FakeAudioRenderer AFakeRendererthat supportsC.TRACK_TYPE_AUDIO.FakeChunkSource FakeChunkSourcewith adaptive media chunks of a given duration.FakeChunkSource.Factory Factory for aFakeChunkSource.FakeClock FakeClockimplementation that allows toadvance the timemanually to trigger pending timed messages.FakeCryptoConfig FakeCryptoConfig.FakeDataSet Collection ofFakeDataSet.FakeDatato be served by aFakeDataSource.FakeDataSet.FakeData Container of fake data to be served by aFakeDataSource.FakeDataSet.FakeData.Segment A segment ofFakeDataSet.FakeData.FakeDataSource A fakeDataSourcecapable of simulating various scenarios.FakeDataSource.Factory Factory to create aFakeDataSource.FakeExoMediaDrm A fake implementation ofExoMediaDrmfor use in tests.FakeExoMediaDrm.Builder Builder forFakeExoMediaDrminstances.FakeExoMediaDrm.LicenseServer An license server implementation to interact withFakeExoMediaDrm.FakeExtractorInput A fakeExtractorInputcapable of simulating various scenarios.FakeExtractorInput.Builder Builder ofFakeExtractorInputinstances.FakeExtractorOutput A fakeExtractorOutput.FakeMediaChunk FakeMediaChunk.FakeMediaChunkIterator FakeMediaChunkIterator.FakeMediaClockRenderer Fake abstractRendererwhich is also aMediaClock.FakeMediaPeriod FakeMediaPeriodthat provides tracks from the givenTrackGroupArray.FakeMediaSource FakeMediaSourcethat provides a given timeline.FakeMediaSource.InitialTimeline A forwarding timeline to provide an initial timeline for fake multi window sources.FakeMediaSourceFactory FakeMediaSourceFactorythat creates aFakeMediaSource.FakeMetadataEntry A fakeMetadata.Entry.FakeRenderer FakeRendererthat supports any format with the matching track type.FakeSampleStream FakeSampleStream.FakeSampleStreamItem Item to customize a return value ofSampleStream.readData(com.google.android.exoplayer2.FormatHolder, com.google.android.exoplayer2.decoder.DecoderInputBuffer, int).FakeShuffleOrder FakeShuffleOrderwhich returns a reverse order.FakeTimeline FakeTimelinewhich can be setup to return customFakeTimeline.TimelineWindowDefinitions.FakeTimeline.TimelineWindowDefinition Definition used to define aFakeTimeline.FakeTrackOutput A fakeTrackOutput.FakeTrackSelection A fakeExoTrackSelectionthat only returns 1 fixed track, and allows querying the number of calls to its methods.FakeTrackSelector A fakeMappingTrackSelectorthat returnsFakeTrackSelections.FakeVideoRenderer AFakeRendererthat supportsC.TRACK_TYPE_VIDEO.HostActivity A host activity for performing playback tests.HttpDataSourceTestEnv A JUnitRulethat creates test resources forHttpDataSourcecontract tests.MediaPeriodAsserts Assertion methods forMediaPeriod.MediaSourceTestRunner A runner forMediaSourcetests.NoUidTimeline A timeline which wraps another timeline and overrides all window and period uids to 0.StubExoPlayer An abstractExoPlayerimplementation that throwsUnsupportedOperationExceptionfrom every method.StubPlayer An abstractPlayerimplementation that throwsUnsupportedOperationExceptionfrom every method.TestExoPlayerBuilder A builder ofSimpleExoPlayerinstances for testing.TestUtil Utility methods for tests.TimelineAsserts Assertion methods forTimeline.WebServerDispatcher ADispatcherforMockWebServerthat 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.