AndroidPlayerViewRenderer

A renderer that can follow the SurfaceView owned by KitePlayerView.

The view owns the android.view.Surface and the renderer must not release it. Passing null fences use of the previous Surface with a bounded wait; an unfinished draw must be reported as a failure. Every call comes from the main thread, so an implementation must never wait on work that needs that thread, and should not wait at all for a non-null Surface.

The view gives the size of its subtitle layer through setViewport. Report that size as outputSize, so the engine lays the subtitles out for the layer: docs/subtitle-placement.md.

Properties

Link copied to clipboard
abstract val events: Flow<RendererEvent>
Link copied to clipboard
abstract val failedFrames: Long

Frames that could not be displayed for a reason other than supersession.

Link copied to clipboard
Link copied to clipboard
abstract val presentedFrames: Long

Frames that reached the platform display.

Link copied to clipboard
Link copied to clipboard
open val showsHdr: Boolean
Link copied to clipboard
abstract val supersededFrames: Long

Frames replaced by a newer frame before they reached the display.

Functions

Link copied to clipboard
open fun accepts(shape: FrameShape): Boolean
Link copied to clipboard
open fun clearPicture()
Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract suspend fun present(frame: VideoFrame, targetNanos: Long): Boolean
Link copied to clipboard
open fun setAdjustments(adjustments: VideoAdjustments)
Link copied to clipboard
open fun setDisplayHdr(types: IntArray, headroom: Float)

What the display this view sits on can show of HDR, fed by the view: the Display.HdrCapabilities types it supports, such as HDR_TYPE_HDR10 and HDR_TYPE_HLG, and how far beyond standard white it goes now, or 1 when unknown. Default: ignored, for renderers that report nothing about HDR.

Link copied to clipboard

The refresh rate of the display this view sits on, fed by the view because a Surface does not know its display. 0 means unknown. Default: ignored, for renderers that do not pace.

Link copied to clipboard
open fun setHdrPolicy(policy: HdrPolicy)
Link copied to clipboard
abstract suspend fun setOverlay(overlay: SubtitleOverlay?)
Link copied to clipboard
open fun setRenderQuality(quality: RenderQuality)
Link copied to clipboard
open fun setScaleMode(mode: VideoScale)
Link copied to clipboard
abstract fun setSurface(surface: Surface?)
Link copied to clipboard
open fun setTransform(transform: VideoTransform)
Link copied to clipboard
abstract fun setViewport(width: Int, height: Int, scale: Float)
Link copied to clipboard
Link copied to clipboard
abstract fun supports(format: PlayerPixelFormat): Boolean
Link copied to clipboard
Link copied to clipboard
abstract fun vsyncIntervalNanos(): Long?