RenderersFactory


@UnstableApi
public interface RenderersFactory

Known direct subclasses
CapturingRenderersFactory

A RenderersFactory that captures interactions with the audio and video instances and ImageOutput instances.

DefaultRenderersFactory

Default RenderersFactory implementation.


Builds Renderer instances for use by an ExoPlayer.

Summary

Public methods

abstract Renderer[]
createRenderers(
    Handler eventHandler,
    VideoRendererEventListener videoRendererEventListener,
    AudioRendererEventListener audioRendererEventListener,
    TextOutput textRendererOutput,
    MetadataOutput metadataRendererOutput
)

Builds the Renderer instances for an ExoPlayer.

default @Nullable Renderer
createSecondaryRenderer(
    Renderer renderer,
    Handler eventHandler,
    VideoRendererEventListener videoRendererEventListener,
    AudioRendererEventListener audioRendererEventListener,
    TextOutput textRendererOutput,
    MetadataOutput metadataRendererOutput
)

Provides a secondary Renderer instance for an ExoPlayer to use for pre-warming.

Public methods

createRenderers

abstract Renderer[] createRenderers(
    Handler eventHandler,
    VideoRendererEventListener videoRendererEventListener,
    AudioRendererEventListener audioRendererEventListener,
    TextOutput textRendererOutput,
    MetadataOutput metadataRendererOutput
)

Builds the Renderer instances for an ExoPlayer.

Parameters
Handler eventHandler

A handler to use when invoking event listeners and outputs.

VideoRendererEventListener videoRendererEventListener

An event listener for video renderers.

AudioRendererEventListener audioRendererEventListener

An event listener for audio renderers.

TextOutput textRendererOutput

An output for text renderers.

MetadataOutput metadataRendererOutput

An output for metadata renderers.

Returns
Renderer[]

The instances.

createSecondaryRenderer

default @Nullable Renderer createSecondaryRenderer(
    Renderer renderer,
    Handler eventHandler,
    VideoRendererEventListener videoRendererEventListener,
    AudioRendererEventListener audioRendererEventListener,
    TextOutput textRendererOutput,
    MetadataOutput metadataRendererOutput
)

Provides a secondary Renderer instance for an ExoPlayer to use for pre-warming.

The created secondary Renderer should match its primary in its reported track type support and RendererCapabilities.

Parameters
Renderer renderer

The primary Renderer for which to create the backup.

Handler eventHandler

A handler to use when invoking event listeners and outputs.

VideoRendererEventListener videoRendererEventListener

An event listener for video renderers.

AudioRendererEventListener audioRendererEventListener

An event listener for audio renderers.

TextOutput textRendererOutput

An output for text renderers.

MetadataOutput metadataRendererOutput

An output for metadata renderers.

Returns
@Nullable Renderer

The instances.