public class RendererCommon
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
RendererCommon.GlDrawer
Interface for rendering frames on an EGLSurface.
|
static interface |
RendererCommon.RendererEvents
Interface for reporting rendering events.
|
static class |
RendererCommon.ScalingType |
static class |
RendererCommon.VideoLayoutMeasure
Helper class for determining layout size based on layout requirements, scaling type, and video
aspect ratio.
|
static class |
RendererCommon.YuvUploader
Helper class for uploading YUV bytebuffer frames to textures that handles stride > width.
|
Constructor and Description |
---|
RendererCommon() |
Modifier and Type | Method and Description |
---|---|
static android.graphics.Point |
getDisplaySize(RendererCommon.ScalingType scalingType,
float videoAspectRatio,
int maxDisplayWidth,
int maxDisplayHeight)
Calculate display size based on scaling type, video aspect ratio, and maximum display size.
|
static float[] |
getLayoutMatrix(boolean mirror,
float videoAspectRatio,
float displayAspectRatio)
Returns layout transformation matrix that applies an optional mirror effect and compensates
for video vs display aspect ratio.
|
static float[] |
horizontalFlipMatrix() |
static float[] |
identityMatrix() |
static float[] |
multiplyMatrices(float[] a,
float[] b)
Returns new matrix with the result of a * b.
|
static float[] |
rotateTextureMatrix(float[] textureMatrix,
float rotationDegree)
Returns texture matrix that will have the effect of rotating the frame |rotationDegree|
clockwise when rendered.
|
static float[] |
verticalFlipMatrix() |
public static final float[] identityMatrix()
public static final float[] verticalFlipMatrix()
public static final float[] horizontalFlipMatrix()
public static float[] rotateTextureMatrix(float[] textureMatrix, float rotationDegree)
public static float[] multiplyMatrices(float[] a, float[] b)
public static float[] getLayoutMatrix(boolean mirror, float videoAspectRatio, float displayAspectRatio)
public static android.graphics.Point getDisplaySize(RendererCommon.ScalingType scalingType, float videoAspectRatio, int maxDisplayWidth, int maxDisplayHeight)