VideoRendererEventListener.EventDispatcher


class VideoRendererEventListener.EventDispatcher


Dispatches events to a VideoRendererEventListener.

Summary

Public constructors

Public functions

Unit
decoderInitialized(
    decoderName: String!,
    initializedTimestampMs: Long,
    initializationDurationMs: Long
)

Invokes onVideoDecoderInitialized.

Unit
decoderReleased(decoderName: String!)

Invokes onVideoDecoderReleased.

Unit

Invokes onVideoDisabled.

Unit
droppedFrames(droppedFrameCount: Int, elapsedMs: Long)

Invokes onDroppedFrames.

Unit
enabled(decoderCounters: DecoderCounters!)

Invokes onVideoEnabled.

Unit
inputFormatChanged(
    format: Format!,
    decoderReuseEvaluation: DecoderReuseEvaluation?
)

Invokes onVideoInputFormatChanged.

Unit

Invokes onRenderedFirstFrame.

Unit
reportVideoFrameProcessingOffset(
    totalProcessingOffsetUs: Long,
    frameCount: Int
)

Invokes onVideoFrameProcessingOffset.

Unit
videoCodecError(videoCodecError: Exception!)

Invokes onVideoCodecError.

Unit

Invokes onVideoSizeChanged.

Public constructors

EventDispatcher

EventDispatcher(handler: Handler?, listener: VideoRendererEventListener?)
Parameters
handler: Handler?

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

listener: VideoRendererEventListener?

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

Public functions

decoderInitialized

fun decoderInitialized(
    decoderName: String!,
    initializedTimestampMs: Long,
    initializationDurationMs: Long
): Unit

Invokes onVideoDecoderInitialized.

decoderReleased

fun decoderReleased(decoderName: String!): Unit

Invokes onVideoDecoderReleased.

disabled

fun disabled(counters: DecoderCounters!): Unit

Invokes onVideoDisabled.

droppedFrames

fun droppedFrames(droppedFrameCount: Int, elapsedMs: Long): Unit

Invokes onDroppedFrames.

enabled

fun enabled(decoderCounters: DecoderCounters!): Unit

Invokes onVideoEnabled.

inputFormatChanged

fun inputFormatChanged(
    format: Format!,
    decoderReuseEvaluation: DecoderReuseEvaluation?
): Unit

Invokes onVideoInputFormatChanged.

renderedFirstFrame

fun renderedFirstFrame(output: Any!): Unit

Invokes onRenderedFirstFrame.

reportVideoFrameProcessingOffset

fun reportVideoFrameProcessingOffset(
    totalProcessingOffsetUs: Long,
    frameCount: Int
): Unit

Invokes onVideoFrameProcessingOffset.

videoCodecError

fun videoCodecError(videoCodecError: Exception!): Unit

Invokes onVideoCodecError.

videoSizeChanged

fun videoSizeChanged(videoSize: VideoSize!): Unit

Invokes onVideoSizeChanged.