package

androidx.media3.test.utils

Interfaces

ActionSchedule.CallbackCallback to notify listener that the action schedule has finished.
ActionSchedule.PlayerTarget.CallbackCallback to be called when message arrives.
CapturingRenderersFactory.TextRendererFactoryA factory for Renderer instances that handle C.TRACK_TYPE_TEXT tracks.
DecodeOneFrameUtil.ListenerListener for decoding events.
DummyMainThread.TestRunnablejava.lang.Runnable variant which can throw a checked exception.
Dumper.DumpableProvides custom dump method.
ExtractorAsserts.ExtractorFactoryA factory for Extractor instances.
FakeMediaPeriod.TrackDataFactoryA factory to create the test data for a particular track.
FakeTrackOutput.FactoryFactory for FakeTrackOutput instances.
HostActivity.HostedTestInterface for tests that run inside of a HostActivity.
MediaPeriodAsserts.FilterableManifestMediaPeriodFactory<T>Interface to create media periods for testing based on a FilterableManifest.
VideoFrameProcessorTestRunner.BitmapReaderReads a Bitmap from VideoFrameProcessor output.
VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener
VideoFrameProcessorTestRunner.OnVideoFrameProcessingEndedListener

Classes

ActionBase class for actions to perform during playback tests.
Action.AddMediaItemsCalls ExoPlayer.addMediaSources(List).
Action.ClearMediaItemsCalls Player.clearMediaItems()}.
Action.ClearVideoSurfaceCalls Player.clearVideoSurface().
Action.ExecuteRunnableCalls Runnable.run().
Action.MoveMediaItemCalls Player.moveMediaItem(int, int).
Action.PlayUntilPositionSchedules a play action to be executed, waits until the player reaches the specified position, and pauses the player again.
Action.PrepareCalls Player.prepare().
Action.RemoveMediaItemCalls Player.removeMediaItem(int).
Action.RemoveMediaItemsCalls Player.removeMediaItems(int, int).
Action.SeekCalls Player.seekTo(long) or Player.seekTo(int, long).
Action.SendMessagesCalls ExoPlayer and PlayerMessage.send().
Action.SetAudioAttributesCalls Player.setAudioAttributes(AudioAttributes, boolean).
Action.SetMediaItemsCalls ExoPlayer.setMediaSources(List, int, long).
Action.SetMediaItemsResetPositionCalls ExoPlayer.setMediaSources(List, boolean).
Action.SetPlaybackParametersCalls Player.setPlaybackParameters(PlaybackParameters).
Action.SetPlayWhenReadyCalls Player.setPlayWhenReady(boolean).
Action.SetRendererDisabledUpdates the DefaultTrackSelector.Parameters of a DefaultTrackSelector to specify whether the renderer at a given index should be disabled.
Action.SetRepeatModeCalls Player.setRepeatMode(int).
Action.SetShuffleModeEnabledCalls Player.setShuffleModeEnabled(boolean).
Action.SetShuffleOrderCalls ExoPlayer.setShuffleOrder(ShuffleOrder) .
Action.SetVideoSurfaceCalls Player.setVideoSurface(Surface).
Action.StopCalls Player.stop().
Action.ThrowPlaybackExceptionThrows a playback exception on the playback thread.
Action.WaitForIsLoadingWaits for a specified loading state, returning either immediately or after a call to .
Action.WaitForMessageWaits for a player message to arrive.
Action.WaitForPendingPlayerCommandsWaits until the player acknowledged all pending player commands.
Action.WaitForPlaybackStateWaits for a specified playback state, returning either immediately or after a call to .
Action.WaitForPlayWhenReadyWaits for a specified playWhenReady value, returning either immediately or after a call to .
Action.WaitForPositionDiscontinuityWaits for .
Action.WaitForTimelineChangedWaits for .
ActionScheduleSchedules a sequence of Actions for execution during a test.
ActionSchedule.BuilderA builder for ActionSchedule instances.
ActionSchedule.PlayerRunnableProvides a wrapper for a java.lang.Runnable which has access to the player.
ActionSchedule.PlayerTargetProvides a wrapper for a PlayerMessage.Target which has access to the player when handling messages.
AdditionalFailureInfoA JUnit that attaches additional info to any errors/exceptions thrown by the test.
AssetContentProviderA ContentProvider for reading asset data.
BitmapPixelTestUtilUtilities for pixel tests.
BitmapPixelTestUtil.ImageBufferRepresents a java.nio.ByteBuffer read from an Image.
CacheAssertsAssertion methods for Cache.
CacheAsserts.RequestSetDefines a set of data requests.
CapturingAudioSinkA ForwardingAudioSink that captures configuration, discontinuity and buffer events.
CapturingImageOutputA ImageOutput that captures image availability events.
CapturingRenderersFactoryA RenderersFactory that captures interactions with the audio and video MediaCodecAdapter instances and ImageOutput instances.
DataSourceContractTestA collection of contract tests for DataSource implementations.
DataSourceContractTest.FakeTransferListenerA TransferListener that only keeps track of the transferred bytes.
DataSourceContractTest.TestResourceInformation about a resource that can be used to test the DataSource instance.
DataSourceContractTest.TestResource.BuilderBuilder for DataSourceContractTest.TestResource instances.
DecodeOneFrameUtilUtilities for decoding a video frame for tests.
DecoderCountersUtilAssertions for DecoderCounters.
DefaultRenderersFactoryAssertsAssertions for DefaultRenderersFactory.
DownloadBuilderBuilder for Download.
DummyMainThreadHelper class to simulate main/UI thread in tests.
DumpableFormatWraps a Format to allow dumping it.
DumpableMp4BoxWraps an Mp4 box to allow dumping it.
DumperHelper utility to dump field values.
DumpFileAssertsHelper class to enable assertions based on golden-data dump files.
ExoHostedTestA HostActivity.HostedTest for ExoPlayer playback tests.
ExoPlayerTestRunnerHelper class to run an ExoPlayer test.
ExoPlayerTestRunner.BuilderBuilder to set-up an ExoPlayerTestRunner.
ExtractorAssertsAssertion methods for Extractor.
ExtractorAsserts.AssertionConfigA config for the assertions made (e.g.
ExtractorAsserts.AssertionConfig.BuilderBuilder for ExtractorAsserts.AssertionConfig instances.
ExtractorAsserts.SimulationConfigA config of different environments to simulate and extractor behaviours to test.
FailOnCloseDataSinkA DataSink that can simulate caching the bytes being written to it, and then failing to persist them when FailOnCloseDataSink.close() is called.
FailOnCloseDataSink.FactoryFactory to create a FailOnCloseDataSink.
FakeAdaptiveDataSetFake data set emulating the data of an adaptive media source.
FakeAdaptiveDataSet.FactoryFactory for FakeAdaptiveDataSets.
FakeAdaptiveDataSet.IteratorMediaChunkIterator for the chunks defined by a fake adaptive data set.
FakeAdaptiveMediaPeriodFake MediaPeriod that provides tracks from the given TrackGroupArray.
FakeAdaptiveMediaSourceFake MediaSource that provides a given timeline.
FakeAudioRendererA FakeRenderer that supports C.TRACK_TYPE_AUDIO.
FakeChunkSourceFake ChunkSource with adaptive media chunks of a given duration.
FakeChunkSource.FactoryFactory for a FakeChunkSource.
FakeClockFake Clock implementation that allows to advance the time manually to trigger pending timed messages.
FakeClock.HandlerMessageMessage data saved to send messages or execute runnables at a later time on a Handler.
FakeCryptoConfigFake CryptoConfig.
FakeDataSetCollection of FakeDataSet.FakeData to be served by a FakeDataSource.
FakeDataSet.FakeDataContainer of fake data to be served by a FakeDataSource.
FakeDataSet.FakeData.SegmentA segment of FakeDataSet.FakeData.
FakeDataSourceA fake DataSource capable of simulating various scenarios.
FakeDataSource.FactoryFactory to create a FakeDataSource.
FakeExoMediaDrmA fake implementation of ExoMediaDrm for use in tests.
FakeExoMediaDrm.BuilderBuilder for FakeExoMediaDrm instances.
FakeExoMediaDrm.LicenseServerAn license server implementation to interact with FakeExoMediaDrm.
FakeExtractorInputA fake ExtractorInput capable of simulating various scenarios.
FakeExtractorInput.BuilderBuilder of FakeExtractorInput instances.
FakeExtractorOutputA fake ExtractorOutput.
FakeMediaChunkFake MediaChunk.
FakeMediaChunkIteratorFake MediaChunkIterator.
FakeMediaClockRendererFake abstract Renderer which is also a MediaClock.
FakeMediaPeriodFake MediaPeriod that provides tracks from the given TrackGroupArray.
FakeMediaSourceFake MediaSource that provides a given timeline.
FakeMediaSource.InitialTimelineA forwarding timeline to provide an initial timeline for fake multi window sources.
FakeMediaSourceFactoryFake MediaSourceFactory that creates a FakeMediaSource.
FakeMetadataEntryA fake .
FakeMultiPeriodLiveTimelineA fake Timeline that produces a live window with periods according to the available time range.
FakeRendererFake Renderer that supports any format with the matching track type.
FakeSampleStreamFake SampleStream that outputs a given Format and any amount of items.
FakeSampleStream.FakeSampleStreamItemItem to customize a return value of SampleStream.readData(FormatHolder, DecoderInputBuffer, int).
FakeShuffleOrderFake ShuffleOrder which returns a reverse order.
FakeSuitableOutputCheckerFake implementation for SuitableOutputChecker.
FakeSuitableOutputChecker.BuilderBuilder for FakeSuitableOutputChecker instance.
FakeTimelineFake Timeline which can be setup to return custom FakeTimeline.TimelineWindowDefinitions.
FakeTimeline.TimelineWindowDefinitionDefinition used to define a FakeTimeline.
FakeTrackOutputA fake TrackOutput.
FakeTrackSelectionA fake ExoTrackSelection that only returns 1 fixed track, and allows querying the number of calls to its methods.
FakeTrackSelectorA fake MappingTrackSelector that returns FakeTrackSelections.
FakeVideoRendererA FakeRenderer that supports C.TRACK_TYPE_VIDEO.
HostActivityA host activity for performing playback tests.
HttpDataSourceTestEnvA JUnit that creates test resources for HttpDataSource contract tests.
MediaPeriodAssertsAssertion methods for MediaPeriod.
MediaSourceTestRunnerA runner for MediaSource tests.
MssimCalculatorImage comparison tool that calculates the Mean Structural Similarity (MSSIM) of two images, developed by Wang, Bovik, Sheikh, and Simoncelli.
NoUidTimelineA timeline which wraps another timeline and overrides all window and period uids to 0.
OggFileAudioBufferSinkA sink for audio buffers that writes output audio as .ogg files with a given path prefix.
SsimHelperA helper for calculating SSIM score for transcoded videos.
StubExoPlayerAn abstract ExoPlayer implementation that throws java.lang.UnsupportedOperationException from every method.
StubPlayerAn abstract Player implementation that throws java.lang.UnsupportedOperationException from every method.
TestExoPlayerBuilderA builder of ExoPlayer instances for testing.
TestSpeedProviderSpeedProvider for tests
TestUtilUtility methods for tests.
TextureBitmapReader
ThreadTestUtilStatic utility to coordinate threads in testing environments.
TimelineAssertsAssertion methods for Timeline.
VideoDecodingWrapperA wrapper for decoding a video using MediaCodec.
VideoFrameProcessorTestRunnerA test runner for VideoFrameProcessor tests.
VideoFrameProcessorTestRunner.BuilderA builder for VideoFrameProcessorTestRunner instances.
VideoFrameProcessorTestRunner.SurfaceBitmapReader
WebServerDispatcherA for that allows per-path customisation of the static data served.
WebServerDispatcher.ResourceA resource served by WebServerDispatcher.
WebServerDispatcher.Resource.BuilderBuilder for WebServerDispatcher.Resource.