Agora Java API Reference for Android
Classes | Static Public Member Functions | List of all members
io.agora.rtc.gl.RendererCommon Class Reference

Classes

interface  GlDrawer
 
interface  RendererEvents
 
enum  ScalingType
 
class  VideoLayoutMeasure
 

Static Public Member Functions

static final float [] identityMatrix ()
 
static final float [] verticalFlipMatrix ()
 
static final float [] horizontalFlipMatrix ()
 
static float [] rotateTextureMatrix (float[] textureMatrix, float rotationDegree)
 
static float [] multiplyMatrices (float[] a, float[] b)
 
static float [] getLayoutMatrix (boolean mirror, float videoAspectRatio, float displayAspectRatio)
 
static android.graphics.Matrix convertMatrixToAndroidGraphicsMatrix (float[] matrix4x4)
 
static float [] convertMatrixFromAndroidGraphicsMatrix (android.graphics.Matrix matrix)
 
static Point getDisplaySize (ScalingType scalingType, float videoAspectRatio, int maxDisplayWidth, int maxDisplayHeight)
 

Detailed Description

Static helper functions for renderer implementations.

Member Function Documentation

◆ rotateTextureMatrix()

static float [] io.agora.rtc.gl.RendererCommon.rotateTextureMatrix ( float []  textureMatrix,
float  rotationDegree 
)
static

Returns texture matrix that will have the effect of rotating the frame |rotationDegree| clockwise when rendered.

◆ multiplyMatrices()

static float [] io.agora.rtc.gl.RendererCommon.multiplyMatrices ( float []  a,
float []  b 
)
static

Returns new matrix with the result of a * b.

◆ getLayoutMatrix()

static float [] io.agora.rtc.gl.RendererCommon.getLayoutMatrix ( boolean  mirror,
float  videoAspectRatio,
float  displayAspectRatio 
)
static

Returns layout transformation matrix that applies an optional mirror effect and compensates for video vs display aspect ratio.

◆ convertMatrixToAndroidGraphicsMatrix()

static android.graphics.Matrix io.agora.rtc.gl.RendererCommon.convertMatrixToAndroidGraphicsMatrix ( float []  matrix4x4)
static

Converts a float[16] matrix array to android.graphics.Matrix.

◆ convertMatrixFromAndroidGraphicsMatrix()

static float [] io.agora.rtc.gl.RendererCommon.convertMatrixFromAndroidGraphicsMatrix ( android.graphics.Matrix  matrix)
static

Converts android.graphics.Matrix to a float[16] matrix array.

◆ getDisplaySize()

static Point io.agora.rtc.gl.RendererCommon.getDisplaySize ( ScalingType  scalingType,
float  videoAspectRatio,
int  maxDisplayWidth,
int  maxDisplayHeight 
)
static

Calculate display size based on scaling type, video aspect ratio, and maximum display size.