Back to Exoplayer

Package com.google.android.exoplayer2.testutil

docs/doc/reference/com/google/android/exoplayer2/testutil/package-summary.html

latest32.4 KB
Original Source

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 for Extractor instances. | | FakeMediaPeriod.TrackDataFactory | A factory to create the test data for a particular track. | | FakeTrackOutput.Factory | Factory for FakeTrackOutput instances. | | HostActivity.HostedTest | Interface for tests that run inside of a HostActivity. | | MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T extends FilterableManifest<T>> | Interface to create media periods for testing based on a FilterableManifest. | | VideoFrameProcessorTestRunner.BitmapReader | Reads a Bitmap from VideoFrameProcessor output. | | VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener | |

Class Summary | Class | Description | | --- | --- | | Action | Base class for actions to perform during playback tests. | | Action.AddMediaItems | Calls ExoPlayer.addMediaSources(List). | | Action.ClearMediaItems | Calls Player.clearMediaItems()}. | | Action.ClearVideoSurface | Calls Player.clearVideoSurface(). | | Action.ExecuteRunnable | Calls Runnable.run(). | | Action.MoveMediaItem | Calls Player.moveMediaItem(int, int). | | Action.PlayUntilPosition | Schedules a play action to be executed, waits until the player reaches the specified position, and pauses the player again. | | Action.Prepare | Calls Player.prepare(). | | Action.RemoveMediaItem | Calls Player.removeMediaItem(int). | | Action.RemoveMediaItems | Calls Player.removeMediaItems(int, int). | | Action.Seek | Calls Player.seekTo(long) or Player.seekTo(int, long). | | Action.SendMessages | Calls ExoPlayer.createMessage(Target) and PlayerMessage.send(). | | Action.SetAudioAttributes | Calls ExoPlayer.setAudioAttributes(AudioAttributes, boolean). | | Action.SetMediaItems | Calls ExoPlayer.setMediaSources(List, int, long). | | Action.SetMediaItemsResetPosition | Calls ExoPlayer.setMediaSources(List, boolean). | | Action.SetPlaybackParameters | Calls Player.setPlaybackParameters(PlaybackParameters). | | Action.SetPlayWhenReady | Calls Player.setPlayWhenReady(boolean). | | Action.SetRendererDisabled | Updates the DefaultTrackSelector.Parameters of a DefaultTrackSelector to specify whether the renderer at a given index should be disabled. | | Action.SetRepeatMode | Calls Player.setRepeatMode(int). | | Action.SetShuffleModeEnabled | Calls Player.setShuffleModeEnabled(boolean). | | Action.SetShuffleOrder | Calls ExoPlayer.setShuffleOrder(ShuffleOrder) . | | Action.SetVideoSurface | Calls Player.setVideoSurface(Surface). | | Action.Stop | Calls Player.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 to Player.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 to Player.Listener.onPlaybackStateChanged(int). | | Action.WaitForPlayWhenReady | Waits for a specified playWhenReady value, returning either immediately or after a call to Player.Listener.onPlayWhenReadyChanged(boolean, int). | | Action.WaitForPositionDiscontinuity | Waits for Player.Listener.onPositionDiscontinuity(Player.PositionInfo, Player.PositionInfo, int). | | Action.WaitForTimelineChanged | Waits for Player.Listener.onTimelineChanged(Timeline, int). | | ActionSchedule | Schedules a sequence of Actions for execution during a test. | | ActionSchedule.Builder | A builder for ActionSchedule instances. | | ActionSchedule.PlayerRunnable | Provides a wrapper for a Runnable which has access to the player. | | ActionSchedule.PlayerTarget | Provides a wrapper for a PlayerMessage.Target which has access to the player when handling messages. | | AdditionalFailureInfo | A JUnit Rule that attaches additional info to any errors/exceptions thrown by the test. | | AssetContentProvider | A ContentProvider for reading asset data. | | BitmapPixelTestUtil | Utilities for pixel tests. | | CacheAsserts | Assertion methods for Cache. | | CacheAsserts.RequestSet | Defines a set of data requests. | | CapturingAudioSink | A ForwardingAudioSink that captures configuration, discontinuity and buffer events. | | CapturingRenderersFactory | A RenderersFactory that captures interactions with the audio and video MediaCodecAdapter instances. | | DataSourceContractTest | A collection of contract tests for DataSource implementations. | | DataSourceContractTest.FakeTransferListener | A TransferListener that only keeps track of the transferred bytes. | | DataSourceContractTest.TestResource | Information about a resource that can be used to test the DataSource instance. | | DataSourceContractTest.TestResource.Builder | Builder for DataSourceContractTest.TestResource instances. | | DecodeOneFrameUtil | Utilities for decoding a video frame for tests. | | DecoderCountersUtil | Assertions for DecoderCounters. | | DefaultRenderersFactoryAsserts | Assertions for DefaultRenderersFactory. | | DownloadBuilder | Builder for Download. | | DummyMainThread | Helper class to simulate main/UI thread in tests. | | DumpableFormat | Wraps a Format 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 | A HostActivity.HostedTest for ExoPlayer playback tests. | | ExoPlayerTestRunner | Helper class to run an ExoPlayer test. | | ExoPlayerTestRunner.Builder | Builder to set-up an ExoPlayerTestRunner. | | ExtractorAsserts | Assertion methods for Extractor. | | ExtractorAsserts.AssertionConfig | A config for the assertions made (e.g. | | ExtractorAsserts.AssertionConfig.Builder | Builder for ExtractorAsserts.AssertionConfig instances. | | ExtractorAsserts.SimulationConfig | A config of different environments to simulate and extractor behaviours to test. | | FailOnCloseDataSink | A DataSink that can simulate caching the bytes being written to it, and then failing to persist them when FailOnCloseDataSink.close() is called. | | FailOnCloseDataSink.Factory | Factory to create a FailOnCloseDataSink. | | FakeAdaptiveDataSet | Fake data set emulating the data of an adaptive media source. | | FakeAdaptiveDataSet.Factory | Factory for FakeAdaptiveDataSets. | | FakeAdaptiveDataSet.Iterator | MediaChunkIterator for the chunks defined by a fake adaptive data set. | | FakeAdaptiveMediaPeriod | Fake MediaPeriod that provides tracks from the given TrackGroupArray. | | FakeAdaptiveMediaSource | Fake MediaSource that provides a given timeline. | | FakeAudioRenderer | A FakeRenderer that supports C.TRACK_TYPE_AUDIO. | | FakeChunkSource | Fake ChunkSource with adaptive media chunks of a given duration. | | FakeChunkSource.Factory | Factory for a FakeChunkSource. | | FakeClock | Fake Clock implementation that allows to advance the time manually to trigger pending timed messages. | | FakeCryptoConfig | Fake CryptoConfig. | | FakeDataSet | Collection of FakeDataSet.FakeData to be served by a FakeDataSource. | | FakeDataSet.FakeData | Container of fake data to be served by a FakeDataSource. | | FakeDataSet.FakeData.Segment | A segment of FakeDataSet.FakeData. | | FakeDataSource | A fake DataSource capable of simulating various scenarios. | | FakeDataSource.Factory | Factory to create a FakeDataSource. | | FakeExoMediaDrm | A fake implementation of ExoMediaDrm for use in tests. | | FakeExoMediaDrm.Builder | Builder for FakeExoMediaDrm instances. | | FakeExoMediaDrm.LicenseServer | An license server implementation to interact with FakeExoMediaDrm. | | FakeExtractorInput | A fake ExtractorInput capable of simulating various scenarios. | | FakeExtractorInput.Builder | Builder of FakeExtractorInput instances. | | FakeExtractorOutput | A fake ExtractorOutput. | | FakeMediaChunk | Fake MediaChunk. | | FakeMediaChunkIterator | Fake MediaChunkIterator. | | FakeMediaClockRenderer | Fake abstract Renderer which is also a MediaClock. | | FakeMediaPeriod | Fake MediaPeriod that provides tracks from the given TrackGroupArray. | | FakeMediaSource | Fake MediaSource that provides a given timeline. | | FakeMediaSource.InitialTimeline | A forwarding timeline to provide an initial timeline for fake multi window sources. | | FakeMediaSourceFactory | Fake MediaSourceFactory that creates a FakeMediaSource. | | FakeMetadataEntry | A fake Metadata.Entry. | | FakeMultiPeriodLiveTimeline | A fake Timeline that produces a live window with periods according to the available time range. | | FakeRenderer | Fake Renderer that supports any format with the matching track type. | | FakeSampleStream | Fake SampleStream that outputs a given Format and any amount of items. | | FakeSampleStream.FakeSampleStreamItem | Item to customize a return value of SampleStream.readData(com.google.android.exoplayer2.FormatHolder, com.google.android.exoplayer2.decoder.DecoderInputBuffer, @com.google.android.exoplayer2.source.SampleStream.ReadFlags int). | | FakeShuffleOrder | Fake ShuffleOrder which returns a reverse order. | | FakeTimeline | Fake Timeline which can be setup to return custom FakeTimeline.TimelineWindowDefinitions. | | FakeTimeline.TimelineWindowDefinition | Definition used to define a FakeTimeline. | | FakeTrackOutput | A fake TrackOutput. | | FakeTrackSelection | A fake ExoTrackSelection that only returns 1 fixed track, and allows querying the number of calls to its methods. | | FakeTrackSelector | A fake MappingTrackSelector that returns FakeTrackSelections. | | FakeVideoRenderer | A FakeRenderer that supports C.TRACK_TYPE_VIDEO. | | HostActivity | A host activity for performing playback tests. | | HttpDataSourceTestEnv | A JUnit Rule that creates test resources for HttpDataSource contract tests. | | MediaPeriodAsserts | Assertion methods for MediaPeriod. | | MediaSourceTestRunner | A runner for MediaSource tests. | | OggFileAudioBufferSink | A sink for audio buffers that writes output audio as .ogg files with a given path prefix. | | StubExoPlayer | An abstract ExoPlayer implementation that throws UnsupportedOperationException from every method. | | StubPlayer | An abstract Player implementation that throws UnsupportedOperationException from every method. | | TestExoPlayerBuilder | A builder of ExoPlayer instances for testing. | | TestUtil | Utility methods for tests. | | TimelineAsserts | Assertion methods for Timeline. | | VideoFrameProcessorTestRunner | A test runner for VideoFrameProcessor tests. | | VideoFrameProcessorTestRunner.Builder | A builder for VideoFrameProcessorTestRunner instances. |

VideoFrameProcessorTestRunner.SurfaceBitmapReader
WebServerDispatcher
A Dispatcher for MockWebServer that allows per-path customisation of the static data served.
WebServerDispatcher.Resource
A resource served by WebServerDispatcher.
WebServerDispatcher.Resource.Builder
Builder for WebServerDispatcher.Resource.

Exception Summary | Exception | Description | | --- | --- | | FakeExtractorInput.SimulatedIOException | Thrown when simulating an IOException. |