FrameProcessorTestUtil


@RequiresApi(value = 26)
@UnstableApi
class FrameProcessorTestUtil


Test utilities for asserting FrameProcessor inputs.

Summary

Nested types

Represents a frame that is expected to be presented.

Public functions

java-static Unit
assertPlaybackOutput(
    frameProcessor: CapturingFrameProcessor!,
    compositionAssetInfo: CompositionAssetInfo!
)

Asserts the CapturingFrameProcessor consumes frames matching the CompositionAssetInfo, if it was played from start to finish.

java-static ImmutableList<(Mutable)List<FrameProcessorTestUtil.ExpectedFrame!>!>!
getExpectedEvents(compositionAssetInfo: CompositionAssetInfo!)

Returns the events expected to be consumed by the androidx.media3.common.video.FrameProcessor if the Composition was played from start to finish.

Public functions

assertPlaybackOutput

java-static fun assertPlaybackOutput(
    frameProcessor: CapturingFrameProcessor!,
    compositionAssetInfo: CompositionAssetInfo!
): Unit

Asserts the CapturingFrameProcessor consumes frames matching the CompositionAssetInfo, if it was played from start to finish.

This method verifies both the timing/structure of the playback (timestamps, sequence indices, EOS) and that the correct MediaItem metadata is associated with each frame.

getExpectedEvents

java-static fun getExpectedEvents(compositionAssetInfo: CompositionAssetInfo!): ImmutableList<(Mutable)List<FrameProcessorTestUtil.ExpectedFrame!>!>!

Returns the events expected to be consumed by the androidx.media3.common.video.FrameProcessor if the Composition was played from start to finish.