Package tvi.webrtc
Class VideoFrameDrawer
java.lang.Object
tvi.webrtc.VideoFrameDrawer
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.prepareBufferForViewportSize
(VideoFrame.Buffer buffer, int width, int height) void
release()
-
Field Details
-
TAG
- See Also:
-
-
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
-
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()
-