RendererCommon

tee3.webrtc

## 类 RendererCommon

- java.lang.Object
- - tee3.webrtc.RendererCommon

-     public class RendererCommon
      extends java.lang.Object

  Static helper functions for renderer implementations.

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `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.

  - ### 构造器概要

    构造器
    构造器和说明
    `RendererCommon()`

  - ### 方法概要

    所有方法 静态方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `static float[]` | `convertMatrixFromAndroidGraphicsMatrix(android.graphics.Matrix matrix)` Converts android.graphics.Matrix to a float[16] matrix array.
    `static android.graphics.Matrix` | `convertMatrixToAndroidGraphicsMatrix(float[] matrix4x4)` Converts a float[16] matrix array to android.graphics.Matrix.
    `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()`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### RendererCommon

          public RendererCommon()

  - ### 方法详细资料

    - #### identityMatrix

          public static final float[] identityMatrix()

    - #### verticalFlipMatrix

          public static final float[] verticalFlipMatrix()

    - #### horizontalFlipMatrix

          public static final float[] horizontalFlipMatrix()

    - #### rotateTextureMatrix

          public static float[] rotateTextureMatrix(float[] textureMatrix,
                                                    float rotationDegree)

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

    - #### multiplyMatrices

          public static float[] multiplyMatrices(float[] a,
                                                 float[] b)

      Returns new matrix with the result of a * b.

    - #### getLayoutMatrix

          public 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.

    - #### convertMatrixToAndroidGraphicsMatrix

          public static android.graphics.Matrix convertMatrixToAndroidGraphicsMatrix(float[] matrix4x4)

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

    - #### convertMatrixFromAndroidGraphicsMatrix

          public static float[] convertMatrixFromAndroidGraphicsMatrix(android.graphics.Matrix matrix)

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

    - #### getDisplaySize

          public 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.