Package tvi.webrtc
Class VideoFrameDrawer
- java.lang.Object
-
- tvi.webrtc.VideoFrameDrawer
-
public class VideoFrameDrawer extends java.lang.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 Summary
Fields Modifier and Type Field Description static java.lang.String
TAG
-
Constructor Summary
Constructors Constructor Description VideoFrameDrawer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
drawFrame(VideoFrame frame, RendererCommon.GlDrawer drawer)
void
drawFrame(VideoFrame frame, RendererCommon.GlDrawer drawer, android.graphics.Matrix additionalRenderMatrix)
void
drawFrame(VideoFrame frame, RendererCommon.GlDrawer drawer, android.graphics.Matrix additionalRenderMatrix, int viewportX, int viewportY, int viewportWidth, int viewportHeight)
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.VideoFrame.Buffer
prepareBufferForViewportSize(VideoFrame.Buffer buffer, int width, int height)
void
release()
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
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()
-
-