@UnstableApi
public final class PlaybackOutput implements Dumper.Dumpable


Class to capture output from a playback test.

Implements Dumper.Dumpable so the output can be easily dumped to a string for comparison against previous test runs.

Summary

Public methods

void
dump(Dumper dumper)

Dumps the fields of the object using the dumper.

static PlaybackOutput
register(
    ExoPlayer player,
    CapturingRenderersFactory capturingRenderersFactory
)

Create an instance that captures the metadata and text output from player and the audio and video output via capturingRenderersFactory.

Public methods

dump

public void dump(Dumper dumper)

Dumps the fields of the object using the dumper.

Parameters
Dumper dumper

The Dumper to be used to dump fields.

register

public static PlaybackOutput register(
    ExoPlayer player,
    CapturingRenderersFactory capturingRenderersFactory
)

Create an instance that captures the metadata and text output from player and the audio and video output via capturingRenderersFactory.

Must be called before playback to ensure metadata and text output is captured correctly.

Parameters
ExoPlayer player

The ExoPlayer to capture metadata and text output from.

CapturingRenderersFactory capturingRenderersFactory

The CapturingRenderersFactory to capture audio and video output from.

Returns
PlaybackOutput

A new instance that can be used to dump the playback output.