Package tvi.webrtc

Class GlRectDrawer

  • All Implemented Interfaces:
    RendererCommon.GlDrawer

    public class GlRectDrawer
    extends java.lang.Object
    Simplest possible GL shader that just draws frames as opaque quads.
    • Constructor Summary

      Constructors 
      Constructor Description
      GlRectDrawer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void drawOes​(int oesTextureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
      Draw an OES texture frame with specified texture transformation matrix.
      void drawRgb​(int textureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
      Draw a RGB(A) texture frame with specified texture transformation matrix.
      void drawYuv​(int[] yuvTextures, float[] texMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
      Draw a YUV frame with specified texture transformation matrix.
      void release()
      Release all GLES resources.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GlRectDrawer

        public GlRectDrawer()
    • Method Detail

      • drawOes

        public void drawOes​(int oesTextureId,
                            float[] texMatrix,
                            int frameWidth,
                            int frameHeight,
                            int viewportX,
                            int viewportY,
                            int viewportWidth,
                            int viewportHeight)
        Draw an OES texture frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.
        Specified by:
        drawOes in interface RendererCommon.GlDrawer
      • drawRgb

        public void drawRgb​(int textureId,
                            float[] texMatrix,
                            int frameWidth,
                            int frameHeight,
                            int viewportX,
                            int viewportY,
                            int viewportWidth,
                            int viewportHeight)
        Draw a RGB(A) texture frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.
        Specified by:
        drawRgb in interface RendererCommon.GlDrawer
      • drawYuv

        public void drawYuv​(int[] yuvTextures,
                            float[] texMatrix,
                            int frameWidth,
                            int frameHeight,
                            int viewportX,
                            int viewportY,
                            int viewportWidth,
                            int viewportHeight)
        Draw a YUV frame with specified texture transformation matrix. Required resources are allocated at the first call to this function.
        Specified by:
        drawYuv in interface RendererCommon.GlDrawer
      • release

        public void release()
        Release all GLES resources. This needs to be done manually, otherwise the resources are leaked.
        Specified by:
        release in interface RendererCommon.GlDrawer