CustomMediaCodecVideoRenderer

constructor(context: Context, mediaCodecSelector: MediaCodecSelector)

Parameters

context

A context.

mediaCodecSelector

A decoder selector.


constructor(context: Context, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long)

Parameters

context

A context.

mediaCodecSelector

A decoder selector.

allowedJoiningTimeMs

The maximum duration in milliseconds for which this video renderer can attempt to seamlessly join an ongoing playback.


constructor(context: Context, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long, @Nullable eventHandler: Handler, @Nullable eventListener: VideoRendererEventListener, maxDroppedFramesToNotify: Int)

Parameters

context

A context.

mediaCodecSelector

A decoder selector.

allowedJoiningTimeMs

The maximum duration in milliseconds for which this video renderer can attempt to seamlessly join an ongoing playback.

eventHandler

A handler to use when delivering events to eventListener. May be null if delivery of events is not required.

eventListener

A listener of events. May be null if delivery of events is not required.

maxDroppedFramesToNotify

The maximum number of frames that can be dropped between invocations of onDroppedFrames.


constructor(context: Context, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long, enableDecoderFallback: Boolean, @Nullable eventHandler: Handler, @Nullable eventListener: VideoRendererEventListener, maxDroppedFramesToNotify: Int)

Parameters

context

A context.

mediaCodecSelector

A decoder selector.

allowedJoiningTimeMs

The maximum duration in milliseconds for which this video renderer can attempt to seamlessly join an ongoing playback.

enableDecoderFallback

Whether to enable fallback to lower-priority decoders if decoder initialization fails. This may result in using a decoder that is slower/less efficient than the primary decoder.

eventHandler

A handler to use when delivering events to eventListener. May be null if delivery of events is not required.

eventListener

A listener of events. May be null if delivery of events is not required.

maxDroppedFramesToNotify

The maximum number of frames that can be dropped between invocations of onDroppedFrames.


constructor(context: Context, codecAdapterFactory: MediaCodecAdapter.Factory, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long, enableDecoderFallback: Boolean, @Nullable eventHandler: Handler, @Nullable eventListener: VideoRendererEventListener, maxDroppedFramesToNotify: Int)

Parameters

context

A context.

codecAdapterFactory

The MediaCodecAdapter.Factory used to create instances.

mediaCodecSelector

A decoder selector.

allowedJoiningTimeMs

The maximum duration in milliseconds for which this video renderer can attempt to seamlessly join an ongoing playback.

enableDecoderFallback

Whether to enable fallback to lower-priority decoders if decoder initialization fails. This may result in using a decoder that is slower/less efficient than the primary decoder.

eventHandler

A handler to use when delivering events to eventListener. May be null if delivery of events is not required.

eventListener

A listener of events. May be null if delivery of events is not required.

maxDroppedFramesToNotify

The maximum number of frames that can be dropped between invocations of onDroppedFrames.


constructor(context: Context, codecAdapterFactory: MediaCodecAdapter.Factory, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long, enableDecoderFallback: Boolean, @Nullable eventHandler: Handler, @Nullable eventListener: VideoRendererEventListener, maxDroppedFramesToNotify: Int, assumedMinimumCodecOperatingRate: Float)

Creates a new instance.

Parameters

context

A context.

codecAdapterFactory

The MediaCodecAdapter.Factory used to create instances.

mediaCodecSelector

A decoder selector.

allowedJoiningTimeMs

The maximum duration in milliseconds for which this video renderer can attempt to seamlessly join an ongoing playback.

enableDecoderFallback

Whether to enable fallback to lower-priority decoders if decoder initialization fails. This may result in using a decoder that is slower/less efficient than the primary decoder.

eventHandler

A handler to use when delivering events to eventListener. May be null if delivery of events is not required.

eventListener

A listener of events. May be null if delivery of events is not required.

maxDroppedFramesToNotify

The maximum number of frames that can be dropped between invocations of onDroppedFrames.

assumedMinimumCodecOperatingRate

A codec operating rate that all codecs instantiated by this renderer are assumed to meet implicitly (i.e. without the operating rate being set explicitly using KEY_OPERATING_RATE).