Package tvi.webrtc

Interface RendererCommon.GlDrawer

All Known Implementing Classes:
GlRectDrawer
Enclosing class:
RendererCommon

public static interface RendererCommon.GlDrawer
Interface for rendering frames on an EGLSurface with specified viewport location. Rotation, mirror, and cropping is specified using a 4x4 texture coordinate transform matrix. The frame input can either be an OES texture, RGB texture, or YUV textures in I420 format. The function release() must be called manually to free the resources held by this object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    drawOes(int oesTextureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
    Functions for drawing frames with different sources.
    void
    drawRgb(int textureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
     
    void
    drawYuv(int[] yuvTextures, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
     
    void
    Release all GL resources.
  • Method Details

    • drawOes

      void drawOes(int oesTextureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
      Functions for drawing frames with different sources. The rendering surface target is implied by the current EGL context of the calling thread and requires no explicit argument. The coordinates specify the viewport location on the surface target.
    • drawRgb

      void drawRgb(int textureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
    • drawYuv

      void drawYuv(int[] yuvTextures, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
    • release

      void release()
      Release all GL resources. This needs to be done manually, otherwise resources may leak.