VideoRendererEventListener.EventDispatcher


public final class VideoRendererEventListener.EventDispatcher


Dispatches events to a VideoRendererEventListener.

Summary

Public constructors

Public methods

void
decoderInitialized(
    String decoderName,
    long initializedTimestampMs,
    long initializationDurationMs
)

Invokes onVideoDecoderInitialized.

void
decoderReleased(String decoderName)

Invokes onVideoDecoderReleased.

void

Invokes onVideoDisabled.

void
droppedFrames(int droppedFrameCount, long elapsedMs)

Invokes onDroppedFrames.

void
enabled(DecoderCounters decoderCounters)

Invokes onVideoEnabled.

void
inputFormatChanged(
    Format format,
    @Nullable DecoderReuseEvaluation decoderReuseEvaluation
)

Invokes onVideoInputFormatChanged.

void

Invokes onRenderedFirstFrame.

void
reportVideoFrameProcessingOffset(
    long totalProcessingOffsetUs,
    int frameCount
)

Invokes onVideoFrameProcessingOffset.

void
videoCodecError(Exception videoCodecError)

Invokes onVideoCodecError.

void

Invokes onVideoSizeChanged.

Public constructors

EventDispatcher

public EventDispatcher(
    @Nullable Handler handler,
    @Nullable VideoRendererEventListener listener
)
Parameters
@Nullable Handler handler

A handler for dispatching events, or null if events should not be dispatched.

@Nullable VideoRendererEventListener listener

The listener to which events should be dispatched, or null if events should not be dispatched.

Public methods

decoderInitialized

public void decoderInitialized(
    String decoderName,
    long initializedTimestampMs,
    long initializationDurationMs
)

Invokes onVideoDecoderInitialized.

decoderReleased

public void decoderReleased(String decoderName)

Invokes onVideoDecoderReleased.

disabled

public void disabled(DecoderCounters counters)

Invokes onVideoDisabled.

droppedFrames

public void droppedFrames(int droppedFrameCount, long elapsedMs)

Invokes onDroppedFrames.

enabled

public void enabled(DecoderCounters decoderCounters)

Invokes onVideoEnabled.

inputFormatChanged

public void inputFormatChanged(
    Format format,
    @Nullable DecoderReuseEvaluation decoderReuseEvaluation
)

Invokes onVideoInputFormatChanged.

renderedFirstFrame

public void renderedFirstFrame(Object output)

Invokes onRenderedFirstFrame.

reportVideoFrameProcessingOffset

public void reportVideoFrameProcessingOffset(
    long totalProcessingOffsetUs,
    int frameCount
)

Invokes onVideoFrameProcessingOffset.

videoCodecError

public void videoCodecError(Exception videoCodecError)

Invokes onVideoCodecError.

videoSizeChanged

public void videoSizeChanged(VideoSize videoSize)

Invokes onVideoSizeChanged.