Package tvi.webrtc

Class VideoFrameDrawer

java.lang.Object
tvi.webrtc.VideoFrameDrawer

public class VideoFrameDrawer extends Object
Helper class to draw VideoFrames. Calls either drawer.drawOes, drawer.drawRgb, or drawer.drawYuv depending on the type of the buffer. The frame will be rendered with rotation taken into account. You can supply an additional render matrix for custom transformations.
  • Field Details

  • Constructor Details

    • VideoFrameDrawer

      public VideoFrameDrawer()
  • Method Details

    • drawTexture

      public static void drawTexture(RendererCommon.GlDrawer drawer, VideoFrame.TextureBuffer buffer, android.graphics.Matrix renderMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
      Draws a VideoFrame.TextureBuffer. Calls either drawer.drawOes or drawer.drawRgb depending on the type of the buffer. You can supply an additional render matrix. This is used multiplied together with the transformation matrix of the frame. (M = renderMatrix * transformationMatrix)
    • drawFrame

      public void drawFrame(VideoFrame frame, RendererCommon.GlDrawer drawer)
    • drawFrame

      public void drawFrame(VideoFrame frame, RendererCommon.GlDrawer drawer, android.graphics.Matrix additionalRenderMatrix)
    • drawFrame

      public void drawFrame(VideoFrame frame, RendererCommon.GlDrawer drawer, @Nullable android.graphics.Matrix additionalRenderMatrix, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
    • prepareBufferForViewportSize

      public VideoFrame.Buffer prepareBufferForViewportSize(VideoFrame.Buffer buffer, int width, int height)
    • release

      public void release()