CustomMediaCodecVideoRenderer

open class CustomMediaCodecVideoRenderer : MediaCodecVideoRenderer

Custom MediaCodecVideoRenderer that overrides getMediaFormat in order to configure a video decoder, rendering to a surface, in such a way that causes the decoder to output "blank", i.e. black frames to the surface when stopped to clear out any previously displayed contents.

Constructors

Link copied to clipboard
constructor(context: Context, mediaCodecSelector: MediaCodecSelector)
constructor(context: Context, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long)
constructor(context: Context, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long, @Nullable eventHandler: Handler, @Nullable eventListener: VideoRendererEventListener, maxDroppedFramesToNotify: Int)
constructor(context: Context, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long, enableDecoderFallback: Boolean, @Nullable eventHandler: Handler, @Nullable eventListener: VideoRendererEventListener, maxDroppedFramesToNotify: Int)
constructor(context: Context, codecAdapterFactory: MediaCodecAdapter.Factory, mediaCodecSelector: MediaCodecSelector, allowedJoiningTimeMs: Long, enableDecoderFallback: Boolean, @Nullable eventHandler: Handler, @Nullable eventListener: VideoRendererEventListener, maxDroppedFramesToNotify: Int)
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.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val MSG_CUSTOM_BASE: Int = 10000
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val state: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val stream: SampleStream
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun create(formatSupport: Int): Int
Link copied to clipboard
fun disable()
Link copied to clipboard
fun enable(configuration: RendererConfiguration, formats: Array<Format>, stream: SampleStream, positionUs: Long, joining: Boolean, mayRenderStartOfStream: Boolean, startPositionUs: Long, offsetUs: Long)
Link copied to clipboard
open fun getAdaptiveSupport(supportFlags: Int): Int
Link copied to clipboard
fun getCapabilities(): RendererCapabilities
Link copied to clipboard
open fun getCodecMaxInputSize(codecInfo: MediaCodecInfo, format: Format): Int
Link copied to clipboard
open fun getDecoderSupport(supportFlags: Int): Int
Link copied to clipboard
open fun getFormatSupport(supportFlags: Int): Int
Link copied to clipboard
open fun getHardwareAccelerationSupport(supportFlags: Int): Int
Link copied to clipboard
open fun getMediaClock(): MediaClock
Link copied to clipboard
open fun getName(): String
Link copied to clipboard
open fun getTunnelingSupport(supportFlags: Int): Int
Link copied to clipboard
open fun handleMessage(messageType: Int, message: Any)
Link copied to clipboard
Link copied to clipboard
fun init(index: Int, playerId: PlayerId)
Link copied to clipboard
Link copied to clipboard
open fun isEnded(): Boolean
Link copied to clipboard
open fun isReady(): Boolean
Link copied to clipboard
Link copied to clipboard
fun release()
Link copied to clipboard
open fun render(positionUs: Long, elapsedRealtimeUs: Long)
Link copied to clipboard
fun replaceStream(formats: Array<Format>, stream: SampleStream, startPositionUs: Long, offsetUs: Long)
Link copied to clipboard
fun reset()
Link copied to clipboard
fun resetPosition(positionUs: Long)
Link copied to clipboard
Link copied to clipboard
fun setListener(listener: RendererCapabilities.Listener)
Link copied to clipboard
open fun setPlaybackSpeed(currentPlaybackSpeed: Float, targetPlaybackSpeed: Float)
Link copied to clipboard
open fun setRenderTimeLimitMs(renderTimeLimitMs: Long)
Link copied to clipboard
fun start()
Link copied to clipboard
fun stop()