RendererCommon

open class RendererCommon

Static helper functions for renderer implementations.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
interface GlDrawer
Interface for rendering frames on an EGLSurface with specified viewport location.
Link copied to clipboard
interface RendererEvents
Interface for reporting rendering events.
Link copied to clipboard
Link copied to clipboard
Helper class for determining layout size based on layout requirements, scaling type, and video aspect ratio.

Functions

Link copied to clipboard
Converts android.graphics.Matrix to a float[16] matrix array.
Link copied to clipboard
Converts a float[16] matrix array to android.graphics.Matrix.
Link copied to clipboard
open fun getDisplaySize(minVisibleFraction: Float, videoAspectRatio: Float, maxDisplayWidth: Int, maxDisplayHeight: Int): Point
Calculate display size based on minimum fraction of the video that must remain visible, video aspect ratio, and maximum display size.
open fun getDisplaySize(scalingType: RendererCommon.ScalingType, videoAspectRatio: Float, maxDisplayWidth: Int, maxDisplayHeight: Int): Point
Calculate display size based on scaling type, video aspect ratio, and maximum display size.
Link copied to clipboard
open fun getLayoutMatrix(mirror: Boolean, videoAspectRatio: Float, displayAspectRatio: Float): Array<Float>
Returns layout transformation matrix that applies an optional mirror effect and compensates for video vs display aspect ratio.